diff --git a/agent/addons/addons_test.go b/agent/addons/addons_test.go index 4f96fdba189..61c3f6e830c 100644 --- a/agent/addons/addons_test.go +++ b/agent/addons/addons_test.go @@ -147,8 +147,9 @@ func (s *registerSuite) TestRegisterEngineMetrics(c *gc.C) { registry := NewMockRegisterer(ctrl) registry.EXPECT().Register(collector) - registry.EXPECT().Unregister(collector).Do(func(_ prometheus.Collector) { + registry.EXPECT().Unregister(collector).Do(func(_ prometheus.Collector) bool { close(done) + return false }) sink := NewMockMetricSink(ctrl) sink.EXPECT().Unregister() diff --git a/agent/addons/engine_mock_test.go b/agent/addons/engine_mock_test.go index 708a1006775..7c040fea5e4 100644 --- a/agent/addons/engine_mock_test.go +++ b/agent/addons/engine_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package addons_test -destination engine_mock_test.go github.com/juju/juju/agent/engine MetricSink +// mockgen -typed -package addons_test -destination engine_mock_test.go github.com/juju/juju/agent/engine MetricSink // // Package addons_test is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockMetricSink) RecordStart(arg0 string) { } // RecordStart indicates an expected call of RecordStart. -func (mr *MockMetricSinkMockRecorder) RecordStart(arg0 any) *gomock.Call { +func (mr *MockMetricSinkMockRecorder) RecordStart(arg0 any) *MockMetricSinkRecordStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordStart", reflect.TypeOf((*MockMetricSink)(nil).RecordStart), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordStart", reflect.TypeOf((*MockMetricSink)(nil).RecordStart), arg0) + return &MockMetricSinkRecordStartCall{Call: call} +} + +// MockMetricSinkRecordStartCall wrap *gomock.Call +type MockMetricSinkRecordStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricSinkRecordStartCall) Return() *MockMetricSinkRecordStartCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricSinkRecordStartCall) Do(f func(string)) *MockMetricSinkRecordStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricSinkRecordStartCall) DoAndReturn(f func(string)) *MockMetricSinkRecordStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unregister mocks base method. @@ -59,7 +83,31 @@ func (m *MockMetricSink) Unregister() bool { } // Unregister indicates an expected call of Unregister. -func (mr *MockMetricSinkMockRecorder) Unregister() *gomock.Call { +func (mr *MockMetricSinkMockRecorder) Unregister() *MockMetricSinkUnregisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockMetricSink)(nil).Unregister)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockMetricSink)(nil).Unregister)) + return &MockMetricSinkUnregisterCall{Call: call} +} + +// MockMetricSinkUnregisterCall wrap *gomock.Call +type MockMetricSinkUnregisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricSinkUnregisterCall) Return(arg0 bool) *MockMetricSinkUnregisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricSinkUnregisterCall) Do(f func() bool) *MockMetricSinkUnregisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricSinkUnregisterCall) DoAndReturn(f func() bool) *MockMetricSinkUnregisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/agent/addons/package_test.go b/agent/addons/package_test.go index 6a6a01d9035..e38c2890abe 100644 --- a/agent/addons/package_test.go +++ b/agent/addons/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer -//go:generate go run go.uber.org/mock/mockgen -package addons_test -destination engine_mock_test.go github.com/juju/juju/agent/engine MetricSink +//go:generate go run go.uber.org/mock/mockgen -typed -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +//go:generate go run go.uber.org/mock/mockgen -typed -package addons_test -destination engine_mock_test.go github.com/juju/juju/agent/engine MetricSink func Test(t *testing.T) { gc.TestingT(t) diff --git a/agent/addons/prometheus_mock_test.go b/agent/addons/prometheus_mock_test.go index 4c95982e3cc..2ec99d710d3 100644 --- a/agent/addons/prometheus_mock_test.go +++ b/agent/addons/prometheus_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +// mockgen -typed -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer // // Package addons_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRegisterer) MustRegister(arg0 ...prometheus.Collector) { } // MustRegister indicates an expected call of MustRegister. -func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *gomock.Call { +func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *MockRegistererMustRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + return &MockRegistererMustRegisterCall{Call: call} +} + +// MockRegistererMustRegisterCall wrap *gomock.Call +type MockRegistererMustRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererMustRegisterCall) Return() *MockRegistererMustRegisterCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererMustRegisterCall) Do(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererMustRegisterCall) DoAndReturn(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockRegisterer) Register(arg0 prometheus.Collector) error { } // Register indicates an expected call of Register. -func (mr *MockRegistererMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Register(arg0 any) *MockRegistererRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + return &MockRegistererRegisterCall{Call: call} +} + +// MockRegistererRegisterCall wrap *gomock.Call +type MockRegistererRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererRegisterCall) Return(arg0 error) *MockRegistererRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererRegisterCall) Do(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererRegisterCall) DoAndReturn(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unregister mocks base method. @@ -78,7 +126,31 @@ func (m *MockRegisterer) Unregister(arg0 prometheus.Collector) bool { } // Unregister indicates an expected call of Unregister. -func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *MockRegistererUnregisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + return &MockRegistererUnregisterCall{Call: call} +} + +// MockRegistererUnregisterCall wrap *gomock.Call +type MockRegistererUnregisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererUnregisterCall) Return(arg0 bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererUnregisterCall) Do(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererUnregisterCall) DoAndReturn(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/instancemutater/mocks/caller_mock.go b/api/agent/instancemutater/mocks/caller_mock.go index d2ef44262dd..58b157e9637 100644 --- a/api/agent/instancemutater/mocks/caller_mock.go +++ b/api/agent/instancemutater/mocks/caller_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller +// mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,9 +324,33 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFacadeCaller is a mock of FacadeCaller interface. @@ -193,9 +385,33 @@ func (m *MockFacadeCaller) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *MockFacadeCallerBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + return &MockFacadeCallerBestAPIVersionCall{Call: call} +} + +// MockFacadeCallerBestAPIVersionCall wrap *gomock.Call +type MockFacadeCallerBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerBestAPIVersionCall) Return(arg0 int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerBestAPIVersionCall) Do(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerBestAPIVersionCall) DoAndReturn(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FacadeCall mocks base method. @@ -207,9 +423,33 @@ func (m *MockFacadeCaller) FacadeCall(arg0 context.Context, arg1 string, arg2, a } // FacadeCall indicates an expected call of FacadeCall. -func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *MockFacadeCallerFacadeCallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + return &MockFacadeCallerFacadeCallCall{Call: call} +} + +// MockFacadeCallerFacadeCallCall wrap *gomock.Call +type MockFacadeCallerFacadeCallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerFacadeCallCall) Return(arg0 error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerFacadeCallCall) Do(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerFacadeCallCall) DoAndReturn(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -221,9 +461,33 @@ func (m *MockFacadeCaller) Name() string { } // Name indicates an expected call of Name. -func (mr *MockFacadeCallerMockRecorder) Name() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) Name() *MockFacadeCallerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + return &MockFacadeCallerNameCall{Call: call} +} + +// MockFacadeCallerNameCall wrap *gomock.Call +type MockFacadeCallerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerNameCall) Return(arg0 string) *MockFacadeCallerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerNameCall) Do(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerNameCall) DoAndReturn(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawAPICaller mocks base method. @@ -235,7 +499,31 @@ func (m *MockFacadeCaller) RawAPICaller() base.APICaller { } // RawAPICaller indicates an expected call of RawAPICaller. -func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *MockFacadeCallerRawAPICallerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + return &MockFacadeCallerRawAPICallerCall{Call: call} +} + +// MockFacadeCallerRawAPICallerCall wrap *gomock.Call +type MockFacadeCallerRawAPICallerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerRawAPICallerCall) Return(arg0 base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerRawAPICallerCall) Do(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerRawAPICallerCall) DoAndReturn(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/instancemutater/mocks/machinemutater_mock.go b/api/agent/instancemutater/mocks/machinemutater_mock.go index dc34e4ab668..0ebb0cbd4d2 100644 --- a/api/agent/instancemutater/mocks/machinemutater_mock.go +++ b/api/agent/instancemutater/mocks/machinemutater_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine +// mockgen -typed -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockMutaterMachine) CharmProfilingInfo(arg0 context.Context) (*instance } // CharmProfilingInfo indicates an expected call of CharmProfilingInfo. -func (mr *MockMutaterMachineMockRecorder) CharmProfilingInfo(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) CharmProfilingInfo(arg0 any) *MockMutaterMachineCharmProfilingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfilingInfo", reflect.TypeOf((*MockMutaterMachine)(nil).CharmProfilingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfilingInfo", reflect.TypeOf((*MockMutaterMachine)(nil).CharmProfilingInfo), arg0) + return &MockMutaterMachineCharmProfilingInfoCall{Call: call} +} + +// MockMutaterMachineCharmProfilingInfoCall wrap *gomock.Call +type MockMutaterMachineCharmProfilingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineCharmProfilingInfoCall) Return(arg0 *instancemutater.UnitProfileInfo, arg1 error) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineCharmProfilingInfoCall) Do(f func(context.Context) (*instancemutater.UnitProfileInfo, error)) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineCharmProfilingInfoCall) DoAndReturn(f func(context.Context) (*instancemutater.UnitProfileInfo, error)) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -70,9 +94,33 @@ func (m *MockMutaterMachine) ContainerType(arg0 context.Context) (instance.Conta } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMutaterMachineMockRecorder) ContainerType(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) ContainerType(arg0 any) *MockMutaterMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMutaterMachine)(nil).ContainerType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMutaterMachine)(nil).ContainerType), arg0) + return &MockMutaterMachineContainerTypeCall{Call: call} +} + +// MockMutaterMachineContainerTypeCall wrap *gomock.Call +type MockMutaterMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineContainerTypeCall) Return(arg0 instance.ContainerType, arg1 error) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineContainerTypeCall) Do(f func(context.Context) (instance.ContainerType, error)) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineContainerTypeCall) DoAndReturn(f func(context.Context) (instance.ContainerType, error)) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -85,9 +133,33 @@ func (m *MockMutaterMachine) InstanceId(arg0 context.Context) (string, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMutaterMachineMockRecorder) InstanceId(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) InstanceId(arg0 any) *MockMutaterMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMutaterMachine)(nil).InstanceId), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMutaterMachine)(nil).InstanceId), arg0) + return &MockMutaterMachineInstanceIdCall{Call: call} +} + +// MockMutaterMachineInstanceIdCall wrap *gomock.Call +type MockMutaterMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineInstanceIdCall) Return(arg0 string, arg1 error) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineInstanceIdCall) Do(f func(context.Context) (string, error)) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineInstanceIdCall) DoAndReturn(f func(context.Context) (string, error)) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -99,9 +171,33 @@ func (m *MockMutaterMachine) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMutaterMachineMockRecorder) Life() *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Life() *MockMutaterMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMutaterMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMutaterMachine)(nil).Life)) + return &MockMutaterMachineLifeCall{Call: call} +} + +// MockMutaterMachineLifeCall wrap *gomock.Call +type MockMutaterMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineLifeCall) Return(arg0 life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineLifeCall) Do(f func() life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineLifeCall) DoAndReturn(f func() life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -113,9 +209,33 @@ func (m *MockMutaterMachine) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockMutaterMachineMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Refresh(arg0 any) *MockMutaterMachineRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMutaterMachine)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMutaterMachine)(nil).Refresh), arg0) + return &MockMutaterMachineRefreshCall{Call: call} +} + +// MockMutaterMachineRefreshCall wrap *gomock.Call +type MockMutaterMachineRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineRefreshCall) Return(arg0 error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineRefreshCall) Do(f func(context.Context) error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineRefreshCall) DoAndReturn(f func(context.Context) error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmProfiles mocks base method. @@ -127,9 +247,33 @@ func (m *MockMutaterMachine) SetCharmProfiles(arg0 context.Context, arg1 []strin } // SetCharmProfiles indicates an expected call of SetCharmProfiles. -func (mr *MockMutaterMachineMockRecorder) SetCharmProfiles(arg0, arg1 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) SetCharmProfiles(arg0, arg1 any) *MockMutaterMachineSetCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMutaterMachine)(nil).SetCharmProfiles), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMutaterMachine)(nil).SetCharmProfiles), arg0, arg1) + return &MockMutaterMachineSetCharmProfilesCall{Call: call} +} + +// MockMutaterMachineSetCharmProfilesCall wrap *gomock.Call +type MockMutaterMachineSetCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineSetCharmProfilesCall) Return(arg0 error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineSetCharmProfilesCall) Do(f func(context.Context, []string) error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineSetCharmProfilesCall) DoAndReturn(f func(context.Context, []string) error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -141,9 +285,33 @@ func (m *MockMutaterMachine) SetModificationStatus(arg0 context.Context, arg1 st } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMutaterMachineMockRecorder) SetModificationStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) SetModificationStatus(arg0, arg1, arg2, arg3 any) *MockMutaterMachineSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMutaterMachine)(nil).SetModificationStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMutaterMachine)(nil).SetModificationStatus), arg0, arg1, arg2, arg3) + return &MockMutaterMachineSetModificationStatusCall{Call: call} +} + +// MockMutaterMachineSetModificationStatusCall wrap *gomock.Call +type MockMutaterMachineSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineSetModificationStatusCall) Return(arg0 error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineSetModificationStatusCall) Do(f func(context.Context, status.Status, string, map[string]any) error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineSetModificationStatusCall) DoAndReturn(f func(context.Context, status.Status, string, map[string]any) error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -155,9 +323,33 @@ func (m *MockMutaterMachine) Tag() names.MachineTag { } // Tag indicates an expected call of Tag. -func (mr *MockMutaterMachineMockRecorder) Tag() *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Tag() *MockMutaterMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMutaterMachine)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMutaterMachine)(nil).Tag)) + return &MockMutaterMachineTagCall{Call: call} +} + +// MockMutaterMachineTagCall wrap *gomock.Call +type MockMutaterMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineTagCall) Return(arg0 names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineTagCall) Do(f func() names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -170,9 +362,33 @@ func (m *MockMutaterMachine) WatchContainers(arg0 context.Context) (watcher.Watc } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockMutaterMachineMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchContainers(arg0 any) *MockMutaterMachineWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMutaterMachine)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMutaterMachine)(nil).WatchContainers), arg0) + return &MockMutaterMachineWatchContainersCall{Call: call} +} + +// MockMutaterMachineWatchContainersCall wrap *gomock.Call +type MockMutaterMachineWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchContainersCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchContainersCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchContainersCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchLXDProfileVerificationNeeded mocks base method. @@ -185,9 +401,33 @@ func (m *MockMutaterMachine) WatchLXDProfileVerificationNeeded(arg0 context.Cont } // WatchLXDProfileVerificationNeeded indicates an expected call of WatchLXDProfileVerificationNeeded. -func (mr *MockMutaterMachineMockRecorder) WatchLXDProfileVerificationNeeded(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchLXDProfileVerificationNeeded(arg0 any) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationNeeded", reflect.TypeOf((*MockMutaterMachine)(nil).WatchLXDProfileVerificationNeeded), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationNeeded", reflect.TypeOf((*MockMutaterMachine)(nil).WatchLXDProfileVerificationNeeded), arg0) + return &MockMutaterMachineWatchLXDProfileVerificationNeededCall{Call: call} +} + +// MockMutaterMachineWatchLXDProfileVerificationNeededCall wrap *gomock.Call +type MockMutaterMachineWatchLXDProfileVerificationNeededCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUnits mocks base method. @@ -200,7 +440,31 @@ func (m *MockMutaterMachine) WatchUnits(arg0 context.Context) (watcher.Watcher[[ } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockMutaterMachineMockRecorder) WatchUnits(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchUnits(arg0 any) *MockMutaterMachineWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMutaterMachine)(nil).WatchUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMutaterMachine)(nil).WatchUnits), arg0) + return &MockMutaterMachineWatchUnitsCall{Call: call} +} + +// MockMutaterMachineWatchUnitsCall wrap *gomock.Call +type MockMutaterMachineWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchUnitsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchUnitsCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchUnitsCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/instancemutater/package_test.go b/api/agent/instancemutater/package_test.go index 77d66adc655..b15eb1b7698 100644 --- a/api/agent/instancemutater/package_test.go +++ b/api/agent/instancemutater/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/api/agent/provisioner/mocks/caller_mock.go b/api/agent/provisioner/mocks/caller_mock.go index 37d202baed6..c628559a10a 100644 --- a/api/agent/provisioner/mocks/caller_mock.go +++ b/api/agent/provisioner/mocks/caller_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/provisioner/mocks/machine_mock.go b/api/agent/provisioner/mocks/machine_mock.go index f3dd9c57b6a..7eaaeacd77d 100644 --- a/api/agent/provisioner/mocks/machine_mock.go +++ b/api/agent/provisioner/mocks/machine_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner +// mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockMachineProvisioner) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockMachineProvisionerMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) AvailabilityZone() *MockMachineProvisionerAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockMachineProvisioner)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockMachineProvisioner)(nil).AvailabilityZone)) + return &MockMachineProvisionerAvailabilityZoneCall{Call: call} +} + +// MockMachineProvisionerAvailabilityZoneCall wrap *gomock.Call +type MockMachineProvisionerAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerAvailabilityZoneCall) Do(f func() (string, error)) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DistributionGroup mocks base method. @@ -71,9 +95,33 @@ func (m *MockMachineProvisioner) DistributionGroup() ([]instance.Id, error) { } // DistributionGroup indicates an expected call of DistributionGroup. -func (mr *MockMachineProvisionerMockRecorder) DistributionGroup() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) DistributionGroup() *MockMachineProvisionerDistributionGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DistributionGroup", reflect.TypeOf((*MockMachineProvisioner)(nil).DistributionGroup)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DistributionGroup", reflect.TypeOf((*MockMachineProvisioner)(nil).DistributionGroup)) + return &MockMachineProvisionerDistributionGroupCall{Call: call} +} + +// MockMachineProvisionerDistributionGroupCall wrap *gomock.Call +type MockMachineProvisionerDistributionGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerDistributionGroupCall) Return(arg0 []instance.Id, arg1 error) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerDistributionGroupCall) Do(f func() ([]instance.Id, error)) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerDistributionGroupCall) DoAndReturn(f func() ([]instance.Id, error)) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDead mocks base method. @@ -85,9 +133,33 @@ func (m *MockMachineProvisioner) EnsureDead() error { } // EnsureDead indicates an expected call of EnsureDead. -func (mr *MockMachineProvisionerMockRecorder) EnsureDead() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) EnsureDead() *MockMachineProvisionerEnsureDeadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockMachineProvisioner)(nil).EnsureDead)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockMachineProvisioner)(nil).EnsureDead)) + return &MockMachineProvisionerEnsureDeadCall{Call: call} +} + +// MockMachineProvisionerEnsureDeadCall wrap *gomock.Call +type MockMachineProvisionerEnsureDeadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerEnsureDeadCall) Return(arg0 error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerEnsureDeadCall) Do(f func() error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerEnsureDeadCall) DoAndReturn(f func() error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -99,9 +171,33 @@ func (m *MockMachineProvisioner) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineProvisionerMockRecorder) Id() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Id() *MockMachineProvisionerIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachineProvisioner)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachineProvisioner)(nil).Id)) + return &MockMachineProvisionerIdCall{Call: call} +} + +// MockMachineProvisionerIdCall wrap *gomock.Call +type MockMachineProvisionerIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerIdCall) Return(arg0 string) *MockMachineProvisionerIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerIdCall) Do(f func() string) *MockMachineProvisionerIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerIdCall) DoAndReturn(f func() string) *MockMachineProvisionerIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -114,9 +210,33 @@ func (m *MockMachineProvisioner) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineProvisionerMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) InstanceId() *MockMachineProvisionerInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceId)) + return &MockMachineProvisionerInstanceIdCall{Call: call} +} + +// MockMachineProvisionerInstanceIdCall wrap *gomock.Call +type MockMachineProvisionerInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceStatus mocks base method. @@ -130,9 +250,33 @@ func (m *MockMachineProvisioner) InstanceStatus() (status.Status, string, error) } // InstanceStatus indicates an expected call of InstanceStatus. -func (mr *MockMachineProvisionerMockRecorder) InstanceStatus() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) InstanceStatus() *MockMachineProvisionerInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceStatus)) + return &MockMachineProvisionerInstanceStatusCall{Call: call} +} + +// MockMachineProvisionerInstanceStatusCall wrap *gomock.Call +type MockMachineProvisionerInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerInstanceStatusCall) Return(arg0 status.Status, arg1 string, arg2 error) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerInstanceStatusCall) Do(f func() (status.Status, string, error)) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerInstanceStatusCall) DoAndReturn(f func() (status.Status, string, error)) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // KeepInstance mocks base method. @@ -145,9 +289,33 @@ func (m *MockMachineProvisioner) KeepInstance() (bool, error) { } // KeepInstance indicates an expected call of KeepInstance. -func (mr *MockMachineProvisionerMockRecorder) KeepInstance() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) KeepInstance() *MockMachineProvisionerKeepInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepInstance", reflect.TypeOf((*MockMachineProvisioner)(nil).KeepInstance)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepInstance", reflect.TypeOf((*MockMachineProvisioner)(nil).KeepInstance)) + return &MockMachineProvisionerKeepInstanceCall{Call: call} +} + +// MockMachineProvisionerKeepInstanceCall wrap *gomock.Call +type MockMachineProvisionerKeepInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerKeepInstanceCall) Return(arg0 bool, arg1 error) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerKeepInstanceCall) Do(f func() (bool, error)) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerKeepInstanceCall) DoAndReturn(f func() (bool, error)) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -159,9 +327,33 @@ func (m *MockMachineProvisioner) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMachineProvisionerMockRecorder) Life() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Life() *MockMachineProvisionerLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachineProvisioner)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachineProvisioner)(nil).Life)) + return &MockMachineProvisionerLifeCall{Call: call} +} + +// MockMachineProvisionerLifeCall wrap *gomock.Call +type MockMachineProvisionerLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerLifeCall) Return(arg0 life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerLifeCall) Do(f func() life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerLifeCall) DoAndReturn(f func() life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineTag mocks base method. @@ -173,9 +365,33 @@ func (m *MockMachineProvisioner) MachineTag() names.MachineTag { } // MachineTag indicates an expected call of MachineTag. -func (mr *MockMachineProvisionerMockRecorder) MachineTag() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) MachineTag() *MockMachineProvisionerMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachineProvisioner)(nil).MachineTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachineProvisioner)(nil).MachineTag)) + return &MockMachineProvisionerMachineTagCall{Call: call} +} + +// MockMachineProvisionerMachineTagCall wrap *gomock.Call +type MockMachineProvisionerMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerMachineTagCall) Return(arg0 names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerMachineTagCall) Do(f func() names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MarkForRemoval mocks base method. @@ -187,9 +403,33 @@ func (m *MockMachineProvisioner) MarkForRemoval() error { } // MarkForRemoval indicates an expected call of MarkForRemoval. -func (mr *MockMachineProvisionerMockRecorder) MarkForRemoval() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) MarkForRemoval() *MockMachineProvisionerMarkForRemovalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkForRemoval", reflect.TypeOf((*MockMachineProvisioner)(nil).MarkForRemoval)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkForRemoval", reflect.TypeOf((*MockMachineProvisioner)(nil).MarkForRemoval)) + return &MockMachineProvisionerMarkForRemovalCall{Call: call} +} + +// MockMachineProvisionerMarkForRemovalCall wrap *gomock.Call +type MockMachineProvisionerMarkForRemovalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerMarkForRemovalCall) Return(arg0 error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerMarkForRemovalCall) Do(f func() error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerMarkForRemovalCall) DoAndReturn(f func() error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelAgentVersion mocks base method. @@ -202,9 +442,33 @@ func (m *MockMachineProvisioner) ModelAgentVersion() (*version.Number, error) { } // ModelAgentVersion indicates an expected call of ModelAgentVersion. -func (mr *MockMachineProvisionerMockRecorder) ModelAgentVersion() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) ModelAgentVersion() *MockMachineProvisionerModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelAgentVersion", reflect.TypeOf((*MockMachineProvisioner)(nil).ModelAgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelAgentVersion", reflect.TypeOf((*MockMachineProvisioner)(nil).ModelAgentVersion)) + return &MockMachineProvisionerModelAgentVersionCall{Call: call} +} + +// MockMachineProvisionerModelAgentVersionCall wrap *gomock.Call +type MockMachineProvisionerModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerModelAgentVersionCall) Return(arg0 *version.Number, arg1 error) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerModelAgentVersionCall) Do(f func() (*version.Number, error)) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerModelAgentVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -216,9 +480,33 @@ func (m *MockMachineProvisioner) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockMachineProvisionerMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Refresh(arg0 any) *MockMachineProvisionerRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachineProvisioner)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachineProvisioner)(nil).Refresh), arg0) + return &MockMachineProvisionerRefreshCall{Call: call} +} + +// MockMachineProvisionerRefreshCall wrap *gomock.Call +type MockMachineProvisionerRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerRefreshCall) Return(arg0 error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerRefreshCall) Do(f func(context.Context) error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerRefreshCall) DoAndReturn(f func(context.Context) error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -230,9 +518,33 @@ func (m *MockMachineProvisioner) Remove() error { } // Remove indicates an expected call of Remove. -func (mr *MockMachineProvisionerMockRecorder) Remove() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Remove() *MockMachineProvisionerRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMachineProvisioner)(nil).Remove)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMachineProvisioner)(nil).Remove)) + return &MockMachineProvisionerRemoveCall{Call: call} +} + +// MockMachineProvisionerRemoveCall wrap *gomock.Call +type MockMachineProvisionerRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerRemoveCall) Return(arg0 error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerRemoveCall) Do(f func() error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerRemoveCall) DoAndReturn(f func() error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmProfiles mocks base method. @@ -244,9 +556,33 @@ func (m *MockMachineProvisioner) SetCharmProfiles(arg0 []string) error { } // SetCharmProfiles indicates an expected call of SetCharmProfiles. -func (mr *MockMachineProvisionerMockRecorder) SetCharmProfiles(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetCharmProfiles(arg0 any) *MockMachineProvisionerSetCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachineProvisioner)(nil).SetCharmProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachineProvisioner)(nil).SetCharmProfiles), arg0) + return &MockMachineProvisionerSetCharmProfilesCall{Call: call} +} + +// MockMachineProvisionerSetCharmProfilesCall wrap *gomock.Call +type MockMachineProvisionerSetCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetCharmProfilesCall) Return(arg0 error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetCharmProfilesCall) Do(f func([]string) error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetCharmProfilesCall) DoAndReturn(f func([]string) error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceInfo mocks base method. @@ -258,9 +594,33 @@ func (m *MockMachineProvisioner) SetInstanceInfo(arg0 instance.Id, arg1, arg2 st } // SetInstanceInfo indicates an expected call of SetInstanceInfo. -func (mr *MockMachineProvisionerMockRecorder) SetInstanceInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetInstanceInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *MockMachineProvisionerSetInstanceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceInfo", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceInfo", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + return &MockMachineProvisionerSetInstanceInfoCall{Call: call} +} + +// MockMachineProvisionerSetInstanceInfoCall wrap *gomock.Call +type MockMachineProvisionerSetInstanceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetInstanceInfoCall) Return(arg0 error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetInstanceInfoCall) Do(f func(instance.Id, string, string, *instance.HardwareCharacteristics, []params.NetworkConfig, []params.Volume, map[string]params.VolumeAttachmentInfo, []string) error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetInstanceInfoCall) DoAndReturn(f func(instance.Id, string, string, *instance.HardwareCharacteristics, []params.NetworkConfig, []params.Volume, map[string]params.VolumeAttachmentInfo, []string) error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -272,9 +632,33 @@ func (m *MockMachineProvisioner) SetInstanceStatus(arg0 status.Status, arg1 stri } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockMachineProvisionerMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetInstanceStatusCall{Call: call} +} + +// MockMachineProvisionerSetInstanceStatusCall wrap *gomock.Call +type MockMachineProvisionerSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetInstanceStatusCall) Return(arg0 error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetInstanceStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetInstanceStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -286,9 +670,33 @@ func (m *MockMachineProvisioner) SetModificationStatus(arg0 status.Status, arg1 } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMachineProvisionerMockRecorder) SetModificationStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetModificationStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetModificationStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetModificationStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetModificationStatusCall{Call: call} +} + +// MockMachineProvisionerSetModificationStatusCall wrap *gomock.Call +type MockMachineProvisionerSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetModificationStatusCall) Return(arg0 error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetModificationStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetModificationStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -300,9 +708,33 @@ func (m *MockMachineProvisioner) SetPassword(arg0 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockMachineProvisionerMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetPassword(arg0 any) *MockMachineProvisionerSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachineProvisioner)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachineProvisioner)(nil).SetPassword), arg0) + return &MockMachineProvisionerSetPasswordCall{Call: call} +} + +// MockMachineProvisionerSetPasswordCall wrap *gomock.Call +type MockMachineProvisionerSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetPasswordCall) Return(arg0 error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetPasswordCall) Do(f func(string) error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetPasswordCall) DoAndReturn(f func(string) error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -314,9 +746,33 @@ func (m *MockMachineProvisioner) SetStatus(arg0 status.Status, arg1 string, arg2 } // SetStatus indicates an expected call of SetStatus. -func (mr *MockMachineProvisionerMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetStatusCall{Call: call} +} + +// MockMachineProvisionerSetStatusCall wrap *gomock.Call +type MockMachineProvisionerSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetStatusCall) Return(arg0 error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSupportedContainers mocks base method. @@ -332,9 +788,33 @@ func (m *MockMachineProvisioner) SetSupportedContainers(arg0 ...instance.Contain } // SetSupportedContainers indicates an expected call of SetSupportedContainers. -func (mr *MockMachineProvisionerMockRecorder) SetSupportedContainers(arg0 ...any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetSupportedContainers(arg0 ...any) *MockMachineProvisionerSetSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SetSupportedContainers), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SetSupportedContainers), arg0...) + return &MockMachineProvisionerSetSupportedContainersCall{Call: call} +} + +// MockMachineProvisionerSetSupportedContainersCall wrap *gomock.Call +type MockMachineProvisionerSetSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetSupportedContainersCall) Return(arg0 error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetSupportedContainersCall) Do(f func(...instance.ContainerType) error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetSupportedContainersCall) DoAndReturn(f func(...instance.ContainerType) error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -348,9 +828,33 @@ func (m *MockMachineProvisioner) Status() (status.Status, string, error) { } // Status indicates an expected call of Status. -func (mr *MockMachineProvisionerMockRecorder) Status() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Status() *MockMachineProvisionerStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachineProvisioner)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachineProvisioner)(nil).Status)) + return &MockMachineProvisionerStatusCall{Call: call} +} + +// MockMachineProvisionerStatusCall wrap *gomock.Call +type MockMachineProvisionerStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerStatusCall) Return(arg0 status.Status, arg1 string, arg2 error) *MockMachineProvisionerStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerStatusCall) Do(f func() (status.Status, string, error)) *MockMachineProvisionerStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerStatusCall) DoAndReturn(f func() (status.Status, string, error)) *MockMachineProvisionerStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -362,9 +866,33 @@ func (m *MockMachineProvisioner) String() string { } // String indicates an expected call of String. -func (mr *MockMachineProvisionerMockRecorder) String() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) String() *MockMachineProvisionerStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachineProvisioner)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachineProvisioner)(nil).String)) + return &MockMachineProvisionerStringCall{Call: call} +} + +// MockMachineProvisionerStringCall wrap *gomock.Call +type MockMachineProvisionerStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerStringCall) Return(arg0 string) *MockMachineProvisionerStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerStringCall) Do(f func() string) *MockMachineProvisionerStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerStringCall) DoAndReturn(f func() string) *MockMachineProvisionerStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedContainers mocks base method. @@ -378,9 +906,33 @@ func (m *MockMachineProvisioner) SupportedContainers() ([]instance.ContainerType } // SupportedContainers indicates an expected call of SupportedContainers. -func (mr *MockMachineProvisionerMockRecorder) SupportedContainers() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SupportedContainers() *MockMachineProvisionerSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportedContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportedContainers)) + return &MockMachineProvisionerSupportedContainersCall{Call: call} +} + +// MockMachineProvisionerSupportedContainersCall wrap *gomock.Call +type MockMachineProvisionerSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSupportedContainersCall) Return(arg0 []instance.ContainerType, arg1 bool, arg2 error) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSupportedContainersCall) Do(f func() ([]instance.ContainerType, bool, error)) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSupportedContainersCall) DoAndReturn(f func() ([]instance.ContainerType, bool, error)) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsNoContainers mocks base method. @@ -392,9 +944,33 @@ func (m *MockMachineProvisioner) SupportsNoContainers() error { } // SupportsNoContainers indicates an expected call of SupportsNoContainers. -func (mr *MockMachineProvisionerMockRecorder) SupportsNoContainers() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SupportsNoContainers() *MockMachineProvisionerSupportsNoContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsNoContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportsNoContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsNoContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportsNoContainers)) + return &MockMachineProvisionerSupportsNoContainersCall{Call: call} +} + +// MockMachineProvisionerSupportsNoContainersCall wrap *gomock.Call +type MockMachineProvisionerSupportsNoContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSupportsNoContainersCall) Return(arg0 error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSupportsNoContainersCall) Do(f func() error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSupportsNoContainersCall) DoAndReturn(f func() error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -406,9 +982,33 @@ func (m *MockMachineProvisioner) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockMachineProvisionerMockRecorder) Tag() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Tag() *MockMachineProvisionerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachineProvisioner)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachineProvisioner)(nil).Tag)) + return &MockMachineProvisionerTagCall{Call: call} +} + +// MockMachineProvisionerTagCall wrap *gomock.Call +type MockMachineProvisionerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerTagCall) Return(arg0 names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerTagCall) Do(f func() names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerTagCall) DoAndReturn(f func() names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -421,7 +1021,31 @@ func (m *MockMachineProvisioner) WatchContainers(arg0 instance.ContainerType) (w } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockMachineProvisionerMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) WatchContainers(arg0 any) *MockMachineProvisionerWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).WatchContainers), arg0) + return &MockMachineProvisionerWatchContainersCall{Call: call} +} + +// MockMachineProvisionerWatchContainersCall wrap *gomock.Call +type MockMachineProvisionerWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerWatchContainersCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerWatchContainersCall) Do(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerWatchContainersCall) DoAndReturn(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/provisioner/package_test.go b/api/agent/provisioner/package_test.go index 0029cbdf38c..a7cd5e7de17 100644 --- a/api/agent/provisioner/package_test.go +++ b/api/agent/provisioner/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/api/agent/secretsdrain/mocks/facade_mock.go b/api/agent/secretsdrain/mocks/facade_mock.go index a2ed270913b..caab89a8e98 100644 --- a/api/agent/secretsdrain/mocks/facade_mock.go +++ b/api/agent/secretsdrain/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/agent/secretsdrain/package_test.go b/api/agent/secretsdrain/package_test.go index b5cbe9894f0..a476f4a0898 100644 --- a/api/agent/secretsdrain/package_test.go +++ b/api/agent/secretsdrain/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/api/base/mocks/caller_mock.go b/api/base/mocks/caller_mock.go index d2ef44262dd..58b157e9637 100644 --- a/api/base/mocks/caller_mock.go +++ b/api/base/mocks/caller_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller +// mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,9 +324,33 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFacadeCaller is a mock of FacadeCaller interface. @@ -193,9 +385,33 @@ func (m *MockFacadeCaller) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *MockFacadeCallerBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + return &MockFacadeCallerBestAPIVersionCall{Call: call} +} + +// MockFacadeCallerBestAPIVersionCall wrap *gomock.Call +type MockFacadeCallerBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerBestAPIVersionCall) Return(arg0 int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerBestAPIVersionCall) Do(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerBestAPIVersionCall) DoAndReturn(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FacadeCall mocks base method. @@ -207,9 +423,33 @@ func (m *MockFacadeCaller) FacadeCall(arg0 context.Context, arg1 string, arg2, a } // FacadeCall indicates an expected call of FacadeCall. -func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *MockFacadeCallerFacadeCallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + return &MockFacadeCallerFacadeCallCall{Call: call} +} + +// MockFacadeCallerFacadeCallCall wrap *gomock.Call +type MockFacadeCallerFacadeCallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerFacadeCallCall) Return(arg0 error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerFacadeCallCall) Do(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerFacadeCallCall) DoAndReturn(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -221,9 +461,33 @@ func (m *MockFacadeCaller) Name() string { } // Name indicates an expected call of Name. -func (mr *MockFacadeCallerMockRecorder) Name() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) Name() *MockFacadeCallerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + return &MockFacadeCallerNameCall{Call: call} +} + +// MockFacadeCallerNameCall wrap *gomock.Call +type MockFacadeCallerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerNameCall) Return(arg0 string) *MockFacadeCallerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerNameCall) Do(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerNameCall) DoAndReturn(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawAPICaller mocks base method. @@ -235,7 +499,31 @@ func (m *MockFacadeCaller) RawAPICaller() base.APICaller { } // RawAPICaller indicates an expected call of RawAPICaller. -func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *MockFacadeCallerRawAPICallerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + return &MockFacadeCallerRawAPICallerCall{Call: call} +} + +// MockFacadeCallerRawAPICallerCall wrap *gomock.Call +type MockFacadeCallerRawAPICallerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerRawAPICallerCall) Return(arg0 base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerRawAPICallerCall) Do(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerRawAPICallerCall) DoAndReturn(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/base/mocks/clientfacade_mock.go b/api/base/mocks/clientfacade_mock.go index d2480504c87..4fc052ac0b0 100644 --- a/api/base/mocks/clientfacade_mock.go +++ b/api/base/mocks/clientfacade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade +// mockgen -typed -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICallCloser) APICall(arg0 context.Context, arg1 string, arg2 int, } // APICall indicates an expected call of APICall. -func (mr *MockAPICallCloserMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallCloserAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICallCloser)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICallCloser)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallCloserAPICallCall{Call: call} +} + +// MockAPICallCloserAPICallCall wrap *gomock.Call +type MockAPICallCloserAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserAPICallCall) Return(arg0 error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICallCloser) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallCloserMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) BakeryClient() *MockAPICallCloserBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICallCloser)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICallCloser)(nil).BakeryClient)) + return &MockAPICallCloserBakeryClientCall{Call: call} +} + +// MockAPICallCloserBakeryClientCall wrap *gomock.Call +type MockAPICallCloserBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICallCloser) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallCloserMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallCloserBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICallCloser)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICallCloser)(nil).BestFacadeVersion), arg0) + return &MockAPICallCloserBestFacadeVersionCall{Call: call} +} + +// MockAPICallCloserBestFacadeVersionCall wrap *gomock.Call +type MockAPICallCloserBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserBestFacadeVersionCall) Return(arg0 int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserBestFacadeVersionCall) Do(f func(string) int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -95,9 +167,33 @@ func (m *MockAPICallCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAPICallCloserMockRecorder) Close() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) Close() *MockAPICallCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPICallCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPICallCloser)(nil).Close)) + return &MockAPICallCloserCloseCall{Call: call} +} + +// MockAPICallCloserCloseCall wrap *gomock.Call +type MockAPICallCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserCloseCall) Return(arg0 error) *MockAPICallCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserCloseCall) Do(f func() error) *MockAPICallCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserCloseCall) DoAndReturn(f func() error) *MockAPICallCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -110,9 +206,33 @@ func (m *MockAPICallCloser) ConnectControllerStream(arg0 context.Context, arg1 s } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallCloserMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallCloserConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallCloserConnectControllerStreamCall{Call: call} +} + +// MockAPICallCloserConnectControllerStreamCall wrap *gomock.Call +type MockAPICallCloserConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -125,9 +245,33 @@ func (m *MockAPICallCloser) ConnectStream(arg0 context.Context, arg1 string, arg } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallCloserMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallCloserConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallCloserConnectStreamCall{Call: call} +} + +// MockAPICallCloserConnectStreamCall wrap *gomock.Call +type MockAPICallCloserConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -140,9 +284,33 @@ func (m *MockAPICallCloser) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallCloserMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) HTTPClient() *MockAPICallCloserHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).HTTPClient)) + return &MockAPICallCloserHTTPClientCall{Call: call} +} + +// MockAPICallCloserHTTPClientCall wrap *gomock.Call +type MockAPICallCloserHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -155,9 +323,33 @@ func (m *MockAPICallCloser) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallCloserMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ModelTag() *MockAPICallCloserModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICallCloser)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICallCloser)(nil).ModelTag)) + return &MockAPICallCloserModelTagCall{Call: call} +} + +// MockAPICallCloserModelTagCall wrap *gomock.Call +type MockAPICallCloserModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallCloserModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallCloserModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallCloserModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -170,9 +362,33 @@ func (m *MockAPICallCloser) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallCloserMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) RootHTTPClient() *MockAPICallCloserRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).RootHTTPClient)) + return &MockAPICallCloserRootHTTPClientCall{Call: call} +} + +// MockAPICallCloserRootHTTPClientCall wrap *gomock.Call +type MockAPICallCloserRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClientFacade is a mock of ClientFacade interface. @@ -207,9 +423,33 @@ func (m *MockClientFacade) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockClientFacadeMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockClientFacadeMockRecorder) BestAPIVersion() *MockClientFacadeBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockClientFacade)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockClientFacade)(nil).BestAPIVersion)) + return &MockClientFacadeBestAPIVersionCall{Call: call} +} + +// MockClientFacadeBestAPIVersionCall wrap *gomock.Call +type MockClientFacadeBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientFacadeBestAPIVersionCall) Return(arg0 int) *MockClientFacadeBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientFacadeBestAPIVersionCall) Do(f func() int) *MockClientFacadeBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientFacadeBestAPIVersionCall) DoAndReturn(f func() int) *MockClientFacadeBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -221,7 +461,31 @@ func (m *MockClientFacade) Close() error { } // Close indicates an expected call of Close. -func (mr *MockClientFacadeMockRecorder) Close() *gomock.Call { +func (mr *MockClientFacadeMockRecorder) Close() *MockClientFacadeCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClientFacade)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClientFacade)(nil).Close)) + return &MockClientFacadeCloseCall{Call: call} +} + +// MockClientFacadeCloseCall wrap *gomock.Call +type MockClientFacadeCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientFacadeCloseCall) Return(arg0 error) *MockClientFacadeCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientFacadeCloseCall) Do(f func() error) *MockClientFacadeCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientFacadeCloseCall) DoAndReturn(f func() error) *MockClientFacadeCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/base/package_test.go b/api/base/package_test.go index 709fc48bb92..9491ac3862c 100644 --- a/api/base/package_test.go +++ b/api/base/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/api/client/charms/charmsgetter_mock_test.go b/api/client/charms/charmsgetter_mock_test.go index 9908ed1ed84..7e78bf8968e 100644 --- a/api/client/charms/charmsgetter_mock_test.go +++ b/api/client/charms/charmsgetter_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package charms_test -destination charmsgetter_mock_test.go github.com/juju/juju/api/client/charms CharmGetter +// mockgen -typed -package charms_test -destination charmsgetter_mock_test.go github.com/juju/juju/api/client/charms CharmGetter // // Package charms_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockCharmGetter) GetCharm(arg0 context.Context, arg1, arg2 string) (io. } // GetCharm indicates an expected call of GetCharm. -func (mr *MockCharmGetterMockRecorder) GetCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmGetterMockRecorder) GetCharm(arg0, arg1, arg2 any) *MockCharmGetterGetCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharm", reflect.TypeOf((*MockCharmGetter)(nil).GetCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharm", reflect.TypeOf((*MockCharmGetter)(nil).GetCharm), arg0, arg1, arg2) + return &MockCharmGetterGetCharmCall{Call: call} +} + +// MockCharmGetterGetCharmCall wrap *gomock.Call +type MockCharmGetterGetCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmGetterGetCharmCall) Return(arg0 io.ReadCloser, arg1 error) *MockCharmGetterGetCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmGetterGetCharmCall) Do(f func(context.Context, string, string) (io.ReadCloser, error)) *MockCharmGetterGetCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmGetterGetCharmCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, error)) *MockCharmGetterGetCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/client/charms/charmsputter_mock_test.go b/api/client/charms/charmsputter_mock_test.go index 82f151cc14b..3f05b14ff4e 100644 --- a/api/client/charms/charmsputter_mock_test.go +++ b/api/client/charms/charmsputter_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package charms -destination charmsputter_mock_test.go github.com/juju/juju/api/client/charms CharmPutter +// mockgen -typed -package charms -destination charmsputter_mock_test.go github.com/juju/juju/api/client/charms CharmPutter // // Package charms is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockCharmPutter) PutCharm(arg0 context.Context, arg1, arg2, arg3 string } // PutCharm indicates an expected call of PutCharm. -func (mr *MockCharmPutterMockRecorder) PutCharm(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockCharmPutterMockRecorder) PutCharm(arg0, arg1, arg2, arg3, arg4 any) *MockCharmPutterPutCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutCharm", reflect.TypeOf((*MockCharmPutter)(nil).PutCharm), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutCharm", reflect.TypeOf((*MockCharmPutter)(nil).PutCharm), arg0, arg1, arg2, arg3, arg4) + return &MockCharmPutterPutCharmCall{Call: call} +} + +// MockCharmPutterPutCharmCall wrap *gomock.Call +type MockCharmPutterPutCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmPutterPutCharmCall) Return(arg0 string, arg1 error) *MockCharmPutterPutCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmPutterPutCharmCall) Do(f func(context.Context, string, string, string, io.Reader) (string, error)) *MockCharmPutterPutCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmPutterPutCharmCall) DoAndReturn(f func(context.Context, string, string, string, io.Reader) (string, error)) *MockCharmPutterPutCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/client/charms/package_test.go b/api/client/charms/package_test.go index 7e53531fa91..bbbdbc91550 100644 --- a/api/client/charms/package_test.go +++ b/api/client/charms/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package charms_test -destination charmsgetter_mock_test.go github.com/juju/juju/api/client/charms CharmGetter -//go:generate go run go.uber.org/mock/mockgen -package charms -destination charmsputter_mock_test.go github.com/juju/juju/api/client/charms CharmPutter +//go:generate go run go.uber.org/mock/mockgen -typed -package charms_test -destination charmsgetter_mock_test.go github.com/juju/juju/api/client/charms CharmGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package charms -destination charmsputter_mock_test.go github.com/juju/juju/api/client/charms CharmPutter func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/api/client/modelupgrader/mocks/apibase_mock.go b/api/client/modelupgrader/mocks/apibase_mock.go index 44816a58c15..c0fa907bae4 100644 --- a/api/client/modelupgrader/mocks/apibase_mock.go +++ b/api/client/modelupgrader/mocks/apibase_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/apibase_mock.go github.com/juju/juju/api/base APICallCloser +// mockgen -typed -package mocks -destination mocks/apibase_mock.go github.com/juju/juju/api/base APICallCloser // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICallCloser) APICall(arg0 context.Context, arg1 string, arg2 int, } // APICall indicates an expected call of APICall. -func (mr *MockAPICallCloserMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallCloserAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICallCloser)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICallCloser)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallCloserAPICallCall{Call: call} +} + +// MockAPICallCloserAPICallCall wrap *gomock.Call +type MockAPICallCloserAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserAPICallCall) Return(arg0 error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallCloserAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICallCloser) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallCloserMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) BakeryClient() *MockAPICallCloserBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICallCloser)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICallCloser)(nil).BakeryClient)) + return &MockAPICallCloserBakeryClientCall{Call: call} +} + +// MockAPICallCloserBakeryClientCall wrap *gomock.Call +type MockAPICallCloserBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallCloserBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICallCloser) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallCloserMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallCloserBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICallCloser)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICallCloser)(nil).BestFacadeVersion), arg0) + return &MockAPICallCloserBestFacadeVersionCall{Call: call} +} + +// MockAPICallCloserBestFacadeVersionCall wrap *gomock.Call +type MockAPICallCloserBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserBestFacadeVersionCall) Return(arg0 int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserBestFacadeVersionCall) Do(f func(string) int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallCloserBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -95,9 +167,33 @@ func (m *MockAPICallCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAPICallCloserMockRecorder) Close() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) Close() *MockAPICallCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPICallCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPICallCloser)(nil).Close)) + return &MockAPICallCloserCloseCall{Call: call} +} + +// MockAPICallCloserCloseCall wrap *gomock.Call +type MockAPICallCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserCloseCall) Return(arg0 error) *MockAPICallCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserCloseCall) Do(f func() error) *MockAPICallCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserCloseCall) DoAndReturn(f func() error) *MockAPICallCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -110,9 +206,33 @@ func (m *MockAPICallCloser) ConnectControllerStream(arg0 context.Context, arg1 s } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallCloserMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallCloserConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallCloserConnectControllerStreamCall{Call: call} +} + +// MockAPICallCloserConnectControllerStreamCall wrap *gomock.Call +type MockAPICallCloserConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallCloserConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -125,9 +245,33 @@ func (m *MockAPICallCloser) ConnectStream(arg0 context.Context, arg1 string, arg } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallCloserMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallCloserConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICallCloser)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallCloserConnectStreamCall{Call: call} +} + +// MockAPICallCloserConnectStreamCall wrap *gomock.Call +type MockAPICallCloserConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallCloserConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -140,9 +284,33 @@ func (m *MockAPICallCloser) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallCloserMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) HTTPClient() *MockAPICallCloserHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).HTTPClient)) + return &MockAPICallCloserHTTPClientCall{Call: call} +} + +// MockAPICallCloserHTTPClientCall wrap *gomock.Call +type MockAPICallCloserHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallCloserHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -155,9 +323,33 @@ func (m *MockAPICallCloser) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallCloserMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) ModelTag() *MockAPICallCloserModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICallCloser)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICallCloser)(nil).ModelTag)) + return &MockAPICallCloserModelTagCall{Call: call} +} + +// MockAPICallCloserModelTagCall wrap *gomock.Call +type MockAPICallCloserModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallCloserModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallCloserModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallCloserModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -170,7 +362,31 @@ func (m *MockAPICallCloser) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallCloserMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallCloserMockRecorder) RootHTTPClient() *MockAPICallCloserRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICallCloser)(nil).RootHTTPClient)) + return &MockAPICallCloserRootHTTPClientCall{Call: call} +} + +// MockAPICallCloserRootHTTPClientCall wrap *gomock.Call +type MockAPICallCloserRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallCloserRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallCloserRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallCloserRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallCloserRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/client/modelupgrader/mocks/httprequest_mock.go b/api/client/modelupgrader/mocks/httprequest_mock.go index 291b8b68fe4..421cd0106a6 100644 --- a/api/client/modelupgrader/mocks/httprequest_mock.go +++ b/api/client/modelupgrader/mocks/httprequest_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/httprequest_mock.go gopkg.in/httprequest.v1 Doer +// mockgen -typed -package mocks -destination mocks/httprequest_mock.go gopkg.in/httprequest.v1 Doer // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockDoer) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockDoerMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockDoerMockRecorder) Do(arg0 any) *MockDoerDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockDoer)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockDoer)(nil).Do), arg0) + return &MockDoerDoCall{Call: call} +} + +// MockDoerDoCall wrap *gomock.Call +type MockDoerDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDoerDoCall) Return(arg0 *http.Response, arg1 error) *MockDoerDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDoerDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockDoerDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDoerDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockDoerDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/client/modelupgrader/package_test.go b/api/client/modelupgrader/package_test.go index beaae5fdec5..9b72102768f 100644 --- a/api/client/modelupgrader/package_test.go +++ b/api/client/modelupgrader/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/apibase_mock.go github.com/juju/juju/api/base APICallCloser -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/httprequest_mock.go gopkg.in/httprequest.v1 Doer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/apibase_mock.go github.com/juju/juju/api/base APICallCloser +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/httprequest_mock.go gopkg.in/httprequest.v1 Doer func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/api/common/secretbackends/mocks/facade_mock.go b/api/common/secretbackends/mocks/facade_mock.go index 1f086bc04d2..e947700bb3c 100644 --- a/api/common/secretbackends/mocks/facade_mock.go +++ b/api/common/secretbackends/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockFacadeCaller) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *MockFacadeCallerBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + return &MockFacadeCallerBestAPIVersionCall{Call: call} +} + +// MockFacadeCallerBestAPIVersionCall wrap *gomock.Call +type MockFacadeCallerBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerBestAPIVersionCall) Return(arg0 int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerBestAPIVersionCall) Do(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerBestAPIVersionCall) DoAndReturn(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FacadeCall mocks base method. @@ -63,9 +87,33 @@ func (m *MockFacadeCaller) FacadeCall(arg0 context.Context, arg1 string, arg2, a } // FacadeCall indicates an expected call of FacadeCall. -func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *MockFacadeCallerFacadeCallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + return &MockFacadeCallerFacadeCallCall{Call: call} +} + +// MockFacadeCallerFacadeCallCall wrap *gomock.Call +type MockFacadeCallerFacadeCallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerFacadeCallCall) Return(arg0 error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerFacadeCallCall) Do(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerFacadeCallCall) DoAndReturn(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -77,9 +125,33 @@ func (m *MockFacadeCaller) Name() string { } // Name indicates an expected call of Name. -func (mr *MockFacadeCallerMockRecorder) Name() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) Name() *MockFacadeCallerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + return &MockFacadeCallerNameCall{Call: call} +} + +// MockFacadeCallerNameCall wrap *gomock.Call +type MockFacadeCallerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerNameCall) Return(arg0 string) *MockFacadeCallerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerNameCall) Do(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerNameCall) DoAndReturn(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawAPICaller mocks base method. @@ -91,7 +163,31 @@ func (m *MockFacadeCaller) RawAPICaller() base.APICaller { } // RawAPICaller indicates an expected call of RawAPICaller. -func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *MockFacadeCallerRawAPICallerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + return &MockFacadeCallerRawAPICallerCall{Call: call} +} + +// MockFacadeCallerRawAPICallerCall wrap *gomock.Call +type MockFacadeCallerRawAPICallerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerRawAPICallerCall) Return(arg0 base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerRawAPICallerCall) Do(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerRawAPICallerCall) DoAndReturn(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/common/secretbackends/package_test.go b/api/common/secretbackends/package_test.go index 1d38f297c23..67bb3bb91a6 100644 --- a/api/common/secretbackends/package_test.go +++ b/api/common/secretbackends/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/api/common/secretsdrain/mocks/facade_mock.go b/api/common/secretsdrain/mocks/facade_mock.go index 1f086bc04d2..e947700bb3c 100644 --- a/api/common/secretsdrain/mocks/facade_mock.go +++ b/api/common/secretsdrain/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockFacadeCaller) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *MockFacadeCallerBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion)) + return &MockFacadeCallerBestAPIVersionCall{Call: call} +} + +// MockFacadeCallerBestAPIVersionCall wrap *gomock.Call +type MockFacadeCallerBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerBestAPIVersionCall) Return(arg0 int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerBestAPIVersionCall) Do(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerBestAPIVersionCall) DoAndReturn(f func() int) *MockFacadeCallerBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FacadeCall mocks base method. @@ -63,9 +87,33 @@ func (m *MockFacadeCaller) FacadeCall(arg0 context.Context, arg1 string, arg2, a } // FacadeCall indicates an expected call of FacadeCall. -func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2, arg3 any) *MockFacadeCallerFacadeCallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2, arg3) + return &MockFacadeCallerFacadeCallCall{Call: call} +} + +// MockFacadeCallerFacadeCallCall wrap *gomock.Call +type MockFacadeCallerFacadeCallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerFacadeCallCall) Return(arg0 error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerFacadeCallCall) Do(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerFacadeCallCall) DoAndReturn(f func(context.Context, string, any, any) error) *MockFacadeCallerFacadeCallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -77,9 +125,33 @@ func (m *MockFacadeCaller) Name() string { } // Name indicates an expected call of Name. -func (mr *MockFacadeCallerMockRecorder) Name() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) Name() *MockFacadeCallerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name)) + return &MockFacadeCallerNameCall{Call: call} +} + +// MockFacadeCallerNameCall wrap *gomock.Call +type MockFacadeCallerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerNameCall) Return(arg0 string) *MockFacadeCallerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerNameCall) Do(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerNameCall) DoAndReturn(f func() string) *MockFacadeCallerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawAPICaller mocks base method. @@ -91,7 +163,31 @@ func (m *MockFacadeCaller) RawAPICaller() base.APICaller { } // RawAPICaller indicates an expected call of RawAPICaller. -func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *gomock.Call { +func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *MockFacadeCallerRawAPICallerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller)) + return &MockFacadeCallerRawAPICallerCall{Call: call} +} + +// MockFacadeCallerRawAPICallerCall wrap *gomock.Call +type MockFacadeCallerRawAPICallerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCallerRawAPICallerCall) Return(arg0 base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCallerRawAPICallerCall) Do(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCallerRawAPICallerCall) DoAndReturn(f func() base.APICaller) *MockFacadeCallerRawAPICallerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/common/secretsdrain/package_test.go b/api/common/secretsdrain/package_test.go index 1b20c493a0d..b4aa55adbf6 100644 --- a/api/common/secretsdrain/package_test.go +++ b/api/common/secretsdrain/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base FacadeCaller func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/api/controller/usersecretsdrain/mocks/facade_mock.go b/api/controller/usersecretsdrain/mocks/facade_mock.go index a2ed270913b..caab89a8e98 100644 --- a/api/controller/usersecretsdrain/mocks/facade_mock.go +++ b/api/controller/usersecretsdrain/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/controller/usersecretsdrain/package_test.go b/api/controller/usersecretsdrain/package_test.go index 2da63d5f033..f4c2ca6868b 100644 --- a/api/controller/usersecretsdrain/package_test.go +++ b/api/controller/usersecretsdrain/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/base APICaller func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/api/http/mocks/http_mock.go b/api/http/mocks/http_mock.go index df120514b0d..188bf0d06a4 100644 --- a/api/http/mocks/http_mock.go +++ b/api/http/mocks/http_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/http_mock.go github.com/juju/juju/api/http HTTPClient +// mockgen -typed -package mocks -destination mocks/http_mock.go github.com/juju/juju/api/http HTTPClient // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockHTTPClient) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *MockHTTPClientDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + return &MockHTTPClientDoCall{Call: call} +} + +// MockHTTPClientDoCall wrap *gomock.Call +type MockHTTPClientDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPClientDoCall) Return(arg0 *http.Response, arg1 error) *MockHTTPClientDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPClientDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPClientDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/http/mocks/httpdoer_mock.go b/api/http/mocks/httpdoer_mock.go index fda2b83c48d..5e77479feda 100644 --- a/api/http/mocks/httpdoer_mock.go +++ b/api/http/mocks/httpdoer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/httpdoer_mock.go github.com/juju/juju/api/http HTTPDoer +// mockgen -typed -package mocks -destination mocks/httpdoer_mock.go github.com/juju/juju/api/http HTTPDoer // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockHTTPDoer) Do(arg0 context.Context, arg1 *http.Request, arg2 any) er } // Do indicates an expected call of Do. -func (mr *MockHTTPDoerMockRecorder) Do(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHTTPDoerMockRecorder) Do(arg0, arg1, arg2 any) *MockHTTPDoerDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPDoer)(nil).Do), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPDoer)(nil).Do), arg0, arg1, arg2) + return &MockHTTPDoerDoCall{Call: call} +} + +// MockHTTPDoerDoCall wrap *gomock.Call +type MockHTTPDoerDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPDoerDoCall) Return(arg0 error) *MockHTTPDoerDoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPDoerDoCall) Do(f func(context.Context, *http.Request, any) error) *MockHTTPDoerDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPDoerDoCall) DoAndReturn(f func(context.Context, *http.Request, any) error) *MockHTTPDoerDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/api/http/package_test.go b/api/http/package_test.go index 1d98fd3e461..08d5c7ad9c3 100644 --- a/api/http/package_test.go +++ b/api/http/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/http_mock.go github.com/juju/juju/api/http HTTPClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/httpdoer_mock.go github.com/juju/juju/api/http HTTPDoer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/http_mock.go github.com/juju/juju/api/http HTTPClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/httpdoer_mock.go github.com/juju/juju/api/http HTTPDoer func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/api/watcher/watcher_test.go b/api/watcher/watcher_test.go index 50b73a254f3..0a6d67522bd 100644 --- a/api/watcher/watcher_test.go +++ b/api/watcher/watcher_test.go @@ -58,7 +58,7 @@ func (s *watcherSuite) TestWatcherStopsOnBlockedNext(c *gc.C) { caller.EXPECT().BestFacadeVersion(facadeName).Return(666).AnyTimes() caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Stop", nil, gomock.Any()).Return(nil).AnyTimes() - caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Next", nil, gomock.Any()).DoAndReturn(func(ctx context.Context, _ string, _ int, _ string, _ string, _ any, r *any) error { + caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Next", nil, gomock.Any()).DoAndReturn(func(ctx context.Context, _ string, _ int, _, _ string, _, _ any) error { close(called) select { @@ -100,20 +100,21 @@ func setupWatcher[T any](c *gc.C, caller *apimocks.MockAPICaller, facadeName str eventCh := make(chan T) stopped := make(chan bool) - caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Stop", nil, gomock.Any()).DoAndReturn(func(_ context.Context, _ string, _ int, _ string, _ string, _ any, _ any) { + caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Stop", nil, gomock.Any()).DoAndReturn(func(_ context.Context, _ string, _ int, _ string, _ string, _ any, _ any) error { select { case stopped <- true: default: } + return nil }).Return(nil).AnyTimes() - caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Next", nil, gomock.Any()).DoAndReturn(func(_ context.Context, _ string, _ int, _ string, _ string, _ any, r *any) error { + caller.EXPECT().APICall(gomock.Any(), facadeName, 666, "id-666", "Next", nil, gomock.Any()).DoAndReturn(func(_ context.Context, _ string, _ int, _ string, _ string, _ any, r any) error { select { case ev, ok := <-eventCh: if !ok { c.FailNow() } - *(*r).(*any) = ev + *(*r.(*any)).(*any) = ev return nil case <-stopped: } diff --git a/apiserver/common/charms/mocks/mocks.go b/apiserver/common/charms/mocks/mocks.go index ecf3a7c6c02..78cd7b458a5 100644 --- a/apiserver/common/charms/mocks/mocks.go +++ b/apiserver/common/charms/mocks/mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/common/charms State,Application,Charm,Model +// mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/common/charms State,Application,Charm,Model // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockState) Application(arg0 string) (charms.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Application(arg0 any) *MockStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + return &MockStateApplicationCall{Call: call} +} + +// MockStateApplicationCall wrap *gomock.Call +type MockStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateApplicationCall) Return(arg0 charms.Application, arg1 error) *MockStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateApplicationCall) Do(f func(string) (charms.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateApplicationCall) DoAndReturn(f func(string) (charms.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -67,9 +91,33 @@ func (m *MockState) Charm(arg0 string) (charms.Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Charm(arg0 any) *MockStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockState)(nil).Charm), arg0) + return &MockStateCharmCall{Call: call} +} + +// MockStateCharmCall wrap *gomock.Call +type MockStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCharmCall) Return(arg0 charms.Charm, arg1 error) *MockStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCharmCall) Do(f func(string) (charms.Charm, error)) *MockStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCharmCall) DoAndReturn(f func(string) (charms.Charm, error)) *MockStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -82,9 +130,33 @@ func (m *MockState) Model() (charms.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateMockRecorder) Model() *gomock.Call { +func (mr *MockStateMockRecorder) Model() *MockStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + return &MockStateModelCall{Call: call} +} + +// MockStateModelCall wrap *gomock.Call +type MockStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelCall) Return(arg0 charms.Model, arg1 error) *MockStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelCall) Do(f func() (charms.Model, error)) *MockStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelCall) DoAndReturn(f func() (charms.Model, error)) *MockStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -121,9 +193,33 @@ func (m *MockApplication) Charm() (charms.Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 charms.Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (charms.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (charms.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -158,9 +254,33 @@ func (m *MockCharm) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmMockRecorder) Actions() *MockCharmActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + return &MockCharmActionsCall{Call: call} +} + +// MockCharmActionsCall wrap *gomock.Call +type MockCharmActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmActionsCall) Return(arg0 *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmActionsCall) Do(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -172,9 +292,33 @@ func (m *MockCharm) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmMockRecorder) Config() *gomock.Call { +func (mr *MockCharmMockRecorder) Config() *MockCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + return &MockCharmConfigCall{Call: call} +} + +// MockCharmConfigCall wrap *gomock.Call +type MockCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmConfigCall) Return(arg0 *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmConfigCall) Do(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfile mocks base method. @@ -186,9 +330,33 @@ func (m *MockCharm) LXDProfile() *state.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockCharmMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockCharmMockRecorder) LXDProfile() *MockCharmLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + return &MockCharmLXDProfileCall{Call: call} +} + +// MockCharmLXDProfileCall wrap *gomock.Call +type MockCharmLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmLXDProfileCall) Return(arg0 *state.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmLXDProfileCall) Do(f func() *state.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmLXDProfileCall) DoAndReturn(f func() *state.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -200,9 +368,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -214,9 +406,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -228,9 +444,33 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -242,9 +482,33 @@ func (m *MockCharm) URL() string { } // URL indicates an expected call of URL. -func (mr *MockCharmMockRecorder) URL() *gomock.Call { +func (mr *MockCharmMockRecorder) URL() *MockCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + return &MockCharmURLCall{Call: call} +} + +// MockCharmURLCall wrap *gomock.Call +type MockCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmURLCall) Return(arg0 string) *MockCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmURLCall) Do(f func() string) *MockCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmURLCall) DoAndReturn(f func() string) *MockCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -279,7 +543,31 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/charms/package_test.go b/apiserver/common/charms/package_test.go index 066c6cfeaf5..f169f93cd20 100644 --- a/apiserver/common/charms/package_test.go +++ b/apiserver/common/charms/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/common/charms State,Application,Charm,Model +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/common/charms State,Application,Charm,Model func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/common/credentialcommon/credentialcommon_mock.go b/apiserver/common/credentialcommon/credentialcommon_mock.go index 3e340deb119..2ce48cfeefc 100644 --- a/apiserver/common/credentialcommon/credentialcommon_mock.go +++ b/apiserver/common/credentialcommon/credentialcommon_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package credentialcommon -destination credentialcommon_mock.go github.com/juju/juju/apiserver/common/credentialcommon CredentialService +// mockgen -typed -package credentialcommon -destination credentialcommon_mock.go github.com/juju/juju/apiserver/common/credentialcommon CredentialService // // Package credentialcommon is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockCredentialService) CloudCredential(arg0 context.Context, arg1 crede } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockCredentialServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + return &MockCredentialServiceCloudCredentialCall{Call: call} +} + +// MockCredentialServiceCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InvalidateCredential mocks base method. @@ -65,7 +89,31 @@ func (m *MockCredentialService) InvalidateCredential(arg0 context.Context, arg1 } // InvalidateCredential indicates an expected call of InvalidateCredential. -func (mr *MockCredentialServiceMockRecorder) InvalidateCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) InvalidateCredential(arg0, arg1, arg2 any) *MockCredentialServiceInvalidateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateCredential", reflect.TypeOf((*MockCredentialService)(nil).InvalidateCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateCredential", reflect.TypeOf((*MockCredentialService)(nil).InvalidateCredential), arg0, arg1, arg2) + return &MockCredentialServiceInvalidateCredentialCall{Call: call} +} + +// MockCredentialServiceInvalidateCredentialCall wrap *gomock.Call +type MockCredentialServiceInvalidateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceInvalidateCredentialCall) Return(arg0 error) *MockCredentialServiceInvalidateCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceInvalidateCredentialCall) Do(f func(context.Context, credential.Key, string) error) *MockCredentialServiceInvalidateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceInvalidateCredentialCall) DoAndReturn(f func(context.Context, credential.Key, string) error) *MockCredentialServiceInvalidateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/credentialcommon/package_test.go b/apiserver/common/credentialcommon/package_test.go index 99c65700b5c..8a625e601d0 100644 --- a/apiserver/common/credentialcommon/package_test.go +++ b/apiserver/common/credentialcommon/package_test.go @@ -11,7 +11,7 @@ import ( // At the moment mocks generated here are in use in the apiserver/facades/client/cloud unit tests. // -//go:generate go run go.uber.org/mock/mockgen -package credentialcommon -destination credentialcommon_mock.go github.com/juju/juju/apiserver/common/credentialcommon CredentialService +//go:generate go run go.uber.org/mock/mockgen -typed -package credentialcommon -destination credentialcommon_mock.go github.com/juju/juju/apiserver/common/credentialcommon CredentialService func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/common/crossmodel/mocks/authentication_mock.go b/apiserver/common/crossmodel/mocks/authentication_mock.go index bc0d6367104..d56ca5a0ed9 100644 --- a/apiserver/common/crossmodel/mocks/authentication_mock.go +++ b/apiserver/common/crossmodel/mocks/authentication_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/authentication_mock.go github.com/juju/juju/apiserver/authentication ExpirableStorageBakery +// mockgen -typed -package mocks -destination mocks/authentication_mock.go github.com/juju/juju/apiserver/authentication ExpirableStorageBakery // // Package mocks is a generated GoMock package. @@ -57,10 +57,34 @@ func (m *MockExpirableStorageBakery) Auth(arg0 context.Context, arg1 ...macaroon } // Auth indicates an expected call of Auth. -func (mr *MockExpirableStorageBakeryMockRecorder) Auth(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockExpirableStorageBakeryMockRecorder) Auth(arg0 any, arg1 ...any) *MockExpirableStorageBakeryAuthCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Auth", reflect.TypeOf((*MockExpirableStorageBakery)(nil).Auth), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Auth", reflect.TypeOf((*MockExpirableStorageBakery)(nil).Auth), varargs...) + return &MockExpirableStorageBakeryAuthCall{Call: call} +} + +// MockExpirableStorageBakeryAuthCall wrap *gomock.Call +type MockExpirableStorageBakeryAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageBakeryAuthCall) Return(arg0 *bakery.AuthChecker) *MockExpirableStorageBakeryAuthCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageBakeryAuthCall) Do(f func(context.Context, ...macaroon.Slice) *bakery.AuthChecker) *MockExpirableStorageBakeryAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageBakeryAuthCall) DoAndReturn(f func(context.Context, ...macaroon.Slice) *bakery.AuthChecker) *MockExpirableStorageBakeryAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExpireStorageAfter mocks base method. @@ -73,9 +97,33 @@ func (m *MockExpirableStorageBakery) ExpireStorageAfter(arg0 time.Duration) (aut } // ExpireStorageAfter indicates an expected call of ExpireStorageAfter. -func (mr *MockExpirableStorageBakeryMockRecorder) ExpireStorageAfter(arg0 any) *gomock.Call { +func (mr *MockExpirableStorageBakeryMockRecorder) ExpireStorageAfter(arg0 any) *MockExpirableStorageBakeryExpireStorageAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireStorageAfter", reflect.TypeOf((*MockExpirableStorageBakery)(nil).ExpireStorageAfter), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireStorageAfter", reflect.TypeOf((*MockExpirableStorageBakery)(nil).ExpireStorageAfter), arg0) + return &MockExpirableStorageBakeryExpireStorageAfterCall{Call: call} +} + +// MockExpirableStorageBakeryExpireStorageAfterCall wrap *gomock.Call +type MockExpirableStorageBakeryExpireStorageAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageBakeryExpireStorageAfterCall) Return(arg0 authentication.ExpirableStorageBakery, arg1 error) *MockExpirableStorageBakeryExpireStorageAfterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageBakeryExpireStorageAfterCall) Do(f func(time.Duration) (authentication.ExpirableStorageBakery, error)) *MockExpirableStorageBakeryExpireStorageAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageBakeryExpireStorageAfterCall) DoAndReturn(f func(time.Duration) (authentication.ExpirableStorageBakery, error)) *MockExpirableStorageBakeryExpireStorageAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewMacaroon mocks base method. @@ -92,8 +140,32 @@ func (m *MockExpirableStorageBakery) NewMacaroon(arg0 context.Context, arg1 bake } // NewMacaroon indicates an expected call of NewMacaroon. -func (mr *MockExpirableStorageBakeryMockRecorder) NewMacaroon(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockExpirableStorageBakeryMockRecorder) NewMacaroon(arg0, arg1, arg2 any, arg3 ...any) *MockExpirableStorageBakeryNewMacaroonCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMacaroon", reflect.TypeOf((*MockExpirableStorageBakery)(nil).NewMacaroon), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMacaroon", reflect.TypeOf((*MockExpirableStorageBakery)(nil).NewMacaroon), varargs...) + return &MockExpirableStorageBakeryNewMacaroonCall{Call: call} +} + +// MockExpirableStorageBakeryNewMacaroonCall wrap *gomock.Call +type MockExpirableStorageBakeryNewMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageBakeryNewMacaroonCall) Return(arg0 *bakery.Macaroon, arg1 error) *MockExpirableStorageBakeryNewMacaroonCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageBakeryNewMacaroonCall) Do(f func(context.Context, bakery.Version, []checkers.Caveat, ...bakery.Op) (*bakery.Macaroon, error)) *MockExpirableStorageBakeryNewMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageBakeryNewMacaroonCall) DoAndReturn(f func(context.Context, bakery.Version, []checkers.Caveat, ...bakery.Op) (*bakery.Macaroon, error)) *MockExpirableStorageBakeryNewMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/crossmodel/mocks/bakery_mock.go b/apiserver/common/crossmodel/mocks/bakery_mock.go index 023c99cde7d..22a4e55e773 100644 --- a/apiserver/common/crossmodel/mocks/bakery_mock.go +++ b/apiserver/common/crossmodel/mocks/bakery_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/bakery_mock.go github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery FirstPartyCaveatChecker +// mockgen -typed -package mocks -destination mocks/bakery_mock.go github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery FirstPartyCaveatChecker // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockFirstPartyCaveatChecker) CheckFirstPartyCaveat(arg0 context.Context } // CheckFirstPartyCaveat indicates an expected call of CheckFirstPartyCaveat. -func (mr *MockFirstPartyCaveatCheckerMockRecorder) CheckFirstPartyCaveat(arg0, arg1 any) *gomock.Call { +func (mr *MockFirstPartyCaveatCheckerMockRecorder) CheckFirstPartyCaveat(arg0, arg1 any) *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckFirstPartyCaveat", reflect.TypeOf((*MockFirstPartyCaveatChecker)(nil).CheckFirstPartyCaveat), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckFirstPartyCaveat", reflect.TypeOf((*MockFirstPartyCaveatChecker)(nil).CheckFirstPartyCaveat), arg0, arg1) + return &MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall{Call: call} +} + +// MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall wrap *gomock.Call +type MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall) Return(arg0 error) *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall) Do(f func(context.Context, string) error) *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall) DoAndReturn(f func(context.Context, string) error) *MockFirstPartyCaveatCheckerCheckFirstPartyCaveatCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Namespace mocks base method. @@ -63,7 +87,31 @@ func (m *MockFirstPartyCaveatChecker) Namespace() *checkers.Namespace { } // Namespace indicates an expected call of Namespace. -func (mr *MockFirstPartyCaveatCheckerMockRecorder) Namespace() *gomock.Call { +func (mr *MockFirstPartyCaveatCheckerMockRecorder) Namespace() *MockFirstPartyCaveatCheckerNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockFirstPartyCaveatChecker)(nil).Namespace)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockFirstPartyCaveatChecker)(nil).Namespace)) + return &MockFirstPartyCaveatCheckerNamespaceCall{Call: call} +} + +// MockFirstPartyCaveatCheckerNamespaceCall wrap *gomock.Call +type MockFirstPartyCaveatCheckerNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirstPartyCaveatCheckerNamespaceCall) Return(arg0 *checkers.Namespace) *MockFirstPartyCaveatCheckerNamespaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirstPartyCaveatCheckerNamespaceCall) Do(f func() *checkers.Namespace) *MockFirstPartyCaveatCheckerNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirstPartyCaveatCheckerNamespaceCall) DoAndReturn(f func() *checkers.Namespace) *MockFirstPartyCaveatCheckerNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/crossmodel/mocks/bakerystorage_mock.go b/apiserver/common/crossmodel/mocks/bakerystorage_mock.go index a0f0d7bc7cb..cb7937ba4e6 100644 --- a/apiserver/common/crossmodel/mocks/bakerystorage_mock.go +++ b/apiserver/common/crossmodel/mocks/bakerystorage_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/bakerystorage_mock.go github.com/juju/juju/state/bakerystorage BakeryConfig,ExpirableStorage +// mockgen -typed -package mocks -destination mocks/bakerystorage_mock.go github.com/juju/juju/state/bakerystorage BakeryConfig,ExpirableStorage // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockBakeryConfig) GetExternalUsersThirdPartyKey() (*bakery.KeyPair, err } // GetExternalUsersThirdPartyKey indicates an expected call of GetExternalUsersThirdPartyKey. -func (mr *MockBakeryConfigMockRecorder) GetExternalUsersThirdPartyKey() *gomock.Call { +func (mr *MockBakeryConfigMockRecorder) GetExternalUsersThirdPartyKey() *MockBakeryConfigGetExternalUsersThirdPartyKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExternalUsersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetExternalUsersThirdPartyKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExternalUsersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetExternalUsersThirdPartyKey)) + return &MockBakeryConfigGetExternalUsersThirdPartyKeyCall{Call: call} +} + +// MockBakeryConfigGetExternalUsersThirdPartyKeyCall wrap *gomock.Call +type MockBakeryConfigGetExternalUsersThirdPartyKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBakeryConfigGetExternalUsersThirdPartyKeyCall) Return(arg0 *bakery.KeyPair, arg1 error) *MockBakeryConfigGetExternalUsersThirdPartyKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBakeryConfigGetExternalUsersThirdPartyKeyCall) Do(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetExternalUsersThirdPartyKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBakeryConfigGetExternalUsersThirdPartyKeyCall) DoAndReturn(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetExternalUsersThirdPartyKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetLocalUsersKey mocks base method. @@ -68,9 +92,33 @@ func (m *MockBakeryConfig) GetLocalUsersKey() (*bakery.KeyPair, error) { } // GetLocalUsersKey indicates an expected call of GetLocalUsersKey. -func (mr *MockBakeryConfigMockRecorder) GetLocalUsersKey() *gomock.Call { +func (mr *MockBakeryConfigMockRecorder) GetLocalUsersKey() *MockBakeryConfigGetLocalUsersKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLocalUsersKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetLocalUsersKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLocalUsersKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetLocalUsersKey)) + return &MockBakeryConfigGetLocalUsersKeyCall{Call: call} +} + +// MockBakeryConfigGetLocalUsersKeyCall wrap *gomock.Call +type MockBakeryConfigGetLocalUsersKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBakeryConfigGetLocalUsersKeyCall) Return(arg0 *bakery.KeyPair, arg1 error) *MockBakeryConfigGetLocalUsersKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBakeryConfigGetLocalUsersKeyCall) Do(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetLocalUsersKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBakeryConfigGetLocalUsersKeyCall) DoAndReturn(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetLocalUsersKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetLocalUsersThirdPartyKey mocks base method. @@ -83,9 +131,33 @@ func (m *MockBakeryConfig) GetLocalUsersThirdPartyKey() (*bakery.KeyPair, error) } // GetLocalUsersThirdPartyKey indicates an expected call of GetLocalUsersThirdPartyKey. -func (mr *MockBakeryConfigMockRecorder) GetLocalUsersThirdPartyKey() *gomock.Call { +func (mr *MockBakeryConfigMockRecorder) GetLocalUsersThirdPartyKey() *MockBakeryConfigGetLocalUsersThirdPartyKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLocalUsersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetLocalUsersThirdPartyKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLocalUsersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetLocalUsersThirdPartyKey)) + return &MockBakeryConfigGetLocalUsersThirdPartyKeyCall{Call: call} +} + +// MockBakeryConfigGetLocalUsersThirdPartyKeyCall wrap *gomock.Call +type MockBakeryConfigGetLocalUsersThirdPartyKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBakeryConfigGetLocalUsersThirdPartyKeyCall) Return(arg0 *bakery.KeyPair, arg1 error) *MockBakeryConfigGetLocalUsersThirdPartyKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBakeryConfigGetLocalUsersThirdPartyKeyCall) Do(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetLocalUsersThirdPartyKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBakeryConfigGetLocalUsersThirdPartyKeyCall) DoAndReturn(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetLocalUsersThirdPartyKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOffersThirdPartyKey mocks base method. @@ -98,9 +170,33 @@ func (m *MockBakeryConfig) GetOffersThirdPartyKey() (*bakery.KeyPair, error) { } // GetOffersThirdPartyKey indicates an expected call of GetOffersThirdPartyKey. -func (mr *MockBakeryConfigMockRecorder) GetOffersThirdPartyKey() *gomock.Call { +func (mr *MockBakeryConfigMockRecorder) GetOffersThirdPartyKey() *MockBakeryConfigGetOffersThirdPartyKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetOffersThirdPartyKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffersThirdPartyKey", reflect.TypeOf((*MockBakeryConfig)(nil).GetOffersThirdPartyKey)) + return &MockBakeryConfigGetOffersThirdPartyKeyCall{Call: call} +} + +// MockBakeryConfigGetOffersThirdPartyKeyCall wrap *gomock.Call +type MockBakeryConfigGetOffersThirdPartyKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBakeryConfigGetOffersThirdPartyKeyCall) Return(arg0 *bakery.KeyPair, arg1 error) *MockBakeryConfigGetOffersThirdPartyKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBakeryConfigGetOffersThirdPartyKeyCall) Do(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetOffersThirdPartyKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBakeryConfigGetOffersThirdPartyKeyCall) DoAndReturn(f func() (*bakery.KeyPair, error)) *MockBakeryConfigGetOffersThirdPartyKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialiseBakeryConfigOp mocks base method. @@ -113,9 +209,33 @@ func (m *MockBakeryConfig) InitialiseBakeryConfigOp() (txn.Op, error) { } // InitialiseBakeryConfigOp indicates an expected call of InitialiseBakeryConfigOp. -func (mr *MockBakeryConfigMockRecorder) InitialiseBakeryConfigOp() *gomock.Call { +func (mr *MockBakeryConfigMockRecorder) InitialiseBakeryConfigOp() *MockBakeryConfigInitialiseBakeryConfigOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialiseBakeryConfigOp", reflect.TypeOf((*MockBakeryConfig)(nil).InitialiseBakeryConfigOp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialiseBakeryConfigOp", reflect.TypeOf((*MockBakeryConfig)(nil).InitialiseBakeryConfigOp)) + return &MockBakeryConfigInitialiseBakeryConfigOpCall{Call: call} +} + +// MockBakeryConfigInitialiseBakeryConfigOpCall wrap *gomock.Call +type MockBakeryConfigInitialiseBakeryConfigOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBakeryConfigInitialiseBakeryConfigOpCall) Return(arg0 txn.Op, arg1 error) *MockBakeryConfigInitialiseBakeryConfigOpCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBakeryConfigInitialiseBakeryConfigOpCall) Do(f func() (txn.Op, error)) *MockBakeryConfigInitialiseBakeryConfigOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBakeryConfigInitialiseBakeryConfigOpCall) DoAndReturn(f func() (txn.Op, error)) *MockBakeryConfigInitialiseBakeryConfigOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExpirableStorage is a mock of ExpirableStorage interface. @@ -150,9 +270,33 @@ func (m *MockExpirableStorage) ExpireAfter(arg0 time.Duration) bakerystorage.Exp } // ExpireAfter indicates an expected call of ExpireAfter. -func (mr *MockExpirableStorageMockRecorder) ExpireAfter(arg0 any) *gomock.Call { +func (mr *MockExpirableStorageMockRecorder) ExpireAfter(arg0 any) *MockExpirableStorageExpireAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireAfter", reflect.TypeOf((*MockExpirableStorage)(nil).ExpireAfter), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireAfter", reflect.TypeOf((*MockExpirableStorage)(nil).ExpireAfter), arg0) + return &MockExpirableStorageExpireAfterCall{Call: call} +} + +// MockExpirableStorageExpireAfterCall wrap *gomock.Call +type MockExpirableStorageExpireAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageExpireAfterCall) Return(arg0 bakerystorage.ExpirableStorage) *MockExpirableStorageExpireAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageExpireAfterCall) Do(f func(time.Duration) bakerystorage.ExpirableStorage) *MockExpirableStorageExpireAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageExpireAfterCall) DoAndReturn(f func(time.Duration) bakerystorage.ExpirableStorage) *MockExpirableStorageExpireAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -165,9 +309,33 @@ func (m *MockExpirableStorage) Get(arg0 context.Context, arg1 []byte) ([]byte, e } // Get indicates an expected call of Get. -func (mr *MockExpirableStorageMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockExpirableStorageMockRecorder) Get(arg0, arg1 any) *MockExpirableStorageGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockExpirableStorage)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockExpirableStorage)(nil).Get), arg0, arg1) + return &MockExpirableStorageGetCall{Call: call} +} + +// MockExpirableStorageGetCall wrap *gomock.Call +type MockExpirableStorageGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageGetCall) Return(arg0 []byte, arg1 error) *MockExpirableStorageGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageGetCall) Do(f func(context.Context, []byte) ([]byte, error)) *MockExpirableStorageGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageGetCall) DoAndReturn(f func(context.Context, []byte) ([]byte, error)) *MockExpirableStorageGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootKey mocks base method. @@ -181,7 +349,31 @@ func (m *MockExpirableStorage) RootKey(arg0 context.Context) ([]byte, []byte, er } // RootKey indicates an expected call of RootKey. -func (mr *MockExpirableStorageMockRecorder) RootKey(arg0 any) *gomock.Call { +func (mr *MockExpirableStorageMockRecorder) RootKey(arg0 any) *MockExpirableStorageRootKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootKey", reflect.TypeOf((*MockExpirableStorage)(nil).RootKey), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootKey", reflect.TypeOf((*MockExpirableStorage)(nil).RootKey), arg0) + return &MockExpirableStorageRootKeyCall{Call: call} +} + +// MockExpirableStorageRootKeyCall wrap *gomock.Call +type MockExpirableStorageRootKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpirableStorageRootKeyCall) Return(arg0, arg1 []byte, arg2 error) *MockExpirableStorageRootKeyCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpirableStorageRootKeyCall) Do(f func(context.Context) ([]byte, []byte, error)) *MockExpirableStorageRootKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpirableStorageRootKeyCall) DoAndReturn(f func(context.Context) ([]byte, []byte, error)) *MockExpirableStorageRootKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/crossmodel/mocks/crossmodel_mock.go b/apiserver/common/crossmodel/mocks/crossmodel_mock.go index 040a02d7b15..cbc661814f3 100644 --- a/apiserver/common/crossmodel/mocks/crossmodel_mock.go +++ b/apiserver/common/crossmodel/mocks/crossmodel_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/crossmodel_mock.go github.com/juju/juju/apiserver/common/crossmodel OfferBakeryInterface,Backend +// mockgen -typed -package mocks -destination mocks/crossmodel_mock.go github.com/juju/juju/apiserver/common/crossmodel OfferBakeryInterface,Backend // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockOfferBakeryInterface) CreateDischargeMacaroon(arg0 context.Context, } // CreateDischargeMacaroon indicates an expected call of CreateDischargeMacaroon. -func (mr *MockOfferBakeryInterfaceMockRecorder) CreateDischargeMacaroon(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) CreateDischargeMacaroon(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockOfferBakeryInterfaceCreateDischargeMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDischargeMacaroon", reflect.TypeOf((*MockOfferBakeryInterface)(nil).CreateDischargeMacaroon), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDischargeMacaroon", reflect.TypeOf((*MockOfferBakeryInterface)(nil).CreateDischargeMacaroon), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockOfferBakeryInterfaceCreateDischargeMacaroonCall{Call: call} +} + +// MockOfferBakeryInterfaceCreateDischargeMacaroonCall wrap *gomock.Call +type MockOfferBakeryInterfaceCreateDischargeMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfaceCreateDischargeMacaroonCall) Return(arg0 *bakery.Macaroon, arg1 error) *MockOfferBakeryInterfaceCreateDischargeMacaroonCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfaceCreateDischargeMacaroonCall) Do(f func(context.Context, string, string, map[string]string, map[string]string, bakery.Op, bakery.Version) (*bakery.Macaroon, error)) *MockOfferBakeryInterfaceCreateDischargeMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfaceCreateDischargeMacaroonCall) DoAndReturn(f func(context.Context, string, string, map[string]string, map[string]string, bakery.Op, bakery.Version) (*bakery.Macaroon, error)) *MockOfferBakeryInterfaceCreateDischargeMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumeOfferCaveats mocks base method. @@ -74,9 +98,33 @@ func (m *MockOfferBakeryInterface) GetConsumeOfferCaveats(arg0, arg1, arg2 strin } // GetConsumeOfferCaveats indicates an expected call of GetConsumeOfferCaveats. -func (mr *MockOfferBakeryInterfaceMockRecorder) GetConsumeOfferCaveats(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) GetConsumeOfferCaveats(arg0, arg1, arg2 any) *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumeOfferCaveats", reflect.TypeOf((*MockOfferBakeryInterface)(nil).GetConsumeOfferCaveats), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumeOfferCaveats", reflect.TypeOf((*MockOfferBakeryInterface)(nil).GetConsumeOfferCaveats), arg0, arg1, arg2) + return &MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall{Call: call} +} + +// MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall wrap *gomock.Call +type MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall) Return(arg0 []checkers.Caveat) *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall) Do(f func(string, string, string) []checkers.Caveat) *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall) DoAndReturn(f func(string, string, string) []checkers.Caveat) *MockOfferBakeryInterfaceGetConsumeOfferCaveatsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InferDeclaredFromMacaroon mocks base method. @@ -88,9 +136,33 @@ func (m *MockOfferBakeryInterface) InferDeclaredFromMacaroon(arg0 macaroon.Slice } // InferDeclaredFromMacaroon indicates an expected call of InferDeclaredFromMacaroon. -func (mr *MockOfferBakeryInterfaceMockRecorder) InferDeclaredFromMacaroon(arg0, arg1 any) *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) InferDeclaredFromMacaroon(arg0, arg1 any) *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferDeclaredFromMacaroon", reflect.TypeOf((*MockOfferBakeryInterface)(nil).InferDeclaredFromMacaroon), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferDeclaredFromMacaroon", reflect.TypeOf((*MockOfferBakeryInterface)(nil).InferDeclaredFromMacaroon), arg0, arg1) + return &MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall{Call: call} +} + +// MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall wrap *gomock.Call +type MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall) Return(arg0 map[string]string) *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall) Do(f func(macaroon.Slice, map[string]string) map[string]string) *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall) DoAndReturn(f func(macaroon.Slice, map[string]string) map[string]string) *MockOfferBakeryInterfaceInferDeclaredFromMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RefreshDischargeURL mocks base method. @@ -103,9 +175,33 @@ func (m *MockOfferBakeryInterface) RefreshDischargeURL(arg0 string) (string, err } // RefreshDischargeURL indicates an expected call of RefreshDischargeURL. -func (mr *MockOfferBakeryInterfaceMockRecorder) RefreshDischargeURL(arg0 any) *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) RefreshDischargeURL(arg0 any) *MockOfferBakeryInterfaceRefreshDischargeURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshDischargeURL", reflect.TypeOf((*MockOfferBakeryInterface)(nil).RefreshDischargeURL), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshDischargeURL", reflect.TypeOf((*MockOfferBakeryInterface)(nil).RefreshDischargeURL), arg0) + return &MockOfferBakeryInterfaceRefreshDischargeURLCall{Call: call} +} + +// MockOfferBakeryInterfaceRefreshDischargeURLCall wrap *gomock.Call +type MockOfferBakeryInterfaceRefreshDischargeURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfaceRefreshDischargeURLCall) Return(arg0 string, arg1 error) *MockOfferBakeryInterfaceRefreshDischargeURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfaceRefreshDischargeURLCall) Do(f func(string) (string, error)) *MockOfferBakeryInterfaceRefreshDischargeURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfaceRefreshDischargeURLCall) DoAndReturn(f func(string) (string, error)) *MockOfferBakeryInterfaceRefreshDischargeURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // getBakery mocks base method. @@ -117,9 +213,33 @@ func (m *MockOfferBakeryInterface) getBakery() authentication.ExpirableStorageBa } // getBakery indicates an expected call of getBakery. -func (mr *MockOfferBakeryInterfaceMockRecorder) getBakery() *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) getBakery() *MockOfferBakeryInterfacegetBakeryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getBakery", reflect.TypeOf((*MockOfferBakeryInterface)(nil).getBakery)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getBakery", reflect.TypeOf((*MockOfferBakeryInterface)(nil).getBakery)) + return &MockOfferBakeryInterfacegetBakeryCall{Call: call} +} + +// MockOfferBakeryInterfacegetBakeryCall wrap *gomock.Call +type MockOfferBakeryInterfacegetBakeryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfacegetBakeryCall) Return(arg0 authentication.ExpirableStorageBakery) *MockOfferBakeryInterfacegetBakeryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfacegetBakeryCall) Do(f func() authentication.ExpirableStorageBakery) *MockOfferBakeryInterfacegetBakeryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfacegetBakeryCall) DoAndReturn(f func() authentication.ExpirableStorageBakery) *MockOfferBakeryInterfacegetBakeryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // getClock mocks base method. @@ -131,9 +251,33 @@ func (m *MockOfferBakeryInterface) getClock() clock.Clock { } // getClock indicates an expected call of getClock. -func (mr *MockOfferBakeryInterfaceMockRecorder) getClock() *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) getClock() *MockOfferBakeryInterfacegetClockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getClock", reflect.TypeOf((*MockOfferBakeryInterface)(nil).getClock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getClock", reflect.TypeOf((*MockOfferBakeryInterface)(nil).getClock)) + return &MockOfferBakeryInterfacegetClockCall{Call: call} +} + +// MockOfferBakeryInterfacegetClockCall wrap *gomock.Call +type MockOfferBakeryInterfacegetClockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfacegetClockCall) Return(arg0 clock.Clock) *MockOfferBakeryInterfacegetClockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfacegetClockCall) Do(f func() clock.Clock) *MockOfferBakeryInterfacegetClockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfacegetClockCall) DoAndReturn(f func() clock.Clock) *MockOfferBakeryInterfacegetClockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // setClock mocks base method. @@ -143,9 +287,33 @@ func (m *MockOfferBakeryInterface) setClock(arg0 clock.Clock) { } // setClock indicates an expected call of setClock. -func (mr *MockOfferBakeryInterfaceMockRecorder) setClock(arg0 any) *gomock.Call { +func (mr *MockOfferBakeryInterfaceMockRecorder) setClock(arg0 any) *MockOfferBakeryInterfacesetClockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setClock", reflect.TypeOf((*MockOfferBakeryInterface)(nil).setClock), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setClock", reflect.TypeOf((*MockOfferBakeryInterface)(nil).setClock), arg0) + return &MockOfferBakeryInterfacesetClockCall{Call: call} +} + +// MockOfferBakeryInterfacesetClockCall wrap *gomock.Call +type MockOfferBakeryInterfacesetClockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferBakeryInterfacesetClockCall) Return() *MockOfferBakeryInterfacesetClockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferBakeryInterfacesetClockCall) Do(f func(clock.Clock)) *MockOfferBakeryInterfacesetClockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferBakeryInterfacesetClockCall) DoAndReturn(f func(clock.Clock)) *MockOfferBakeryInterfacesetClockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBackend is a mock of Backend interface. @@ -185,9 +353,33 @@ func (m *MockBackend) AddRelation(arg0 ...state.Endpoint) (crossmodel.Relation, } // AddRelation indicates an expected call of AddRelation. -func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *MockBackendAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + return &MockBackendAddRelationCall{Call: call} +} + +// MockBackendAddRelationCall wrap *gomock.Call +type MockBackendAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockBackendAddRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddRelationCall) Do(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddRelationCall) DoAndReturn(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteApplication mocks base method. @@ -200,9 +392,33 @@ func (m *MockBackend) AddRemoteApplication(arg0 state.AddRemoteApplicationParams } // AddRemoteApplication indicates an expected call of AddRemoteApplication. -func (mr *MockBackendMockRecorder) AddRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddRemoteApplication(arg0 any) *MockBackendAddRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockBackend)(nil).AddRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockBackend)(nil).AddRemoteApplication), arg0) + return &MockBackendAddRemoteApplicationCall{Call: call} +} + +// MockBackendAddRemoteApplicationCall wrap *gomock.Call +type MockBackendAddRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddRemoteApplicationCall) Return(arg0 crossmodel.RemoteApplication, arg1 error) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddRemoteApplicationCall) Do(f func(state.AddRemoteApplicationParams) (crossmodel.RemoteApplication, error)) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddRemoteApplicationCall) DoAndReturn(f func(state.AddRemoteApplicationParams) (crossmodel.RemoteApplication, error)) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelUUIDs mocks base method. @@ -215,9 +431,33 @@ func (m *MockBackend) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockBackendMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockBackendMockRecorder) AllModelUUIDs() *MockBackendAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + return &MockBackendAllModelUUIDsCall{Call: call} +} + +// MockBackendAllModelUUIDsCall wrap *gomock.Call +type MockBackendAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllModelUUIDsCall) Do(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -230,9 +470,33 @@ func (m *MockBackend) Application(arg0 string) (crossmodel.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Application(arg0 any) *MockBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + return &MockBackendApplicationCall{Call: call} +} + +// MockBackendApplicationCall wrap *gomock.Call +type MockBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationCall) Return(arg0 crossmodel.Application, arg1 error) *MockBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationCall) Do(f func(string) (crossmodel.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationCall) DoAndReturn(f func(string) (crossmodel.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationOfferForUUID mocks base method. @@ -245,9 +509,33 @@ func (m *MockBackend) ApplicationOfferForUUID(arg0 string) (*crossmodel0.Applica } // ApplicationOfferForUUID indicates an expected call of ApplicationOfferForUUID. -func (mr *MockBackendMockRecorder) ApplicationOfferForUUID(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ApplicationOfferForUUID(arg0 any) *MockBackendApplicationOfferForUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockBackend)(nil).ApplicationOfferForUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockBackend)(nil).ApplicationOfferForUUID), arg0) + return &MockBackendApplicationOfferForUUIDCall{Call: call} +} + +// MockBackendApplicationOfferForUUIDCall wrap *gomock.Call +type MockBackendApplicationOfferForUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationOfferForUUIDCall) Return(arg0 *crossmodel0.ApplicationOffer, arg1 error) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationOfferForUUIDCall) Do(f func(string) (*crossmodel0.ApplicationOffer, error)) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationOfferForUUIDCall) DoAndReturn(f func(string) (*crossmodel0.ApplicationOffer, error)) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyOperation mocks base method. @@ -259,9 +547,33 @@ func (m *MockBackend) ApplyOperation(arg0 state.ModelOperation) error { } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockBackendMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ApplyOperation(arg0 any) *MockBackendApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBackend)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBackend)(nil).ApplyOperation), arg0) + return &MockBackendApplyOperationCall{Call: call} +} + +// MockBackendApplyOperationCall wrap *gomock.Call +type MockBackendApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplyOperationCall) Return(arg0 error) *MockBackendApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplyOperationCall) Do(f func(state.ModelOperation) error) *MockBackendApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockBackendApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -273,9 +585,33 @@ func (m *MockBackend) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockBackendMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerTag() *MockBackendControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + return &MockBackendControllerTagCall{Call: call} +} + +// MockBackendControllerTagCall wrap *gomock.Call +type MockBackendControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerTagCall) Return(arg0 names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerTagCall) Do(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointsRelation mocks base method. @@ -292,9 +628,33 @@ func (m *MockBackend) EndpointsRelation(arg0 ...state.Endpoint) (crossmodel.Rela } // EndpointsRelation indicates an expected call of EndpointsRelation. -func (mr *MockBackendMockRecorder) EndpointsRelation(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) EndpointsRelation(arg0 ...any) *MockBackendEndpointsRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsRelation", reflect.TypeOf((*MockBackend)(nil).EndpointsRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsRelation", reflect.TypeOf((*MockBackend)(nil).EndpointsRelation), arg0...) + return &MockBackendEndpointsRelationCall{Call: call} +} + +// MockBackendEndpointsRelationCall wrap *gomock.Call +type MockBackendEndpointsRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendEndpointsRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockBackendEndpointsRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendEndpointsRelationCall) Do(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockBackendEndpointsRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendEndpointsRelationCall) DoAndReturn(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockBackendEndpointsRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExportLocalEntity mocks base method. @@ -307,9 +667,33 @@ func (m *MockBackend) ExportLocalEntity(arg0 names.Tag) (string, error) { } // ExportLocalEntity indicates an expected call of ExportLocalEntity. -func (mr *MockBackendMockRecorder) ExportLocalEntity(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ExportLocalEntity(arg0 any) *MockBackendExportLocalEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportLocalEntity", reflect.TypeOf((*MockBackend)(nil).ExportLocalEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportLocalEntity", reflect.TypeOf((*MockBackend)(nil).ExportLocalEntity), arg0) + return &MockBackendExportLocalEntityCall{Call: call} +} + +// MockBackendExportLocalEntityCall wrap *gomock.Call +type MockBackendExportLocalEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendExportLocalEntityCall) Return(arg0 string, arg1 error) *MockBackendExportLocalEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendExportLocalEntityCall) Do(f func(names.Tag) (string, error)) *MockBackendExportLocalEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendExportLocalEntityCall) DoAndReturn(f func(names.Tag) (string, error)) *MockBackendExportLocalEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOfferAccess mocks base method. @@ -322,9 +706,33 @@ func (m *MockBackend) GetOfferAccess(arg0 string, arg1 names.UserTag) (permissio } // GetOfferAccess indicates an expected call of GetOfferAccess. -func (mr *MockBackendMockRecorder) GetOfferAccess(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetOfferAccess(arg0, arg1 any) *MockBackendGetOfferAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOfferAccess", reflect.TypeOf((*MockBackend)(nil).GetOfferAccess), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOfferAccess", reflect.TypeOf((*MockBackend)(nil).GetOfferAccess), arg0, arg1) + return &MockBackendGetOfferAccessCall{Call: call} +} + +// MockBackendGetOfferAccessCall wrap *gomock.Call +type MockBackendGetOfferAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetOfferAccessCall) Return(arg0 permission.Access, arg1 error) *MockBackendGetOfferAccessCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetOfferAccessCall) Do(f func(string, names.UserTag) (permission.Access, error)) *MockBackendGetOfferAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetOfferAccessCall) DoAndReturn(f func(string, names.UserTag) (permission.Access, error)) *MockBackendGetOfferAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRemoteEntity mocks base method. @@ -337,9 +745,33 @@ func (m *MockBackend) GetRemoteEntity(arg0 string) (names.Tag, error) { } // GetRemoteEntity indicates an expected call of GetRemoteEntity. -func (mr *MockBackendMockRecorder) GetRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetRemoteEntity(arg0 any) *MockBackendGetRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockBackend)(nil).GetRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockBackend)(nil).GetRemoteEntity), arg0) + return &MockBackendGetRemoteEntityCall{Call: call} +} + +// MockBackendGetRemoteEntityCall wrap *gomock.Call +type MockBackendGetRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetRemoteEntityCall) Return(arg0 names.Tag, arg1 error) *MockBackendGetRemoteEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetRemoteEntityCall) Do(f func(string) (names.Tag, error)) *MockBackendGetRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetRemoteEntityCall) DoAndReturn(f func(string) (names.Tag, error)) *MockBackendGetRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetToken mocks base method. @@ -352,9 +784,33 @@ func (m *MockBackend) GetToken(arg0 names.Tag) (string, error) { } // GetToken indicates an expected call of GetToken. -func (mr *MockBackendMockRecorder) GetToken(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetToken(arg0 any) *MockBackendGetTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockBackend)(nil).GetToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockBackend)(nil).GetToken), arg0) + return &MockBackendGetTokenCall{Call: call} +} + +// MockBackendGetTokenCall wrap *gomock.Call +type MockBackendGetTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetTokenCall) Return(arg0 string, arg1 error) *MockBackendGetTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetTokenCall) Do(f func(names.Tag) (string, error)) *MockBackendGetTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetTokenCall) DoAndReturn(f func(names.Tag) (string, error)) *MockBackendGetTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ImportRemoteEntity mocks base method. @@ -366,9 +822,33 @@ func (m *MockBackend) ImportRemoteEntity(arg0 names.Tag, arg1 string) error { } // ImportRemoteEntity indicates an expected call of ImportRemoteEntity. -func (mr *MockBackendMockRecorder) ImportRemoteEntity(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ImportRemoteEntity(arg0, arg1 any) *MockBackendImportRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportRemoteEntity", reflect.TypeOf((*MockBackend)(nil).ImportRemoteEntity), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportRemoteEntity", reflect.TypeOf((*MockBackend)(nil).ImportRemoteEntity), arg0, arg1) + return &MockBackendImportRemoteEntityCall{Call: call} +} + +// MockBackendImportRemoteEntityCall wrap *gomock.Call +type MockBackendImportRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendImportRemoteEntityCall) Return(arg0 error) *MockBackendImportRemoteEntityCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendImportRemoteEntityCall) Do(f func(names.Tag, string) error) *MockBackendImportRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendImportRemoteEntityCall) DoAndReturn(f func(names.Tag, string) error) *MockBackendImportRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IngressNetworks mocks base method. @@ -381,9 +861,33 @@ func (m *MockBackend) IngressNetworks(arg0 string) (state.RelationNetworks, erro } // IngressNetworks indicates an expected call of IngressNetworks. -func (mr *MockBackendMockRecorder) IngressNetworks(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) IngressNetworks(arg0 any) *MockBackendIngressNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressNetworks", reflect.TypeOf((*MockBackend)(nil).IngressNetworks), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressNetworks", reflect.TypeOf((*MockBackend)(nil).IngressNetworks), arg0) + return &MockBackendIngressNetworksCall{Call: call} +} + +// MockBackendIngressNetworksCall wrap *gomock.Call +type MockBackendIngressNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendIngressNetworksCall) Return(arg0 state.RelationNetworks, arg1 error) *MockBackendIngressNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendIngressNetworksCall) Do(f func(string) (state.RelationNetworks, error)) *MockBackendIngressNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendIngressNetworksCall) DoAndReturn(f func(string) (state.RelationNetworks, error)) *MockBackendIngressNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // KeyRelation mocks base method. @@ -396,9 +900,33 @@ func (m *MockBackend) KeyRelation(arg0 string) (crossmodel.Relation, error) { } // KeyRelation indicates an expected call of KeyRelation. -func (mr *MockBackendMockRecorder) KeyRelation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) KeyRelation(arg0 any) *MockBackendKeyRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockBackend)(nil).KeyRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockBackend)(nil).KeyRelation), arg0) + return &MockBackendKeyRelationCall{Call: call} +} + +// MockBackendKeyRelationCall wrap *gomock.Call +type MockBackendKeyRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendKeyRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockBackendKeyRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendKeyRelationCall) Do(f func(string) (crossmodel.Relation, error)) *MockBackendKeyRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendKeyRelationCall) DoAndReturn(f func(string) (crossmodel.Relation, error)) *MockBackendKeyRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -411,9 +939,33 @@ func (m *MockBackend) ModelConfig(arg0 context.Context) (*config.Config, error) } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockBackendMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ModelConfig(arg0 any) *MockBackendModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBackend)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBackend)(nil).ModelConfig), arg0) + return &MockBackendModelConfigCall{Call: call} +} + +// MockBackendModelConfigCall wrap *gomock.Call +type MockBackendModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockBackendModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -425,9 +977,33 @@ func (m *MockBackend) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackendMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelTag() *MockBackendModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + return &MockBackendModelTagCall{Call: call} +} + +// MockBackendModelTagCall wrap *gomock.Call +type MockBackendModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelTagCall) Return(arg0 names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelTagCall) Do(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -439,9 +1015,33 @@ func (m *MockBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelUUID() *MockBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + return &MockBackendModelUUIDCall{Call: call} +} + +// MockBackendModelUUIDCall wrap *gomock.Call +type MockBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelUUIDCall) Return(arg0 string) *MockBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelUUIDCall) Do(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelUUIDCall) DoAndReturn(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferConnectionForRelation mocks base method. @@ -454,9 +1054,33 @@ func (m *MockBackend) OfferConnectionForRelation(arg0 string) (crossmodel.OfferC } // OfferConnectionForRelation indicates an expected call of OfferConnectionForRelation. -func (mr *MockBackendMockRecorder) OfferConnectionForRelation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) OfferConnectionForRelation(arg0 any) *MockBackendOfferConnectionForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockBackend)(nil).OfferConnectionForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockBackend)(nil).OfferConnectionForRelation), arg0) + return &MockBackendOfferConnectionForRelationCall{Call: call} +} + +// MockBackendOfferConnectionForRelationCall wrap *gomock.Call +type MockBackendOfferConnectionForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendOfferConnectionForRelationCall) Return(arg0 crossmodel.OfferConnection, arg1 error) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendOfferConnectionForRelationCall) Do(f func(string) (crossmodel.OfferConnection, error)) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendOfferConnectionForRelationCall) DoAndReturn(f func(string) (crossmodel.OfferConnection, error)) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUIDForRelation mocks base method. @@ -469,9 +1093,33 @@ func (m *MockBackend) OfferUUIDForRelation(arg0 string) (string, error) { } // OfferUUIDForRelation indicates an expected call of OfferUUIDForRelation. -func (mr *MockBackendMockRecorder) OfferUUIDForRelation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) OfferUUIDForRelation(arg0 any) *MockBackendOfferUUIDForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForRelation", reflect.TypeOf((*MockBackend)(nil).OfferUUIDForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForRelation", reflect.TypeOf((*MockBackend)(nil).OfferUUIDForRelation), arg0) + return &MockBackendOfferUUIDForRelationCall{Call: call} +} + +// MockBackendOfferUUIDForRelationCall wrap *gomock.Call +type MockBackendOfferUUIDForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendOfferUUIDForRelationCall) Return(arg0 string, arg1 error) *MockBackendOfferUUIDForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendOfferUUIDForRelationCall) Do(f func(string) (string, error)) *MockBackendOfferUUIDForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendOfferUUIDForRelationCall) DoAndReturn(f func(string) (string, error)) *MockBackendOfferUUIDForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplication mocks base method. @@ -484,9 +1132,33 @@ func (m *MockBackend) RemoteApplication(arg0 string) (crossmodel.RemoteApplicati } // RemoteApplication indicates an expected call of RemoteApplication. -func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *MockBackendRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + return &MockBackendRemoteApplicationCall{Call: call} +} + +// MockBackendRemoteApplicationCall wrap *gomock.Call +type MockBackendRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoteApplicationCall) Return(arg0 crossmodel.RemoteApplication, arg1 error) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoteApplicationCall) Do(f func(string) (crossmodel.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoteApplicationCall) DoAndReturn(f func(string) (crossmodel.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveIngressNetworks mocks base method. @@ -499,9 +1171,33 @@ func (m *MockBackend) SaveIngressNetworks(arg0 string, arg1 []string) (state.Rel } // SaveIngressNetworks indicates an expected call of SaveIngressNetworks. -func (mr *MockBackendMockRecorder) SaveIngressNetworks(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) SaveIngressNetworks(arg0, arg1 any) *MockBackendSaveIngressNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveIngressNetworks", reflect.TypeOf((*MockBackend)(nil).SaveIngressNetworks), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveIngressNetworks", reflect.TypeOf((*MockBackend)(nil).SaveIngressNetworks), arg0, arg1) + return &MockBackendSaveIngressNetworksCall{Call: call} +} + +// MockBackendSaveIngressNetworksCall wrap *gomock.Call +type MockBackendSaveIngressNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendSaveIngressNetworksCall) Return(arg0 state.RelationNetworks, arg1 error) *MockBackendSaveIngressNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendSaveIngressNetworksCall) Do(f func(string, []string) (state.RelationNetworks, error)) *MockBackendSaveIngressNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendSaveIngressNetworksCall) DoAndReturn(f func(string, []string) (state.RelationNetworks, error)) *MockBackendSaveIngressNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserPermission mocks base method. @@ -514,9 +1210,33 @@ func (m *MockBackend) UserPermission(arg0 names.UserTag, arg1 names.Tag) (permis } // UserPermission indicates an expected call of UserPermission. -func (mr *MockBackendMockRecorder) UserPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) UserPermission(arg0, arg1 any) *MockBackendUserPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserPermission", reflect.TypeOf((*MockBackend)(nil).UserPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserPermission", reflect.TypeOf((*MockBackend)(nil).UserPermission), arg0, arg1) + return &MockBackendUserPermissionCall{Call: call} +} + +// MockBackendUserPermissionCall wrap *gomock.Call +type MockBackendUserPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUserPermissionCall) Return(arg0 permission.Access, arg1 error) *MockBackendUserPermissionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUserPermissionCall) Do(f func(names.UserTag, names.Tag) (permission.Access, error)) *MockBackendUserPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUserPermissionCall) DoAndReturn(f func(names.UserTag, names.Tag) (permission.Access, error)) *MockBackendUserPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOffer mocks base method. @@ -528,9 +1248,33 @@ func (m *MockBackend) WatchOffer(arg0 string) state.NotifyWatcher { } // WatchOffer indicates an expected call of WatchOffer. -func (mr *MockBackendMockRecorder) WatchOffer(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) WatchOffer(arg0 any) *MockBackendWatchOfferCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOffer", reflect.TypeOf((*MockBackend)(nil).WatchOffer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOffer", reflect.TypeOf((*MockBackend)(nil).WatchOffer), arg0) + return &MockBackendWatchOfferCall{Call: call} +} + +// MockBackendWatchOfferCall wrap *gomock.Call +type MockBackendWatchOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendWatchOfferCall) Return(arg0 state.NotifyWatcher) *MockBackendWatchOfferCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendWatchOfferCall) Do(f func(string) state.NotifyWatcher) *MockBackendWatchOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendWatchOfferCall) DoAndReturn(f func(string) state.NotifyWatcher) *MockBackendWatchOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOfferStatus mocks base method. @@ -543,7 +1287,31 @@ func (m *MockBackend) WatchOfferStatus(arg0 string) (state.NotifyWatcher, error) } // WatchOfferStatus indicates an expected call of WatchOfferStatus. -func (mr *MockBackendMockRecorder) WatchOfferStatus(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) WatchOfferStatus(arg0 any) *MockBackendWatchOfferStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOfferStatus", reflect.TypeOf((*MockBackend)(nil).WatchOfferStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOfferStatus", reflect.TypeOf((*MockBackend)(nil).WatchOfferStatus), arg0) + return &MockBackendWatchOfferStatusCall{Call: call} +} + +// MockBackendWatchOfferStatusCall wrap *gomock.Call +type MockBackendWatchOfferStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendWatchOfferStatusCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockBackendWatchOfferStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendWatchOfferStatusCall) Do(f func(string) (state.NotifyWatcher, error)) *MockBackendWatchOfferStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendWatchOfferStatusCall) DoAndReturn(f func(string) (state.NotifyWatcher, error)) *MockBackendWatchOfferStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/crossmodel/mocks/http_mock.go b/apiserver/common/crossmodel/mocks/http_mock.go index f245fa98fcf..2de021172fb 100644 --- a/apiserver/common/crossmodel/mocks/http_mock.go +++ b/apiserver/common/crossmodel/mocks/http_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper +// mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockRoundTripper) RoundTrip(arg0 *http.Request) (*http.Response, error) } // RoundTrip indicates an expected call of RoundTrip. -func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *gomock.Call { +func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *MockRoundTripperRoundTripCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + return &MockRoundTripperRoundTripCall{Call: call} +} + +// MockRoundTripperRoundTripCall wrap *gomock.Call +type MockRoundTripperRoundTripCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoundTripperRoundTripCall) Return(arg0 *http.Response, arg1 error) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoundTripperRoundTripCall) Do(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoundTripperRoundTripCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/crossmodel/package_test.go b/apiserver/common/crossmodel/package_test.go index cf1d8fd0407..c3ec6ea0498 100644 --- a/apiserver/common/crossmodel/package_test.go +++ b/apiserver/common/crossmodel/package_test.go @@ -12,11 +12,11 @@ import ( "github.com/juju/juju/apiserver/authentication" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/authentication_mock.go github.com/juju/juju/apiserver/authentication ExpirableStorageBakery -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/bakerystorage_mock.go github.com/juju/juju/state/bakerystorage BakeryConfig,ExpirableStorage -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/bakery_mock.go github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery FirstPartyCaveatChecker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/crossmodel_mock.go github.com/juju/juju/apiserver/common/crossmodel OfferBakeryInterface,Backend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/authentication_mock.go github.com/juju/juju/apiserver/authentication ExpirableStorageBakery +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/bakerystorage_mock.go github.com/juju/juju/state/bakerystorage BakeryConfig,ExpirableStorage +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/bakery_mock.go github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery FirstPartyCaveatChecker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/crossmodel_mock.go github.com/juju/juju/apiserver/common/crossmodel OfferBakeryInterface,Backend func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/common/firewall/package_test.go b/apiserver/common/firewall/package_test.go index 459cfe8f64d..cb5ffaa09f2 100644 --- a/apiserver/common/firewall/package_test.go +++ b/apiserver/common/firewall/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package firewall_test -destination service_mock_test.go github.com/juju/juju/apiserver/common/firewall ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package firewall_test -destination service_mock_test.go github.com/juju/juju/apiserver/common/firewall ModelConfigService func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/common/firewall/service_mock_test.go b/apiserver/common/firewall/service_mock_test.go index 84cc77b3d77..ca4e6cadea0 100644 --- a/apiserver/common/firewall/service_mock_test.go +++ b/apiserver/common/firewall/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package firewall_test -destination service_mock_test.go github.com/juju/juju/apiserver/common/firewall ModelConfigService +// mockgen -typed -package firewall_test -destination service_mock_test.go github.com/juju/juju/apiserver/common/firewall ModelConfigService // // Package firewall_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/leadership.go b/apiserver/common/leadership.go index 5f4126f13dc..95dcf216455 100644 --- a/apiserver/common/leadership.go +++ b/apiserver/common/leadership.go @@ -17,7 +17,7 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadership.go github.com/juju/juju/apiserver/common LeadershipPinningBackend,LeadershipMachine +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadership.go github.com/juju/juju/apiserver/common LeadershipPinningBackend,LeadershipMachine // LeadershipMachine is an indirection for state.machine. type LeadershipMachine interface { diff --git a/apiserver/common/mocks/authorizer_mock.go b/apiserver/common/mocks/authorizer_mock.go index 61877d1fe38..1e61b9c80d9 100644 --- a/apiserver/common/mocks/authorizer_mock.go +++ b/apiserver/common/mocks/authorizer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/common Authorizer +// mockgen -typed -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/common Authorizer // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -62,9 +86,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -76,7 +124,31 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/controllerconfig_mock.go b/apiserver/common/mocks/controllerconfig_mock.go index 59cac746c0c..ac3f18f4736 100644 --- a/apiserver/common/mocks/controllerconfig_mock.go +++ b/apiserver/common/mocks/controllerconfig_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/controllerconfig_mock.go github.com/juju/juju/apiserver/common ControllerConfigState,ControllerConfigService,ExternalControllerService +// mockgen -typed -package mocks -destination mocks/controllerconfig_mock.go github.com/juju/juju/apiserver/common ControllerConfigState,ControllerConfigService,ExternalControllerService // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockControllerConfigState) APIHostPortsForAgents(arg0 controller.Config } // APIHostPortsForAgents indicates an expected call of APIHostPortsForAgents. -func (mr *MockControllerConfigStateMockRecorder) APIHostPortsForAgents(arg0 any) *gomock.Call { +func (mr *MockControllerConfigStateMockRecorder) APIHostPortsForAgents(arg0 any) *MockControllerConfigStateAPIHostPortsForAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockControllerConfigState)(nil).APIHostPortsForAgents), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockControllerConfigState)(nil).APIHostPortsForAgents), arg0) + return &MockControllerConfigStateAPIHostPortsForAgentsCall{Call: call} +} + +// MockControllerConfigStateAPIHostPortsForAgentsCall wrap *gomock.Call +type MockControllerConfigStateAPIHostPortsForAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigStateAPIHostPortsForAgentsCall) Return(arg0 []network.SpaceHostPorts, arg1 error) *MockControllerConfigStateAPIHostPortsForAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigStateAPIHostPortsForAgentsCall) Do(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerConfigStateAPIHostPortsForAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigStateAPIHostPortsForAgentsCall) DoAndReturn(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerConfigStateAPIHostPortsForAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CompletedMigrationForModel mocks base method. @@ -68,9 +92,33 @@ func (m *MockControllerConfigState) CompletedMigrationForModel(arg0 string) (sta } // CompletedMigrationForModel indicates an expected call of CompletedMigrationForModel. -func (mr *MockControllerConfigStateMockRecorder) CompletedMigrationForModel(arg0 any) *gomock.Call { +func (mr *MockControllerConfigStateMockRecorder) CompletedMigrationForModel(arg0 any) *MockControllerConfigStateCompletedMigrationForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedMigrationForModel", reflect.TypeOf((*MockControllerConfigState)(nil).CompletedMigrationForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedMigrationForModel", reflect.TypeOf((*MockControllerConfigState)(nil).CompletedMigrationForModel), arg0) + return &MockControllerConfigStateCompletedMigrationForModelCall{Call: call} +} + +// MockControllerConfigStateCompletedMigrationForModelCall wrap *gomock.Call +type MockControllerConfigStateCompletedMigrationForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigStateCompletedMigrationForModelCall) Return(arg0 state.ModelMigration, arg1 error) *MockControllerConfigStateCompletedMigrationForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigStateCompletedMigrationForModelCall) Do(f func(string) (state.ModelMigration, error)) *MockControllerConfigStateCompletedMigrationForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigStateCompletedMigrationForModelCall) DoAndReturn(f func(string) (state.ModelMigration, error)) *MockControllerConfigStateCompletedMigrationForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelExists mocks base method. @@ -83,9 +131,33 @@ func (m *MockControllerConfigState) ModelExists(arg0 string) (bool, error) { } // ModelExists indicates an expected call of ModelExists. -func (mr *MockControllerConfigStateMockRecorder) ModelExists(arg0 any) *gomock.Call { +func (mr *MockControllerConfigStateMockRecorder) ModelExists(arg0 any) *MockControllerConfigStateModelExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelExists", reflect.TypeOf((*MockControllerConfigState)(nil).ModelExists), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelExists", reflect.TypeOf((*MockControllerConfigState)(nil).ModelExists), arg0) + return &MockControllerConfigStateModelExistsCall{Call: call} +} + +// MockControllerConfigStateModelExistsCall wrap *gomock.Call +type MockControllerConfigStateModelExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigStateModelExistsCall) Return(arg0 bool, arg1 error) *MockControllerConfigStateModelExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigStateModelExistsCall) Do(f func(string) (bool, error)) *MockControllerConfigStateModelExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigStateModelExistsCall) DoAndReturn(f func(string) (bool, error)) *MockControllerConfigStateModelExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -121,9 +193,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExternalControllerService is a mock of ExternalControllerService interface. @@ -159,9 +255,33 @@ func (m *MockExternalControllerService) ControllerForModel(arg0 context.Context, } // ControllerForModel indicates an expected call of ControllerForModel. -func (mr *MockExternalControllerServiceMockRecorder) ControllerForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) ControllerForModel(arg0, arg1 any) *MockExternalControllerServiceControllerForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExternalControllerService)(nil).ControllerForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExternalControllerService)(nil).ControllerForModel), arg0, arg1) + return &MockExternalControllerServiceControllerForModelCall{Call: call} +} + +// MockExternalControllerServiceControllerForModelCall wrap *gomock.Call +type MockExternalControllerServiceControllerForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceControllerForModelCall) Return(arg0 *crossmodel.ControllerInfo, arg1 error) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceControllerForModelCall) Do(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceControllerForModelCall) DoAndReturn(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateExternalController mocks base method. @@ -173,7 +293,31 @@ func (m *MockExternalControllerService) UpdateExternalController(arg0 context.Co } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *MockExternalControllerServiceUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + return &MockExternalControllerServiceUpdateExternalControllerCall{Call: call} +} + +// MockExternalControllerServiceUpdateExternalControllerCall wrap *gomock.Call +type MockExternalControllerServiceUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Return(arg0 error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Do(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/credential_mock.go b/apiserver/common/mocks/credential_mock.go index 28778316d8f..fbc578f8b79 100644 --- a/apiserver/common/mocks/credential_mock.go +++ b/apiserver/common/mocks/credential_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/credential_mock.go github.com/juju/juju/apiserver/common CredentialService,CloudService +// mockgen -typed -package mocks -destination mocks/credential_mock.go github.com/juju/juju/apiserver/common CredentialService,CloudService // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockCredentialService) CloudCredential(arg0 context.Context, arg1 crede } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockCredentialServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + return &MockCredentialServiceCloudCredentialCall{Call: call} +} + +// MockCredentialServiceCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCredential mocks base method. @@ -67,9 +91,33 @@ func (m *MockCredentialService) WatchCredential(arg0 context.Context, arg1 crede } // WatchCredential indicates an expected call of WatchCredential. -func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *MockCredentialServiceWatchCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + return &MockCredentialServiceWatchCredentialCall{Call: call} +} + +// MockCredentialServiceWatchCredentialCall wrap *gomock.Call +type MockCredentialServiceWatchCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceWatchCredentialCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceWatchCredentialCall) Do(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceWatchCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudService is a mock of CloudService interface. @@ -105,9 +153,33 @@ func (m *MockCloudService) Cloud(arg0 context.Context, arg1 string) (*cloud.Clou } // Cloud indicates an expected call of Cloud. -func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *MockCloudServiceCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + return &MockCloudServiceCloudCall{Call: call} +} + +// MockCloudServiceCloudCall wrap *gomock.Call +type MockCloudServiceCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceCloudCall) Return(arg0 *cloud.Cloud, arg1 error) *MockCloudServiceCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceCloudCall) Do(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceCloudCall) DoAndReturn(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCloud mocks base method. @@ -120,7 +192,31 @@ func (m *MockCloudService) WatchCloud(arg0 context.Context, arg1 string) (watche } // WatchCloud indicates an expected call of WatchCloud. -func (mr *MockCloudServiceMockRecorder) WatchCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) WatchCloud(arg0, arg1 any) *MockCloudServiceWatchCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockCloudService)(nil).WatchCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockCloudService)(nil).WatchCloud), arg0, arg1) + return &MockCloudServiceWatchCloudCall{Call: call} +} + +// MockCloudServiceWatchCloudCall wrap *gomock.Call +type MockCloudServiceWatchCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceWatchCloudCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceWatchCloudCall) Do(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceWatchCloudCall) DoAndReturn(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/environs.go b/apiserver/common/mocks/environs.go index 8e1b66e59ff..8151d50c5f2 100644 --- a/apiserver/common/mocks/environs.go +++ b/apiserver/common/mocks/environs.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/environs.go github.com/juju/juju/environs EnvironConfigGetter,BootstrapEnviron +// mockgen -typed -package mocks -destination mocks/environs.go github.com/juju/juju/environs EnvironConfigGetter,BootstrapEnviron // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockEnvironConfigGetter) CloudSpec(arg0 context.Context) (cloudspec.Clo } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockEnvironConfigGetterMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockEnvironConfigGetterMockRecorder) CloudSpec(arg0 any) *MockEnvironConfigGetterCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockEnvironConfigGetter)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockEnvironConfigGetter)(nil).CloudSpec), arg0) + return &MockEnvironConfigGetterCloudSpecCall{Call: call} +} + +// MockEnvironConfigGetterCloudSpecCall wrap *gomock.Call +type MockEnvironConfigGetterCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigGetterCloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockEnvironConfigGetterCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigGetterCloudSpecCall) Do(f func(context.Context) (cloudspec.CloudSpec, error)) *MockEnvironConfigGetterCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigGetterCloudSpecCall) DoAndReturn(f func(context.Context) (cloudspec.CloudSpec, error)) *MockEnvironConfigGetterCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -70,9 +94,33 @@ func (m *MockEnvironConfigGetter) ModelConfig(arg0 context.Context) (*config.Con } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockEnvironConfigGetterMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockEnvironConfigGetterMockRecorder) ModelConfig(arg0 any) *MockEnvironConfigGetterModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockEnvironConfigGetter)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockEnvironConfigGetter)(nil).ModelConfig), arg0) + return &MockEnvironConfigGetterModelConfigCall{Call: call} +} + +// MockEnvironConfigGetterModelConfigCall wrap *gomock.Call +type MockEnvironConfigGetterModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigGetterModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockEnvironConfigGetterModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigGetterModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockEnvironConfigGetterModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigGetterModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockEnvironConfigGetterModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBootstrapEnviron is a mock of BootstrapEnviron interface. @@ -108,9 +156,33 @@ func (m *MockBootstrapEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 en } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockBootstrapEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockBootstrapEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockBootstrapEnvironBootstrapCall{Call: call} +} + +// MockBootstrapEnvironBootstrapCall wrap *gomock.Call +type MockBootstrapEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -122,9 +194,33 @@ func (m *MockBootstrapEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockBootstrapEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Config() *MockBootstrapEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBootstrapEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBootstrapEnviron)(nil).Config)) + return &MockBootstrapEnvironConfigCall{Call: call} +} + +// MockBootstrapEnvironConfigCall wrap *gomock.Call +type MockBootstrapEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironConfigCall) Return(arg0 *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironConfigCall) Do(f func() *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -137,9 +233,33 @@ func (m *MockBootstrapEnviron) ConstraintsValidator(arg0 envcontext.ProviderCall } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockBootstrapEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockBootstrapEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBootstrapEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBootstrapEnviron)(nil).ConstraintsValidator), arg0) + return &MockBootstrapEnvironConstraintsValidatorCall{Call: call} +} + +// MockBootstrapEnvironConstraintsValidatorCall wrap *gomock.Call +type MockBootstrapEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -151,9 +271,33 @@ func (m *MockBootstrapEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 } // Create indicates an expected call of Create. -func (mr *MockBootstrapEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Create(arg0, arg1 any) *MockBootstrapEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBootstrapEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBootstrapEnviron)(nil).Create), arg0, arg1) + return &MockBootstrapEnvironCreateCall{Call: call} +} + +// MockBootstrapEnvironCreateCall wrap *gomock.Call +type MockBootstrapEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironCreateCall) Return(arg0 error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -165,9 +309,33 @@ func (m *MockBootstrapEnviron) Destroy(arg0 envcontext.ProviderCallContext) erro } // Destroy indicates an expected call of Destroy. -func (mr *MockBootstrapEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Destroy(arg0 any) *MockBootstrapEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBootstrapEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBootstrapEnviron)(nil).Destroy), arg0) + return &MockBootstrapEnvironDestroyCall{Call: call} +} + +// MockBootstrapEnvironDestroyCall wrap *gomock.Call +type MockBootstrapEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironDestroyCall) Return(arg0 error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -179,9 +347,33 @@ func (m *MockBootstrapEnviron) DestroyController(arg0 envcontext.ProviderCallCon } // DestroyController indicates an expected call of DestroyController. -func (mr *MockBootstrapEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockBootstrapEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBootstrapEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBootstrapEnviron)(nil).DestroyController), arg0, arg1) + return &MockBootstrapEnvironDestroyControllerCall{Call: call} +} + +// MockBootstrapEnvironDestroyControllerCall wrap *gomock.Call +type MockBootstrapEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironDestroyControllerCall) Return(arg0 error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -193,9 +385,33 @@ func (m *MockBootstrapEnviron) PrepareForBootstrap(arg0 environs.BootstrapContex } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockBootstrapEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockBootstrapEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockBootstrapEnvironPrepareForBootstrapCall{Call: call} +} + +// MockBootstrapEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockBootstrapEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironPrepareForBootstrapCall) Return(arg0 error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -207,9 +423,33 @@ func (m *MockBootstrapEnviron) SetConfig(arg0 context.Context, arg1 *config.Conf } // SetConfig indicates an expected call of SetConfig. -func (mr *MockBootstrapEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockBootstrapEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBootstrapEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBootstrapEnviron)(nil).SetConfig), arg0, arg1) + return &MockBootstrapEnvironSetConfigCall{Call: call} +} + +// MockBootstrapEnvironSetConfigCall wrap *gomock.Call +type MockBootstrapEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironSetConfigCall) Return(arg0 error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -222,9 +462,33 @@ func (m *MockBootstrapEnviron) StorageProvider(arg0 storage.ProviderType) (stora } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockBootstrapEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) StorageProvider(arg0 any) *MockBootstrapEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProvider), arg0) + return &MockBootstrapEnvironStorageProviderCall{Call: call} +} + +// MockBootstrapEnvironStorageProviderCall wrap *gomock.Call +type MockBootstrapEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -237,7 +501,31 @@ func (m *MockBootstrapEnviron) StorageProviderTypes() ([]storage.ProviderType, e } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockBootstrapEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) StorageProviderTypes() *MockBootstrapEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProviderTypes)) + return &MockBootstrapEnvironStorageProviderTypesCall{Call: call} +} + +// MockBootstrapEnvironStorageProviderTypesCall wrap *gomock.Call +type MockBootstrapEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/leadership.go b/apiserver/common/mocks/leadership.go index 4939fef85e6..bf68f62dfbf 100644 --- a/apiserver/common/mocks/leadership.go +++ b/apiserver/common/mocks/leadership.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadership.go github.com/juju/juju/apiserver/common LeadershipPinningBackend,LeadershipMachine +// mockgen -typed -package mocks -destination mocks/leadership.go github.com/juju/juju/apiserver/common LeadershipPinningBackend,LeadershipMachine // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockLeadershipPinningBackend) Machine(arg0 string) (common.LeadershipMa } // Machine indicates an expected call of Machine. -func (mr *MockLeadershipPinningBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockLeadershipPinningBackendMockRecorder) Machine(arg0 any) *MockLeadershipPinningBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLeadershipPinningBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLeadershipPinningBackend)(nil).Machine), arg0) + return &MockLeadershipPinningBackendMachineCall{Call: call} +} + +// MockLeadershipPinningBackendMachineCall wrap *gomock.Call +type MockLeadershipPinningBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipPinningBackendMachineCall) Return(arg0 common.LeadershipMachine, arg1 error) *MockLeadershipPinningBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipPinningBackendMachineCall) Do(f func(string) (common.LeadershipMachine, error)) *MockLeadershipPinningBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipPinningBackendMachineCall) DoAndReturn(f func(string) (common.LeadershipMachine, error)) *MockLeadershipPinningBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLeadershipMachine is a mock of LeadershipMachine interface. @@ -87,7 +111,31 @@ func (m *MockLeadershipMachine) ApplicationNames() ([]string, error) { } // ApplicationNames indicates an expected call of ApplicationNames. -func (mr *MockLeadershipMachineMockRecorder) ApplicationNames() *gomock.Call { +func (mr *MockLeadershipMachineMockRecorder) ApplicationNames() *MockLeadershipMachineApplicationNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationNames", reflect.TypeOf((*MockLeadershipMachine)(nil).ApplicationNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationNames", reflect.TypeOf((*MockLeadershipMachine)(nil).ApplicationNames)) + return &MockLeadershipMachineApplicationNamesCall{Call: call} +} + +// MockLeadershipMachineApplicationNamesCall wrap *gomock.Call +type MockLeadershipMachineApplicationNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipMachineApplicationNamesCall) Return(arg0 []string, arg1 error) *MockLeadershipMachineApplicationNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipMachineApplicationNamesCall) Do(f func() ([]string, error)) *MockLeadershipMachineApplicationNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipMachineApplicationNamesCall) DoAndReturn(f func() ([]string, error)) *MockLeadershipMachineApplicationNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/modelconfig_mock.go b/apiserver/common/mocks/modelconfig_mock.go index 230bd8ac155..3d514a1d728 100644 --- a/apiserver/common/mocks/modelconfig_mock.go +++ b/apiserver/common/mocks/modelconfig_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/apiserver/common ModelConfigService +// mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/apiserver/common ModelConfigService // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/modeloperation.go b/apiserver/common/mocks/modeloperation.go index 437820ff2b3..9608c24312f 100644 --- a/apiserver/common/mocks/modeloperation.go +++ b/apiserver/common/mocks/modeloperation.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modeloperation.go github.com/juju/juju/state ModelOperation +// mockgen -typed -package mocks -destination mocks/modeloperation.go github.com/juju/juju/state ModelOperation // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockModelOperation) Build(arg0 int) ([]txn.Op, error) { } // Build indicates an expected call of Build. -func (mr *MockModelOperationMockRecorder) Build(arg0 any) *gomock.Call { +func (mr *MockModelOperationMockRecorder) Build(arg0 any) *MockModelOperationBuildCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockModelOperation)(nil).Build), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockModelOperation)(nil).Build), arg0) + return &MockModelOperationBuildCall{Call: call} +} + +// MockModelOperationBuildCall wrap *gomock.Call +type MockModelOperationBuildCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationBuildCall) Return(arg0 []txn.Op, arg1 error) *MockModelOperationBuildCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationBuildCall) Do(f func(int) ([]txn.Op, error)) *MockModelOperationBuildCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationBuildCall) DoAndReturn(f func(int) ([]txn.Op, error)) *MockModelOperationBuildCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -63,7 +87,31 @@ func (m *MockModelOperation) Done(arg0 error) error { } // Done indicates an expected call of Done. -func (mr *MockModelOperationMockRecorder) Done(arg0 any) *gomock.Call { +func (mr *MockModelOperationMockRecorder) Done(arg0 any) *MockModelOperationDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockModelOperation)(nil).Done), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockModelOperation)(nil).Done), arg0) + return &MockModelOperationDoneCall{Call: call} +} + +// MockModelOperationDoneCall wrap *gomock.Call +type MockModelOperationDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationDoneCall) Return(arg0 error) *MockModelOperationDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationDoneCall) Do(f func(error) error) *MockModelOperationDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationDoneCall) DoAndReturn(f func(error) error) *MockModelOperationDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/objectstore.go b/apiserver/common/mocks/objectstore.go index e3995451b8c..a3d8b45c225 100644 --- a/apiserver/common/mocks/objectstore.go +++ b/apiserver/common/mocks/objectstore.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/storage.go b/apiserver/common/mocks/storage.go index fc11b8fb9b5..1be2b5ceb02 100644 --- a/apiserver/common/mocks/storage.go +++ b/apiserver/common/mocks/storage.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/storage.go github.com/juju/juju/state/binarystorage StorageCloser +// mockgen -typed -package mocks -destination mocks/storage.go github.com/juju/juju/state/binarystorage StorageCloser // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockStorageCloser) Add(arg0 context.Context, arg1 io.Reader, arg2 binar } // Add indicates an expected call of Add. -func (mr *MockStorageCloserMockRecorder) Add(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Add(arg0, arg1, arg2 any) *MockStorageCloserAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStorageCloser)(nil).Add), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStorageCloser)(nil).Add), arg0, arg1, arg2) + return &MockStorageCloserAddCall{Call: call} +} + +// MockStorageCloserAddCall wrap *gomock.Call +type MockStorageCloserAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserAddCall) Return(arg0 error) *MockStorageCloserAddCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserAddCall) Do(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockStorageCloserAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserAddCall) DoAndReturn(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockStorageCloserAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMetadata mocks base method. @@ -65,9 +89,33 @@ func (m *MockStorageCloser) AllMetadata() ([]binarystorage.Metadata, error) { } // AllMetadata indicates an expected call of AllMetadata. -func (mr *MockStorageCloserMockRecorder) AllMetadata() *gomock.Call { +func (mr *MockStorageCloserMockRecorder) AllMetadata() *MockStorageCloserAllMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMetadata", reflect.TypeOf((*MockStorageCloser)(nil).AllMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMetadata", reflect.TypeOf((*MockStorageCloser)(nil).AllMetadata)) + return &MockStorageCloserAllMetadataCall{Call: call} +} + +// MockStorageCloserAllMetadataCall wrap *gomock.Call +type MockStorageCloserAllMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserAllMetadataCall) Return(arg0 []binarystorage.Metadata, arg1 error) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserAllMetadataCall) Do(f func() ([]binarystorage.Metadata, error)) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserAllMetadataCall) DoAndReturn(f func() ([]binarystorage.Metadata, error)) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -79,9 +127,33 @@ func (m *MockStorageCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockStorageCloserMockRecorder) Close() *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Close() *MockStorageCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorageCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorageCloser)(nil).Close)) + return &MockStorageCloserCloseCall{Call: call} +} + +// MockStorageCloserCloseCall wrap *gomock.Call +type MockStorageCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserCloseCall) Return(arg0 error) *MockStorageCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserCloseCall) Do(f func() error) *MockStorageCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserCloseCall) DoAndReturn(f func() error) *MockStorageCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Metadata mocks base method. @@ -94,9 +166,33 @@ func (m *MockStorageCloser) Metadata(arg0 string) (binarystorage.Metadata, error } // Metadata indicates an expected call of Metadata. -func (mr *MockStorageCloserMockRecorder) Metadata(arg0 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Metadata(arg0 any) *MockStorageCloserMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockStorageCloser)(nil).Metadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockStorageCloser)(nil).Metadata), arg0) + return &MockStorageCloserMetadataCall{Call: call} +} + +// MockStorageCloserMetadataCall wrap *gomock.Call +type MockStorageCloserMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserMetadataCall) Return(arg0 binarystorage.Metadata, arg1 error) *MockStorageCloserMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserMetadataCall) Do(f func(string) (binarystorage.Metadata, error)) *MockStorageCloserMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserMetadataCall) DoAndReturn(f func(string) (binarystorage.Metadata, error)) *MockStorageCloserMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -110,7 +206,31 @@ func (m *MockStorageCloser) Open(arg0 context.Context, arg1 string) (binarystora } // Open indicates an expected call of Open. -func (mr *MockStorageCloserMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Open(arg0, arg1 any) *MockStorageCloserOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorageCloser)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorageCloser)(nil).Open), arg0, arg1) + return &MockStorageCloserOpenCall{Call: call} +} + +// MockStorageCloserOpenCall wrap *gomock.Call +type MockStorageCloserOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserOpenCall) Return(arg0 binarystorage.Metadata, arg1 io.ReadCloser, arg2 error) *MockStorageCloserOpenCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserOpenCall) Do(f func(context.Context, string) (binarystorage.Metadata, io.ReadCloser, error)) *MockStorageCloserOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserOpenCall) DoAndReturn(f func(context.Context, string) (binarystorage.Metadata, io.ReadCloser, error)) *MockStorageCloserOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/tools_mock.go b/apiserver/common/mocks/tools_mock.go index e5c19ca7abc..af4b8539fd9 100644 --- a/apiserver/common/mocks/tools_mock.go +++ b/apiserver/common/mocks/tools_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/tools_mock.go github.com/juju/juju/apiserver/common ToolsFinder,ToolsFindEntity,ToolsURLGetter,APIHostPortsForAgentsGetter,ToolsStorageGetter,AgentTooler +// mockgen -typed -package mocks -destination mocks/tools_mock.go github.com/juju/juju/apiserver/common ToolsFinder,ToolsFindEntity,ToolsURLGetter,APIHostPortsForAgentsGetter,ToolsStorageGetter,AgentTooler // // Package mocks is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockToolsFinder) FindAgents(arg0 context.Context, arg1 common.FindAgent } // FindAgents indicates an expected call of FindAgents. -func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *gomock.Call { +func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *MockToolsFinderFindAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + return &MockToolsFinderFindAgentsCall{Call: call} +} + +// MockToolsFinderFindAgentsCall wrap *gomock.Call +type MockToolsFinderFindAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsFinderFindAgentsCall) Return(arg0 tools.List, arg1 error) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsFinderFindAgentsCall) Do(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsFinderFindAgentsCall) DoAndReturn(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToolsFindEntity is a mock of ToolsFindEntity interface. @@ -96,9 +120,33 @@ func (m *MockToolsFindEntity) FindEntity(arg0 names.Tag) (state.Entity, error) { } // FindEntity indicates an expected call of FindEntity. -func (mr *MockToolsFindEntityMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockToolsFindEntityMockRecorder) FindEntity(arg0 any) *MockToolsFindEntityFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockToolsFindEntity)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockToolsFindEntity)(nil).FindEntity), arg0) + return &MockToolsFindEntityFindEntityCall{Call: call} +} + +// MockToolsFindEntityFindEntityCall wrap *gomock.Call +type MockToolsFindEntityFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsFindEntityFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockToolsFindEntityFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsFindEntityFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockToolsFindEntityFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsFindEntityFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockToolsFindEntityFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToolsURLGetter is a mock of ToolsURLGetter interface. @@ -134,9 +182,33 @@ func (m *MockToolsURLGetter) ToolsURLs(arg0 context.Context, arg1 controller.Con } // ToolsURLs indicates an expected call of ToolsURLs. -func (mr *MockToolsURLGetterMockRecorder) ToolsURLs(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockToolsURLGetterMockRecorder) ToolsURLs(arg0, arg1, arg2 any) *MockToolsURLGetterToolsURLsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsURLs", reflect.TypeOf((*MockToolsURLGetter)(nil).ToolsURLs), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsURLs", reflect.TypeOf((*MockToolsURLGetter)(nil).ToolsURLs), arg0, arg1, arg2) + return &MockToolsURLGetterToolsURLsCall{Call: call} +} + +// MockToolsURLGetterToolsURLsCall wrap *gomock.Call +type MockToolsURLGetterToolsURLsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsURLGetterToolsURLsCall) Return(arg0 []string, arg1 error) *MockToolsURLGetterToolsURLsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsURLGetterToolsURLsCall) Do(f func(context.Context, controller.Config, version.Binary) ([]string, error)) *MockToolsURLGetterToolsURLsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsURLGetterToolsURLsCall) DoAndReturn(f func(context.Context, controller.Config, version.Binary) ([]string, error)) *MockToolsURLGetterToolsURLsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAPIHostPortsForAgentsGetter is a mock of APIHostPortsForAgentsGetter interface. @@ -172,9 +244,33 @@ func (m *MockAPIHostPortsForAgentsGetter) APIHostPortsForAgents(arg0 controller. } // APIHostPortsForAgents indicates an expected call of APIHostPortsForAgents. -func (mr *MockAPIHostPortsForAgentsGetterMockRecorder) APIHostPortsForAgents(arg0 any) *gomock.Call { +func (mr *MockAPIHostPortsForAgentsGetterMockRecorder) APIHostPortsForAgents(arg0 any) *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockAPIHostPortsForAgentsGetter)(nil).APIHostPortsForAgents), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockAPIHostPortsForAgentsGetter)(nil).APIHostPortsForAgents), arg0) + return &MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall{Call: call} +} + +// MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall wrap *gomock.Call +type MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall) Return(arg0 []network.SpaceHostPorts, arg1 error) *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall) Do(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall) DoAndReturn(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockAPIHostPortsForAgentsGetterAPIHostPortsForAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToolsStorageGetter is a mock of ToolsStorageGetter interface. @@ -210,9 +306,33 @@ func (m *MockToolsStorageGetter) ToolsStorage(arg0 objectstore.ObjectStore) (bin } // ToolsStorage indicates an expected call of ToolsStorage. -func (mr *MockToolsStorageGetterMockRecorder) ToolsStorage(arg0 any) *gomock.Call { +func (mr *MockToolsStorageGetterMockRecorder) ToolsStorage(arg0 any) *MockToolsStorageGetterToolsStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockToolsStorageGetter)(nil).ToolsStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockToolsStorageGetter)(nil).ToolsStorage), arg0) + return &MockToolsStorageGetterToolsStorageCall{Call: call} +} + +// MockToolsStorageGetterToolsStorageCall wrap *gomock.Call +type MockToolsStorageGetterToolsStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsStorageGetterToolsStorageCall) Return(arg0 binarystorage.StorageCloser, arg1 error) *MockToolsStorageGetterToolsStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsStorageGetterToolsStorageCall) Do(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockToolsStorageGetterToolsStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsStorageGetterToolsStorageCall) DoAndReturn(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockToolsStorageGetterToolsStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAgentTooler is a mock of AgentTooler interface. @@ -248,9 +368,33 @@ func (m *MockAgentTooler) AgentTools() (*tools.Tools, error) { } // AgentTools indicates an expected call of AgentTools. -func (mr *MockAgentToolerMockRecorder) AgentTools() *gomock.Call { +func (mr *MockAgentToolerMockRecorder) AgentTools() *MockAgentToolerAgentToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockAgentTooler)(nil).AgentTools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockAgentTooler)(nil).AgentTools)) + return &MockAgentToolerAgentToolsCall{Call: call} +} + +// MockAgentToolerAgentToolsCall wrap *gomock.Call +type MockAgentToolerAgentToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentToolerAgentToolsCall) Return(arg0 *tools.Tools, arg1 error) *MockAgentToolerAgentToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentToolerAgentToolsCall) Do(f func() (*tools.Tools, error)) *MockAgentToolerAgentToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentToolerAgentToolsCall) DoAndReturn(f func() (*tools.Tools, error)) *MockAgentToolerAgentToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAgentVersion mocks base method. @@ -262,9 +406,33 @@ func (m *MockAgentTooler) SetAgentVersion(arg0 version.Binary) error { } // SetAgentVersion indicates an expected call of SetAgentVersion. -func (mr *MockAgentToolerMockRecorder) SetAgentVersion(arg0 any) *gomock.Call { +func (mr *MockAgentToolerMockRecorder) SetAgentVersion(arg0 any) *MockAgentToolerSetAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAgentVersion", reflect.TypeOf((*MockAgentTooler)(nil).SetAgentVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAgentVersion", reflect.TypeOf((*MockAgentTooler)(nil).SetAgentVersion), arg0) + return &MockAgentToolerSetAgentVersionCall{Call: call} +} + +// MockAgentToolerSetAgentVersionCall wrap *gomock.Call +type MockAgentToolerSetAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentToolerSetAgentVersionCall) Return(arg0 error) *MockAgentToolerSetAgentVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentToolerSetAgentVersionCall) Do(f func(version.Binary) error) *MockAgentToolerSetAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentToolerSetAgentVersionCall) DoAndReturn(f func(version.Binary) error) *MockAgentToolerSetAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -276,7 +444,31 @@ func (m *MockAgentTooler) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockAgentToolerMockRecorder) Tag() *gomock.Call { +func (mr *MockAgentToolerMockRecorder) Tag() *MockAgentToolerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockAgentTooler)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockAgentTooler)(nil).Tag)) + return &MockAgentToolerTagCall{Call: call} +} + +// MockAgentToolerTagCall wrap *gomock.Call +type MockAgentToolerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentToolerTagCall) Return(arg0 names.Tag) *MockAgentToolerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentToolerTagCall) Do(f func() names.Tag) *MockAgentToolerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentToolerTagCall) DoAndReturn(f func() names.Tag) *MockAgentToolerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/unitstate.go b/apiserver/common/mocks/unitstate.go index 9fc3c2bc338..38b07ee94b8 100644 --- a/apiserver/common/mocks/unitstate.go +++ b/apiserver/common/mocks/unitstate.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/unitstate.go github.com/juju/juju/apiserver/common UnitStateBackend,UnitStateUnit +// mockgen -typed -package mocks -destination mocks/unitstate.go github.com/juju/juju/apiserver/common UnitStateBackend,UnitStateUnit // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockUnitStateBackend) ApplyOperation(arg0 state.ModelOperation) error { } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockUnitStateBackendMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockUnitStateBackendMockRecorder) ApplyOperation(arg0 any) *MockUnitStateBackendApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockUnitStateBackend)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockUnitStateBackend)(nil).ApplyOperation), arg0) + return &MockUnitStateBackendApplyOperationCall{Call: call} +} + +// MockUnitStateBackendApplyOperationCall wrap *gomock.Call +type MockUnitStateBackendApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateBackendApplyOperationCall) Return(arg0 error) *MockUnitStateBackendApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateBackendApplyOperationCall) Do(f func(state.ModelOperation) error) *MockUnitStateBackendApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateBackendApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockUnitStateBackendApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -64,9 +88,33 @@ func (m *MockUnitStateBackend) Unit(arg0 string) (common.UnitStateUnit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockUnitStateBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockUnitStateBackendMockRecorder) Unit(arg0 any) *MockUnitStateBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUnitStateBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUnitStateBackend)(nil).Unit), arg0) + return &MockUnitStateBackendUnitCall{Call: call} +} + +// MockUnitStateBackendUnitCall wrap *gomock.Call +type MockUnitStateBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateBackendUnitCall) Return(arg0 common.UnitStateUnit, arg1 error) *MockUnitStateBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateBackendUnitCall) Do(f func(string) (common.UnitStateUnit, error)) *MockUnitStateBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateBackendUnitCall) DoAndReturn(f func(string) (common.UnitStateUnit, error)) *MockUnitStateBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnitStateUnit is a mock of UnitStateUnit interface. @@ -101,9 +149,33 @@ func (m *MockUnitStateUnit) SetStateOperation(arg0 *state.UnitState, arg1 state. } // SetStateOperation indicates an expected call of SetStateOperation. -func (mr *MockUnitStateUnitMockRecorder) SetStateOperation(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitStateUnitMockRecorder) SetStateOperation(arg0, arg1 any) *MockUnitStateUnitSetStateOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateOperation", reflect.TypeOf((*MockUnitStateUnit)(nil).SetStateOperation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateOperation", reflect.TypeOf((*MockUnitStateUnit)(nil).SetStateOperation), arg0, arg1) + return &MockUnitStateUnitSetStateOperationCall{Call: call} +} + +// MockUnitStateUnitSetStateOperationCall wrap *gomock.Call +type MockUnitStateUnitSetStateOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateUnitSetStateOperationCall) Return(arg0 state.ModelOperation) *MockUnitStateUnitSetStateOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateUnitSetStateOperationCall) Do(f func(*state.UnitState, state.UnitStateSizeLimits) state.ModelOperation) *MockUnitStateUnitSetStateOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateUnitSetStateOperationCall) DoAndReturn(f func(*state.UnitState, state.UnitStateSizeLimits) state.ModelOperation) *MockUnitStateUnitSetStateOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // State mocks base method. @@ -116,7 +188,31 @@ func (m *MockUnitStateUnit) State() (*state.UnitState, error) { } // State indicates an expected call of State. -func (mr *MockUnitStateUnitMockRecorder) State() *gomock.Call { +func (mr *MockUnitStateUnitMockRecorder) State() *MockUnitStateUnitStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnitStateUnit)(nil).State)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnitStateUnit)(nil).State)) + return &MockUnitStateUnitStateCall{Call: call} +} + +// MockUnitStateUnitStateCall wrap *gomock.Call +type MockUnitStateUnitStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateUnitStateCall) Return(arg0 *state.UnitState, arg1 error) *MockUnitStateUnitStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateUnitStateCall) Do(f func() (*state.UnitState, error)) *MockUnitStateUnitStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateUnitStateCall) DoAndReturn(f func() (*state.UnitState, error)) *MockUnitStateUnitStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/mocks/upgradeseries.go b/apiserver/common/mocks/upgradeseries.go index cfb6f2f33e1..cdb452be2dc 100644 --- a/apiserver/common/mocks/upgradeseries.go +++ b/apiserver/common/mocks/upgradeseries.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/upgradeseries.go github.com/juju/juju/apiserver/common UpgradeSeriesBackend,UpgradeSeriesMachine,UpgradeSeriesUnit +// mockgen -typed -package mocks -destination mocks/upgradeseries.go github.com/juju/juju/apiserver/common UpgradeSeriesBackend,UpgradeSeriesMachine,UpgradeSeriesUnit // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockUpgradeSeriesBackend) Machine(arg0 string) (common.UpgradeSeriesMac } // Machine indicates an expected call of Machine. -func (mr *MockUpgradeSeriesBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesBackendMockRecorder) Machine(arg0 any) *MockUpgradeSeriesBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockUpgradeSeriesBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockUpgradeSeriesBackend)(nil).Machine), arg0) + return &MockUpgradeSeriesBackendMachineCall{Call: call} +} + +// MockUpgradeSeriesBackendMachineCall wrap *gomock.Call +type MockUpgradeSeriesBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesBackendMachineCall) Return(arg0 common.UpgradeSeriesMachine, arg1 error) *MockUpgradeSeriesBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesBackendMachineCall) Do(f func(string) (common.UpgradeSeriesMachine, error)) *MockUpgradeSeriesBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesBackendMachineCall) DoAndReturn(f func(string) (common.UpgradeSeriesMachine, error)) *MockUpgradeSeriesBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -68,9 +92,33 @@ func (m *MockUpgradeSeriesBackend) Unit(arg0 string) (common.UpgradeSeriesUnit, } // Unit indicates an expected call of Unit. -func (mr *MockUpgradeSeriesBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesBackendMockRecorder) Unit(arg0 any) *MockUpgradeSeriesBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUpgradeSeriesBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUpgradeSeriesBackend)(nil).Unit), arg0) + return &MockUpgradeSeriesBackendUnitCall{Call: call} +} + +// MockUpgradeSeriesBackendUnitCall wrap *gomock.Call +type MockUpgradeSeriesBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesBackendUnitCall) Return(arg0 common.UpgradeSeriesUnit, arg1 error) *MockUpgradeSeriesBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesBackendUnitCall) Do(f func(string) (common.UpgradeSeriesUnit, error)) *MockUpgradeSeriesBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesBackendUnitCall) DoAndReturn(f func(string) (common.UpgradeSeriesUnit, error)) *MockUpgradeSeriesBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeSeriesMachine is a mock of UpgradeSeriesMachine interface. @@ -105,9 +153,33 @@ func (m *MockUpgradeSeriesMachine) Base() state.Base { } // Base indicates an expected call of Base. -func (mr *MockUpgradeSeriesMachineMockRecorder) Base() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) Base() *MockUpgradeSeriesMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).Base)) + return &MockUpgradeSeriesMachineBaseCall{Call: call} +} + +// MockUpgradeSeriesMachineBaseCall wrap *gomock.Call +type MockUpgradeSeriesMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineBaseCall) Return(arg0 state.Base) *MockUpgradeSeriesMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineBaseCall) Do(f func() state.Base) *MockUpgradeSeriesMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineBaseCall) DoAndReturn(f func() state.Base) *MockUpgradeSeriesMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUpgradeSeriesLock mocks base method. @@ -119,9 +191,33 @@ func (m *MockUpgradeSeriesMachine) RemoveUpgradeSeriesLock() error { } // RemoveUpgradeSeriesLock indicates an expected call of RemoveUpgradeSeriesLock. -func (mr *MockUpgradeSeriesMachineMockRecorder) RemoveUpgradeSeriesLock() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) RemoveUpgradeSeriesLock() *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUpgradeSeriesLock", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).RemoveUpgradeSeriesLock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUpgradeSeriesLock", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).RemoveUpgradeSeriesLock)) + return &MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall{Call: call} +} + +// MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall wrap *gomock.Call +type MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall) Return(arg0 error) *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall) Do(f func() error) *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall) DoAndReturn(f func() error) *MockUpgradeSeriesMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -133,9 +229,33 @@ func (m *MockUpgradeSeriesMachine) SetInstanceStatus(arg0 status.StatusInfo) err } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockUpgradeSeriesMachineMockRecorder) SetInstanceStatus(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) SetInstanceStatus(arg0 any) *MockUpgradeSeriesMachineSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).SetInstanceStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).SetInstanceStatus), arg0) + return &MockUpgradeSeriesMachineSetInstanceStatusCall{Call: call} +} + +// MockUpgradeSeriesMachineSetInstanceStatusCall wrap *gomock.Call +type MockUpgradeSeriesMachineSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineSetInstanceStatusCall) Return(arg0 error) *MockUpgradeSeriesMachineSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineSetInstanceStatusCall) Do(f func(status.StatusInfo) error) *MockUpgradeSeriesMachineSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineSetInstanceStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockUpgradeSeriesMachineSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradeSeriesStatus mocks base method. @@ -147,9 +267,33 @@ func (m *MockUpgradeSeriesMachine) SetUpgradeSeriesStatus(arg0 model.UpgradeSeri } // SetUpgradeSeriesStatus indicates an expected call of SetUpgradeSeriesStatus. -func (mr *MockUpgradeSeriesMachineMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).SetUpgradeSeriesStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).SetUpgradeSeriesStatus), arg0, arg1) + return &MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall{Call: call} +} + +// MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall wrap *gomock.Call +type MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall) Return(arg0 error) *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockUpgradeSeriesMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartUpgradeSeriesUnitCompletion mocks base method. @@ -161,9 +305,33 @@ func (m *MockUpgradeSeriesMachine) StartUpgradeSeriesUnitCompletion(arg0 string) } // StartUpgradeSeriesUnitCompletion indicates an expected call of StartUpgradeSeriesUnitCompletion. -func (mr *MockUpgradeSeriesMachineMockRecorder) StartUpgradeSeriesUnitCompletion(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) StartUpgradeSeriesUnitCompletion(arg0 any) *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgradeSeriesUnitCompletion", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).StartUpgradeSeriesUnitCompletion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgradeSeriesUnitCompletion", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).StartUpgradeSeriesUnitCompletion), arg0) + return &MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall{Call: call} +} + +// MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall wrap *gomock.Call +type MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall) Return(arg0 error) *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall) Do(f func(string) error) *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall) DoAndReturn(f func(string) error) *MockUpgradeSeriesMachineStartUpgradeSeriesUnitCompletionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -176,9 +344,33 @@ func (m *MockUpgradeSeriesMachine) Units() ([]common.UpgradeSeriesUnit, error) { } // Units indicates an expected call of Units. -func (mr *MockUpgradeSeriesMachineMockRecorder) Units() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) Units() *MockUpgradeSeriesMachineUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).Units)) + return &MockUpgradeSeriesMachineUnitsCall{Call: call} +} + +// MockUpgradeSeriesMachineUnitsCall wrap *gomock.Call +type MockUpgradeSeriesMachineUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineUnitsCall) Return(arg0 []common.UpgradeSeriesUnit, arg1 error) *MockUpgradeSeriesMachineUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineUnitsCall) Do(f func() ([]common.UpgradeSeriesUnit, error)) *MockUpgradeSeriesMachineUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineUnitsCall) DoAndReturn(f func() ([]common.UpgradeSeriesUnit, error)) *MockUpgradeSeriesMachineUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateMachineSeries mocks base method. @@ -190,9 +382,33 @@ func (m *MockUpgradeSeriesMachine) UpdateMachineSeries(arg0 state.Base) error { } // UpdateMachineSeries indicates an expected call of UpdateMachineSeries. -func (mr *MockUpgradeSeriesMachineMockRecorder) UpdateMachineSeries(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) UpdateMachineSeries(arg0 any) *MockUpgradeSeriesMachineUpdateMachineSeriesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMachineSeries", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpdateMachineSeries), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMachineSeries", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpdateMachineSeries), arg0) + return &MockUpgradeSeriesMachineUpdateMachineSeriesCall{Call: call} +} + +// MockUpgradeSeriesMachineUpdateMachineSeriesCall wrap *gomock.Call +type MockUpgradeSeriesMachineUpdateMachineSeriesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineUpdateMachineSeriesCall) Return(arg0 error) *MockUpgradeSeriesMachineUpdateMachineSeriesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineUpdateMachineSeriesCall) Do(f func(state.Base) error) *MockUpgradeSeriesMachineUpdateMachineSeriesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineUpdateMachineSeriesCall) DoAndReturn(f func(state.Base) error) *MockUpgradeSeriesMachineUpdateMachineSeriesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesStatus mocks base method. @@ -205,9 +421,33 @@ func (m *MockUpgradeSeriesMachine) UpgradeSeriesStatus() (model.UpgradeSeriesSta } // UpgradeSeriesStatus indicates an expected call of UpgradeSeriesStatus. -func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesStatus() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesStatus() *MockUpgradeSeriesMachineUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesStatus)) + return &MockUpgradeSeriesMachineUpgradeSeriesStatusCall{Call: call} +} + +// MockUpgradeSeriesMachineUpgradeSeriesStatusCall wrap *gomock.Call +type MockUpgradeSeriesMachineUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineUpgradeSeriesStatusCall) Return(arg0 model.UpgradeSeriesStatus, arg1 error) *MockUpgradeSeriesMachineUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineUpgradeSeriesStatusCall) Do(f func() (model.UpgradeSeriesStatus, error)) *MockUpgradeSeriesMachineUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineUpgradeSeriesStatusCall) DoAndReturn(f func() (model.UpgradeSeriesStatus, error)) *MockUpgradeSeriesMachineUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesTarget mocks base method. @@ -220,9 +460,33 @@ func (m *MockUpgradeSeriesMachine) UpgradeSeriesTarget() (string, error) { } // UpgradeSeriesTarget indicates an expected call of UpgradeSeriesTarget. -func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesTarget() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesTarget() *MockUpgradeSeriesMachineUpgradeSeriesTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesTarget", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesTarget)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesTarget", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesTarget)) + return &MockUpgradeSeriesMachineUpgradeSeriesTargetCall{Call: call} +} + +// MockUpgradeSeriesMachineUpgradeSeriesTargetCall wrap *gomock.Call +type MockUpgradeSeriesMachineUpgradeSeriesTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineUpgradeSeriesTargetCall) Return(arg0 string, arg1 error) *MockUpgradeSeriesMachineUpgradeSeriesTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineUpgradeSeriesTargetCall) Do(f func() (string, error)) *MockUpgradeSeriesMachineUpgradeSeriesTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineUpgradeSeriesTargetCall) DoAndReturn(f func() (string, error)) *MockUpgradeSeriesMachineUpgradeSeriesTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesUnitStatuses mocks base method. @@ -235,9 +499,33 @@ func (m *MockUpgradeSeriesMachine) UpgradeSeriesUnitStatuses() (map[string]state } // UpgradeSeriesUnitStatuses indicates an expected call of UpgradeSeriesUnitStatuses. -func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesUnitStatuses() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) UpgradeSeriesUnitStatuses() *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesUnitStatuses", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesUnitStatuses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesUnitStatuses", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).UpgradeSeriesUnitStatuses)) + return &MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall{Call: call} +} + +// MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall wrap *gomock.Call +type MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall) Return(arg0 map[string]state.UpgradeSeriesUnitStatus, arg1 error) *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall) Do(f func() (map[string]state.UpgradeSeriesUnitStatus, error)) *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall) DoAndReturn(f func() (map[string]state.UpgradeSeriesUnitStatus, error)) *MockUpgradeSeriesMachineUpgradeSeriesUnitStatusesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpgradeSeriesNotifications mocks base method. @@ -250,9 +538,33 @@ func (m *MockUpgradeSeriesMachine) WatchUpgradeSeriesNotifications() (state.Noti } // WatchUpgradeSeriesNotifications indicates an expected call of WatchUpgradeSeriesNotifications. -func (mr *MockUpgradeSeriesMachineMockRecorder) WatchUpgradeSeriesNotifications() *gomock.Call { +func (mr *MockUpgradeSeriesMachineMockRecorder) WatchUpgradeSeriesNotifications() *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).WatchUpgradeSeriesNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUpgradeSeriesMachine)(nil).WatchUpgradeSeriesNotifications)) + return &MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall{Call: call} +} + +// MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall wrap *gomock.Call +type MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall) Do(f func() (state.NotifyWatcher, error)) *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall) DoAndReturn(f func() (state.NotifyWatcher, error)) *MockUpgradeSeriesMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeSeriesUnit is a mock of UpgradeSeriesUnit interface. @@ -288,9 +600,33 @@ func (m *MockUpgradeSeriesUnit) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockUpgradeSeriesUnitMockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockUpgradeSeriesUnitMockRecorder) AssignedMachineId() *MockUpgradeSeriesUnitAssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).AssignedMachineId)) + return &MockUpgradeSeriesUnitAssignedMachineIdCall{Call: call} +} + +// MockUpgradeSeriesUnitAssignedMachineIdCall wrap *gomock.Call +type MockUpgradeSeriesUnitAssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesUnitAssignedMachineIdCall) Return(arg0 string, arg1 error) *MockUpgradeSeriesUnitAssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesUnitAssignedMachineIdCall) Do(f func() (string, error)) *MockUpgradeSeriesUnitAssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesUnitAssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockUpgradeSeriesUnitAssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradeSeriesStatus mocks base method. @@ -302,9 +638,33 @@ func (m *MockUpgradeSeriesUnit) SetUpgradeSeriesStatus(arg0 model.UpgradeSeriesS } // SetUpgradeSeriesStatus indicates an expected call of SetUpgradeSeriesStatus. -func (mr *MockUpgradeSeriesUnitMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeSeriesUnitMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).SetUpgradeSeriesStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).SetUpgradeSeriesStatus), arg0, arg1) + return &MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall{Call: call} +} + +// MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall wrap *gomock.Call +type MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall) Return(arg0 error) *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockUpgradeSeriesUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -316,9 +676,33 @@ func (m *MockUpgradeSeriesUnit) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockUpgradeSeriesUnitMockRecorder) Tag() *gomock.Call { +func (mr *MockUpgradeSeriesUnitMockRecorder) Tag() *MockUpgradeSeriesUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).Tag)) + return &MockUpgradeSeriesUnitTagCall{Call: call} +} + +// MockUpgradeSeriesUnitTagCall wrap *gomock.Call +type MockUpgradeSeriesUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesUnitTagCall) Return(arg0 names.Tag) *MockUpgradeSeriesUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesUnitTagCall) Do(f func() names.Tag) *MockUpgradeSeriesUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesUnitTagCall) DoAndReturn(f func() names.Tag) *MockUpgradeSeriesUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesStatus mocks base method. @@ -332,7 +716,31 @@ func (m *MockUpgradeSeriesUnit) UpgradeSeriesStatus() (model.UpgradeSeriesStatus } // UpgradeSeriesStatus indicates an expected call of UpgradeSeriesStatus. -func (mr *MockUpgradeSeriesUnitMockRecorder) UpgradeSeriesStatus() *gomock.Call { +func (mr *MockUpgradeSeriesUnitMockRecorder) UpgradeSeriesStatus() *MockUpgradeSeriesUnitUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).UpgradeSeriesStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUpgradeSeriesUnit)(nil).UpgradeSeriesStatus)) + return &MockUpgradeSeriesUnitUpgradeSeriesStatusCall{Call: call} +} + +// MockUpgradeSeriesUnitUpgradeSeriesStatusCall wrap *gomock.Call +type MockUpgradeSeriesUnitUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesUnitUpgradeSeriesStatusCall) Return(arg0 model.UpgradeSeriesStatus, arg1 string, arg2 error) *MockUpgradeSeriesUnitUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesUnitUpgradeSeriesStatusCall) Do(f func() (model.UpgradeSeriesStatus, string, error)) *MockUpgradeSeriesUnitUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesUnitUpgradeSeriesStatusCall) DoAndReturn(f func() (model.UpgradeSeriesStatus, string, error)) *MockUpgradeSeriesUnitUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/networkingcommon/mocks/package_mock.go b/apiserver/common/networkingcommon/mocks/package_mock.go index 098412d4ce6..cad33038a34 100644 --- a/apiserver/common/networkingcommon/mocks/package_mock.go +++ b/apiserver/common/networkingcommon/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/common/networkingcommon LinkLayerDevice,LinkLayerAddress,LinkLayerMachine,LinkLayerState,LinkLayerAndSubnetsState,NetworkService +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/common/networkingcommon LinkLayerDevice,LinkLayerAddress,LinkLayerMachine,LinkLayerState,LinkLayerAndSubnetsState,NetworkService // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockLinkLayerDevice) AddAddressOps(arg0 state.LinkLayerDeviceAddress) ( } // AddAddressOps indicates an expected call of AddAddressOps. -func (mr *MockLinkLayerDeviceMockRecorder) AddAddressOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) AddAddressOps(arg0 any) *MockLinkLayerDeviceAddAddressOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddressOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).AddAddressOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddressOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).AddAddressOps), arg0) + return &MockLinkLayerDeviceAddAddressOpsCall{Call: call} +} + +// MockLinkLayerDeviceAddAddressOpsCall wrap *gomock.Call +type MockLinkLayerDeviceAddAddressOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceAddAddressOpsCall) Return(arg0 []txn.Op, arg1 error) *MockLinkLayerDeviceAddAddressOpsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceAddAddressOpsCall) Do(f func(state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerDeviceAddAddressOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceAddAddressOpsCall) DoAndReturn(f func(state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerDeviceAddAddressOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MACAddress mocks base method. @@ -67,9 +91,33 @@ func (m *MockLinkLayerDevice) MACAddress() string { } // MACAddress indicates an expected call of MACAddress. -func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *MockLinkLayerDeviceMACAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + return &MockLinkLayerDeviceMACAddressCall{Call: call} +} + +// MockLinkLayerDeviceMACAddressCall wrap *gomock.Call +type MockLinkLayerDeviceMACAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceMACAddressCall) Return(arg0 string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceMACAddressCall) Do(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceMACAddressCall) DoAndReturn(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -81,9 +129,33 @@ func (m *MockLinkLayerDevice) Name() string { } // Name indicates an expected call of Name. -func (mr *MockLinkLayerDeviceMockRecorder) Name() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Name() *MockLinkLayerDeviceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + return &MockLinkLayerDeviceNameCall{Call: call} +} + +// MockLinkLayerDeviceNameCall wrap *gomock.Call +type MockLinkLayerDeviceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceNameCall) Return(arg0 string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceNameCall) Do(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceNameCall) DoAndReturn(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderID mocks base method. @@ -95,9 +167,33 @@ func (m *MockLinkLayerDevice) ProviderID() network.Id { } // ProviderID indicates an expected call of ProviderID. -func (mr *MockLinkLayerDeviceMockRecorder) ProviderID() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) ProviderID() *MockLinkLayerDeviceProviderIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderID", reflect.TypeOf((*MockLinkLayerDevice)(nil).ProviderID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderID", reflect.TypeOf((*MockLinkLayerDevice)(nil).ProviderID)) + return &MockLinkLayerDeviceProviderIDCall{Call: call} +} + +// MockLinkLayerDeviceProviderIDCall wrap *gomock.Call +type MockLinkLayerDeviceProviderIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceProviderIDCall) Return(arg0 network.Id) *MockLinkLayerDeviceProviderIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceProviderIDCall) Do(f func() network.Id) *MockLinkLayerDeviceProviderIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceProviderIDCall) DoAndReturn(f func() network.Id) *MockLinkLayerDeviceProviderIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveOps mocks base method. @@ -109,9 +205,33 @@ func (m *MockLinkLayerDevice) RemoveOps() []txn.Op { } // RemoveOps indicates an expected call of RemoveOps. -func (mr *MockLinkLayerDeviceMockRecorder) RemoveOps() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) RemoveOps() *MockLinkLayerDeviceRemoveOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).RemoveOps)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).RemoveOps)) + return &MockLinkLayerDeviceRemoveOpsCall{Call: call} +} + +// MockLinkLayerDeviceRemoveOpsCall wrap *gomock.Call +type MockLinkLayerDeviceRemoveOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceRemoveOpsCall) Return(arg0 []txn.Op) *MockLinkLayerDeviceRemoveOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceRemoveOpsCall) Do(f func() []txn.Op) *MockLinkLayerDeviceRemoveOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceRemoveOpsCall) DoAndReturn(f func() []txn.Op) *MockLinkLayerDeviceRemoveOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProviderIDOps mocks base method. @@ -124,9 +244,33 @@ func (m *MockLinkLayerDevice) SetProviderIDOps(arg0 network.Id) ([]txn.Op, error } // SetProviderIDOps indicates an expected call of SetProviderIDOps. -func (mr *MockLinkLayerDeviceMockRecorder) SetProviderIDOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) SetProviderIDOps(arg0 any) *MockLinkLayerDeviceSetProviderIDOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderIDOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).SetProviderIDOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderIDOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).SetProviderIDOps), arg0) + return &MockLinkLayerDeviceSetProviderIDOpsCall{Call: call} +} + +// MockLinkLayerDeviceSetProviderIDOpsCall wrap *gomock.Call +type MockLinkLayerDeviceSetProviderIDOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceSetProviderIDOpsCall) Return(arg0 []txn.Op, arg1 error) *MockLinkLayerDeviceSetProviderIDOpsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceSetProviderIDOpsCall) Do(f func(network.Id) ([]txn.Op, error)) *MockLinkLayerDeviceSetProviderIDOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceSetProviderIDOpsCall) DoAndReturn(f func(network.Id) ([]txn.Op, error)) *MockLinkLayerDeviceSetProviderIDOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -138,9 +282,33 @@ func (m *MockLinkLayerDevice) Type() network.LinkLayerDeviceType { } // Type indicates an expected call of Type. -func (mr *MockLinkLayerDeviceMockRecorder) Type() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Type() *MockLinkLayerDeviceTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + return &MockLinkLayerDeviceTypeCall{Call: call} +} + +// MockLinkLayerDeviceTypeCall wrap *gomock.Call +type MockLinkLayerDeviceTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceTypeCall) Return(arg0 network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceTypeCall) Do(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceTypeCall) DoAndReturn(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateOps mocks base method. @@ -152,9 +320,33 @@ func (m *MockLinkLayerDevice) UpdateOps(arg0 state.LinkLayerDeviceArgs) []txn.Op } // UpdateOps indicates an expected call of UpdateOps. -func (mr *MockLinkLayerDeviceMockRecorder) UpdateOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) UpdateOps(arg0 any) *MockLinkLayerDeviceUpdateOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).UpdateOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOps", reflect.TypeOf((*MockLinkLayerDevice)(nil).UpdateOps), arg0) + return &MockLinkLayerDeviceUpdateOpsCall{Call: call} +} + +// MockLinkLayerDeviceUpdateOpsCall wrap *gomock.Call +type MockLinkLayerDeviceUpdateOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceUpdateOpsCall) Return(arg0 []txn.Op) *MockLinkLayerDeviceUpdateOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceUpdateOpsCall) Do(f func(state.LinkLayerDeviceArgs) []txn.Op) *MockLinkLayerDeviceUpdateOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceUpdateOpsCall) DoAndReturn(f func(state.LinkLayerDeviceArgs) []txn.Op) *MockLinkLayerDeviceUpdateOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinkLayerAddress is a mock of LinkLayerAddress interface. @@ -189,9 +381,33 @@ func (m *MockLinkLayerAddress) DeviceName() string { } // DeviceName indicates an expected call of DeviceName. -func (mr *MockLinkLayerAddressMockRecorder) DeviceName() *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) DeviceName() *MockLinkLayerAddressDeviceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeviceName", reflect.TypeOf((*MockLinkLayerAddress)(nil).DeviceName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeviceName", reflect.TypeOf((*MockLinkLayerAddress)(nil).DeviceName)) + return &MockLinkLayerAddressDeviceNameCall{Call: call} +} + +// MockLinkLayerAddressDeviceNameCall wrap *gomock.Call +type MockLinkLayerAddressDeviceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressDeviceNameCall) Return(arg0 string) *MockLinkLayerAddressDeviceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressDeviceNameCall) Do(f func() string) *MockLinkLayerAddressDeviceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressDeviceNameCall) DoAndReturn(f func() string) *MockLinkLayerAddressDeviceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Origin mocks base method. @@ -203,9 +419,33 @@ func (m *MockLinkLayerAddress) Origin() network.Origin { } // Origin indicates an expected call of Origin. -func (mr *MockLinkLayerAddressMockRecorder) Origin() *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) Origin() *MockLinkLayerAddressOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Origin", reflect.TypeOf((*MockLinkLayerAddress)(nil).Origin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Origin", reflect.TypeOf((*MockLinkLayerAddress)(nil).Origin)) + return &MockLinkLayerAddressOriginCall{Call: call} +} + +// MockLinkLayerAddressOriginCall wrap *gomock.Call +type MockLinkLayerAddressOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressOriginCall) Return(arg0 network.Origin) *MockLinkLayerAddressOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressOriginCall) Do(f func() network.Origin) *MockLinkLayerAddressOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressOriginCall) DoAndReturn(f func() network.Origin) *MockLinkLayerAddressOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveOps mocks base method. @@ -217,9 +457,33 @@ func (m *MockLinkLayerAddress) RemoveOps() []txn.Op { } // RemoveOps indicates an expected call of RemoveOps. -func (mr *MockLinkLayerAddressMockRecorder) RemoveOps() *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) RemoveOps() *MockLinkLayerAddressRemoveOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).RemoveOps)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).RemoveOps)) + return &MockLinkLayerAddressRemoveOpsCall{Call: call} +} + +// MockLinkLayerAddressRemoveOpsCall wrap *gomock.Call +type MockLinkLayerAddressRemoveOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressRemoveOpsCall) Return(arg0 []txn.Op) *MockLinkLayerAddressRemoveOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressRemoveOpsCall) Do(f func() []txn.Op) *MockLinkLayerAddressRemoveOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressRemoveOpsCall) DoAndReturn(f func() []txn.Op) *MockLinkLayerAddressRemoveOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOriginOps mocks base method. @@ -231,9 +495,33 @@ func (m *MockLinkLayerAddress) SetOriginOps(arg0 network.Origin) []txn.Op { } // SetOriginOps indicates an expected call of SetOriginOps. -func (mr *MockLinkLayerAddressMockRecorder) SetOriginOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) SetOriginOps(arg0 any) *MockLinkLayerAddressSetOriginOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOriginOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetOriginOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOriginOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetOriginOps), arg0) + return &MockLinkLayerAddressSetOriginOpsCall{Call: call} +} + +// MockLinkLayerAddressSetOriginOpsCall wrap *gomock.Call +type MockLinkLayerAddressSetOriginOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressSetOriginOpsCall) Return(arg0 []txn.Op) *MockLinkLayerAddressSetOriginOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressSetOriginOpsCall) Do(f func(network.Origin) []txn.Op) *MockLinkLayerAddressSetOriginOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressSetOriginOpsCall) DoAndReturn(f func(network.Origin) []txn.Op) *MockLinkLayerAddressSetOriginOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProviderIDOps mocks base method. @@ -246,9 +534,33 @@ func (m *MockLinkLayerAddress) SetProviderIDOps(arg0 network.Id) ([]txn.Op, erro } // SetProviderIDOps indicates an expected call of SetProviderIDOps. -func (mr *MockLinkLayerAddressMockRecorder) SetProviderIDOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) SetProviderIDOps(arg0 any) *MockLinkLayerAddressSetProviderIDOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderIDOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetProviderIDOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderIDOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetProviderIDOps), arg0) + return &MockLinkLayerAddressSetProviderIDOpsCall{Call: call} +} + +// MockLinkLayerAddressSetProviderIDOpsCall wrap *gomock.Call +type MockLinkLayerAddressSetProviderIDOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressSetProviderIDOpsCall) Return(arg0 []txn.Op, arg1 error) *MockLinkLayerAddressSetProviderIDOpsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressSetProviderIDOpsCall) Do(f func(network.Id) ([]txn.Op, error)) *MockLinkLayerAddressSetProviderIDOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressSetProviderIDOpsCall) DoAndReturn(f func(network.Id) ([]txn.Op, error)) *MockLinkLayerAddressSetProviderIDOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProviderNetIDsOps mocks base method. @@ -260,9 +572,33 @@ func (m *MockLinkLayerAddress) SetProviderNetIDsOps(arg0, arg1 network.Id) []txn } // SetProviderNetIDsOps indicates an expected call of SetProviderNetIDsOps. -func (mr *MockLinkLayerAddressMockRecorder) SetProviderNetIDsOps(arg0, arg1 any) *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) SetProviderNetIDsOps(arg0, arg1 any) *MockLinkLayerAddressSetProviderNetIDsOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderNetIDsOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetProviderNetIDsOps), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderNetIDsOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).SetProviderNetIDsOps), arg0, arg1) + return &MockLinkLayerAddressSetProviderNetIDsOpsCall{Call: call} +} + +// MockLinkLayerAddressSetProviderNetIDsOpsCall wrap *gomock.Call +type MockLinkLayerAddressSetProviderNetIDsOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressSetProviderNetIDsOpsCall) Return(arg0 []txn.Op) *MockLinkLayerAddressSetProviderNetIDsOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressSetProviderNetIDsOpsCall) Do(f func(network.Id, network.Id) []txn.Op) *MockLinkLayerAddressSetProviderNetIDsOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressSetProviderNetIDsOpsCall) DoAndReturn(f func(network.Id, network.Id) []txn.Op) *MockLinkLayerAddressSetProviderNetIDsOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateOps mocks base method. @@ -275,9 +611,33 @@ func (m *MockLinkLayerAddress) UpdateOps(arg0 state.LinkLayerDeviceAddress) ([]t } // UpdateOps indicates an expected call of UpdateOps. -func (mr *MockLinkLayerAddressMockRecorder) UpdateOps(arg0 any) *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) UpdateOps(arg0 any) *MockLinkLayerAddressUpdateOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).UpdateOps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOps", reflect.TypeOf((*MockLinkLayerAddress)(nil).UpdateOps), arg0) + return &MockLinkLayerAddressUpdateOpsCall{Call: call} +} + +// MockLinkLayerAddressUpdateOpsCall wrap *gomock.Call +type MockLinkLayerAddressUpdateOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressUpdateOpsCall) Return(arg0 []txn.Op, arg1 error) *MockLinkLayerAddressUpdateOpsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressUpdateOpsCall) Do(f func(state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerAddressUpdateOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressUpdateOpsCall) DoAndReturn(f func(state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerAddressUpdateOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -289,9 +649,33 @@ func (m *MockLinkLayerAddress) Value() string { } // Value indicates an expected call of Value. -func (mr *MockLinkLayerAddressMockRecorder) Value() *gomock.Call { +func (mr *MockLinkLayerAddressMockRecorder) Value() *MockLinkLayerAddressValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockLinkLayerAddress)(nil).Value)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockLinkLayerAddress)(nil).Value)) + return &MockLinkLayerAddressValueCall{Call: call} +} + +// MockLinkLayerAddressValueCall wrap *gomock.Call +type MockLinkLayerAddressValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAddressValueCall) Return(arg0 string) *MockLinkLayerAddressValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAddressValueCall) Do(f func() string) *MockLinkLayerAddressValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAddressValueCall) DoAndReturn(f func() string) *MockLinkLayerAddressValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinkLayerMachine is a mock of LinkLayerMachine interface. @@ -331,10 +715,34 @@ func (m *MockLinkLayerMachine) AddLinkLayerDeviceOps(arg0 state.LinkLayerDeviceA } // AddLinkLayerDeviceOps indicates an expected call of AddLinkLayerDeviceOps. -func (mr *MockLinkLayerMachineMockRecorder) AddLinkLayerDeviceOps(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) AddLinkLayerDeviceOps(arg0 any, arg1 ...any) *MockLinkLayerMachineAddLinkLayerDeviceOpsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLinkLayerDeviceOps", reflect.TypeOf((*MockLinkLayerMachine)(nil).AddLinkLayerDeviceOps), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLinkLayerDeviceOps", reflect.TypeOf((*MockLinkLayerMachine)(nil).AddLinkLayerDeviceOps), varargs...) + return &MockLinkLayerMachineAddLinkLayerDeviceOpsCall{Call: call} +} + +// MockLinkLayerMachineAddLinkLayerDeviceOpsCall wrap *gomock.Call +type MockLinkLayerMachineAddLinkLayerDeviceOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineAddLinkLayerDeviceOpsCall) Return(arg0 []txn.Op, arg1 error) *MockLinkLayerMachineAddLinkLayerDeviceOpsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineAddLinkLayerDeviceOpsCall) Do(f func(state.LinkLayerDeviceArgs, ...state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerMachineAddLinkLayerDeviceOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineAddLinkLayerDeviceOpsCall) DoAndReturn(f func(state.LinkLayerDeviceArgs, ...state.LinkLayerDeviceAddress) ([]txn.Op, error)) *MockLinkLayerMachineAddLinkLayerDeviceOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllDeviceAddresses mocks base method. @@ -347,9 +755,33 @@ func (m *MockLinkLayerMachine) AllDeviceAddresses() ([]networkingcommon.LinkLaye } // AllDeviceAddresses indicates an expected call of AllDeviceAddresses. -func (mr *MockLinkLayerMachineMockRecorder) AllDeviceAddresses() *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) AllDeviceAddresses() *MockLinkLayerMachineAllDeviceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockLinkLayerMachine)(nil).AllDeviceAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockLinkLayerMachine)(nil).AllDeviceAddresses)) + return &MockLinkLayerMachineAllDeviceAddressesCall{Call: call} +} + +// MockLinkLayerMachineAllDeviceAddressesCall wrap *gomock.Call +type MockLinkLayerMachineAllDeviceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineAllDeviceAddressesCall) Return(arg0 []networkingcommon.LinkLayerAddress, arg1 error) *MockLinkLayerMachineAllDeviceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineAllDeviceAddressesCall) Do(f func() ([]networkingcommon.LinkLayerAddress, error)) *MockLinkLayerMachineAllDeviceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineAllDeviceAddressesCall) DoAndReturn(f func() ([]networkingcommon.LinkLayerAddress, error)) *MockLinkLayerMachineAllDeviceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllLinkLayerDevices mocks base method. @@ -362,9 +794,33 @@ func (m *MockLinkLayerMachine) AllLinkLayerDevices() ([]networkingcommon.LinkLay } // AllLinkLayerDevices indicates an expected call of AllLinkLayerDevices. -func (mr *MockLinkLayerMachineMockRecorder) AllLinkLayerDevices() *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) AllLinkLayerDevices() *MockLinkLayerMachineAllLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockLinkLayerMachine)(nil).AllLinkLayerDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockLinkLayerMachine)(nil).AllLinkLayerDevices)) + return &MockLinkLayerMachineAllLinkLayerDevicesCall{Call: call} +} + +// MockLinkLayerMachineAllLinkLayerDevicesCall wrap *gomock.Call +type MockLinkLayerMachineAllLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineAllLinkLayerDevicesCall) Return(arg0 []networkingcommon.LinkLayerDevice, arg1 error) *MockLinkLayerMachineAllLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineAllLinkLayerDevicesCall) Do(f func() ([]networkingcommon.LinkLayerDevice, error)) *MockLinkLayerMachineAllLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineAllLinkLayerDevicesCall) DoAndReturn(f func() ([]networkingcommon.LinkLayerDevice, error)) *MockLinkLayerMachineAllLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssertAliveOp mocks base method. @@ -376,9 +832,33 @@ func (m *MockLinkLayerMachine) AssertAliveOp() txn.Op { } // AssertAliveOp indicates an expected call of AssertAliveOp. -func (mr *MockLinkLayerMachineMockRecorder) AssertAliveOp() *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) AssertAliveOp() *MockLinkLayerMachineAssertAliveOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssertAliveOp", reflect.TypeOf((*MockLinkLayerMachine)(nil).AssertAliveOp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssertAliveOp", reflect.TypeOf((*MockLinkLayerMachine)(nil).AssertAliveOp)) + return &MockLinkLayerMachineAssertAliveOpCall{Call: call} +} + +// MockLinkLayerMachineAssertAliveOpCall wrap *gomock.Call +type MockLinkLayerMachineAssertAliveOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineAssertAliveOpCall) Return(arg0 txn.Op) *MockLinkLayerMachineAssertAliveOpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineAssertAliveOpCall) Do(f func() txn.Op) *MockLinkLayerMachineAssertAliveOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineAssertAliveOpCall) DoAndReturn(f func() txn.Op) *MockLinkLayerMachineAssertAliveOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -390,9 +870,33 @@ func (m *MockLinkLayerMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockLinkLayerMachineMockRecorder) Id() *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) Id() *MockLinkLayerMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockLinkLayerMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockLinkLayerMachine)(nil).Id)) + return &MockLinkLayerMachineIdCall{Call: call} +} + +// MockLinkLayerMachineIdCall wrap *gomock.Call +type MockLinkLayerMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineIdCall) Return(arg0 string) *MockLinkLayerMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineIdCall) Do(f func() string) *MockLinkLayerMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineIdCall) DoAndReturn(f func() string) *MockLinkLayerMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -404,9 +908,33 @@ func (m *MockLinkLayerMachine) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockLinkLayerMachineMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockLinkLayerMachineMockRecorder) ModelUUID() *MockLinkLayerMachineModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockLinkLayerMachine)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockLinkLayerMachine)(nil).ModelUUID)) + return &MockLinkLayerMachineModelUUIDCall{Call: call} +} + +// MockLinkLayerMachineModelUUIDCall wrap *gomock.Call +type MockLinkLayerMachineModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerMachineModelUUIDCall) Return(arg0 string) *MockLinkLayerMachineModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerMachineModelUUIDCall) Do(f func() string) *MockLinkLayerMachineModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerMachineModelUUIDCall) DoAndReturn(f func() string) *MockLinkLayerMachineModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinkLayerState is a mock of LinkLayerState interface. @@ -441,9 +969,33 @@ func (m *MockLinkLayerState) ApplyOperation(arg0 state.ModelOperation) error { } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockLinkLayerStateMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockLinkLayerStateMockRecorder) ApplyOperation(arg0 any) *MockLinkLayerStateApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockLinkLayerState)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockLinkLayerState)(nil).ApplyOperation), arg0) + return &MockLinkLayerStateApplyOperationCall{Call: call} +} + +// MockLinkLayerStateApplyOperationCall wrap *gomock.Call +type MockLinkLayerStateApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerStateApplyOperationCall) Return(arg0 error) *MockLinkLayerStateApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerStateApplyOperationCall) Do(f func(state.ModelOperation) error) *MockLinkLayerStateApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerStateApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockLinkLayerStateApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -456,9 +1008,33 @@ func (m *MockLinkLayerState) Machine(arg0 string) (networkingcommon.LinkLayerMac } // Machine indicates an expected call of Machine. -func (mr *MockLinkLayerStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockLinkLayerStateMockRecorder) Machine(arg0 any) *MockLinkLayerStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLinkLayerState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLinkLayerState)(nil).Machine), arg0) + return &MockLinkLayerStateMachineCall{Call: call} +} + +// MockLinkLayerStateMachineCall wrap *gomock.Call +type MockLinkLayerStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerStateMachineCall) Return(arg0 networkingcommon.LinkLayerMachine, arg1 error) *MockLinkLayerStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerStateMachineCall) Do(f func(string) (networkingcommon.LinkLayerMachine, error)) *MockLinkLayerStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerStateMachineCall) DoAndReturn(f func(string) (networkingcommon.LinkLayerMachine, error)) *MockLinkLayerStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinkLayerAndSubnetsState is a mock of LinkLayerAndSubnetsState interface. @@ -493,9 +1069,33 @@ func (m *MockLinkLayerAndSubnetsState) ApplyOperation(arg0 state.ModelOperation) } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockLinkLayerAndSubnetsStateMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockLinkLayerAndSubnetsStateMockRecorder) ApplyOperation(arg0 any) *MockLinkLayerAndSubnetsStateApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockLinkLayerAndSubnetsState)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockLinkLayerAndSubnetsState)(nil).ApplyOperation), arg0) + return &MockLinkLayerAndSubnetsStateApplyOperationCall{Call: call} +} + +// MockLinkLayerAndSubnetsStateApplyOperationCall wrap *gomock.Call +type MockLinkLayerAndSubnetsStateApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAndSubnetsStateApplyOperationCall) Return(arg0 error) *MockLinkLayerAndSubnetsStateApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAndSubnetsStateApplyOperationCall) Do(f func(state.ModelOperation) error) *MockLinkLayerAndSubnetsStateApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAndSubnetsStateApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockLinkLayerAndSubnetsStateApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -508,9 +1108,33 @@ func (m *MockLinkLayerAndSubnetsState) Machine(arg0 string) (networkingcommon.Li } // Machine indicates an expected call of Machine. -func (mr *MockLinkLayerAndSubnetsStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockLinkLayerAndSubnetsStateMockRecorder) Machine(arg0 any) *MockLinkLayerAndSubnetsStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLinkLayerAndSubnetsState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLinkLayerAndSubnetsState)(nil).Machine), arg0) + return &MockLinkLayerAndSubnetsStateMachineCall{Call: call} +} + +// MockLinkLayerAndSubnetsStateMachineCall wrap *gomock.Call +type MockLinkLayerAndSubnetsStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerAndSubnetsStateMachineCall) Return(arg0 networkingcommon.LinkLayerMachine, arg1 error) *MockLinkLayerAndSubnetsStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerAndSubnetsStateMachineCall) Do(f func(string) (networkingcommon.LinkLayerMachine, error)) *MockLinkLayerAndSubnetsStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerAndSubnetsStateMachineCall) DoAndReturn(f func(string) (networkingcommon.LinkLayerMachine, error)) *MockLinkLayerAndSubnetsStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -546,9 +1170,33 @@ func (m *MockNetworkService) AddSubnet(arg0 context.Context, arg1 network.Subnet } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockNetworkServiceMockRecorder) AddSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) AddSubnet(arg0, arg1 any) *MockNetworkServiceAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkService)(nil).AddSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkService)(nil).AddSubnet), arg0, arg1) + return &MockNetworkServiceAddSubnetCall{Call: call} +} + +// MockNetworkServiceAddSubnetCall wrap *gomock.Call +type MockNetworkServiceAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceAddSubnetCall) Return(arg0 network.Id, arg1 error) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceAddSubnetCall) Do(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceAddSubnetCall) DoAndReturn(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -561,7 +1209,31 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/networkingcommon/package_test.go b/apiserver/common/networkingcommon/package_test.go index c0ff72fa9a9..1944ee0ed91 100644 --- a/apiserver/common/networkingcommon/package_test.go +++ b/apiserver/common/networkingcommon/package_test.go @@ -14,7 +14,7 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/common/networkingcommon LinkLayerDevice,LinkLayerAddress,LinkLayerMachine,LinkLayerState,LinkLayerAndSubnetsState,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/common/networkingcommon LinkLayerDevice,LinkLayerAddress,LinkLayerMachine,LinkLayerState,LinkLayerAndSubnetsState,NetworkService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/common/package_test.go b/apiserver/common/package_test.go index a01e9e04147..a5d345bb9c3 100644 --- a/apiserver/common/package_test.go +++ b/apiserver/common/package_test.go @@ -9,14 +9,14 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/common Authorizer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/credential_mock.go github.com/juju/juju/apiserver/common CredentialService,CloudService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/controllerconfig_mock.go github.com/juju/juju/apiserver/common ControllerConfigState,ControllerConfigService,ExternalControllerService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/apiserver/common ModelConfigService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/tools_mock.go github.com/juju/juju/apiserver/common ToolsFinder,ToolsFindEntity,ToolsURLGetter,APIHostPortsForAgentsGetter,ToolsStorageGetter,AgentTooler -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/storage.go github.com/juju/juju/state/binarystorage StorageCloser -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/environs.go github.com/juju/juju/environs EnvironConfigGetter,BootstrapEnviron -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/common Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/credential_mock.go github.com/juju/juju/apiserver/common CredentialService,CloudService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/controllerconfig_mock.go github.com/juju/juju/apiserver/common ControllerConfigState,ControllerConfigService,ExternalControllerService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/apiserver/common ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/tools_mock.go github.com/juju/juju/apiserver/common ToolsFinder,ToolsFindEntity,ToolsURLGetter,APIHostPortsForAgentsGetter,ToolsStorageGetter,AgentTooler +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/storage.go github.com/juju/juju/state/binarystorage StorageCloser +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/environs.go github.com/juju/juju/environs EnvironConfigGetter,BootstrapEnviron +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/common/secrets/mocks/authorizer_mock.go b/apiserver/common/secrets/mocks/authorizer_mock.go index 645ddc19377..8a0f35f9b92 100644 --- a/apiserver/common/secrets/mocks/authorizer_mock.go +++ b/apiserver/common/secrets/mocks/authorizer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/facade Authorizer +// mockgen -typed -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/facade Authorizer // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -77,9 +125,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -91,9 +163,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -105,9 +201,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -119,9 +239,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -147,9 +315,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -161,9 +353,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -175,9 +391,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -189,7 +429,31 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/secrets/mocks/commonsecrets_mock.go b/apiserver/common/secrets/mocks/commonsecrets_mock.go index 099b020f168..db30d6c7a3d 100644 --- a/apiserver/common/secrets/mocks/commonsecrets_mock.go +++ b/apiserver/common/secrets/mocks/commonsecrets_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/commonsecrets_mock.go github.com/juju/juju/apiserver/common/secrets SecretBackendGetter,SecretService,SecretBackendService +// mockgen -typed -package mocks -destination mocks/commonsecrets_mock.go github.com/juju/juju/apiserver/common/secrets SecretBackendGetter,SecretService,SecretBackendService // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockSecretBackendGetter) GetSecretBackendID(arg0 context.Context) (stri } // GetSecretBackendID indicates an expected call of GetSecretBackendID. -func (mr *MockSecretBackendGetterMockRecorder) GetSecretBackendID(arg0 any) *gomock.Call { +func (mr *MockSecretBackendGetterMockRecorder) GetSecretBackendID(arg0 any) *MockSecretBackendGetterGetSecretBackendIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendID", reflect.TypeOf((*MockSecretBackendGetter)(nil).GetSecretBackendID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendID", reflect.TypeOf((*MockSecretBackendGetter)(nil).GetSecretBackendID), arg0) + return &MockSecretBackendGetterGetSecretBackendIDCall{Call: call} +} + +// MockSecretBackendGetterGetSecretBackendIDCall wrap *gomock.Call +type MockSecretBackendGetterGetSecretBackendIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendGetterGetSecretBackendIDCall) Return(arg0 string, arg1 error) *MockSecretBackendGetterGetSecretBackendIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendGetterGetSecretBackendIDCall) Do(f func(context.Context) (string, error)) *MockSecretBackendGetterGetSecretBackendIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendGetterGetSecretBackendIDCall) DoAndReturn(f func(context.Context) (string, error)) *MockSecretBackendGetterGetSecretBackendIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretService is a mock of SecretService interface. @@ -91,9 +115,33 @@ func (m *MockSecretService) ChangeSecretBackend(arg0 context.Context, arg1 *secr } // ChangeSecretBackend indicates an expected call of ChangeSecretBackend. -func (mr *MockSecretServiceMockRecorder) ChangeSecretBackend(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ChangeSecretBackend(arg0, arg1, arg2, arg3 any) *MockSecretServiceChangeSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretService)(nil).ChangeSecretBackend), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretService)(nil).ChangeSecretBackend), arg0, arg1, arg2, arg3) + return &MockSecretServiceChangeSecretBackendCall{Call: call} +} + +// MockSecretServiceChangeSecretBackendCall wrap *gomock.Call +type MockSecretServiceChangeSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceChangeSecretBackendCall) Return(arg0 error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceChangeSecretBackendCall) Do(f func(context.Context, *secrets.URI, int, service.ChangeSecretBackendParams) error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceChangeSecretBackendCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.ChangeSecretBackendParams) error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretBackendID mocks base method. @@ -106,9 +154,33 @@ func (m *MockSecretService) GetSecretBackendID(arg0 context.Context) (string, er } // GetSecretBackendID indicates an expected call of GetSecretBackendID. -func (mr *MockSecretServiceMockRecorder) GetSecretBackendID(arg0 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretBackendID(arg0 any) *MockSecretServiceGetSecretBackendIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendID", reflect.TypeOf((*MockSecretService)(nil).GetSecretBackendID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendID", reflect.TypeOf((*MockSecretService)(nil).GetSecretBackendID), arg0) + return &MockSecretServiceGetSecretBackendIDCall{Call: call} +} + +// MockSecretServiceGetSecretBackendIDCall wrap *gomock.Call +type MockSecretServiceGetSecretBackendIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretBackendIDCall) Return(arg0 string, arg1 error) *MockSecretServiceGetSecretBackendIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretBackendIDCall) Do(f func(context.Context) (string, error)) *MockSecretServiceGetSecretBackendIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretBackendIDCall) DoAndReturn(f func(context.Context) (string, error)) *MockSecretServiceGetSecretBackendIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmSecretsToDrain mocks base method. @@ -125,10 +197,34 @@ func (m *MockSecretService) ListCharmSecretsToDrain(arg0 context.Context, arg1 . } // ListCharmSecretsToDrain indicates an expected call of ListCharmSecretsToDrain. -func (mr *MockSecretServiceMockRecorder) ListCharmSecretsToDrain(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListCharmSecretsToDrain(arg0 any, arg1 ...any) *MockSecretServiceListCharmSecretsToDrainCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecretsToDrain", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecretsToDrain), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecretsToDrain", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecretsToDrain), varargs...) + return &MockSecretServiceListCharmSecretsToDrainCall{Call: call} +} + +// MockSecretServiceListCharmSecretsToDrainCall wrap *gomock.Call +type MockSecretServiceListCharmSecretsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListCharmSecretsToDrainCall) Return(arg0 []*secrets.SecretMetadataForDrain, arg1 error) *MockSecretServiceListCharmSecretsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListCharmSecretsToDrainCall) Do(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadataForDrain, error)) *MockSecretServiceListCharmSecretsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListCharmSecretsToDrainCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadataForDrain, error)) *MockSecretServiceListCharmSecretsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListUserSecretsToDrain mocks base method. @@ -141,9 +237,33 @@ func (m *MockSecretService) ListUserSecretsToDrain(arg0 context.Context) ([]*sec } // ListUserSecretsToDrain indicates an expected call of ListUserSecretsToDrain. -func (mr *MockSecretServiceMockRecorder) ListUserSecretsToDrain(arg0 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListUserSecretsToDrain(arg0 any) *MockSecretServiceListUserSecretsToDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUserSecretsToDrain", reflect.TypeOf((*MockSecretService)(nil).ListUserSecretsToDrain), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUserSecretsToDrain", reflect.TypeOf((*MockSecretService)(nil).ListUserSecretsToDrain), arg0) + return &MockSecretServiceListUserSecretsToDrainCall{Call: call} +} + +// MockSecretServiceListUserSecretsToDrainCall wrap *gomock.Call +type MockSecretServiceListUserSecretsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListUserSecretsToDrainCall) Return(arg0 []*secrets.SecretMetadataForDrain, arg1 error) *MockSecretServiceListUserSecretsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListUserSecretsToDrainCall) Do(f func(context.Context) ([]*secrets.SecretMetadataForDrain, error)) *MockSecretServiceListUserSecretsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListUserSecretsToDrainCall) DoAndReturn(f func(context.Context) ([]*secrets.SecretMetadataForDrain, error)) *MockSecretServiceListUserSecretsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSecretBackendChanged mocks base method. @@ -156,9 +276,33 @@ func (m *MockSecretService) WatchSecretBackendChanged(arg0 context.Context) (wat } // WatchSecretBackendChanged indicates an expected call of WatchSecretBackendChanged. -func (mr *MockSecretServiceMockRecorder) WatchSecretBackendChanged(arg0 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) WatchSecretBackendChanged(arg0 any) *MockSecretServiceWatchSecretBackendChangedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendChanged", reflect.TypeOf((*MockSecretService)(nil).WatchSecretBackendChanged), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendChanged", reflect.TypeOf((*MockSecretService)(nil).WatchSecretBackendChanged), arg0) + return &MockSecretServiceWatchSecretBackendChangedCall{Call: call} +} + +// MockSecretServiceWatchSecretBackendChangedCall wrap *gomock.Call +type MockSecretServiceWatchSecretBackendChangedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceWatchSecretBackendChangedCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockSecretServiceWatchSecretBackendChangedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceWatchSecretBackendChangedCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockSecretServiceWatchSecretBackendChangedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceWatchSecretBackendChangedCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockSecretServiceWatchSecretBackendChangedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -194,7 +338,31 @@ func (m *MockSecretBackendService) GetRevisionsToDrain(arg0 context.Context, arg } // GetRevisionsToDrain indicates an expected call of GetRevisionsToDrain. -func (mr *MockSecretBackendServiceMockRecorder) GetRevisionsToDrain(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) GetRevisionsToDrain(arg0, arg1, arg2 any) *MockSecretBackendServiceGetRevisionsToDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionsToDrain", reflect.TypeOf((*MockSecretBackendService)(nil).GetRevisionsToDrain), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionsToDrain", reflect.TypeOf((*MockSecretBackendService)(nil).GetRevisionsToDrain), arg0, arg1, arg2) + return &MockSecretBackendServiceGetRevisionsToDrainCall{Call: call} +} + +// MockSecretBackendServiceGetRevisionsToDrainCall wrap *gomock.Call +type MockSecretBackendServiceGetRevisionsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceGetRevisionsToDrainCall) Return(arg0 []service0.RevisionInfo, arg1 error) *MockSecretBackendServiceGetRevisionsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceGetRevisionsToDrainCall) Do(f func(context.Context, model.UUID, []secrets.SecretExternalRevision) ([]service0.RevisionInfo, error)) *MockSecretBackendServiceGetRevisionsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceGetRevisionsToDrainCall) DoAndReturn(f func(context.Context, model.UUID, []secrets.SecretExternalRevision) ([]service0.RevisionInfo, error)) *MockSecretBackendServiceGetRevisionsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/secrets/mocks/leadership_mock.go b/apiserver/common/secrets/mocks/leadership_mock.go index 13c840aa589..67a4e81c3c2 100644 --- a/apiserver/common/secrets/mocks/leadership_mock.go +++ b/apiserver/common/secrets/mocks/leadership_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Checker,Token +// mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Checker,Token // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockChecker) LeadershipCheck(arg0, arg1 string) leadership.Token { } // LeadershipCheck indicates an expected call of LeadershipCheck. -func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *gomock.Call { +func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *MockCheckerLeadershipCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + return &MockCheckerLeadershipCheckCall{Call: call} +} + +// MockCheckerLeadershipCheckCall wrap *gomock.Call +type MockCheckerLeadershipCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCheckerLeadershipCheckCall) Return(arg0 leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCheckerLeadershipCheckCall) Do(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCheckerLeadershipCheckCall) DoAndReturn(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToken is a mock of Token interface. @@ -85,7 +109,31 @@ func (m *MockToken) Check() error { } // Check indicates an expected call of Check. -func (mr *MockTokenMockRecorder) Check() *gomock.Call { +func (mr *MockTokenMockRecorder) Check() *MockTokenCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + return &MockTokenCheckCall{Call: call} +} + +// MockTokenCheckCall wrap *gomock.Call +type MockTokenCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenCheckCall) Return(arg0 error) *MockTokenCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenCheckCall) Do(f func() error) *MockTokenCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenCheckCall) DoAndReturn(f func() error) *MockTokenCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/common/secrets/package_test.go b/apiserver/common/secrets/package_test.go index 0243c209a14..9613bb3ca2c 100644 --- a/apiserver/common/secrets/package_test.go +++ b/apiserver/common/secrets/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/commonsecrets_mock.go github.com/juju/juju/apiserver/common/secrets SecretBackendGetter,SecretService,SecretBackendService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/facade Authorizer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Checker,Token +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/commonsecrets_mock.go github.com/juju/juju/apiserver/common/secrets SecretBackendGetter,SecretService,SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/authorizer_mock.go github.com/juju/juju/apiserver/facade Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Checker,Token func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/common/unitstate.go b/apiserver/common/unitstate.go index 6f344f47831..ac6ae3cbdc6 100644 --- a/apiserver/common/unitstate.go +++ b/apiserver/common/unitstate.go @@ -16,8 +16,8 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/unitstate.go github.com/juju/juju/apiserver/common UnitStateBackend,UnitStateUnit -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modeloperation.go github.com/juju/juju/state ModelOperation +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/unitstate.go github.com/juju/juju/apiserver/common UnitStateBackend,UnitStateUnit +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modeloperation.go github.com/juju/juju/state ModelOperation // UnitStateUnit describes unit-receiver state methods required // for UnitStateAPI. diff --git a/apiserver/common/upgradeseries.go b/apiserver/common/upgradeseries.go index ed4d8e9470b..c7a288bc0b7 100644 --- a/apiserver/common/upgradeseries.go +++ b/apiserver/common/upgradeseries.go @@ -18,7 +18,7 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/upgradeseries.go github.com/juju/juju/apiserver/common UpgradeSeriesBackend,UpgradeSeriesMachine,UpgradeSeriesUnit +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/upgradeseries.go github.com/juju/juju/apiserver/common UpgradeSeriesBackend,UpgradeSeriesMachine,UpgradeSeriesUnit type UpgradeSeriesBackend interface { Machine(string) (UpgradeSeriesMachine, error) diff --git a/apiserver/facade/mocks/facade_mock.go b/apiserver/facade/mocks/facade_mock.go index d95be641769..a6bcb89b771 100644 --- a/apiserver/facade/mocks/facade_mock.go +++ b/apiserver/facade/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockResources) Get(arg0 string) worker.Worker { } // Get indicates an expected call of Get. -func (mr *MockResourcesMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Get(arg0 any) *MockResourcesGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + return &MockResourcesGetCall{Call: call} +} + +// MockResourcesGetCall wrap *gomock.Call +type MockResourcesGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetCall) Return(arg0 worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetCall) Do(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetCall) DoAndReturn(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockResources) Register(arg0 worker.Worker) string { } // Register indicates an expected call of Register. -func (mr *MockResourcesMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Register(arg0 any) *MockResourcesRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + return &MockResourcesRegisterCall{Call: call} +} + +// MockResourcesRegisterCall wrap *gomock.Call +type MockResourcesRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRegisterCall) Return(arg0 string) *MockResourcesRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRegisterCall) Do(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRegisterCall) DoAndReturn(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -78,9 +126,33 @@ func (m *MockResources) Stop(arg0 string) error { } // Stop indicates an expected call of Stop. -func (mr *MockResourcesMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Stop(arg0 any) *MockResourcesStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + return &MockResourcesStopCall{Call: call} +} + +// MockResourcesStopCall wrap *gomock.Call +type MockResourcesStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesStopCall) Return(arg0 error) *MockResourcesStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesStopCall) Do(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesStopCall) DoAndReturn(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAuthorizer is a mock of Authorizer interface. @@ -115,9 +187,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -129,9 +225,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -143,9 +263,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -157,9 +301,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -171,9 +339,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -185,9 +377,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -199,9 +415,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -213,9 +453,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -227,9 +491,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -241,9 +529,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -255,9 +567,33 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherRegistry is a mock of WatcherRegistry interface. @@ -292,9 +628,33 @@ func (m *MockWatcherRegistry) Count() int { } // Count indicates an expected call of Count. -func (mr *MockWatcherRegistryMockRecorder) Count() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Count() *MockWatcherRegistryCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockWatcherRegistry)(nil).Count)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockWatcherRegistry)(nil).Count)) + return &MockWatcherRegistryCountCall{Call: call} +} + +// MockWatcherRegistryCountCall wrap *gomock.Call +type MockWatcherRegistryCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryCountCall) Return(arg0 int) *MockWatcherRegistryCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryCountCall) Do(f func() int) *MockWatcherRegistryCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryCountCall) DoAndReturn(f func() int) *MockWatcherRegistryCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -307,9 +667,33 @@ func (m *MockWatcherRegistry) Get(arg0 string) (worker.Worker, error) { } // Get indicates an expected call of Get. -func (mr *MockWatcherRegistryMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Get(arg0 any) *MockWatcherRegistryGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatcherRegistry)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatcherRegistry)(nil).Get), arg0) + return &MockWatcherRegistryGetCall{Call: call} +} + +// MockWatcherRegistryGetCall wrap *gomock.Call +type MockWatcherRegistryGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryGetCall) Return(arg0 worker.Worker, arg1 error) *MockWatcherRegistryGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryGetCall) Do(f func(string) (worker.Worker, error)) *MockWatcherRegistryGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryGetCall) DoAndReturn(f func(string) (worker.Worker, error)) *MockWatcherRegistryGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -319,9 +703,33 @@ func (m *MockWatcherRegistry) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWatcherRegistryMockRecorder) Kill() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Kill() *MockWatcherRegistryKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcherRegistry)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcherRegistry)(nil).Kill)) + return &MockWatcherRegistryKillCall{Call: call} +} + +// MockWatcherRegistryKillCall wrap *gomock.Call +type MockWatcherRegistryKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryKillCall) Return() *MockWatcherRegistryKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryKillCall) Do(f func()) *MockWatcherRegistryKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryKillCall) DoAndReturn(f func()) *MockWatcherRegistryKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -334,9 +742,33 @@ func (m *MockWatcherRegistry) Register(arg0 worker.Worker) (string, error) { } // Register indicates an expected call of Register. -func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *MockWatcherRegistryRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + return &MockWatcherRegistryRegisterCall{Call: call} +} + +// MockWatcherRegistryRegisterCall wrap *gomock.Call +type MockWatcherRegistryRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryRegisterCall) Return(arg0 string, arg1 error) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryRegisterCall) Do(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryRegisterCall) DoAndReturn(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RegisterNamed mocks base method. @@ -348,9 +780,33 @@ func (m *MockWatcherRegistry) RegisterNamed(arg0 string, arg1 worker.Worker) err } // RegisterNamed indicates an expected call of RegisterNamed. -func (mr *MockWatcherRegistryMockRecorder) RegisterNamed(arg0, arg1 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) RegisterNamed(arg0, arg1 any) *MockWatcherRegistryRegisterNamedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterNamed", reflect.TypeOf((*MockWatcherRegistry)(nil).RegisterNamed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterNamed", reflect.TypeOf((*MockWatcherRegistry)(nil).RegisterNamed), arg0, arg1) + return &MockWatcherRegistryRegisterNamedCall{Call: call} +} + +// MockWatcherRegistryRegisterNamedCall wrap *gomock.Call +type MockWatcherRegistryRegisterNamedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryRegisterNamedCall) Return(arg0 error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryRegisterNamedCall) Do(f func(string, worker.Worker) error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryRegisterNamedCall) DoAndReturn(f func(string, worker.Worker) error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -362,9 +818,33 @@ func (m *MockWatcherRegistry) Stop(arg0 string) error { } // Stop indicates an expected call of Stop. -func (mr *MockWatcherRegistryMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Stop(arg0 any) *MockWatcherRegistryStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockWatcherRegistry)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockWatcherRegistry)(nil).Stop), arg0) + return &MockWatcherRegistryStopCall{Call: call} +} + +// MockWatcherRegistryStopCall wrap *gomock.Call +type MockWatcherRegistryStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryStopCall) Return(arg0 error) *MockWatcherRegistryStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryStopCall) Do(f func(string) error) *MockWatcherRegistryStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryStopCall) DoAndReturn(f func(string) error) *MockWatcherRegistryStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -376,7 +856,31 @@ func (m *MockWatcherRegistry) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWatcherRegistryMockRecorder) Wait() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Wait() *MockWatcherRegistryWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcherRegistry)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcherRegistry)(nil).Wait)) + return &MockWatcherRegistryWaitCall{Call: call} +} + +// MockWatcherRegistryWaitCall wrap *gomock.Call +type MockWatcherRegistryWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryWaitCall) Return(arg0 error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryWaitCall) Do(f func() error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryWaitCall) DoAndReturn(f func() error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facade/package_test.go b/apiserver/facade/package_test.go index 8ecaf70dabf..aa2db922f58 100644 --- a/apiserver/facade/package_test.go +++ b/apiserver/facade/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/agent/deployer/mocks/domain_mock.go b/apiserver/facades/agent/deployer/mocks/domain_mock.go index d57fc2fa2f6..8e5d3dd99eb 100644 --- a/apiserver/facades/agent/deployer/mocks/domain_mock.go +++ b/apiserver/facades/agent/deployer/mocks/domain_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/agent/deployer ControllerConfigGetter,UnitRemover +// mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/agent/deployer ControllerConfigGetter,UnitRemover // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockControllerConfigGetter) ControllerConfig(arg0 context.Context) (con } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigGetterControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + return &MockControllerConfigGetterControllerConfigCall{Call: call} +} + +// MockControllerConfigGetterControllerConfigCall wrap *gomock.Call +type MockControllerConfigGetterControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigGetterControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigGetterControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigGetterControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnitRemover is a mock of UnitRemover interface. @@ -87,7 +111,31 @@ func (m *MockUnitRemover) DeleteUnit(arg0 context.Context, arg1 string) error { } // DeleteUnit indicates an expected call of DeleteUnit. -func (mr *MockUnitRemoverMockRecorder) DeleteUnit(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitRemoverMockRecorder) DeleteUnit(arg0, arg1 any) *MockUnitRemoverDeleteUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnit", reflect.TypeOf((*MockUnitRemover)(nil).DeleteUnit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnit", reflect.TypeOf((*MockUnitRemover)(nil).DeleteUnit), arg0, arg1) + return &MockUnitRemoverDeleteUnitCall{Call: call} +} + +// MockUnitRemoverDeleteUnitCall wrap *gomock.Call +type MockUnitRemoverDeleteUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRemoverDeleteUnitCall) Return(arg0 error) *MockUnitRemoverDeleteUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRemoverDeleteUnitCall) Do(f func(context.Context, string) error) *MockUnitRemoverDeleteUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRemoverDeleteUnitCall) DoAndReturn(f func(context.Context, string) error) *MockUnitRemoverDeleteUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/deployer/package_test.go b/apiserver/facades/agent/deployer/package_test.go index d4d9b1771d1..d30d46d7351 100644 --- a/apiserver/facades/agent/deployer/package_test.go +++ b/apiserver/facades/agent/deployer/package_test.go @@ -9,7 +9,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/agent/deployer ControllerConfigGetter,UnitRemover +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/agent/deployer ControllerConfigGetter,UnitRemover func TestAll(t *stdtesting.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/facades/agent/instancemutater/mocks/instancemutater_mock.go b/apiserver/facades/agent/instancemutater/mocks/instancemutater_mock.go index e284de7d28c..573830c6617 100644 --- a/apiserver/facades/agent/instancemutater/mocks/instancemutater_mock.go +++ b/apiserver/facades/agent/instancemutater/mocks/instancemutater_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/instancemutater_mock.go github.com/juju/juju/apiserver/facades/agent/instancemutater InstanceMutatorWatcher,InstanceMutaterState,Machine,Unit,Application,Charm +// mockgen -typed -package mocks -destination mocks/instancemutater_mock.go github.com/juju/juju/apiserver/facades/agent/instancemutater InstanceMutatorWatcher,InstanceMutaterState,Machine,Unit,Application,Charm // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockInstanceMutatorWatcher) WatchLXDProfileVerificationForMachine(arg0 } // WatchLXDProfileVerificationForMachine indicates an expected call of WatchLXDProfileVerificationForMachine. -func (mr *MockInstanceMutatorWatcherMockRecorder) WatchLXDProfileVerificationForMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceMutatorWatcherMockRecorder) WatchLXDProfileVerificationForMachine(arg0, arg1 any) *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationForMachine", reflect.TypeOf((*MockInstanceMutatorWatcher)(nil).WatchLXDProfileVerificationForMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationForMachine", reflect.TypeOf((*MockInstanceMutatorWatcher)(nil).WatchLXDProfileVerificationForMachine), arg0, arg1) + return &MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall{Call: call} +} + +// MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall wrap *gomock.Call +type MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall) Do(f func(instancemutater.Machine, loggo.Logger) (state.NotifyWatcher, error)) *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall) DoAndReturn(f func(instancemutater.Machine, loggo.Logger) (state.NotifyWatcher, error)) *MockInstanceMutatorWatcherWatchLXDProfileVerificationForMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceMutaterState is a mock of InstanceMutaterState interface. @@ -94,9 +118,33 @@ func (m *MockInstanceMutaterState) Application(arg0 string) (instancemutater.App } // Application indicates an expected call of Application. -func (mr *MockInstanceMutaterStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) Application(arg0 any) *MockInstanceMutaterStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockInstanceMutaterState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockInstanceMutaterState)(nil).Application), arg0) + return &MockInstanceMutaterStateApplicationCall{Call: call} +} + +// MockInstanceMutaterStateApplicationCall wrap *gomock.Call +type MockInstanceMutaterStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateApplicationCall) Return(arg0 instancemutater.Application, arg1 error) *MockInstanceMutaterStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateApplicationCall) Do(f func(string) (instancemutater.Application, error)) *MockInstanceMutaterStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateApplicationCall) DoAndReturn(f func(string) (instancemutater.Application, error)) *MockInstanceMutaterStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -109,9 +157,33 @@ func (m *MockInstanceMutaterState) Charm(arg0 string) (instancemutater.Charm, er } // Charm indicates an expected call of Charm. -func (mr *MockInstanceMutaterStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) Charm(arg0 any) *MockInstanceMutaterStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockInstanceMutaterState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockInstanceMutaterState)(nil).Charm), arg0) + return &MockInstanceMutaterStateCharmCall{Call: call} +} + +// MockInstanceMutaterStateCharmCall wrap *gomock.Call +type MockInstanceMutaterStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateCharmCall) Return(arg0 instancemutater.Charm, arg1 error) *MockInstanceMutaterStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateCharmCall) Do(f func(string) (instancemutater.Charm, error)) *MockInstanceMutaterStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateCharmCall) DoAndReturn(f func(string) (instancemutater.Charm, error)) *MockInstanceMutaterStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTimestamp mocks base method. @@ -124,9 +196,33 @@ func (m *MockInstanceMutaterState) ControllerTimestamp() (*time.Time, error) { } // ControllerTimestamp indicates an expected call of ControllerTimestamp. -func (mr *MockInstanceMutaterStateMockRecorder) ControllerTimestamp() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) ControllerTimestamp() *MockInstanceMutaterStateControllerTimestampCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTimestamp", reflect.TypeOf((*MockInstanceMutaterState)(nil).ControllerTimestamp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTimestamp", reflect.TypeOf((*MockInstanceMutaterState)(nil).ControllerTimestamp)) + return &MockInstanceMutaterStateControllerTimestampCall{Call: call} +} + +// MockInstanceMutaterStateControllerTimestampCall wrap *gomock.Call +type MockInstanceMutaterStateControllerTimestampCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateControllerTimestampCall) Return(arg0 *time.Time, arg1 error) *MockInstanceMutaterStateControllerTimestampCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateControllerTimestampCall) Do(f func() (*time.Time, error)) *MockInstanceMutaterStateControllerTimestampCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateControllerTimestampCall) DoAndReturn(f func() (*time.Time, error)) *MockInstanceMutaterStateControllerTimestampCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindEntity mocks base method. @@ -139,9 +235,33 @@ func (m *MockInstanceMutaterState) FindEntity(arg0 names.Tag) (state.Entity, err } // FindEntity indicates an expected call of FindEntity. -func (mr *MockInstanceMutaterStateMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) FindEntity(arg0 any) *MockInstanceMutaterStateFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockInstanceMutaterState)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockInstanceMutaterState)(nil).FindEntity), arg0) + return &MockInstanceMutaterStateFindEntityCall{Call: call} +} + +// MockInstanceMutaterStateFindEntityCall wrap *gomock.Call +type MockInstanceMutaterStateFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockInstanceMutaterStateFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockInstanceMutaterStateFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockInstanceMutaterStateFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -154,9 +274,33 @@ func (m *MockInstanceMutaterState) Machine(arg0 string) (instancemutater.Machine } // Machine indicates an expected call of Machine. -func (mr *MockInstanceMutaterStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) Machine(arg0 any) *MockInstanceMutaterStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceMutaterState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceMutaterState)(nil).Machine), arg0) + return &MockInstanceMutaterStateMachineCall{Call: call} +} + +// MockInstanceMutaterStateMachineCall wrap *gomock.Call +type MockInstanceMutaterStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateMachineCall) Return(arg0 instancemutater.Machine, arg1 error) *MockInstanceMutaterStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateMachineCall) Do(f func(string) (instancemutater.Machine, error)) *MockInstanceMutaterStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateMachineCall) DoAndReturn(f func(string) (instancemutater.Machine, error)) *MockInstanceMutaterStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelName mocks base method. @@ -169,9 +313,33 @@ func (m *MockInstanceMutaterState) ModelName() (string, error) { } // ModelName indicates an expected call of ModelName. -func (mr *MockInstanceMutaterStateMockRecorder) ModelName() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) ModelName() *MockInstanceMutaterStateModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelName", reflect.TypeOf((*MockInstanceMutaterState)(nil).ModelName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelName", reflect.TypeOf((*MockInstanceMutaterState)(nil).ModelName)) + return &MockInstanceMutaterStateModelNameCall{Call: call} +} + +// MockInstanceMutaterStateModelNameCall wrap *gomock.Call +type MockInstanceMutaterStateModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateModelNameCall) Return(arg0 string, arg1 error) *MockInstanceMutaterStateModelNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateModelNameCall) Do(f func() (string, error)) *MockInstanceMutaterStateModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateModelNameCall) DoAndReturn(f func() (string, error)) *MockInstanceMutaterStateModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -184,9 +352,33 @@ func (m *MockInstanceMutaterState) Unit(arg0 string) (instancemutater.Unit, erro } // Unit indicates an expected call of Unit. -func (mr *MockInstanceMutaterStateMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) Unit(arg0 any) *MockInstanceMutaterStateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockInstanceMutaterState)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockInstanceMutaterState)(nil).Unit), arg0) + return &MockInstanceMutaterStateUnitCall{Call: call} +} + +// MockInstanceMutaterStateUnitCall wrap *gomock.Call +type MockInstanceMutaterStateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateUnitCall) Return(arg0 instancemutater.Unit, arg1 error) *MockInstanceMutaterStateUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateUnitCall) Do(f func(string) (instancemutater.Unit, error)) *MockInstanceMutaterStateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateUnitCall) DoAndReturn(f func(string) (instancemutater.Unit, error)) *MockInstanceMutaterStateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplicationCharms mocks base method. @@ -198,9 +390,33 @@ func (m *MockInstanceMutaterState) WatchApplicationCharms() state.StringsWatcher } // WatchApplicationCharms indicates an expected call of WatchApplicationCharms. -func (mr *MockInstanceMutaterStateMockRecorder) WatchApplicationCharms() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) WatchApplicationCharms() *MockInstanceMutaterStateWatchApplicationCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationCharms", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchApplicationCharms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationCharms", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchApplicationCharms)) + return &MockInstanceMutaterStateWatchApplicationCharmsCall{Call: call} +} + +// MockInstanceMutaterStateWatchApplicationCharmsCall wrap *gomock.Call +type MockInstanceMutaterStateWatchApplicationCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateWatchApplicationCharmsCall) Return(arg0 state.StringsWatcher) *MockInstanceMutaterStateWatchApplicationCharmsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateWatchApplicationCharmsCall) Do(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchApplicationCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateWatchApplicationCharmsCall) DoAndReturn(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchApplicationCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCharms mocks base method. @@ -212,9 +428,33 @@ func (m *MockInstanceMutaterState) WatchCharms() state.StringsWatcher { } // WatchCharms indicates an expected call of WatchCharms. -func (mr *MockInstanceMutaterStateMockRecorder) WatchCharms() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) WatchCharms() *MockInstanceMutaterStateWatchCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCharms", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchCharms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCharms", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchCharms)) + return &MockInstanceMutaterStateWatchCharmsCall{Call: call} +} + +// MockInstanceMutaterStateWatchCharmsCall wrap *gomock.Call +type MockInstanceMutaterStateWatchCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateWatchCharmsCall) Return(arg0 state.StringsWatcher) *MockInstanceMutaterStateWatchCharmsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateWatchCharmsCall) Do(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateWatchCharmsCall) DoAndReturn(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchMachines mocks base method. @@ -226,9 +466,33 @@ func (m *MockInstanceMutaterState) WatchMachines() state.StringsWatcher { } // WatchMachines indicates an expected call of WatchMachines. -func (mr *MockInstanceMutaterStateMockRecorder) WatchMachines() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) WatchMachines() *MockInstanceMutaterStateWatchMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMachines", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMachines", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchMachines)) + return &MockInstanceMutaterStateWatchMachinesCall{Call: call} +} + +// MockInstanceMutaterStateWatchMachinesCall wrap *gomock.Call +type MockInstanceMutaterStateWatchMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateWatchMachinesCall) Return(arg0 state.StringsWatcher) *MockInstanceMutaterStateWatchMachinesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateWatchMachinesCall) Do(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateWatchMachinesCall) DoAndReturn(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachines mocks base method. @@ -240,9 +504,33 @@ func (m *MockInstanceMutaterState) WatchModelMachines() state.StringsWatcher { } // WatchModelMachines indicates an expected call of WatchModelMachines. -func (mr *MockInstanceMutaterStateMockRecorder) WatchModelMachines() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) WatchModelMachines() *MockInstanceMutaterStateWatchModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchModelMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchModelMachines)) + return &MockInstanceMutaterStateWatchModelMachinesCall{Call: call} +} + +// MockInstanceMutaterStateWatchModelMachinesCall wrap *gomock.Call +type MockInstanceMutaterStateWatchModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateWatchModelMachinesCall) Return(arg0 state.StringsWatcher) *MockInstanceMutaterStateWatchModelMachinesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateWatchModelMachinesCall) Do(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateWatchModelMachinesCall) DoAndReturn(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUnits mocks base method. @@ -254,9 +542,33 @@ func (m *MockInstanceMutaterState) WatchUnits() state.StringsWatcher { } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockInstanceMutaterStateMockRecorder) WatchUnits() *gomock.Call { +func (mr *MockInstanceMutaterStateMockRecorder) WatchUnits() *MockInstanceMutaterStateWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockInstanceMutaterState)(nil).WatchUnits)) + return &MockInstanceMutaterStateWatchUnitsCall{Call: call} +} + +// MockInstanceMutaterStateWatchUnitsCall wrap *gomock.Call +type MockInstanceMutaterStateWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterStateWatchUnitsCall) Return(arg0 state.StringsWatcher) *MockInstanceMutaterStateWatchUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterStateWatchUnitsCall) Do(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterStateWatchUnitsCall) DoAndReturn(f func() state.StringsWatcher) *MockInstanceMutaterStateWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -292,9 +604,33 @@ func (m *MockMachine) CharmProfiles() ([]string, error) { } // CharmProfiles indicates an expected call of CharmProfiles. -func (mr *MockMachineMockRecorder) CharmProfiles() *gomock.Call { +func (mr *MockMachineMockRecorder) CharmProfiles() *MockMachineCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfiles", reflect.TypeOf((*MockMachine)(nil).CharmProfiles)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfiles", reflect.TypeOf((*MockMachine)(nil).CharmProfiles)) + return &MockMachineCharmProfilesCall{Call: call} +} + +// MockMachineCharmProfilesCall wrap *gomock.Call +type MockMachineCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineCharmProfilesCall) Return(arg0 []string, arg1 error) *MockMachineCharmProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineCharmProfilesCall) Do(f func() ([]string, error)) *MockMachineCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineCharmProfilesCall) DoAndReturn(f func() ([]string, error)) *MockMachineCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -306,9 +642,33 @@ func (m *MockMachine) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMachineMockRecorder) ContainerType() *gomock.Call { +func (mr *MockMachineMockRecorder) ContainerType() *MockMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + return &MockMachineContainerTypeCall{Call: call} +} + +// MockMachineContainerTypeCall wrap *gomock.Call +type MockMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainerTypeCall) Return(arg0 instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainerTypeCall) Do(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -320,9 +680,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -335,9 +719,33 @@ func (m *MockMachine) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceId() *MockMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + return &MockMachineInstanceIdCall{Call: call} +} + +// MockMachineInstanceIdCall wrap *gomock.Call +type MockMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManual mocks base method. @@ -350,9 +758,33 @@ func (m *MockMachine) IsManual() (bool, error) { } // IsManual indicates an expected call of IsManual. -func (mr *MockMachineMockRecorder) IsManual() *gomock.Call { +func (mr *MockMachineMockRecorder) IsManual() *MockMachineIsManualCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + return &MockMachineIsManualCall{Call: call} +} + +// MockMachineIsManualCall wrap *gomock.Call +type MockMachineIsManualCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsManualCall) Return(arg0 bool, arg1 error) *MockMachineIsManualCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsManualCall) Do(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsManualCall) DoAndReturn(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmProfiles mocks base method. @@ -364,9 +796,33 @@ func (m *MockMachine) SetCharmProfiles(arg0 []string) error { } // SetCharmProfiles indicates an expected call of SetCharmProfiles. -func (mr *MockMachineMockRecorder) SetCharmProfiles(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetCharmProfiles(arg0 any) *MockMachineSetCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachine)(nil).SetCharmProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachine)(nil).SetCharmProfiles), arg0) + return &MockMachineSetCharmProfilesCall{Call: call} +} + +// MockMachineSetCharmProfilesCall wrap *gomock.Call +type MockMachineSetCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetCharmProfilesCall) Return(arg0 error) *MockMachineSetCharmProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetCharmProfilesCall) Do(f func([]string) error) *MockMachineSetCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetCharmProfilesCall) DoAndReturn(f func([]string) error) *MockMachineSetCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -378,9 +834,33 @@ func (m *MockMachine) SetModificationStatus(arg0 status.StatusInfo) error { } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMachineMockRecorder) SetModificationStatus(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetModificationStatus(arg0 any) *MockMachineSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachine)(nil).SetModificationStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachine)(nil).SetModificationStatus), arg0) + return &MockMachineSetModificationStatusCall{Call: call} +} + +// MockMachineSetModificationStatusCall wrap *gomock.Call +type MockMachineSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetModificationStatusCall) Return(arg0 error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetModificationStatusCall) Do(f func(status.StatusInfo) error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetModificationStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -393,9 +873,33 @@ func (m *MockMachine) Units() ([]instancemutater.Unit, error) { } // Units indicates an expected call of Units. -func (mr *MockMachineMockRecorder) Units() *gomock.Call { +func (mr *MockMachineMockRecorder) Units() *MockMachineUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + return &MockMachineUnitsCall{Call: call} +} + +// MockMachineUnitsCall wrap *gomock.Call +type MockMachineUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineUnitsCall) Return(arg0 []instancemutater.Unit, arg1 error) *MockMachineUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineUnitsCall) Do(f func() ([]instancemutater.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineUnitsCall) DoAndReturn(f func() ([]instancemutater.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -407,9 +911,33 @@ func (m *MockMachine) WatchContainers(arg0 instance.ContainerType) state.Strings } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockMachineMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) WatchContainers(arg0 any) *MockMachineWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachine)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachine)(nil).WatchContainers), arg0) + return &MockMachineWatchContainersCall{Call: call} +} + +// MockMachineWatchContainersCall wrap *gomock.Call +type MockMachineWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchContainersCall) Return(arg0 state.StringsWatcher) *MockMachineWatchContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchContainersCall) Do(f func(instance.ContainerType) state.StringsWatcher) *MockMachineWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchContainersCall) DoAndReturn(f func(instance.ContainerType) state.StringsWatcher) *MockMachineWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchInstanceData mocks base method. @@ -421,9 +949,33 @@ func (m *MockMachine) WatchInstanceData() state.NotifyWatcher { } // WatchInstanceData indicates an expected call of WatchInstanceData. -func (mr *MockMachineMockRecorder) WatchInstanceData() *gomock.Call { +func (mr *MockMachineMockRecorder) WatchInstanceData() *MockMachineWatchInstanceDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockMachine)(nil).WatchInstanceData)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockMachine)(nil).WatchInstanceData)) + return &MockMachineWatchInstanceDataCall{Call: call} +} + +// MockMachineWatchInstanceDataCall wrap *gomock.Call +type MockMachineWatchInstanceDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchInstanceDataCall) Return(arg0 state.NotifyWatcher) *MockMachineWatchInstanceDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchInstanceDataCall) Do(f func() state.NotifyWatcher) *MockMachineWatchInstanceDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchInstanceDataCall) DoAndReturn(f func() state.NotifyWatcher) *MockMachineWatchInstanceDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -459,9 +1011,33 @@ func (m *MockUnit) Application() (instancemutater.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockUnitMockRecorder) Application() *gomock.Call { +func (mr *MockUnitMockRecorder) Application() *MockUnitApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + return &MockUnitApplicationCall{Call: call} +} + +// MockUnitApplicationCall wrap *gomock.Call +type MockUnitApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationCall) Return(arg0 instancemutater.Application, arg1 error) *MockUnitApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationCall) Do(f func() (instancemutater.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationCall) DoAndReturn(f func() (instancemutater.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationName mocks base method. @@ -473,9 +1049,33 @@ func (m *MockUnit) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockUnitMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockUnitMockRecorder) ApplicationName() *MockUnitApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + return &MockUnitApplicationNameCall{Call: call} +} + +// MockUnitApplicationNameCall wrap *gomock.Call +type MockUnitApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationNameCall) Return(arg0 string) *MockUnitApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationNameCall) Do(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationNameCall) DoAndReturn(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedMachineId mocks base method. @@ -488,9 +1088,33 @@ func (m *MockUnit) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockUnitMockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockUnitMockRecorder) AssignedMachineId() *MockUnitAssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + return &MockUnitAssignedMachineIdCall{Call: call} +} + +// MockUnitAssignedMachineIdCall wrap *gomock.Call +type MockUnitAssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignedMachineIdCall) Return(arg0 string, arg1 error) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignedMachineIdCall) Do(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -502,9 +1126,33 @@ func (m *MockUnit) CharmURL() *string { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockUnitMockRecorder) CharmURL() *gomock.Call { +func (mr *MockUnitMockRecorder) CharmURL() *MockUnitCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockUnit)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockUnit)(nil).CharmURL)) + return &MockUnitCharmURLCall{Call: call} +} + +// MockUnitCharmURLCall wrap *gomock.Call +type MockUnitCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitCharmURLCall) Return(arg0 *string) *MockUnitCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitCharmURLCall) Do(f func() *string) *MockUnitCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitCharmURLCall) DoAndReturn(f func() *string) *MockUnitCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -516,9 +1164,33 @@ func (m *MockUnit) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockUnitMockRecorder) Life() *gomock.Call { +func (mr *MockUnitMockRecorder) Life() *MockUnitLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + return &MockUnitLifeCall{Call: call} +} + +// MockUnitLifeCall wrap *gomock.Call +type MockUnitLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLifeCall) Return(arg0 state.Life) *MockUnitLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLifeCall) Do(f func() state.Life) *MockUnitLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLifeCall) DoAndReturn(f func() state.Life) *MockUnitLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -530,9 +1202,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrincipalName mocks base method. @@ -545,9 +1241,33 @@ func (m *MockUnit) PrincipalName() (string, bool) { } // PrincipalName indicates an expected call of PrincipalName. -func (mr *MockUnitMockRecorder) PrincipalName() *gomock.Call { +func (mr *MockUnitMockRecorder) PrincipalName() *MockUnitPrincipalNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrincipalName", reflect.TypeOf((*MockUnit)(nil).PrincipalName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrincipalName", reflect.TypeOf((*MockUnit)(nil).PrincipalName)) + return &MockUnitPrincipalNameCall{Call: call} +} + +// MockUnitPrincipalNameCall wrap *gomock.Call +type MockUnitPrincipalNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPrincipalNameCall) Return(arg0 string, arg1 bool) *MockUnitPrincipalNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPrincipalNameCall) Do(f func() (string, bool)) *MockUnitPrincipalNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPrincipalNameCall) DoAndReturn(f func() (string, bool)) *MockUnitPrincipalNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -582,9 +1302,33 @@ func (m *MockApplication) CharmURL() *string { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 *string) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() *string) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() *string) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -619,9 +1363,33 @@ func (m *MockCharm) LXDProfile() lxdprofile.Profile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockCharmMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockCharmMockRecorder) LXDProfile() *MockCharmLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + return &MockCharmLXDProfileCall{Call: call} +} + +// MockCharmLXDProfileCall wrap *gomock.Call +type MockCharmLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmLXDProfileCall) Return(arg0 lxdprofile.Profile) *MockCharmLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmLXDProfileCall) Do(f func() lxdprofile.Profile) *MockCharmLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmLXDProfileCall) DoAndReturn(f func() lxdprofile.Profile) *MockCharmLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -633,7 +1401,31 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/instancemutater/mocks/state_mock.go b/apiserver/facades/agent/instancemutater/mocks/state_mock.go index 35f2db41c39..08bfb21e948 100644 --- a/apiserver/facades/agent/instancemutater/mocks/state_mock.go +++ b/apiserver/facades/agent/instancemutater/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/state EntityFinder,Entity,Lifer +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/state EntityFinder,Entity,Lifer // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockEntityFinder) FindEntity(arg0 names.Tag) (state.Entity, error) { } // FindEntity indicates an expected call of FindEntity. -func (mr *MockEntityFinderMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockEntityFinderMockRecorder) FindEntity(arg0 any) *MockEntityFinderFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockEntityFinder)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockEntityFinder)(nil).FindEntity), arg0) + return &MockEntityFinderFindEntityCall{Call: call} +} + +// MockEntityFinderFindEntityCall wrap *gomock.Call +type MockEntityFinderFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEntityFinderFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockEntityFinderFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEntityFinderFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockEntityFinderFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEntityFinderFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockEntityFinderFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEntity is a mock of Entity interface. @@ -87,9 +111,33 @@ func (m *MockEntity) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockEntityMockRecorder) Tag() *gomock.Call { +func (mr *MockEntityMockRecorder) Tag() *MockEntityTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockEntity)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockEntity)(nil).Tag)) + return &MockEntityTagCall{Call: call} +} + +// MockEntityTagCall wrap *gomock.Call +type MockEntityTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEntityTagCall) Return(arg0 names.Tag) *MockEntityTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEntityTagCall) Do(f func() names.Tag) *MockEntityTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEntityTagCall) DoAndReturn(f func() names.Tag) *MockEntityTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLifer is a mock of Lifer interface. @@ -124,7 +172,31 @@ func (m *MockLifer) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockLiferMockRecorder) Life() *gomock.Call { +func (mr *MockLiferMockRecorder) Life() *MockLiferLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockLifer)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockLifer)(nil).Life)) + return &MockLiferLifeCall{Call: call} +} + +// MockLiferLifeCall wrap *gomock.Call +type MockLiferLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLiferLifeCall) Return(arg0 state.Life) *MockLiferLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLiferLifeCall) Do(f func() state.Life) *MockLiferLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLiferLifeCall) DoAndReturn(f func() state.Life) *MockLiferLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/instancemutater/mocks/watcher_mock.go b/apiserver/facades/agent/instancemutater/mocks/watcher_mock.go index dc6efc83295..a223ce2c549 100644 --- a/apiserver/facades/agent/instancemutater/mocks/watcher_mock.go +++ b/apiserver/facades/agent/instancemutater/mocks/watcher_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state NotifyWatcher,StringsWatcher +// mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state NotifyWatcher,StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockNotifyWatcher) Changes() <-chan struct{} { } // Changes indicates an expected call of Changes. -func (mr *MockNotifyWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Changes() *MockNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + return &MockNotifyWatcherChangesCall{Call: call} +} + +// MockNotifyWatcherChangesCall wrap *gomock.Call +type MockNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherChangesCall) Return(arg0 <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherChangesCall) Do(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherChangesCall) DoAndReturn(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -61,9 +85,33 @@ func (m *MockNotifyWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockNotifyWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Err() *MockNotifyWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + return &MockNotifyWatcherErrCall{Call: call} +} + +// MockNotifyWatcherErrCall wrap *gomock.Call +type MockNotifyWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherErrCall) Return(arg0 error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherErrCall) Do(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherErrCall) DoAndReturn(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -73,9 +121,33 @@ func (m *MockNotifyWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockNotifyWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Kill() *MockNotifyWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + return &MockNotifyWatcherKillCall{Call: call} +} + +// MockNotifyWatcherKillCall wrap *gomock.Call +type MockNotifyWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherKillCall) Return() *MockNotifyWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherKillCall) Do(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherKillCall) DoAndReturn(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -87,9 +159,33 @@ func (m *MockNotifyWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockNotifyWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Stop() *MockNotifyWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + return &MockNotifyWatcherStopCall{Call: call} +} + +// MockNotifyWatcherStopCall wrap *gomock.Call +type MockNotifyWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherStopCall) Return(arg0 error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherStopCall) Do(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherStopCall) DoAndReturn(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -101,9 +197,33 @@ func (m *MockNotifyWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockNotifyWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Wait() *MockNotifyWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + return &MockNotifyWatcherWaitCall{Call: call} +} + +// MockNotifyWatcherWaitCall wrap *gomock.Call +type MockNotifyWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherWaitCall) Return(arg0 error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherWaitCall) Do(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherWaitCall) DoAndReturn(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStringsWatcher is a mock of StringsWatcher interface. @@ -138,9 +258,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -152,9 +296,33 @@ func (m *MockStringsWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockStringsWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Err() *MockStringsWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockStringsWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockStringsWatcher)(nil).Err)) + return &MockStringsWatcherErrCall{Call: call} +} + +// MockStringsWatcherErrCall wrap *gomock.Call +type MockStringsWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherErrCall) Return(arg0 error) *MockStringsWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherErrCall) Do(f func() error) *MockStringsWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherErrCall) DoAndReturn(f func() error) *MockStringsWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -164,9 +332,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -178,9 +370,33 @@ func (m *MockStringsWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockStringsWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Stop() *MockStringsWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockStringsWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockStringsWatcher)(nil).Stop)) + return &MockStringsWatcherStopCall{Call: call} +} + +// MockStringsWatcherStopCall wrap *gomock.Call +type MockStringsWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherStopCall) Return(arg0 error) *MockStringsWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherStopCall) Do(f func() error) *MockStringsWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherStopCall) DoAndReturn(f func() error) *MockStringsWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -192,7 +408,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/instancemutater/package_test.go b/apiserver/facades/agent/instancemutater/package_test.go index f182e18487a..80433bdfd6c 100644 --- a/apiserver/facades/agent/instancemutater/package_test.go +++ b/apiserver/facades/agent/instancemutater/package_test.go @@ -16,9 +16,9 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/instancemutater_mock.go github.com/juju/juju/apiserver/facades/agent/instancemutater InstanceMutatorWatcher,InstanceMutaterState,Machine,Unit,Application,Charm -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/state EntityFinder,Entity,Lifer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state NotifyWatcher,StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/instancemutater_mock.go github.com/juju/juju/apiserver/facades/agent/instancemutater InstanceMutatorWatcher,InstanceMutaterState,Machine,Unit,Application,Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/state EntityFinder,Entity,Lifer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state NotifyWatcher,StringsWatcher func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/agent/logger/package_test.go b/apiserver/facades/agent/logger/package_test.go index 4f6ba365b63..bdbbef3741c 100644 --- a/apiserver/facades/agent/logger/package_test.go +++ b/apiserver/facades/agent/logger/package_test.go @@ -9,7 +9,7 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package logger_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/agent/logger ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package logger_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/agent/logger ModelConfigService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/agent/logger/service_mock_test.go b/apiserver/facades/agent/logger/service_mock_test.go index 1ef495c8d4e..6d1834a050d 100644 --- a/apiserver/facades/agent/logger/service_mock_test.go +++ b/apiserver/facades/agent/logger/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package logger_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/agent/logger ModelConfigService +// mockgen -typed -package logger_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/agent/logger ModelConfigService // // Package logger_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/machine/package_mock_test.go b/apiserver/facades/agent/machine/package_mock_test.go index 21e84d9520d..57b941d1549 100644 --- a/apiserver/facades/agent/machine/package_mock_test.go +++ b/apiserver/facades/agent/machine/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machine_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/agent/machine NetworkService +// mockgen -typed -package machine_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/agent/machine NetworkService // // Package machine_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockNetworkService) AddSubnet(arg0 context.Context, arg1 network.Subnet } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockNetworkServiceMockRecorder) AddSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) AddSubnet(arg0, arg1 any) *MockNetworkServiceAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkService)(nil).AddSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkService)(nil).AddSubnet), arg0, arg1) + return &MockNetworkServiceAddSubnetCall{Call: call} +} + +// MockNetworkServiceAddSubnetCall wrap *gomock.Call +type MockNetworkServiceAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceAddSubnetCall) Return(arg0 network.Id, arg1 error) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceAddSubnetCall) Do(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceAddSubnetCall) DoAndReturn(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockNetworkServiceAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSpaces mocks base method. @@ -65,9 +89,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -80,7 +128,31 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/machine/package_test.go b/apiserver/facades/agent/machine/package_test.go index 29ec934f321..bcb288b9dbb 100644 --- a/apiserver/facades/agent/machine/package_test.go +++ b/apiserver/facades/agent/machine/package_test.go @@ -15,7 +15,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package machine_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/agent/machine NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package machine_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/agent/machine NetworkService func TestAll(t *stdtesting.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/facades/agent/provisioner/interface.go b/apiserver/facades/agent/provisioner/interface.go index c189f4c192e..0ac1027e5d6 100644 --- a/apiserver/facades/agent/provisioner/interface.go +++ b/apiserver/facades/agent/provisioner/interface.go @@ -17,8 +17,8 @@ import ( // It is an indirection for both containerizer.Machine and // containerizer.Container as well as state.Machine locally. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/agent/provisioner Machine,BridgePolicy,Unit,Application,Charm -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/containerizer_mock.go github.com/juju/juju/internal/network/containerizer LinkLayerDevice +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/agent/provisioner Machine,BridgePolicy,Unit,Application,Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/containerizer_mock.go github.com/juju/juju/internal/network/containerizer LinkLayerDevice type Machine interface { containerizer.Container diff --git a/apiserver/facades/agent/provisioner/mocks/containerizer_mock.go b/apiserver/facades/agent/provisioner/mocks/containerizer_mock.go index e89ea36ce7e..8ae7d2a6037 100644 --- a/apiserver/facades/agent/provisioner/mocks/containerizer_mock.go +++ b/apiserver/facades/agent/provisioner/mocks/containerizer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/containerizer_mock.go github.com/juju/juju/internal/network/containerizer LinkLayerDevice +// mockgen -typed -package mocks -destination mocks/containerizer_mock.go github.com/juju/juju/internal/network/containerizer LinkLayerDevice // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockLinkLayerDevice) Addresses() ([]*state.Address, error) { } // Addresses indicates an expected call of Addresses. -func (mr *MockLinkLayerDeviceMockRecorder) Addresses() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Addresses() *MockLinkLayerDeviceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockLinkLayerDevice)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockLinkLayerDevice)(nil).Addresses)) + return &MockLinkLayerDeviceAddressesCall{Call: call} +} + +// MockLinkLayerDeviceAddressesCall wrap *gomock.Call +type MockLinkLayerDeviceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceAddressesCall) Return(arg0 []*state.Address, arg1 error) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceAddressesCall) Do(f func() ([]*state.Address, error)) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceAddressesCall) DoAndReturn(f func() ([]*state.Address, error)) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EthernetDeviceForBridge mocks base method. @@ -66,9 +90,33 @@ func (m *MockLinkLayerDevice) EthernetDeviceForBridge(arg0 string, arg1 bool, ar } // EthernetDeviceForBridge indicates an expected call of EthernetDeviceForBridge. -func (mr *MockLinkLayerDeviceMockRecorder) EthernetDeviceForBridge(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) EthernetDeviceForBridge(arg0, arg1, arg2 any) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthernetDeviceForBridge", reflect.TypeOf((*MockLinkLayerDevice)(nil).EthernetDeviceForBridge), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthernetDeviceForBridge", reflect.TypeOf((*MockLinkLayerDevice)(nil).EthernetDeviceForBridge), arg0, arg1, arg2) + return &MockLinkLayerDeviceEthernetDeviceForBridgeCall{Call: call} +} + +// MockLinkLayerDeviceEthernetDeviceForBridgeCall wrap *gomock.Call +type MockLinkLayerDeviceEthernetDeviceForBridgeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) Return(arg0 network.InterfaceInfo, arg1 error) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) Do(f func(string, bool, network.SubnetInfos) (network.InterfaceInfo, error)) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) DoAndReturn(f func(string, bool, network.SubnetInfos) (network.InterfaceInfo, error)) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsAutoStart mocks base method. @@ -80,9 +128,33 @@ func (m *MockLinkLayerDevice) IsAutoStart() bool { } // IsAutoStart indicates an expected call of IsAutoStart. -func (mr *MockLinkLayerDeviceMockRecorder) IsAutoStart() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) IsAutoStart() *MockLinkLayerDeviceIsAutoStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoStart", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsAutoStart)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoStart", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsAutoStart)) + return &MockLinkLayerDeviceIsAutoStartCall{Call: call} +} + +// MockLinkLayerDeviceIsAutoStartCall wrap *gomock.Call +type MockLinkLayerDeviceIsAutoStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceIsAutoStartCall) Return(arg0 bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceIsAutoStartCall) Do(f func() bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceIsAutoStartCall) DoAndReturn(f func() bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUp mocks base method. @@ -94,9 +166,33 @@ func (m *MockLinkLayerDevice) IsUp() bool { } // IsUp indicates an expected call of IsUp. -func (mr *MockLinkLayerDeviceMockRecorder) IsUp() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) IsUp() *MockLinkLayerDeviceIsUpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsUp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsUp)) + return &MockLinkLayerDeviceIsUpCall{Call: call} +} + +// MockLinkLayerDeviceIsUpCall wrap *gomock.Call +type MockLinkLayerDeviceIsUpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceIsUpCall) Return(arg0 bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceIsUpCall) Do(f func() bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceIsUpCall) DoAndReturn(f func() bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MACAddress mocks base method. @@ -108,9 +204,33 @@ func (m *MockLinkLayerDevice) MACAddress() string { } // MACAddress indicates an expected call of MACAddress. -func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *MockLinkLayerDeviceMACAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + return &MockLinkLayerDeviceMACAddressCall{Call: call} +} + +// MockLinkLayerDeviceMACAddressCall wrap *gomock.Call +type MockLinkLayerDeviceMACAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceMACAddressCall) Return(arg0 string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceMACAddressCall) Do(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceMACAddressCall) DoAndReturn(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MTU mocks base method. @@ -122,9 +242,33 @@ func (m *MockLinkLayerDevice) MTU() uint { } // MTU indicates an expected call of MTU. -func (mr *MockLinkLayerDeviceMockRecorder) MTU() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) MTU() *MockLinkLayerDeviceMTUCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockLinkLayerDevice)(nil).MTU)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockLinkLayerDevice)(nil).MTU)) + return &MockLinkLayerDeviceMTUCall{Call: call} +} + +// MockLinkLayerDeviceMTUCall wrap *gomock.Call +type MockLinkLayerDeviceMTUCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceMTUCall) Return(arg0 uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceMTUCall) Do(f func() uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceMTUCall) DoAndReturn(f func() uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -136,9 +280,33 @@ func (m *MockLinkLayerDevice) Name() string { } // Name indicates an expected call of Name. -func (mr *MockLinkLayerDeviceMockRecorder) Name() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Name() *MockLinkLayerDeviceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + return &MockLinkLayerDeviceNameCall{Call: call} +} + +// MockLinkLayerDeviceNameCall wrap *gomock.Call +type MockLinkLayerDeviceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceNameCall) Return(arg0 string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceNameCall) Do(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceNameCall) DoAndReturn(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ParentDevice mocks base method. @@ -151,9 +319,33 @@ func (m *MockLinkLayerDevice) ParentDevice() (containerizer.LinkLayerDevice, err } // ParentDevice indicates an expected call of ParentDevice. -func (mr *MockLinkLayerDeviceMockRecorder) ParentDevice() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) ParentDevice() *MockLinkLayerDeviceParentDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentDevice", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentDevice", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentDevice)) + return &MockLinkLayerDeviceParentDeviceCall{Call: call} +} + +// MockLinkLayerDeviceParentDeviceCall wrap *gomock.Call +type MockLinkLayerDeviceParentDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceParentDeviceCall) Return(arg0 containerizer.LinkLayerDevice, arg1 error) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceParentDeviceCall) Do(f func() (containerizer.LinkLayerDevice, error)) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceParentDeviceCall) DoAndReturn(f func() (containerizer.LinkLayerDevice, error)) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ParentName mocks base method. @@ -165,9 +357,33 @@ func (m *MockLinkLayerDevice) ParentName() string { } // ParentName indicates an expected call of ParentName. -func (mr *MockLinkLayerDeviceMockRecorder) ParentName() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) ParentName() *MockLinkLayerDeviceParentNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentName", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentName", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentName)) + return &MockLinkLayerDeviceParentNameCall{Call: call} +} + +// MockLinkLayerDeviceParentNameCall wrap *gomock.Call +type MockLinkLayerDeviceParentNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceParentNameCall) Return(arg0 string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceParentNameCall) Do(f func() string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceParentNameCall) DoAndReturn(f func() string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -179,9 +395,33 @@ func (m *MockLinkLayerDevice) Type() network.LinkLayerDeviceType { } // Type indicates an expected call of Type. -func (mr *MockLinkLayerDeviceMockRecorder) Type() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Type() *MockLinkLayerDeviceTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + return &MockLinkLayerDeviceTypeCall{Call: call} +} + +// MockLinkLayerDeviceTypeCall wrap *gomock.Call +type MockLinkLayerDeviceTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceTypeCall) Return(arg0 network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceTypeCall) Do(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceTypeCall) DoAndReturn(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VirtualPortType mocks base method. @@ -193,7 +433,31 @@ func (m *MockLinkLayerDevice) VirtualPortType() network.VirtualPortType { } // VirtualPortType indicates an expected call of VirtualPortType. -func (mr *MockLinkLayerDeviceMockRecorder) VirtualPortType() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) VirtualPortType() *MockLinkLayerDeviceVirtualPortTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualPortType", reflect.TypeOf((*MockLinkLayerDevice)(nil).VirtualPortType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualPortType", reflect.TypeOf((*MockLinkLayerDevice)(nil).VirtualPortType)) + return &MockLinkLayerDeviceVirtualPortTypeCall{Call: call} +} + +// MockLinkLayerDeviceVirtualPortTypeCall wrap *gomock.Call +type MockLinkLayerDeviceVirtualPortTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceVirtualPortTypeCall) Return(arg0 network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceVirtualPortTypeCall) Do(f func() network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceVirtualPortTypeCall) DoAndReturn(f func() network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/provisioner/mocks/package_mock.go b/apiserver/facades/agent/provisioner/mocks/package_mock.go index d572ea534ca..d5077c496dd 100644 --- a/apiserver/facades/agent/provisioner/mocks/package_mock.go +++ b/apiserver/facades/agent/provisioner/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/agent/provisioner Machine,BridgePolicy,Unit,Application,Charm +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/agent/provisioner Machine,BridgePolicy,Unit,Application,Charm // // Package mocks is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockMachine) AllDeviceAddresses() ([]containerizer.Address, error) { } // AllDeviceAddresses indicates an expected call of AllDeviceAddresses. -func (mr *MockMachineMockRecorder) AllDeviceAddresses() *gomock.Call { +func (mr *MockMachineMockRecorder) AllDeviceAddresses() *MockMachineAllDeviceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockMachine)(nil).AllDeviceAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockMachine)(nil).AllDeviceAddresses)) + return &MockMachineAllDeviceAddressesCall{Call: call} +} + +// MockMachineAllDeviceAddressesCall wrap *gomock.Call +type MockMachineAllDeviceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAllDeviceAddressesCall) Return(arg0 []containerizer.Address, arg1 error) *MockMachineAllDeviceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAllDeviceAddressesCall) Do(f func() ([]containerizer.Address, error)) *MockMachineAllDeviceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAllDeviceAddressesCall) DoAndReturn(f func() ([]containerizer.Address, error)) *MockMachineAllDeviceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllLinkLayerDevices mocks base method. @@ -73,9 +97,33 @@ func (m *MockMachine) AllLinkLayerDevices() ([]containerizer.LinkLayerDevice, er } // AllLinkLayerDevices indicates an expected call of AllLinkLayerDevices. -func (mr *MockMachineMockRecorder) AllLinkLayerDevices() *gomock.Call { +func (mr *MockMachineMockRecorder) AllLinkLayerDevices() *MockMachineAllLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockMachine)(nil).AllLinkLayerDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockMachine)(nil).AllLinkLayerDevices)) + return &MockMachineAllLinkLayerDevicesCall{Call: call} +} + +// MockMachineAllLinkLayerDevicesCall wrap *gomock.Call +type MockMachineAllLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAllLinkLayerDevicesCall) Return(arg0 []containerizer.LinkLayerDevice, arg1 error) *MockMachineAllLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAllLinkLayerDevicesCall) Do(f func() ([]containerizer.LinkLayerDevice, error)) *MockMachineAllLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAllLinkLayerDevicesCall) DoAndReturn(f func() ([]containerizer.LinkLayerDevice, error)) *MockMachineAllLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllSpaces mocks base method. @@ -88,9 +136,33 @@ func (m *MockMachine) AllSpaces(arg0 network.SubnetInfos) (set.Strings, error) { } // AllSpaces indicates an expected call of AllSpaces. -func (mr *MockMachineMockRecorder) AllSpaces(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AllSpaces(arg0 any) *MockMachineAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockMachine)(nil).AllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockMachine)(nil).AllSpaces), arg0) + return &MockMachineAllSpacesCall{Call: call} +} + +// MockMachineAllSpacesCall wrap *gomock.Call +type MockMachineAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAllSpacesCall) Return(arg0 set.Strings, arg1 error) *MockMachineAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAllSpacesCall) Do(f func(network.SubnetInfos) (set.Strings, error)) *MockMachineAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAllSpacesCall) DoAndReturn(f func(network.SubnetInfos) (set.Strings, error)) *MockMachineAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -103,9 +175,33 @@ func (m *MockMachine) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockMachineMockRecorder) Constraints() *gomock.Call { +func (mr *MockMachineMockRecorder) Constraints() *MockMachineConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + return &MockMachineConstraintsCall{Call: call} +} + +// MockMachineConstraintsCall wrap *gomock.Call +type MockMachineConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockMachineConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineConstraintsCall) Do(f func() (constraints.Value, error)) *MockMachineConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockMachineConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -117,9 +213,33 @@ func (m *MockMachine) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMachineMockRecorder) ContainerType() *gomock.Call { +func (mr *MockMachineMockRecorder) ContainerType() *MockMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + return &MockMachineContainerTypeCall{Call: call} +} + +// MockMachineContainerTypeCall wrap *gomock.Call +type MockMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainerTypeCall) Return(arg0 instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainerTypeCall) Do(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -131,9 +251,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -146,9 +290,33 @@ func (m *MockMachine) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceId() *MockMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + return &MockMachineInstanceIdCall{Call: call} +} + +// MockMachineInstanceIdCall wrap *gomock.Call +type MockMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManual mocks base method. @@ -161,9 +329,33 @@ func (m *MockMachine) IsManual() (bool, error) { } // IsManual indicates an expected call of IsManual. -func (mr *MockMachineMockRecorder) IsManual() *gomock.Call { +func (mr *MockMachineMockRecorder) IsManual() *MockMachineIsManualCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + return &MockMachineIsManualCall{Call: call} +} + +// MockMachineIsManualCall wrap *gomock.Call +type MockMachineIsManualCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsManualCall) Return(arg0 bool, arg1 error) *MockMachineIsManualCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsManualCall) Do(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsManualCall) DoAndReturn(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineTag mocks base method. @@ -175,9 +367,33 @@ func (m *MockMachine) MachineTag() names.MachineTag { } // MachineTag indicates an expected call of MachineTag. -func (mr *MockMachineMockRecorder) MachineTag() *gomock.Call { +func (mr *MockMachineMockRecorder) MachineTag() *MockMachineMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachine)(nil).MachineTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachine)(nil).MachineTag)) + return &MockMachineMachineTagCall{Call: call} +} + +// MockMachineMachineTagCall wrap *gomock.Call +type MockMachineMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineMachineTagCall) Return(arg0 names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineMachineTagCall) Do(f func() names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Raw mocks base method. @@ -189,9 +405,33 @@ func (m *MockMachine) Raw() *state.Machine { } // Raw indicates an expected call of Raw. -func (mr *MockMachineMockRecorder) Raw() *gomock.Call { +func (mr *MockMachineMockRecorder) Raw() *MockMachineRawCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Raw", reflect.TypeOf((*MockMachine)(nil).Raw)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Raw", reflect.TypeOf((*MockMachine)(nil).Raw)) + return &MockMachineRawCall{Call: call} +} + +// MockMachineRawCall wrap *gomock.Call +type MockMachineRawCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineRawCall) Return(arg0 *state.Machine) *MockMachineRawCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineRawCall) Do(f func() *state.Machine) *MockMachineRawCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineRawCall) DoAndReturn(f func() *state.Machine) *MockMachineRawCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllAddresses mocks base method. @@ -203,9 +443,33 @@ func (m *MockMachine) RemoveAllAddresses() error { } // RemoveAllAddresses indicates an expected call of RemoveAllAddresses. -func (mr *MockMachineMockRecorder) RemoveAllAddresses() *gomock.Call { +func (mr *MockMachineMockRecorder) RemoveAllAddresses() *MockMachineRemoveAllAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllAddresses", reflect.TypeOf((*MockMachine)(nil).RemoveAllAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllAddresses", reflect.TypeOf((*MockMachine)(nil).RemoveAllAddresses)) + return &MockMachineRemoveAllAddressesCall{Call: call} +} + +// MockMachineRemoveAllAddressesCall wrap *gomock.Call +type MockMachineRemoveAllAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineRemoveAllAddressesCall) Return(arg0 error) *MockMachineRemoveAllAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineRemoveAllAddressesCall) Do(f func() error) *MockMachineRemoveAllAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineRemoveAllAddressesCall) DoAndReturn(f func() error) *MockMachineRemoveAllAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -217,9 +481,33 @@ func (m *MockMachine) SetConstraints(arg0 constraints.Value) error { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockMachineMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetConstraints(arg0 any) *MockMachineSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockMachine)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockMachine)(nil).SetConstraints), arg0) + return &MockMachineSetConstraintsCall{Call: call} +} + +// MockMachineSetConstraintsCall wrap *gomock.Call +type MockMachineSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetConstraintsCall) Return(arg0 error) *MockMachineSetConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetConstraintsCall) Do(f func(constraints.Value) error) *MockMachineSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetConstraintsCall) DoAndReturn(f func(constraints.Value) error) *MockMachineSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDevicesAddresses mocks base method. @@ -235,9 +523,33 @@ func (m *MockMachine) SetDevicesAddresses(arg0 ...state.LinkLayerDeviceAddress) } // SetDevicesAddresses indicates an expected call of SetDevicesAddresses. -func (mr *MockMachineMockRecorder) SetDevicesAddresses(arg0 ...any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetDevicesAddresses(arg0 ...any) *MockMachineSetDevicesAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDevicesAddresses", reflect.TypeOf((*MockMachine)(nil).SetDevicesAddresses), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDevicesAddresses", reflect.TypeOf((*MockMachine)(nil).SetDevicesAddresses), arg0...) + return &MockMachineSetDevicesAddressesCall{Call: call} +} + +// MockMachineSetDevicesAddressesCall wrap *gomock.Call +type MockMachineSetDevicesAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetDevicesAddressesCall) Return(arg0 error) *MockMachineSetDevicesAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetDevicesAddressesCall) Do(f func(...state.LinkLayerDeviceAddress) error) *MockMachineSetDevicesAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetDevicesAddressesCall) DoAndReturn(f func(...state.LinkLayerDeviceAddress) error) *MockMachineSetDevicesAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLinkLayerDevices mocks base method. @@ -253,9 +565,33 @@ func (m *MockMachine) SetLinkLayerDevices(arg0 ...state.LinkLayerDeviceArgs) err } // SetLinkLayerDevices indicates an expected call of SetLinkLayerDevices. -func (mr *MockMachineMockRecorder) SetLinkLayerDevices(arg0 ...any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetLinkLayerDevices(arg0 ...any) *MockMachineSetLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkLayerDevices", reflect.TypeOf((*MockMachine)(nil).SetLinkLayerDevices), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkLayerDevices", reflect.TypeOf((*MockMachine)(nil).SetLinkLayerDevices), arg0...) + return &MockMachineSetLinkLayerDevicesCall{Call: call} +} + +// MockMachineSetLinkLayerDevicesCall wrap *gomock.Call +type MockMachineSetLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetLinkLayerDevicesCall) Return(arg0 error) *MockMachineSetLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetLinkLayerDevicesCall) Do(f func(...state.LinkLayerDeviceArgs) error) *MockMachineSetLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetLinkLayerDevicesCall) DoAndReturn(f func(...state.LinkLayerDeviceArgs) error) *MockMachineSetLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -268,9 +604,33 @@ func (m *MockMachine) Units() ([]provisioner.Unit, error) { } // Units indicates an expected call of Units. -func (mr *MockMachineMockRecorder) Units() *gomock.Call { +func (mr *MockMachineMockRecorder) Units() *MockMachineUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + return &MockMachineUnitsCall{Call: call} +} + +// MockMachineUnitsCall wrap *gomock.Call +type MockMachineUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineUnitsCall) Return(arg0 []provisioner.Unit, arg1 error) *MockMachineUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineUnitsCall) Do(f func() ([]provisioner.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineUnitsCall) DoAndReturn(f func() ([]provisioner.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBridgePolicy is a mock of BridgePolicy interface. @@ -307,9 +667,33 @@ func (m *MockBridgePolicy) FindMissingBridgesForContainer(arg0 containerizer.Mac } // FindMissingBridgesForContainer indicates an expected call of FindMissingBridgesForContainer. -func (mr *MockBridgePolicyMockRecorder) FindMissingBridgesForContainer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBridgePolicyMockRecorder) FindMissingBridgesForContainer(arg0, arg1, arg2 any) *MockBridgePolicyFindMissingBridgesForContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindMissingBridgesForContainer", reflect.TypeOf((*MockBridgePolicy)(nil).FindMissingBridgesForContainer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindMissingBridgesForContainer", reflect.TypeOf((*MockBridgePolicy)(nil).FindMissingBridgesForContainer), arg0, arg1, arg2) + return &MockBridgePolicyFindMissingBridgesForContainerCall{Call: call} +} + +// MockBridgePolicyFindMissingBridgesForContainerCall wrap *gomock.Call +type MockBridgePolicyFindMissingBridgesForContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBridgePolicyFindMissingBridgesForContainerCall) Return(arg0 []network0.DeviceToBridge, arg1 int, arg2 error) *MockBridgePolicyFindMissingBridgesForContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBridgePolicyFindMissingBridgesForContainerCall) Do(f func(containerizer.Machine, containerizer.Container, network.SubnetInfos) ([]network0.DeviceToBridge, int, error)) *MockBridgePolicyFindMissingBridgesForContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBridgePolicyFindMissingBridgesForContainerCall) DoAndReturn(f func(containerizer.Machine, containerizer.Container, network.SubnetInfos) ([]network0.DeviceToBridge, int, error)) *MockBridgePolicyFindMissingBridgesForContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PopulateContainerLinkLayerDevices mocks base method. @@ -322,9 +706,33 @@ func (m *MockBridgePolicy) PopulateContainerLinkLayerDevices(arg0 containerizer. } // PopulateContainerLinkLayerDevices indicates an expected call of PopulateContainerLinkLayerDevices. -func (mr *MockBridgePolicyMockRecorder) PopulateContainerLinkLayerDevices(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBridgePolicyMockRecorder) PopulateContainerLinkLayerDevices(arg0, arg1, arg2 any) *MockBridgePolicyPopulateContainerLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopulateContainerLinkLayerDevices", reflect.TypeOf((*MockBridgePolicy)(nil).PopulateContainerLinkLayerDevices), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopulateContainerLinkLayerDevices", reflect.TypeOf((*MockBridgePolicy)(nil).PopulateContainerLinkLayerDevices), arg0, arg1, arg2) + return &MockBridgePolicyPopulateContainerLinkLayerDevicesCall{Call: call} +} + +// MockBridgePolicyPopulateContainerLinkLayerDevicesCall wrap *gomock.Call +type MockBridgePolicyPopulateContainerLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBridgePolicyPopulateContainerLinkLayerDevicesCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockBridgePolicyPopulateContainerLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBridgePolicyPopulateContainerLinkLayerDevicesCall) Do(f func(containerizer.Machine, containerizer.Container, bool) (network.InterfaceInfos, error)) *MockBridgePolicyPopulateContainerLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBridgePolicyPopulateContainerLinkLayerDevicesCall) DoAndReturn(f func(containerizer.Machine, containerizer.Container, bool) (network.InterfaceInfos, error)) *MockBridgePolicyPopulateContainerLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -360,9 +768,33 @@ func (m *MockUnit) Application() (provisioner.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockUnitMockRecorder) Application() *gomock.Call { +func (mr *MockUnitMockRecorder) Application() *MockUnitApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + return &MockUnitApplicationCall{Call: call} +} + +// MockUnitApplicationCall wrap *gomock.Call +type MockUnitApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationCall) Return(arg0 provisioner.Application, arg1 error) *MockUnitApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationCall) Do(f func() (provisioner.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationCall) DoAndReturn(f func() (provisioner.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -374,9 +806,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -413,9 +869,33 @@ func (m *MockApplication) Charm() (provisioner.Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 provisioner.Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (provisioner.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (provisioner.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -427,9 +907,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -464,9 +968,33 @@ func (m *MockCharm) LXDProfile() *charm.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockCharmMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockCharmMockRecorder) LXDProfile() *MockCharmLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharm)(nil).LXDProfile)) + return &MockCharmLXDProfileCall{Call: call} +} + +// MockCharmLXDProfileCall wrap *gomock.Call +type MockCharmLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmLXDProfileCall) Return(arg0 *charm.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmLXDProfileCall) Do(f func() *charm.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmLXDProfileCall) DoAndReturn(f func() *charm.LXDProfile) *MockCharmLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -478,7 +1006,31 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsdrain/mocks/facade_mock.go b/apiserver/facades/agent/secretsdrain/mocks/facade_mock.go index b08ce254fa4..4c2675559ee 100644 --- a/apiserver/facades/agent/secretsdrain/mocks/facade_mock.go +++ b/apiserver/facades/agent/secretsdrain/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Authorizer +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Authorizer // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -77,9 +125,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -91,9 +163,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -105,9 +201,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -119,9 +239,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -147,9 +315,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -161,9 +353,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -175,9 +391,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -189,7 +429,31 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsdrain/package_test.go b/apiserver/facades/agent/secretsdrain/package_test.go index 365b9d2f488..b8bcf0797e4 100644 --- a/apiserver/facades/agent/secretsdrain/package_test.go +++ b/apiserver/facades/agent/secretsdrain/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/apiserver/facade Authorizer func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/agent/secretsmanager/mocks/crossmodel.go b/apiserver/facades/agent/secretsmanager/mocks/crossmodel.go index 25ea92ff7b5..e3bba2ec63b 100644 --- a/apiserver/facades/agent/secretsmanager/mocks/crossmodel.go +++ b/apiserver/facades/agent/secretsmanager/mocks/crossmodel.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/agent/secretsmanager CrossModelState,CrossModelSecretsClient +// mockgen -typed -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/agent/secretsmanager CrossModelState,CrossModelSecretsClient // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockCrossModelState) GetMacaroon(arg0 names.Tag) (*macaroon.Macaroon, e } // GetMacaroon indicates an expected call of GetMacaroon. -func (mr *MockCrossModelStateMockRecorder) GetMacaroon(arg0 any) *gomock.Call { +func (mr *MockCrossModelStateMockRecorder) GetMacaroon(arg0 any) *MockCrossModelStateGetMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMacaroon", reflect.TypeOf((*MockCrossModelState)(nil).GetMacaroon), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMacaroon", reflect.TypeOf((*MockCrossModelState)(nil).GetMacaroon), arg0) + return &MockCrossModelStateGetMacaroonCall{Call: call} +} + +// MockCrossModelStateGetMacaroonCall wrap *gomock.Call +type MockCrossModelStateGetMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelStateGetMacaroonCall) Return(arg0 *macaroon.Macaroon, arg1 error) *MockCrossModelStateGetMacaroonCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelStateGetMacaroonCall) Do(f func(names.Tag) (*macaroon.Macaroon, error)) *MockCrossModelStateGetMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelStateGetMacaroonCall) DoAndReturn(f func(names.Tag) (*macaroon.Macaroon, error)) *MockCrossModelStateGetMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRemoteEntity mocks base method. @@ -69,9 +93,33 @@ func (m *MockCrossModelState) GetRemoteEntity(arg0 string) (names.Tag, error) { } // GetRemoteEntity indicates an expected call of GetRemoteEntity. -func (mr *MockCrossModelStateMockRecorder) GetRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockCrossModelStateMockRecorder) GetRemoteEntity(arg0 any) *MockCrossModelStateGetRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockCrossModelState)(nil).GetRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockCrossModelState)(nil).GetRemoteEntity), arg0) + return &MockCrossModelStateGetRemoteEntityCall{Call: call} +} + +// MockCrossModelStateGetRemoteEntityCall wrap *gomock.Call +type MockCrossModelStateGetRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelStateGetRemoteEntityCall) Return(arg0 names.Tag, arg1 error) *MockCrossModelStateGetRemoteEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelStateGetRemoteEntityCall) Do(f func(string) (names.Tag, error)) *MockCrossModelStateGetRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelStateGetRemoteEntityCall) DoAndReturn(f func(string) (names.Tag, error)) *MockCrossModelStateGetRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetToken mocks base method. @@ -84,9 +132,33 @@ func (m *MockCrossModelState) GetToken(arg0 names.Tag) (string, error) { } // GetToken indicates an expected call of GetToken. -func (mr *MockCrossModelStateMockRecorder) GetToken(arg0 any) *gomock.Call { +func (mr *MockCrossModelStateMockRecorder) GetToken(arg0 any) *MockCrossModelStateGetTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockCrossModelState)(nil).GetToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockCrossModelState)(nil).GetToken), arg0) + return &MockCrossModelStateGetTokenCall{Call: call} +} + +// MockCrossModelStateGetTokenCall wrap *gomock.Call +type MockCrossModelStateGetTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelStateGetTokenCall) Return(arg0 string, arg1 error) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelStateGetTokenCall) Do(f func(names.Tag) (string, error)) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelStateGetTokenCall) DoAndReturn(f func(names.Tag) (string, error)) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCrossModelSecretsClient is a mock of CrossModelSecretsClient interface. @@ -121,9 +193,33 @@ func (m *MockCrossModelSecretsClient) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCrossModelSecretsClientMockRecorder) Close() *gomock.Call { +func (mr *MockCrossModelSecretsClientMockRecorder) Close() *MockCrossModelSecretsClientCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).Close)) + return &MockCrossModelSecretsClientCloseCall{Call: call} +} + +// MockCrossModelSecretsClientCloseCall wrap *gomock.Call +type MockCrossModelSecretsClientCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelSecretsClientCloseCall) Return(arg0 error) *MockCrossModelSecretsClientCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelSecretsClientCloseCall) Do(f func() error) *MockCrossModelSecretsClientCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelSecretsClientCloseCall) DoAndReturn(f func() error) *MockCrossModelSecretsClientCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRemoteSecretContentInfo mocks base method. @@ -139,9 +235,33 @@ func (m *MockCrossModelSecretsClient) GetRemoteSecretContentInfo(arg0 context.Co } // GetRemoteSecretContentInfo indicates an expected call of GetRemoteSecretContentInfo. -func (mr *MockCrossModelSecretsClientMockRecorder) GetRemoteSecretContentInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 any) *gomock.Call { +func (mr *MockCrossModelSecretsClientMockRecorder) GetRemoteSecretContentInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 any) *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteSecretContentInfo", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).GetRemoteSecretContentInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteSecretContentInfo", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).GetRemoteSecretContentInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) + return &MockCrossModelSecretsClientGetRemoteSecretContentInfoCall{Call: call} +} + +// MockCrossModelSecretsClientGetRemoteSecretContentInfoCall wrap *gomock.Call +type MockCrossModelSecretsClientGetRemoteSecretContentInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall) Return(arg0 *secrets0.ContentParams, arg1 *provider.ModelBackendConfig, arg2 int, arg3 bool, arg4 error) *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3, arg4) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall) Do(f func(context.Context, *secrets.URI, int, bool, bool, string, string, int, macaroon.Slice) (*secrets0.ContentParams, *provider.ModelBackendConfig, int, bool, error)) *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall) DoAndReturn(f func(context.Context, *secrets.URI, int, bool, bool, string, string, int, macaroon.Slice) (*secrets0.ContentParams, *provider.ModelBackendConfig, int, bool, error)) *MockCrossModelSecretsClientGetRemoteSecretContentInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretAccessScope mocks base method. @@ -154,7 +274,31 @@ func (m *MockCrossModelSecretsClient) GetSecretAccessScope(arg0 *secrets.URI, ar } // GetSecretAccessScope indicates an expected call of GetSecretAccessScope. -func (mr *MockCrossModelSecretsClientMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCrossModelSecretsClientMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *MockCrossModelSecretsClientGetSecretAccessScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).GetSecretAccessScope), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockCrossModelSecretsClient)(nil).GetSecretAccessScope), arg0, arg1, arg2) + return &MockCrossModelSecretsClientGetSecretAccessScopeCall{Call: call} +} + +// MockCrossModelSecretsClientGetSecretAccessScopeCall wrap *gomock.Call +type MockCrossModelSecretsClientGetSecretAccessScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelSecretsClientGetSecretAccessScopeCall) Return(arg0 string, arg1 error) *MockCrossModelSecretsClientGetSecretAccessScopeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelSecretsClientGetSecretAccessScopeCall) Do(f func(*secrets.URI, string, int) (string, error)) *MockCrossModelSecretsClientGetSecretAccessScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelSecretsClientGetSecretAccessScopeCall) DoAndReturn(f func(*secrets.URI, string, int) (string, error)) *MockCrossModelSecretsClientGetSecretAccessScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsmanager/mocks/leadershipchecker.go b/apiserver/facades/agent/secretsmanager/mocks/leadershipchecker.go index 3275131c187..24d3cf128f4 100644 --- a/apiserver/facades/agent/secretsmanager/mocks/leadershipchecker.go +++ b/apiserver/facades/agent/secretsmanager/mocks/leadershipchecker.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadershipchecker.go github.com/juju/juju/core/leadership Checker,Token +// mockgen -typed -package mocks -destination mocks/leadershipchecker.go github.com/juju/juju/core/leadership Checker,Token // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockChecker) LeadershipCheck(arg0, arg1 string) leadership.Token { } // LeadershipCheck indicates an expected call of LeadershipCheck. -func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *gomock.Call { +func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *MockCheckerLeadershipCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + return &MockCheckerLeadershipCheckCall{Call: call} +} + +// MockCheckerLeadershipCheckCall wrap *gomock.Call +type MockCheckerLeadershipCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCheckerLeadershipCheckCall) Return(arg0 leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCheckerLeadershipCheckCall) Do(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCheckerLeadershipCheckCall) DoAndReturn(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToken is a mock of Token interface. @@ -85,7 +109,31 @@ func (m *MockToken) Check() error { } // Check indicates an expected call of Check. -func (mr *MockTokenMockRecorder) Check() *gomock.Call { +func (mr *MockTokenMockRecorder) Check() *MockTokenCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + return &MockTokenCheckCall{Call: call} +} + +// MockTokenCheckCall wrap *gomock.Call +type MockTokenCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenCheckCall) Return(arg0 error) *MockTokenCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenCheckCall) Do(f func() error) *MockTokenCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenCheckCall) DoAndReturn(f func() error) *MockTokenCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsmanager/mocks/secrets.go b/apiserver/facades/agent/secretsmanager/mocks/secrets.go index 4d2aac25bd4..8581901db1e 100644 --- a/apiserver/facades/agent/secretsmanager/mocks/secrets.go +++ b/apiserver/facades/agent/secretsmanager/mocks/secrets.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secrets.go -source service.go +// mockgen -typed -package mocks -destination mocks/secrets.go -source service.go // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockSecretTriggers) SecretRotated(ctx context.Context, uri *secrets.URI } // SecretRotated indicates an expected call of SecretRotated. -func (mr *MockSecretTriggersMockRecorder) SecretRotated(ctx, uri, params any) *gomock.Call { +func (mr *MockSecretTriggersMockRecorder) SecretRotated(ctx, uri, params any) *MockSecretTriggersSecretRotatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretTriggers)(nil).SecretRotated), ctx, uri, params) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretTriggers)(nil).SecretRotated), ctx, uri, params) + return &MockSecretTriggersSecretRotatedCall{Call: call} +} + +// MockSecretTriggersSecretRotatedCall wrap *gomock.Call +type MockSecretTriggersSecretRotatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggersSecretRotatedCall) Return(arg0 error) *MockSecretTriggersSecretRotatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggersSecretRotatedCall) Do(f func(context.Context, *secrets.URI, service.SecretRotatedParams) error) *MockSecretTriggersSecretRotatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggersSecretRotatedCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretRotatedParams) error) *MockSecretTriggersSecretRotatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchObsolete mocks base method. @@ -73,10 +97,34 @@ func (m *MockSecretTriggers) WatchObsolete(ctx context.Context, owners ...servic } // WatchObsolete indicates an expected call of WatchObsolete. -func (mr *MockSecretTriggersMockRecorder) WatchObsolete(ctx any, owners ...any) *gomock.Call { +func (mr *MockSecretTriggersMockRecorder) WatchObsolete(ctx any, owners ...any) *MockSecretTriggersWatchObsoleteCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, owners...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretTriggers)(nil).WatchObsolete), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretTriggers)(nil).WatchObsolete), varargs...) + return &MockSecretTriggersWatchObsoleteCall{Call: call} +} + +// MockSecretTriggersWatchObsoleteCall wrap *gomock.Call +type MockSecretTriggersWatchObsoleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggersWatchObsoleteCall) Return(arg0 watcher.StringsWatcher, arg1 error) *MockSecretTriggersWatchObsoleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggersWatchObsoleteCall) Do(f func(context.Context, ...service.CharmSecretOwner) (watcher.StringsWatcher, error)) *MockSecretTriggersWatchObsoleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggersWatchObsoleteCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) (watcher.StringsWatcher, error)) *MockSecretTriggersWatchObsoleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSecretRevisionsExpiryChanges mocks base method. @@ -93,10 +141,34 @@ func (m *MockSecretTriggers) WatchSecretRevisionsExpiryChanges(ctx context.Conte } // WatchSecretRevisionsExpiryChanges indicates an expected call of WatchSecretRevisionsExpiryChanges. -func (mr *MockSecretTriggersMockRecorder) WatchSecretRevisionsExpiryChanges(ctx any, owners ...any) *gomock.Call { +func (mr *MockSecretTriggersMockRecorder) WatchSecretRevisionsExpiryChanges(ctx any, owners ...any) *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, owners...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretRevisionsExpiryChanges", reflect.TypeOf((*MockSecretTriggers)(nil).WatchSecretRevisionsExpiryChanges), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretRevisionsExpiryChanges", reflect.TypeOf((*MockSecretTriggers)(nil).WatchSecretRevisionsExpiryChanges), varargs...) + return &MockSecretTriggersWatchSecretRevisionsExpiryChangesCall{Call: call} +} + +// MockSecretTriggersWatchSecretRevisionsExpiryChangesCall wrap *gomock.Call +type MockSecretTriggersWatchSecretRevisionsExpiryChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall) Return(arg0 watcher.SecretTriggerWatcher, arg1 error) *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall) Do(f func(context.Context, ...service.CharmSecretOwner) (watcher.SecretTriggerWatcher, error)) *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) (watcher.SecretTriggerWatcher, error)) *MockSecretTriggersWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSecretsRotationChanges mocks base method. @@ -113,10 +185,34 @@ func (m *MockSecretTriggers) WatchSecretsRotationChanges(ctx context.Context, ow } // WatchSecretsRotationChanges indicates an expected call of WatchSecretsRotationChanges. -func (mr *MockSecretTriggersMockRecorder) WatchSecretsRotationChanges(ctx any, owners ...any) *gomock.Call { +func (mr *MockSecretTriggersMockRecorder) WatchSecretsRotationChanges(ctx any, owners ...any) *MockSecretTriggersWatchSecretsRotationChangesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, owners...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretsRotationChanges", reflect.TypeOf((*MockSecretTriggers)(nil).WatchSecretsRotationChanges), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretsRotationChanges", reflect.TypeOf((*MockSecretTriggers)(nil).WatchSecretsRotationChanges), varargs...) + return &MockSecretTriggersWatchSecretsRotationChangesCall{Call: call} +} + +// MockSecretTriggersWatchSecretsRotationChangesCall wrap *gomock.Call +type MockSecretTriggersWatchSecretsRotationChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggersWatchSecretsRotationChangesCall) Return(arg0 watcher.SecretTriggerWatcher, arg1 error) *MockSecretTriggersWatchSecretsRotationChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggersWatchSecretsRotationChangesCall) Do(f func(context.Context, ...service.CharmSecretOwner) (watcher.SecretTriggerWatcher, error)) *MockSecretTriggersWatchSecretsRotationChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggersWatchSecretsRotationChangesCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) (watcher.SecretTriggerWatcher, error)) *MockSecretTriggersWatchSecretsRotationChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsConsumer is a mock of SecretsConsumer interface. @@ -152,9 +248,33 @@ func (m *MockSecretsConsumer) GetConsumedRevision(ctx context.Context, uri *secr } // GetConsumedRevision indicates an expected call of GetConsumedRevision. -func (mr *MockSecretsConsumerMockRecorder) GetConsumedRevision(ctx, uri, unitName, refresh, peek, labelToUpdate any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) GetConsumedRevision(ctx, uri, unitName, refresh, peek, labelToUpdate any) *MockSecretsConsumerGetConsumedRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRevision", reflect.TypeOf((*MockSecretsConsumer)(nil).GetConsumedRevision), ctx, uri, unitName, refresh, peek, labelToUpdate) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRevision", reflect.TypeOf((*MockSecretsConsumer)(nil).GetConsumedRevision), ctx, uri, unitName, refresh, peek, labelToUpdate) + return &MockSecretsConsumerGetConsumedRevisionCall{Call: call} +} + +// MockSecretsConsumerGetConsumedRevisionCall wrap *gomock.Call +type MockSecretsConsumerGetConsumedRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerGetConsumedRevisionCall) Return(arg0 int, arg1 error) *MockSecretsConsumerGetConsumedRevisionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerGetConsumedRevisionCall) Do(f func(context.Context, *secrets.URI, string, bool, bool, *string) (int, error)) *MockSecretsConsumerGetConsumedRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerGetConsumedRevisionCall) DoAndReturn(f func(context.Context, *secrets.URI, string, bool, bool, *string) (int, error)) *MockSecretsConsumerGetConsumedRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretConsumer mocks base method. @@ -167,9 +287,33 @@ func (m *MockSecretsConsumer) GetSecretConsumer(ctx context.Context, uri *secret } // GetSecretConsumer indicates an expected call of GetSecretConsumer. -func (mr *MockSecretsConsumerMockRecorder) GetSecretConsumer(ctx, uri, unitName any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) GetSecretConsumer(ctx, uri, unitName any) *MockSecretsConsumerGetSecretConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumer", reflect.TypeOf((*MockSecretsConsumer)(nil).GetSecretConsumer), ctx, uri, unitName) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumer", reflect.TypeOf((*MockSecretsConsumer)(nil).GetSecretConsumer), ctx, uri, unitName) + return &MockSecretsConsumerGetSecretConsumerCall{Call: call} +} + +// MockSecretsConsumerGetSecretConsumerCall wrap *gomock.Call +type MockSecretsConsumerGetSecretConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerGetSecretConsumerCall) Return(arg0 *secrets.SecretConsumerMetadata, arg1 error) *MockSecretsConsumerGetSecretConsumerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerGetSecretConsumerCall) Do(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, error)) *MockSecretsConsumerGetSecretConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerGetSecretConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, error)) *MockSecretsConsumerGetSecretConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretConsumerAndLatest mocks base method. @@ -183,9 +327,33 @@ func (m *MockSecretsConsumer) GetSecretConsumerAndLatest(ctx context.Context, ur } // GetSecretConsumerAndLatest indicates an expected call of GetSecretConsumerAndLatest. -func (mr *MockSecretsConsumerMockRecorder) GetSecretConsumerAndLatest(ctx, uri, unitName any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) GetSecretConsumerAndLatest(ctx, uri, unitName any) *MockSecretsConsumerGetSecretConsumerAndLatestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumerAndLatest", reflect.TypeOf((*MockSecretsConsumer)(nil).GetSecretConsumerAndLatest), ctx, uri, unitName) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumerAndLatest", reflect.TypeOf((*MockSecretsConsumer)(nil).GetSecretConsumerAndLatest), ctx, uri, unitName) + return &MockSecretsConsumerGetSecretConsumerAndLatestCall{Call: call} +} + +// MockSecretsConsumerGetSecretConsumerAndLatestCall wrap *gomock.Call +type MockSecretsConsumerGetSecretConsumerAndLatestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerGetSecretConsumerAndLatestCall) Return(arg0 *secrets.SecretConsumerMetadata, arg1 int, arg2 error) *MockSecretsConsumerGetSecretConsumerAndLatestCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerGetSecretConsumerAndLatestCall) Do(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockSecretsConsumerGetSecretConsumerAndLatestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerGetSecretConsumerAndLatestCall) DoAndReturn(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockSecretsConsumerGetSecretConsumerAndLatestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetURIByConsumerLabel mocks base method. @@ -198,9 +366,33 @@ func (m *MockSecretsConsumer) GetURIByConsumerLabel(ctx context.Context, label, } // GetURIByConsumerLabel indicates an expected call of GetURIByConsumerLabel. -func (mr *MockSecretsConsumerMockRecorder) GetURIByConsumerLabel(ctx, label, unitName any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) GetURIByConsumerLabel(ctx, label, unitName any) *MockSecretsConsumerGetURIByConsumerLabelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetURIByConsumerLabel", reflect.TypeOf((*MockSecretsConsumer)(nil).GetURIByConsumerLabel), ctx, label, unitName) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetURIByConsumerLabel", reflect.TypeOf((*MockSecretsConsumer)(nil).GetURIByConsumerLabel), ctx, label, unitName) + return &MockSecretsConsumerGetURIByConsumerLabelCall{Call: call} +} + +// MockSecretsConsumerGetURIByConsumerLabelCall wrap *gomock.Call +type MockSecretsConsumerGetURIByConsumerLabelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerGetURIByConsumerLabelCall) Return(arg0 *secrets.URI, arg1 error) *MockSecretsConsumerGetURIByConsumerLabelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerGetURIByConsumerLabelCall) Do(f func(context.Context, string, string) (*secrets.URI, error)) *MockSecretsConsumerGetURIByConsumerLabelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerGetURIByConsumerLabelCall) DoAndReturn(f func(context.Context, string, string) (*secrets.URI, error)) *MockSecretsConsumerGetURIByConsumerLabelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecretAccess mocks base method. @@ -212,9 +404,33 @@ func (m *MockSecretsConsumer) GrantSecretAccess(arg0 context.Context, arg1 *secr } // GrantSecretAccess indicates an expected call of GrantSecretAccess. -func (mr *MockSecretsConsumerMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *MockSecretsConsumerGrantSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretsConsumer)(nil).GrantSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretsConsumer)(nil).GrantSecretAccess), arg0, arg1, arg2) + return &MockSecretsConsumerGrantSecretAccessCall{Call: call} +} + +// MockSecretsConsumerGrantSecretAccessCall wrap *gomock.Call +type MockSecretsConsumerGrantSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerGrantSecretAccessCall) Return(arg0 error) *MockSecretsConsumerGrantSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerGrantSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretsConsumerGrantSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerGrantSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretsConsumerGrantSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecretAccess mocks base method. @@ -226,9 +442,33 @@ func (m *MockSecretsConsumer) RevokeSecretAccess(arg0 context.Context, arg1 *sec } // RevokeSecretAccess indicates an expected call of RevokeSecretAccess. -func (mr *MockSecretsConsumerMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *MockSecretsConsumerRevokeSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretsConsumer)(nil).RevokeSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretsConsumer)(nil).RevokeSecretAccess), arg0, arg1, arg2) + return &MockSecretsConsumerRevokeSecretAccessCall{Call: call} +} + +// MockSecretsConsumerRevokeSecretAccessCall wrap *gomock.Call +type MockSecretsConsumerRevokeSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerRevokeSecretAccessCall) Return(arg0 error) *MockSecretsConsumerRevokeSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerRevokeSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretsConsumerRevokeSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerRevokeSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretsConsumerRevokeSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveSecretConsumer mocks base method. @@ -240,9 +480,33 @@ func (m *MockSecretsConsumer) SaveSecretConsumer(ctx context.Context, uri *secre } // SaveSecretConsumer indicates an expected call of SaveSecretConsumer. -func (mr *MockSecretsConsumerMockRecorder) SaveSecretConsumer(ctx, uri, unitName, md any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) SaveSecretConsumer(ctx, uri, unitName, md any) *MockSecretsConsumerSaveSecretConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretConsumer", reflect.TypeOf((*MockSecretsConsumer)(nil).SaveSecretConsumer), ctx, uri, unitName, md) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretConsumer", reflect.TypeOf((*MockSecretsConsumer)(nil).SaveSecretConsumer), ctx, uri, unitName, md) + return &MockSecretsConsumerSaveSecretConsumerCall{Call: call} +} + +// MockSecretsConsumerSaveSecretConsumerCall wrap *gomock.Call +type MockSecretsConsumerSaveSecretConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerSaveSecretConsumerCall) Return(arg0 error) *MockSecretsConsumerSaveSecretConsumerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerSaveSecretConsumerCall) Do(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockSecretsConsumerSaveSecretConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerSaveSecretConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockSecretsConsumerSaveSecretConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchConsumedSecretsChanges mocks base method. @@ -255,9 +519,33 @@ func (m *MockSecretsConsumer) WatchConsumedSecretsChanges(ctx context.Context, u } // WatchConsumedSecretsChanges indicates an expected call of WatchConsumedSecretsChanges. -func (mr *MockSecretsConsumerMockRecorder) WatchConsumedSecretsChanges(ctx, unitName any) *gomock.Call { +func (mr *MockSecretsConsumerMockRecorder) WatchConsumedSecretsChanges(ctx, unitName any) *MockSecretsConsumerWatchConsumedSecretsChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsConsumer)(nil).WatchConsumedSecretsChanges), ctx, unitName) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsConsumer)(nil).WatchConsumedSecretsChanges), ctx, unitName) + return &MockSecretsConsumerWatchConsumedSecretsChangesCall{Call: call} +} + +// MockSecretsConsumerWatchConsumedSecretsChangesCall wrap *gomock.Call +type MockSecretsConsumerWatchConsumedSecretsChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsConsumerWatchConsumedSecretsChangesCall) Return(arg0 watcher.StringsWatcher, arg1 error) *MockSecretsConsumerWatchConsumedSecretsChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsConsumerWatchConsumedSecretsChangesCall) Do(f func(context.Context, string) (watcher.StringsWatcher, error)) *MockSecretsConsumerWatchConsumedSecretsChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsConsumerWatchConsumedSecretsChangesCall) DoAndReturn(f func(context.Context, string) (watcher.StringsWatcher, error)) *MockSecretsConsumerWatchConsumedSecretsChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretService is a mock of SecretService interface. @@ -292,9 +580,33 @@ func (m *MockSecretService) ChangeSecretBackend(ctx context.Context, uri *secret } // ChangeSecretBackend indicates an expected call of ChangeSecretBackend. -func (mr *MockSecretServiceMockRecorder) ChangeSecretBackend(ctx, uri, revision, params any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ChangeSecretBackend(ctx, uri, revision, params any) *MockSecretServiceChangeSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretService)(nil).ChangeSecretBackend), ctx, uri, revision, params) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretService)(nil).ChangeSecretBackend), ctx, uri, revision, params) + return &MockSecretServiceChangeSecretBackendCall{Call: call} +} + +// MockSecretServiceChangeSecretBackendCall wrap *gomock.Call +type MockSecretServiceChangeSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceChangeSecretBackendCall) Return(arg0 error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceChangeSecretBackendCall) Do(f func(context.Context, *secrets.URI, int, service.ChangeSecretBackendParams) error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceChangeSecretBackendCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.ChangeSecretBackendParams) error) *MockSecretServiceChangeSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCharmSecret mocks base method. @@ -306,9 +618,33 @@ func (m *MockSecretService) CreateCharmSecret(arg0 context.Context, arg1 *secret } // CreateCharmSecret indicates an expected call of CreateCharmSecret. -func (mr *MockSecretServiceMockRecorder) CreateCharmSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) CreateCharmSecret(arg0, arg1, arg2 any) *MockSecretServiceCreateCharmSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).CreateCharmSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).CreateCharmSecret), arg0, arg1, arg2) + return &MockSecretServiceCreateCharmSecretCall{Call: call} +} + +// MockSecretServiceCreateCharmSecretCall wrap *gomock.Call +type MockSecretServiceCreateCharmSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceCreateCharmSecretCall) Return(arg0 error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceCreateCharmSecretCall) Do(f func(context.Context, *secrets.URI, service.CreateCharmSecretParams) error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceCreateCharmSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.CreateCharmSecretParams) error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecretURIs mocks base method. @@ -321,9 +657,33 @@ func (m *MockSecretService) CreateSecretURIs(ctx context.Context, count int) ([] } // CreateSecretURIs indicates an expected call of CreateSecretURIs. -func (mr *MockSecretServiceMockRecorder) CreateSecretURIs(ctx, count any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) CreateSecretURIs(ctx, count any) *MockSecretServiceCreateSecretURIsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretService)(nil).CreateSecretURIs), ctx, count) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretService)(nil).CreateSecretURIs), ctx, count) + return &MockSecretServiceCreateSecretURIsCall{Call: call} +} + +// MockSecretServiceCreateSecretURIsCall wrap *gomock.Call +type MockSecretServiceCreateSecretURIsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceCreateSecretURIsCall) Return(arg0 []*secrets.URI, arg1 error) *MockSecretServiceCreateSecretURIsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceCreateSecretURIsCall) Do(f func(context.Context, int) ([]*secrets.URI, error)) *MockSecretServiceCreateSecretURIsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceCreateSecretURIsCall) DoAndReturn(f func(context.Context, int) ([]*secrets.URI, error)) *MockSecretServiceCreateSecretURIsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecret mocks base method. @@ -335,9 +695,33 @@ func (m *MockSecretService) DeleteSecret(arg0 context.Context, arg1 *secrets.URI } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *MockSecretServiceDeleteSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + return &MockSecretServiceDeleteSecretCall{Call: call} +} + +// MockSecretServiceDeleteSecretCall wrap *gomock.Call +type MockSecretServiceDeleteSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceDeleteSecretCall) Return(arg0 error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceDeleteSecretCall) Do(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceDeleteSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretGrants mocks base method. @@ -350,9 +734,33 @@ func (m *MockSecretService) GetSecretGrants(ctx context.Context, uri *secrets.UR } // GetSecretGrants indicates an expected call of GetSecretGrants. -func (mr *MockSecretServiceMockRecorder) GetSecretGrants(ctx, uri, role any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretGrants(ctx, uri, role any) *MockSecretServiceGetSecretGrantsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockSecretService)(nil).GetSecretGrants), ctx, uri, role) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockSecretService)(nil).GetSecretGrants), ctx, uri, role) + return &MockSecretServiceGetSecretGrantsCall{Call: call} +} + +// MockSecretServiceGetSecretGrantsCall wrap *gomock.Call +type MockSecretServiceGetSecretGrantsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretGrantsCall) Return(arg0 []service.SecretAccess, arg1 error) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretGrantsCall) Do(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]service.SecretAccess, error)) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretGrantsCall) DoAndReturn(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]service.SecretAccess, error)) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretValue mocks base method. @@ -366,9 +774,33 @@ func (m *MockSecretService) GetSecretValue(arg0 context.Context, arg1 *secrets.U } // GetSecretValue indicates an expected call of GetSecretValue. -func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *MockSecretServiceGetSecretValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + return &MockSecretServiceGetSecretValueCall{Call: call} +} + +// MockSecretServiceGetSecretValueCall wrap *gomock.Call +type MockSecretServiceGetSecretValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretValueCall) Return(arg0 secrets.SecretValue, arg1 *secrets.ValueRef, arg2 error) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretValueCall) Do(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretValueCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmSecrets mocks base method. @@ -386,10 +818,34 @@ func (m *MockSecretService) ListCharmSecrets(arg0 context.Context, arg1 ...servi } // ListCharmSecrets indicates an expected call of ListCharmSecrets. -func (mr *MockSecretServiceMockRecorder) ListCharmSecrets(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListCharmSecrets(arg0 any, arg1 ...any) *MockSecretServiceListCharmSecretsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecrets), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecrets), varargs...) + return &MockSecretServiceListCharmSecretsCall{Call: call} +} + +// MockSecretServiceListCharmSecretsCall wrap *gomock.Call +type MockSecretServiceListCharmSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListCharmSecretsCall) Return(arg0 []*secrets.SecretMetadata, arg1 [][]*secrets.SecretRevisionMetadata, arg2 error) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListCharmSecretsCall) Do(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListCharmSecretsCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListGrantedSecretsForBackend mocks base method. @@ -406,10 +862,34 @@ func (m *MockSecretService) ListGrantedSecretsForBackend(ctx context.Context, ba } // ListGrantedSecretsForBackend indicates an expected call of ListGrantedSecretsForBackend. -func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(ctx, backendID, role any, consumers ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(ctx, backendID, role any, consumers ...any) *MockSecretServiceListGrantedSecretsForBackendCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, backendID, role}, consumers...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + return &MockSecretServiceListGrantedSecretsForBackendCall{Call: call} +} + +// MockSecretServiceListGrantedSecretsForBackendCall wrap *gomock.Call +type MockSecretServiceListGrantedSecretsForBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Return(arg0 []*secrets.SecretRevisionRef, arg1 error) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Do(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListGrantedSecretsForBackendCall) DoAndReturn(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProcessCharmSecretConsumerLabel mocks base method. @@ -423,9 +903,33 @@ func (m *MockSecretService) ProcessCharmSecretConsumerLabel(ctx context.Context, } // ProcessCharmSecretConsumerLabel indicates an expected call of ProcessCharmSecretConsumerLabel. -func (mr *MockSecretServiceMockRecorder) ProcessCharmSecretConsumerLabel(ctx, unitName, uri, label, token any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ProcessCharmSecretConsumerLabel(ctx, unitName, uri, label, token any) *MockSecretServiceProcessCharmSecretConsumerLabelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessCharmSecretConsumerLabel", reflect.TypeOf((*MockSecretService)(nil).ProcessCharmSecretConsumerLabel), ctx, unitName, uri, label, token) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessCharmSecretConsumerLabel", reflect.TypeOf((*MockSecretService)(nil).ProcessCharmSecretConsumerLabel), ctx, unitName, uri, label, token) + return &MockSecretServiceProcessCharmSecretConsumerLabelCall{Call: call} +} + +// MockSecretServiceProcessCharmSecretConsumerLabelCall wrap *gomock.Call +type MockSecretServiceProcessCharmSecretConsumerLabelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceProcessCharmSecretConsumerLabelCall) Return(arg0 *secrets.URI, arg1 *string, arg2 error) *MockSecretServiceProcessCharmSecretConsumerLabelCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceProcessCharmSecretConsumerLabelCall) Do(f func(context.Context, string, *secrets.URI, string, leadership.Token) (*secrets.URI, *string, error)) *MockSecretServiceProcessCharmSecretConsumerLabelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceProcessCharmSecretConsumerLabelCall) DoAndReturn(f func(context.Context, string, *secrets.URI, string, leadership.Token) (*secrets.URI, *string, error)) *MockSecretServiceProcessCharmSecretConsumerLabelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCharmSecret mocks base method. @@ -437,9 +941,33 @@ func (m *MockSecretService) UpdateCharmSecret(arg0 context.Context, arg1 *secret } // UpdateCharmSecret indicates an expected call of UpdateCharmSecret. -func (mr *MockSecretServiceMockRecorder) UpdateCharmSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) UpdateCharmSecret(arg0, arg1, arg2 any) *MockSecretServiceUpdateCharmSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateCharmSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateCharmSecret), arg0, arg1, arg2) + return &MockSecretServiceUpdateCharmSecretCall{Call: call} +} + +// MockSecretServiceUpdateCharmSecretCall wrap *gomock.Call +type MockSecretServiceUpdateCharmSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceUpdateCharmSecretCall) Return(arg0 error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceUpdateCharmSecretCall) Do(f func(context.Context, *secrets.URI, service.UpdateCharmSecretParams) error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceUpdateCharmSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.UpdateCharmSecretParams) error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -475,9 +1003,33 @@ func (m *MockSecretBackendService) BackendConfigInfo(ctx context.Context, p serv } // BackendConfigInfo indicates an expected call of BackendConfigInfo. -func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(ctx, p any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(ctx, p any) *MockSecretBackendServiceBackendConfigInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), ctx, p) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), ctx, p) + return &MockSecretBackendServiceBackendConfigInfoCall{Call: call} +} + +// MockSecretBackendServiceBackendConfigInfoCall wrap *gomock.Call +type MockSecretBackendServiceBackendConfigInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceBackendConfigInfoCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceBackendConfigInfoCall) Do(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceBackendConfigInfoCall) DoAndReturn(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DrainBackendConfigInfo mocks base method. @@ -490,7 +1042,31 @@ func (m *MockSecretBackendService) DrainBackendConfigInfo(ctx context.Context, p } // DrainBackendConfigInfo indicates an expected call of DrainBackendConfigInfo. -func (mr *MockSecretBackendServiceMockRecorder) DrainBackendConfigInfo(ctx, p any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) DrainBackendConfigInfo(ctx, p any) *MockSecretBackendServiceDrainBackendConfigInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainBackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).DrainBackendConfigInfo), ctx, p) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainBackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).DrainBackendConfigInfo), ctx, p) + return &MockSecretBackendServiceDrainBackendConfigInfoCall{Call: call} +} + +// MockSecretBackendServiceDrainBackendConfigInfoCall wrap *gomock.Call +type MockSecretBackendServiceDrainBackendConfigInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) Do(f func(context.Context, service0.DrainBackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) DoAndReturn(f func(context.Context, service0.DrainBackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsmanager/mocks/secretsriggerwatcher.go b/apiserver/facades/agent/secretsmanager/mocks/secretsriggerwatcher.go index d772e06f0b8..c3bb261d525 100644 --- a/apiserver/facades/agent/secretsmanager/mocks/secretsriggerwatcher.go +++ b/apiserver/facades/agent/secretsmanager/mocks/secretsriggerwatcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretsriggerwatcher.go github.com/juju/juju/core/watcher SecretTriggerWatcher +// mockgen -typed -package mocks -destination mocks/secretsriggerwatcher.go github.com/juju/juju/core/watcher SecretTriggerWatcher // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockSecretTriggerWatcher) Changes() <-chan []watcher.SecretTriggerChang } // Changes indicates an expected call of Changes. -func (mr *MockSecretTriggerWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Changes() *MockSecretTriggerWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Changes)) + return &MockSecretTriggerWatcherChangesCall{Call: call} +} + +// MockSecretTriggerWatcherChangesCall wrap *gomock.Call +type MockSecretTriggerWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherChangesCall) Return(arg0 <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherChangesCall) Do(f func() <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherChangesCall) DoAndReturn(f func() <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -60,9 +84,33 @@ func (m *MockSecretTriggerWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockSecretTriggerWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Kill() *MockSecretTriggerWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Kill)) + return &MockSecretTriggerWatcherKillCall{Call: call} +} + +// MockSecretTriggerWatcherKillCall wrap *gomock.Call +type MockSecretTriggerWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherKillCall) Return() *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherKillCall) Do(f func()) *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherKillCall) DoAndReturn(f func()) *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -74,7 +122,31 @@ func (m *MockSecretTriggerWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockSecretTriggerWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Wait() *MockSecretTriggerWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Wait)) + return &MockSecretTriggerWatcherWaitCall{Call: call} +} + +// MockSecretTriggerWatcherWaitCall wrap *gomock.Call +type MockSecretTriggerWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherWaitCall) Return(arg0 error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherWaitCall) Do(f func() error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherWaitCall) DoAndReturn(f func() error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsmanager/mocks/secretswatcher.go b/apiserver/facades/agent/secretsmanager/mocks/secretswatcher.go index 478fb1d6bb4..f7cc5d42ec7 100644 --- a/apiserver/facades/agent/secretsmanager/mocks/secretswatcher.go +++ b/apiserver/facades/agent/secretsmanager/mocks/secretswatcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretswatcher.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package mocks -destination mocks/secretswatcher.go github.com/juju/juju/core/watcher StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/secretsmanager/package_test.go b/apiserver/facades/agent/secretsmanager/package_test.go index 40cfe7213fe..b748eec6bcd 100644 --- a/apiserver/facades/agent/secretsmanager/package_test.go +++ b/apiserver/facades/agent/secretsmanager/package_test.go @@ -24,11 +24,11 @@ func TestPackage(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secrets.go -source service.go -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretsriggerwatcher.go github.com/juju/juju/core/watcher SecretTriggerWatcher -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/agent/secretsmanager CrossModelState,CrossModelSecretsClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretswatcher.go github.com/juju/juju/core/watcher StringsWatcher -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadershipchecker.go github.com/juju/juju/core/leadership Checker,Token +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secrets.go -source service.go +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretsriggerwatcher.go github.com/juju/juju/core/watcher SecretTriggerWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/agent/secretsmanager CrossModelState,CrossModelSecretsClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretswatcher.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadershipchecker.go github.com/juju/juju/core/leadership Checker,Token func NewTestAPI( authorizer facade.Authorizer, diff --git a/apiserver/facades/agent/storageprovisioner/blockdevice_mock_test.go b/apiserver/facades/agent/storageprovisioner/blockdevice_mock_test.go index 0ad751531c5..daf4984d88e 100644 --- a/apiserver/facades/agent/storageprovisioner/blockdevice_mock_test.go +++ b/apiserver/facades/agent/storageprovisioner/blockdevice_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package storageprovisioner_test -destination blockdevice_mock_test.go github.com/juju/juju/apiserver/facades/agent/storageprovisioner BlockDeviceService +// mockgen -typed -package storageprovisioner_test -destination blockdevice_mock_test.go github.com/juju/juju/apiserver/facades/agent/storageprovisioner BlockDeviceService // // Package storageprovisioner_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockBlockDeviceService) BlockDevices(arg0 context.Context, arg1 string) } // BlockDevices indicates an expected call of BlockDevices. -func (mr *MockBlockDeviceServiceMockRecorder) BlockDevices(arg0, arg1 any) *gomock.Call { +func (mr *MockBlockDeviceServiceMockRecorder) BlockDevices(arg0, arg1 any) *MockBlockDeviceServiceBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).BlockDevices), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).BlockDevices), arg0, arg1) + return &MockBlockDeviceServiceBlockDevicesCall{Call: call} +} + +// MockBlockDeviceServiceBlockDevicesCall wrap *gomock.Call +type MockBlockDeviceServiceBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockDeviceServiceBlockDevicesCall) Return(arg0 []blockdevice.BlockDevice, arg1 error) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockDeviceServiceBlockDevicesCall) Do(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockDeviceServiceBlockDevicesCall) DoAndReturn(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchBlockDevices mocks base method. @@ -66,7 +90,31 @@ func (m *MockBlockDeviceService) WatchBlockDevices(arg0 context.Context, arg1 st } // WatchBlockDevices indicates an expected call of WatchBlockDevices. -func (mr *MockBlockDeviceServiceMockRecorder) WatchBlockDevices(arg0, arg1 any) *gomock.Call { +func (mr *MockBlockDeviceServiceMockRecorder) WatchBlockDevices(arg0, arg1 any) *MockBlockDeviceServiceWatchBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchBlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).WatchBlockDevices), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchBlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).WatchBlockDevices), arg0, arg1) + return &MockBlockDeviceServiceWatchBlockDevicesCall{Call: call} +} + +// MockBlockDeviceServiceWatchBlockDevicesCall wrap *gomock.Call +type MockBlockDeviceServiceWatchBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockDeviceServiceWatchBlockDevicesCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockBlockDeviceServiceWatchBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockDeviceServiceWatchBlockDevicesCall) Do(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockBlockDeviceServiceWatchBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockDeviceServiceWatchBlockDevicesCall) DoAndReturn(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockBlockDeviceServiceWatchBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/storageprovisioner/package_test.go b/apiserver/facades/agent/storageprovisioner/package_test.go index 2237cab7e17..b580d8f4538 100644 --- a/apiserver/facades/agent/storageprovisioner/package_test.go +++ b/apiserver/facades/agent/storageprovisioner/package_test.go @@ -13,7 +13,7 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package storageprovisioner_test -destination blockdevice_mock_test.go github.com/juju/juju/apiserver/facades/agent/storageprovisioner BlockDeviceService +//go:generate go run go.uber.org/mock/mockgen -typed -package storageprovisioner_test -destination blockdevice_mock_test.go github.com/juju/juju/apiserver/facades/agent/storageprovisioner BlockDeviceService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/agent/uniter/leadership_mocks_test.go b/apiserver/facades/agent/uniter/leadership_mocks_test.go index 0380d79a7d7..dde399acc09 100644 --- a/apiserver/facades/agent/uniter/leadership_mocks_test.go +++ b/apiserver/facades/agent/uniter/leadership_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package uniter -destination leadership_mocks_test.go github.com/juju/juju/core/leadership Checker,Token +// mockgen -typed -package uniter -destination leadership_mocks_test.go github.com/juju/juju/core/leadership Checker,Token // // Package uniter is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockChecker) LeadershipCheck(arg0, arg1 string) leadership.Token { } // LeadershipCheck indicates an expected call of LeadershipCheck. -func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *gomock.Call { +func (mr *MockCheckerMockRecorder) LeadershipCheck(arg0, arg1 any) *MockCheckerLeadershipCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipCheck", reflect.TypeOf((*MockChecker)(nil).LeadershipCheck), arg0, arg1) + return &MockCheckerLeadershipCheckCall{Call: call} +} + +// MockCheckerLeadershipCheckCall wrap *gomock.Call +type MockCheckerLeadershipCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCheckerLeadershipCheckCall) Return(arg0 leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCheckerLeadershipCheckCall) Do(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCheckerLeadershipCheckCall) DoAndReturn(f func(string, string) leadership.Token) *MockCheckerLeadershipCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockToken is a mock of Token interface. @@ -85,7 +109,31 @@ func (m *MockToken) Check() error { } // Check indicates an expected call of Check. -func (mr *MockTokenMockRecorder) Check() *gomock.Call { +func (mr *MockTokenMockRecorder) Check() *MockTokenCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + return &MockTokenCheckCall{Call: call} +} + +// MockTokenCheckCall wrap *gomock.Call +type MockTokenCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenCheckCall) Return(arg0 error) *MockTokenCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenCheckCall) Do(f func() error) *MockTokenCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenCheckCall) DoAndReturn(f func() error) *MockTokenCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/uniter/package_mocks_test.go b/apiserver/facades/agent/uniter/package_mocks_test.go index cb4aa12a5d1..95a63a86785 100644 --- a/apiserver/facades/agent/uniter/package_mocks_test.go +++ b/apiserver/facades/agent/uniter/package_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package uniter_test -destination package_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter LXDProfileBackend,LXDProfileMachine,LXDProfileUnit,LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2,NetworkService +// mockgen -typed -package uniter_test -destination package_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter LXDProfileBackend,LXDProfileMachine,LXDProfileUnit,LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2,NetworkService // // Package uniter_test is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockLXDProfileBackend) Machine(arg0 string) (uniter.LXDProfileMachine, } // Machine indicates an expected call of Machine. -func (mr *MockLXDProfileBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockLXDProfileBackendMockRecorder) Machine(arg0 any) *MockLXDProfileBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLXDProfileBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLXDProfileBackend)(nil).Machine), arg0) + return &MockLXDProfileBackendMachineCall{Call: call} +} + +// MockLXDProfileBackendMachineCall wrap *gomock.Call +type MockLXDProfileBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendMachineCall) Return(arg0 uniter.LXDProfileMachine, arg1 error) *MockLXDProfileBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendMachineCall) Do(f func(string) (uniter.LXDProfileMachine, error)) *MockLXDProfileBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendMachineCall) DoAndReturn(f func(string) (uniter.LXDProfileMachine, error)) *MockLXDProfileBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -71,9 +95,33 @@ func (m *MockLXDProfileBackend) Unit(arg0 string) (uniter.LXDProfileUnit, error) } // Unit indicates an expected call of Unit. -func (mr *MockLXDProfileBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockLXDProfileBackendMockRecorder) Unit(arg0 any) *MockLXDProfileBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockLXDProfileBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockLXDProfileBackend)(nil).Unit), arg0) + return &MockLXDProfileBackendUnitCall{Call: call} +} + +// MockLXDProfileBackendUnitCall wrap *gomock.Call +type MockLXDProfileBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendUnitCall) Return(arg0 uniter.LXDProfileUnit, arg1 error) *MockLXDProfileBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendUnitCall) Do(f func(string) (uniter.LXDProfileUnit, error)) *MockLXDProfileBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendUnitCall) DoAndReturn(f func(string) (uniter.LXDProfileUnit, error)) *MockLXDProfileBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileMachine is a mock of LXDProfileMachine interface. @@ -109,9 +157,33 @@ func (m *MockLXDProfileMachine) WatchLXDProfileUpgradeNotifications(arg0 string) } // WatchLXDProfileUpgradeNotifications indicates an expected call of WatchLXDProfileUpgradeNotifications. -func (mr *MockLXDProfileMachineMockRecorder) WatchLXDProfileUpgradeNotifications(arg0 any) *gomock.Call { +func (mr *MockLXDProfileMachineMockRecorder) WatchLXDProfileUpgradeNotifications(arg0 any) *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileUpgradeNotifications", reflect.TypeOf((*MockLXDProfileMachine)(nil).WatchLXDProfileUpgradeNotifications), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileUpgradeNotifications", reflect.TypeOf((*MockLXDProfileMachine)(nil).WatchLXDProfileUpgradeNotifications), arg0) + return &MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall{Call: call} +} + +// MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall wrap *gomock.Call +type MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall) Return(arg0 state.StringsWatcher, arg1 error) *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall) Do(f func(string) (state.StringsWatcher, error)) *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall) DoAndReturn(f func(string) (state.StringsWatcher, error)) *MockLXDProfileMachineWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileUnit is a mock of LXDProfileUnit interface. @@ -147,9 +219,33 @@ func (m *MockLXDProfileUnit) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockLXDProfileUnitMockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockLXDProfileUnitMockRecorder) AssignedMachineId() *MockLXDProfileUnitAssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockLXDProfileUnit)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockLXDProfileUnit)(nil).AssignedMachineId)) + return &MockLXDProfileUnitAssignedMachineIdCall{Call: call} +} + +// MockLXDProfileUnitAssignedMachineIdCall wrap *gomock.Call +type MockLXDProfileUnitAssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitAssignedMachineIdCall) Return(arg0 string, arg1 error) *MockLXDProfileUnitAssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitAssignedMachineIdCall) Do(f func() (string, error)) *MockLXDProfileUnitAssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitAssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockLXDProfileUnitAssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -161,9 +257,33 @@ func (m *MockLXDProfileUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockLXDProfileUnitMockRecorder) Name() *gomock.Call { +func (mr *MockLXDProfileUnitMockRecorder) Name() *MockLXDProfileUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLXDProfileUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLXDProfileUnit)(nil).Name)) + return &MockLXDProfileUnitNameCall{Call: call} +} + +// MockLXDProfileUnitNameCall wrap *gomock.Call +type MockLXDProfileUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitNameCall) Return(arg0 string) *MockLXDProfileUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitNameCall) Do(f func() string) *MockLXDProfileUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitNameCall) DoAndReturn(f func() string) *MockLXDProfileUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -175,9 +295,33 @@ func (m *MockLXDProfileUnit) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockLXDProfileUnitMockRecorder) Tag() *gomock.Call { +func (mr *MockLXDProfileUnitMockRecorder) Tag() *MockLXDProfileUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockLXDProfileUnit)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockLXDProfileUnit)(nil).Tag)) + return &MockLXDProfileUnitTagCall{Call: call} +} + +// MockLXDProfileUnitTagCall wrap *gomock.Call +type MockLXDProfileUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitTagCall) Return(arg0 names.Tag) *MockLXDProfileUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitTagCall) Do(f func() names.Tag) *MockLXDProfileUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitTagCall) DoAndReturn(f func() names.Tag) *MockLXDProfileUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchLXDProfileUpgradeNotifications mocks base method. @@ -190,9 +334,33 @@ func (m *MockLXDProfileUnit) WatchLXDProfileUpgradeNotifications() (state.String } // WatchLXDProfileUpgradeNotifications indicates an expected call of WatchLXDProfileUpgradeNotifications. -func (mr *MockLXDProfileUnitMockRecorder) WatchLXDProfileUpgradeNotifications() *gomock.Call { +func (mr *MockLXDProfileUnitMockRecorder) WatchLXDProfileUpgradeNotifications() *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileUpgradeNotifications", reflect.TypeOf((*MockLXDProfileUnit)(nil).WatchLXDProfileUpgradeNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileUpgradeNotifications", reflect.TypeOf((*MockLXDProfileUnit)(nil).WatchLXDProfileUpgradeNotifications)) + return &MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall{Call: call} +} + +// MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall wrap *gomock.Call +type MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall) Return(arg0 state.StringsWatcher, arg1 error) *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall) Do(f func() (state.StringsWatcher, error)) *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall) DoAndReturn(f func() (state.StringsWatcher, error)) *MockLXDProfileUnitWatchLXDProfileUpgradeNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileBackendV2 is a mock of LXDProfileBackendV2 interface. @@ -228,9 +396,33 @@ func (m *MockLXDProfileBackendV2) Charm(arg0 string) (uniter.LXDProfileCharmV2, } // Charm indicates an expected call of Charm. -func (mr *MockLXDProfileBackendV2MockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockLXDProfileBackendV2MockRecorder) Charm(arg0 any) *MockLXDProfileBackendV2CharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Charm), arg0) + return &MockLXDProfileBackendV2CharmCall{Call: call} +} + +// MockLXDProfileBackendV2CharmCall wrap *gomock.Call +type MockLXDProfileBackendV2CharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendV2CharmCall) Return(arg0 uniter.LXDProfileCharmV2, arg1 error) *MockLXDProfileBackendV2CharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendV2CharmCall) Do(f func(string) (uniter.LXDProfileCharmV2, error)) *MockLXDProfileBackendV2CharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendV2CharmCall) DoAndReturn(f func(string) (uniter.LXDProfileCharmV2, error)) *MockLXDProfileBackendV2CharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -243,9 +435,33 @@ func (m *MockLXDProfileBackendV2) Machine(arg0 string) (uniter.LXDProfileMachine } // Machine indicates an expected call of Machine. -func (mr *MockLXDProfileBackendV2MockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockLXDProfileBackendV2MockRecorder) Machine(arg0 any) *MockLXDProfileBackendV2MachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Machine), arg0) + return &MockLXDProfileBackendV2MachineCall{Call: call} +} + +// MockLXDProfileBackendV2MachineCall wrap *gomock.Call +type MockLXDProfileBackendV2MachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendV2MachineCall) Return(arg0 uniter.LXDProfileMachineV2, arg1 error) *MockLXDProfileBackendV2MachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendV2MachineCall) Do(f func(string) (uniter.LXDProfileMachineV2, error)) *MockLXDProfileBackendV2MachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendV2MachineCall) DoAndReturn(f func(string) (uniter.LXDProfileMachineV2, error)) *MockLXDProfileBackendV2MachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -258,9 +474,33 @@ func (m *MockLXDProfileBackendV2) Model() (uniter.LXDProfileModelV2, error) { } // Model indicates an expected call of Model. -func (mr *MockLXDProfileBackendV2MockRecorder) Model() *gomock.Call { +func (mr *MockLXDProfileBackendV2MockRecorder) Model() *MockLXDProfileBackendV2ModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Model)) + return &MockLXDProfileBackendV2ModelCall{Call: call} +} + +// MockLXDProfileBackendV2ModelCall wrap *gomock.Call +type MockLXDProfileBackendV2ModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendV2ModelCall) Return(arg0 uniter.LXDProfileModelV2, arg1 error) *MockLXDProfileBackendV2ModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendV2ModelCall) Do(f func() (uniter.LXDProfileModelV2, error)) *MockLXDProfileBackendV2ModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendV2ModelCall) DoAndReturn(f func() (uniter.LXDProfileModelV2, error)) *MockLXDProfileBackendV2ModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -273,9 +513,33 @@ func (m *MockLXDProfileBackendV2) Unit(arg0 string) (uniter.LXDProfileUnitV2, er } // Unit indicates an expected call of Unit. -func (mr *MockLXDProfileBackendV2MockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockLXDProfileBackendV2MockRecorder) Unit(arg0 any) *MockLXDProfileBackendV2UnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Unit), arg0) + return &MockLXDProfileBackendV2UnitCall{Call: call} +} + +// MockLXDProfileBackendV2UnitCall wrap *gomock.Call +type MockLXDProfileBackendV2UnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileBackendV2UnitCall) Return(arg0 uniter.LXDProfileUnitV2, arg1 error) *MockLXDProfileBackendV2UnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileBackendV2UnitCall) Do(f func(string) (uniter.LXDProfileUnitV2, error)) *MockLXDProfileBackendV2UnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileBackendV2UnitCall) DoAndReturn(f func(string) (uniter.LXDProfileUnitV2, error)) *MockLXDProfileBackendV2UnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileMachineV2 is a mock of LXDProfileMachineV2 interface. @@ -311,9 +575,33 @@ func (m *MockLXDProfileMachineV2) CharmProfiles() ([]string, error) { } // CharmProfiles indicates an expected call of CharmProfiles. -func (mr *MockLXDProfileMachineV2MockRecorder) CharmProfiles() *gomock.Call { +func (mr *MockLXDProfileMachineV2MockRecorder) CharmProfiles() *MockLXDProfileMachineV2CharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfiles", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).CharmProfiles)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfiles", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).CharmProfiles)) + return &MockLXDProfileMachineV2CharmProfilesCall{Call: call} +} + +// MockLXDProfileMachineV2CharmProfilesCall wrap *gomock.Call +type MockLXDProfileMachineV2CharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileMachineV2CharmProfilesCall) Return(arg0 []string, arg1 error) *MockLXDProfileMachineV2CharmProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileMachineV2CharmProfilesCall) Do(f func() ([]string, error)) *MockLXDProfileMachineV2CharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileMachineV2CharmProfilesCall) DoAndReturn(f func() ([]string, error)) *MockLXDProfileMachineV2CharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -325,9 +613,33 @@ func (m *MockLXDProfileMachineV2) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockLXDProfileMachineV2MockRecorder) ContainerType() *gomock.Call { +func (mr *MockLXDProfileMachineV2MockRecorder) ContainerType() *MockLXDProfileMachineV2ContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).ContainerType)) + return &MockLXDProfileMachineV2ContainerTypeCall{Call: call} +} + +// MockLXDProfileMachineV2ContainerTypeCall wrap *gomock.Call +type MockLXDProfileMachineV2ContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileMachineV2ContainerTypeCall) Return(arg0 instance.ContainerType) *MockLXDProfileMachineV2ContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileMachineV2ContainerTypeCall) Do(f func() instance.ContainerType) *MockLXDProfileMachineV2ContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileMachineV2ContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockLXDProfileMachineV2ContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManual mocks base method. @@ -340,9 +652,33 @@ func (m *MockLXDProfileMachineV2) IsManual() (bool, error) { } // IsManual indicates an expected call of IsManual. -func (mr *MockLXDProfileMachineV2MockRecorder) IsManual() *gomock.Call { +func (mr *MockLXDProfileMachineV2MockRecorder) IsManual() *MockLXDProfileMachineV2IsManualCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).IsManual)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).IsManual)) + return &MockLXDProfileMachineV2IsManualCall{Call: call} +} + +// MockLXDProfileMachineV2IsManualCall wrap *gomock.Call +type MockLXDProfileMachineV2IsManualCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileMachineV2IsManualCall) Return(arg0 bool, arg1 error) *MockLXDProfileMachineV2IsManualCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileMachineV2IsManualCall) Do(f func() (bool, error)) *MockLXDProfileMachineV2IsManualCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileMachineV2IsManualCall) DoAndReturn(f func() (bool, error)) *MockLXDProfileMachineV2IsManualCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchInstanceData mocks base method. @@ -354,9 +690,33 @@ func (m *MockLXDProfileMachineV2) WatchInstanceData() state.NotifyWatcher { } // WatchInstanceData indicates an expected call of WatchInstanceData. -func (mr *MockLXDProfileMachineV2MockRecorder) WatchInstanceData() *gomock.Call { +func (mr *MockLXDProfileMachineV2MockRecorder) WatchInstanceData() *MockLXDProfileMachineV2WatchInstanceDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).WatchInstanceData)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).WatchInstanceData)) + return &MockLXDProfileMachineV2WatchInstanceDataCall{Call: call} +} + +// MockLXDProfileMachineV2WatchInstanceDataCall wrap *gomock.Call +type MockLXDProfileMachineV2WatchInstanceDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileMachineV2WatchInstanceDataCall) Return(arg0 state.NotifyWatcher) *MockLXDProfileMachineV2WatchInstanceDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileMachineV2WatchInstanceDataCall) Do(f func() state.NotifyWatcher) *MockLXDProfileMachineV2WatchInstanceDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileMachineV2WatchInstanceDataCall) DoAndReturn(f func() state.NotifyWatcher) *MockLXDProfileMachineV2WatchInstanceDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileUnitV2 is a mock of LXDProfileUnitV2 interface. @@ -391,9 +751,33 @@ func (m *MockLXDProfileUnitV2) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockLXDProfileUnitV2MockRecorder) ApplicationName() *gomock.Call { +func (mr *MockLXDProfileUnitV2MockRecorder) ApplicationName() *MockLXDProfileUnitV2ApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).ApplicationName)) + return &MockLXDProfileUnitV2ApplicationNameCall{Call: call} +} + +// MockLXDProfileUnitV2ApplicationNameCall wrap *gomock.Call +type MockLXDProfileUnitV2ApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitV2ApplicationNameCall) Return(arg0 string) *MockLXDProfileUnitV2ApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitV2ApplicationNameCall) Do(f func() string) *MockLXDProfileUnitV2ApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitV2ApplicationNameCall) DoAndReturn(f func() string) *MockLXDProfileUnitV2ApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedMachineId mocks base method. @@ -406,9 +790,33 @@ func (m *MockLXDProfileUnitV2) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockLXDProfileUnitV2MockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockLXDProfileUnitV2MockRecorder) AssignedMachineId() *MockLXDProfileUnitV2AssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).AssignedMachineId)) + return &MockLXDProfileUnitV2AssignedMachineIdCall{Call: call} +} + +// MockLXDProfileUnitV2AssignedMachineIdCall wrap *gomock.Call +type MockLXDProfileUnitV2AssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitV2AssignedMachineIdCall) Return(arg0 string, arg1 error) *MockLXDProfileUnitV2AssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitV2AssignedMachineIdCall) Do(f func() (string, error)) *MockLXDProfileUnitV2AssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitV2AssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockLXDProfileUnitV2AssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -420,9 +828,33 @@ func (m *MockLXDProfileUnitV2) CharmURL() *string { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockLXDProfileUnitV2MockRecorder) CharmURL() *gomock.Call { +func (mr *MockLXDProfileUnitV2MockRecorder) CharmURL() *MockLXDProfileUnitV2CharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).CharmURL)) + return &MockLXDProfileUnitV2CharmURLCall{Call: call} +} + +// MockLXDProfileUnitV2CharmURLCall wrap *gomock.Call +type MockLXDProfileUnitV2CharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitV2CharmURLCall) Return(arg0 *string) *MockLXDProfileUnitV2CharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitV2CharmURLCall) Do(f func() *string) *MockLXDProfileUnitV2CharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitV2CharmURLCall) DoAndReturn(f func() *string) *MockLXDProfileUnitV2CharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -434,9 +866,33 @@ func (m *MockLXDProfileUnitV2) Name() string { } // Name indicates an expected call of Name. -func (mr *MockLXDProfileUnitV2MockRecorder) Name() *gomock.Call { +func (mr *MockLXDProfileUnitV2MockRecorder) Name() *MockLXDProfileUnitV2NameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Name)) + return &MockLXDProfileUnitV2NameCall{Call: call} +} + +// MockLXDProfileUnitV2NameCall wrap *gomock.Call +type MockLXDProfileUnitV2NameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitV2NameCall) Return(arg0 string) *MockLXDProfileUnitV2NameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitV2NameCall) Do(f func() string) *MockLXDProfileUnitV2NameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitV2NameCall) DoAndReturn(f func() string) *MockLXDProfileUnitV2NameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -448,9 +904,33 @@ func (m *MockLXDProfileUnitV2) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockLXDProfileUnitV2MockRecorder) Tag() *gomock.Call { +func (mr *MockLXDProfileUnitV2MockRecorder) Tag() *MockLXDProfileUnitV2TagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Tag)) + return &MockLXDProfileUnitV2TagCall{Call: call} +} + +// MockLXDProfileUnitV2TagCall wrap *gomock.Call +type MockLXDProfileUnitV2TagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileUnitV2TagCall) Return(arg0 names.Tag) *MockLXDProfileUnitV2TagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileUnitV2TagCall) Do(f func() names.Tag) *MockLXDProfileUnitV2TagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileUnitV2TagCall) DoAndReturn(f func() names.Tag) *MockLXDProfileUnitV2TagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileCharmV2 is a mock of LXDProfileCharmV2 interface. @@ -485,9 +965,33 @@ func (m *MockLXDProfileCharmV2) LXDProfile() lxdprofile.Profile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockLXDProfileCharmV2MockRecorder) LXDProfile() *gomock.Call { +func (mr *MockLXDProfileCharmV2MockRecorder) LXDProfile() *MockLXDProfileCharmV2LXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfileCharmV2)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfileCharmV2)(nil).LXDProfile)) + return &MockLXDProfileCharmV2LXDProfileCall{Call: call} +} + +// MockLXDProfileCharmV2LXDProfileCall wrap *gomock.Call +type MockLXDProfileCharmV2LXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileCharmV2LXDProfileCall) Return(arg0 lxdprofile.Profile) *MockLXDProfileCharmV2LXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileCharmV2LXDProfileCall) Do(f func() lxdprofile.Profile) *MockLXDProfileCharmV2LXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileCharmV2LXDProfileCall) DoAndReturn(f func() lxdprofile.Profile) *MockLXDProfileCharmV2LXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfileModelV2 is a mock of LXDProfileModelV2 interface. @@ -523,9 +1027,33 @@ func (m *MockLXDProfileModelV2) ModelConfig(arg0 context.Context) (*config.Confi } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockLXDProfileModelV2MockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockLXDProfileModelV2MockRecorder) ModelConfig(arg0 any) *MockLXDProfileModelV2ModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockLXDProfileModelV2)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockLXDProfileModelV2)(nil).ModelConfig), arg0) + return &MockLXDProfileModelV2ModelConfigCall{Call: call} +} + +// MockLXDProfileModelV2ModelConfigCall wrap *gomock.Call +type MockLXDProfileModelV2ModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileModelV2ModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockLXDProfileModelV2ModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileModelV2ModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockLXDProfileModelV2ModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileModelV2ModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockLXDProfileModelV2ModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -537,9 +1065,33 @@ func (m *MockLXDProfileModelV2) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockLXDProfileModelV2MockRecorder) Type() *gomock.Call { +func (mr *MockLXDProfileModelV2MockRecorder) Type() *MockLXDProfileModelV2TypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLXDProfileModelV2)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLXDProfileModelV2)(nil).Type)) + return &MockLXDProfileModelV2TypeCall{Call: call} +} + +// MockLXDProfileModelV2TypeCall wrap *gomock.Call +type MockLXDProfileModelV2TypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileModelV2TypeCall) Return(arg0 state.ModelType) *MockLXDProfileModelV2TypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileModelV2TypeCall) Do(f func() state.ModelType) *MockLXDProfileModelV2TypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileModelV2TypeCall) DoAndReturn(f func() state.ModelType) *MockLXDProfileModelV2TypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -575,9 +1127,33 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpaceByName mocks base method. @@ -590,7 +1166,31 @@ func (m *MockNetworkService) SpaceByName(arg0 context.Context, arg1 string) (*ne } // SpaceByName indicates an expected call of SpaceByName. -func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *MockNetworkServiceSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + return &MockNetworkServiceSpaceByNameCall{Call: call} +} + +// MockNetworkServiceSpaceByNameCall wrap *gomock.Call +type MockNetworkServiceSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/uniter/package_test.go b/apiserver/facades/agent/uniter/package_test.go index d8138628c13..2eda7f966fe 100644 --- a/apiserver/facades/agent/uniter/package_test.go +++ b/apiserver/facades/agent/uniter/package_test.go @@ -31,9 +31,9 @@ import ( "github.com/juju/juju/testing/factory" ) -//go:generate go run go.uber.org/mock/mockgen -package uniter_test -destination package_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter LXDProfileBackend,LXDProfileMachine,LXDProfileUnit,LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2,NetworkService -//go:generate go run go.uber.org/mock/mockgen -package uniter -destination secret_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter SecretService -//go:generate go run go.uber.org/mock/mockgen -package uniter -destination leadership_mocks_test.go github.com/juju/juju/core/leadership Checker,Token +//go:generate go run go.uber.org/mock/mockgen -typed -package uniter_test -destination package_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter LXDProfileBackend,LXDProfileMachine,LXDProfileUnit,LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package uniter -destination secret_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter SecretService +//go:generate go run go.uber.org/mock/mockgen -typed -package uniter -destination leadership_mocks_test.go github.com/juju/juju/core/leadership Checker,Token func TestPackage(t *stdtesting.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/facades/agent/uniter/secret_mocks_test.go b/apiserver/facades/agent/uniter/secret_mocks_test.go index 114a9c48613..dc57036afac 100644 --- a/apiserver/facades/agent/uniter/secret_mocks_test.go +++ b/apiserver/facades/agent/uniter/secret_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package uniter -destination secret_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter SecretService +// mockgen -typed -package uniter -destination secret_mocks_test.go github.com/juju/juju/apiserver/facades/agent/uniter SecretService // // Package uniter is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockSecretService) CreateCharmSecret(arg0 context.Context, arg1 *secret } // CreateCharmSecret indicates an expected call of CreateCharmSecret. -func (mr *MockSecretServiceMockRecorder) CreateCharmSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) CreateCharmSecret(arg0, arg1, arg2 any) *MockSecretServiceCreateCharmSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).CreateCharmSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).CreateCharmSecret), arg0, arg1, arg2) + return &MockSecretServiceCreateCharmSecretCall{Call: call} +} + +// MockSecretServiceCreateCharmSecretCall wrap *gomock.Call +type MockSecretServiceCreateCharmSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceCreateCharmSecretCall) Return(arg0 error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceCreateCharmSecretCall) Do(f func(context.Context, *secrets.URI, service.CreateCharmSecretParams) error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceCreateCharmSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.CreateCharmSecretParams) error) *MockSecretServiceCreateCharmSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecret mocks base method. @@ -64,9 +88,33 @@ func (m *MockSecretService) DeleteSecret(arg0 context.Context, arg1 *secrets.URI } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *MockSecretServiceDeleteSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + return &MockSecretServiceDeleteSecretCall{Call: call} +} + +// MockSecretServiceDeleteSecretCall wrap *gomock.Call +type MockSecretServiceDeleteSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceDeleteSecretCall) Return(arg0 error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceDeleteSecretCall) Do(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceDeleteSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumedRevision mocks base method. @@ -79,9 +127,33 @@ func (m *MockSecretService) GetConsumedRevision(arg0 context.Context, arg1 *secr } // GetConsumedRevision indicates an expected call of GetConsumedRevision. -func (mr *MockSecretServiceMockRecorder) GetConsumedRevision(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetConsumedRevision(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockSecretServiceGetConsumedRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRevision", reflect.TypeOf((*MockSecretService)(nil).GetConsumedRevision), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRevision", reflect.TypeOf((*MockSecretService)(nil).GetConsumedRevision), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockSecretServiceGetConsumedRevisionCall{Call: call} +} + +// MockSecretServiceGetConsumedRevisionCall wrap *gomock.Call +type MockSecretServiceGetConsumedRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetConsumedRevisionCall) Return(arg0 int, arg1 error) *MockSecretServiceGetConsumedRevisionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetConsumedRevisionCall) Do(f func(context.Context, *secrets.URI, string, bool, bool, *string) (int, error)) *MockSecretServiceGetConsumedRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetConsumedRevisionCall) DoAndReturn(f func(context.Context, *secrets.URI, string, bool, bool, *string) (int, error)) *MockSecretServiceGetConsumedRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretValue mocks base method. @@ -95,9 +167,33 @@ func (m *MockSecretService) GetSecretValue(arg0 context.Context, arg1 *secrets.U } // GetSecretValue indicates an expected call of GetSecretValue. -func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *MockSecretServiceGetSecretValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + return &MockSecretServiceGetSecretValueCall{Call: call} +} + +// MockSecretServiceGetSecretValueCall wrap *gomock.Call +type MockSecretServiceGetSecretValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretValueCall) Return(arg0 secrets.SecretValue, arg1 *secrets.ValueRef, arg2 error) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretValueCall) Do(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretValueCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecretAccess mocks base method. @@ -109,9 +205,33 @@ func (m *MockSecretService) GrantSecretAccess(arg0 context.Context, arg1 *secret } // GrantSecretAccess indicates an expected call of GrantSecretAccess. -func (mr *MockSecretServiceMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *MockSecretServiceGrantSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretService)(nil).GrantSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretService)(nil).GrantSecretAccess), arg0, arg1, arg2) + return &MockSecretServiceGrantSecretAccessCall{Call: call} +} + +// MockSecretServiceGrantSecretAccessCall wrap *gomock.Call +type MockSecretServiceGrantSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGrantSecretAccessCall) Return(arg0 error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGrantSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGrantSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecretAccess mocks base method. @@ -123,9 +243,33 @@ func (m *MockSecretService) RevokeSecretAccess(arg0 context.Context, arg1 *secre } // RevokeSecretAccess indicates an expected call of RevokeSecretAccess. -func (mr *MockSecretServiceMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *MockSecretServiceRevokeSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretService)(nil).RevokeSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretService)(nil).RevokeSecretAccess), arg0, arg1, arg2) + return &MockSecretServiceRevokeSecretAccessCall{Call: call} +} + +// MockSecretServiceRevokeSecretAccessCall wrap *gomock.Call +type MockSecretServiceRevokeSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceRevokeSecretAccessCall) Return(arg0 error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceRevokeSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceRevokeSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCharmSecret mocks base method. @@ -137,7 +281,31 @@ func (m *MockSecretService) UpdateCharmSecret(arg0 context.Context, arg1 *secret } // UpdateCharmSecret indicates an expected call of UpdateCharmSecret. -func (mr *MockSecretServiceMockRecorder) UpdateCharmSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) UpdateCharmSecret(arg0, arg1, arg2 any) *MockSecretServiceUpdateCharmSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateCharmSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateCharmSecret), arg0, arg1, arg2) + return &MockSecretServiceUpdateCharmSecretCall{Call: call} +} + +// MockSecretServiceUpdateCharmSecretCall wrap *gomock.Call +type MockSecretServiceUpdateCharmSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceUpdateCharmSecretCall) Return(arg0 error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceUpdateCharmSecretCall) Do(f func(context.Context, *secrets.URI, service.UpdateCharmSecretParams) error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceUpdateCharmSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.UpdateCharmSecretParams) error) *MockSecretServiceUpdateCharmSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/upgrader/domain_mock_test.go b/apiserver/facades/agent/upgrader/domain_mock_test.go index 11ae92f5232..017e1e99fdf 100644 --- a/apiserver/facades/agent/upgrader/domain_mock_test.go +++ b/apiserver/facades/agent/upgrader/domain_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgrader_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgrader ControllerConfigGetter +// mockgen -typed -package upgrader_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgrader ControllerConfigGetter // // Package upgrader_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockControllerConfigGetter) ControllerConfig(arg0 context.Context) (con } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigGetterControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + return &MockControllerConfigGetterControllerConfigCall{Call: call} +} + +// MockControllerConfigGetterControllerConfigCall wrap *gomock.Call +type MockControllerConfigGetterControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigGetterControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigGetterControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigGetterControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/upgrader/package_test.go b/apiserver/facades/agent/upgrader/package_test.go index 943b5625afe..4777329ed0d 100644 --- a/apiserver/facades/agent/upgrader/package_test.go +++ b/apiserver/facades/agent/upgrader/package_test.go @@ -9,7 +9,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package upgrader_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgrader ControllerConfigGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgrader_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgrader ControllerConfigGetter func TestAll(t *stdtesting.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/facades/agent/upgradesteps/facade_mock_test.go b/apiserver/facades/agent/upgradesteps/facade_mock_test.go index f74b31d42c1..2e3e20fe0e4 100644 --- a/apiserver/facades/agent/upgradesteps/facade_mock_test.go +++ b/apiserver/facades/agent/upgradesteps/facade_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry +// mockgen -typed -package upgradesteps_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry // // Package upgradesteps_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockResources) Get(arg0 string) worker.Worker { } // Get indicates an expected call of Get. -func (mr *MockResourcesMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Get(arg0 any) *MockResourcesGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + return &MockResourcesGetCall{Call: call} +} + +// MockResourcesGetCall wrap *gomock.Call +type MockResourcesGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetCall) Return(arg0 worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetCall) Do(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetCall) DoAndReturn(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockResources) Register(arg0 worker.Worker) string { } // Register indicates an expected call of Register. -func (mr *MockResourcesMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Register(arg0 any) *MockResourcesRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + return &MockResourcesRegisterCall{Call: call} +} + +// MockResourcesRegisterCall wrap *gomock.Call +type MockResourcesRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRegisterCall) Return(arg0 string) *MockResourcesRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRegisterCall) Do(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRegisterCall) DoAndReturn(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -78,9 +126,33 @@ func (m *MockResources) Stop(arg0 string) error { } // Stop indicates an expected call of Stop. -func (mr *MockResourcesMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Stop(arg0 any) *MockResourcesStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + return &MockResourcesStopCall{Call: call} +} + +// MockResourcesStopCall wrap *gomock.Call +type MockResourcesStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesStopCall) Return(arg0 error) *MockResourcesStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesStopCall) Do(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesStopCall) DoAndReturn(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAuthorizer is a mock of Authorizer interface. @@ -115,9 +187,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -129,9 +225,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -143,9 +263,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -157,9 +301,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -171,9 +339,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -185,9 +377,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -199,9 +415,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -213,9 +453,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -227,9 +491,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -241,9 +529,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -255,9 +567,33 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherRegistry is a mock of WatcherRegistry interface. @@ -292,9 +628,33 @@ func (m *MockWatcherRegistry) Count() int { } // Count indicates an expected call of Count. -func (mr *MockWatcherRegistryMockRecorder) Count() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Count() *MockWatcherRegistryCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockWatcherRegistry)(nil).Count)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockWatcherRegistry)(nil).Count)) + return &MockWatcherRegistryCountCall{Call: call} +} + +// MockWatcherRegistryCountCall wrap *gomock.Call +type MockWatcherRegistryCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryCountCall) Return(arg0 int) *MockWatcherRegistryCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryCountCall) Do(f func() int) *MockWatcherRegistryCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryCountCall) DoAndReturn(f func() int) *MockWatcherRegistryCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -307,9 +667,33 @@ func (m *MockWatcherRegistry) Get(arg0 string) (worker.Worker, error) { } // Get indicates an expected call of Get. -func (mr *MockWatcherRegistryMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Get(arg0 any) *MockWatcherRegistryGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatcherRegistry)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatcherRegistry)(nil).Get), arg0) + return &MockWatcherRegistryGetCall{Call: call} +} + +// MockWatcherRegistryGetCall wrap *gomock.Call +type MockWatcherRegistryGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryGetCall) Return(arg0 worker.Worker, arg1 error) *MockWatcherRegistryGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryGetCall) Do(f func(string) (worker.Worker, error)) *MockWatcherRegistryGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryGetCall) DoAndReturn(f func(string) (worker.Worker, error)) *MockWatcherRegistryGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -319,9 +703,33 @@ func (m *MockWatcherRegistry) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWatcherRegistryMockRecorder) Kill() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Kill() *MockWatcherRegistryKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcherRegistry)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcherRegistry)(nil).Kill)) + return &MockWatcherRegistryKillCall{Call: call} +} + +// MockWatcherRegistryKillCall wrap *gomock.Call +type MockWatcherRegistryKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryKillCall) Return() *MockWatcherRegistryKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryKillCall) Do(f func()) *MockWatcherRegistryKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryKillCall) DoAndReturn(f func()) *MockWatcherRegistryKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -334,9 +742,33 @@ func (m *MockWatcherRegistry) Register(arg0 worker.Worker) (string, error) { } // Register indicates an expected call of Register. -func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *MockWatcherRegistryRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + return &MockWatcherRegistryRegisterCall{Call: call} +} + +// MockWatcherRegistryRegisterCall wrap *gomock.Call +type MockWatcherRegistryRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryRegisterCall) Return(arg0 string, arg1 error) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryRegisterCall) Do(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryRegisterCall) DoAndReturn(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RegisterNamed mocks base method. @@ -348,9 +780,33 @@ func (m *MockWatcherRegistry) RegisterNamed(arg0 string, arg1 worker.Worker) err } // RegisterNamed indicates an expected call of RegisterNamed. -func (mr *MockWatcherRegistryMockRecorder) RegisterNamed(arg0, arg1 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) RegisterNamed(arg0, arg1 any) *MockWatcherRegistryRegisterNamedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterNamed", reflect.TypeOf((*MockWatcherRegistry)(nil).RegisterNamed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterNamed", reflect.TypeOf((*MockWatcherRegistry)(nil).RegisterNamed), arg0, arg1) + return &MockWatcherRegistryRegisterNamedCall{Call: call} +} + +// MockWatcherRegistryRegisterNamedCall wrap *gomock.Call +type MockWatcherRegistryRegisterNamedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryRegisterNamedCall) Return(arg0 error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryRegisterNamedCall) Do(f func(string, worker.Worker) error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryRegisterNamedCall) DoAndReturn(f func(string, worker.Worker) error) *MockWatcherRegistryRegisterNamedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -362,9 +818,33 @@ func (m *MockWatcherRegistry) Stop(arg0 string) error { } // Stop indicates an expected call of Stop. -func (mr *MockWatcherRegistryMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Stop(arg0 any) *MockWatcherRegistryStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockWatcherRegistry)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockWatcherRegistry)(nil).Stop), arg0) + return &MockWatcherRegistryStopCall{Call: call} +} + +// MockWatcherRegistryStopCall wrap *gomock.Call +type MockWatcherRegistryStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryStopCall) Return(arg0 error) *MockWatcherRegistryStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryStopCall) Do(f func(string) error) *MockWatcherRegistryStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryStopCall) DoAndReturn(f func(string) error) *MockWatcherRegistryStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -376,7 +856,31 @@ func (m *MockWatcherRegistry) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWatcherRegistryMockRecorder) Wait() *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Wait() *MockWatcherRegistryWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcherRegistry)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcherRegistry)(nil).Wait)) + return &MockWatcherRegistryWaitCall{Call: call} +} + +// MockWatcherRegistryWaitCall wrap *gomock.Call +type MockWatcherRegistryWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryWaitCall) Return(arg0 error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryWaitCall) Do(f func() error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryWaitCall) DoAndReturn(f func() error) *MockWatcherRegistryWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/upgradesteps/package_test.go b/apiserver/facades/agent/upgradesteps/package_test.go index f635f2b4393..14a6073810c 100644 --- a/apiserver/facades/agent/upgradesteps/package_test.go +++ b/apiserver/facades/agent/upgradesteps/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps_test -destination upgradesteps_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgradesteps ControllerConfigGetter,UpgradeStepsState,Machine,Unit -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps_test -destination state_mock_test.go github.com/juju/juju/state EntityFinder,Entity -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps_test -destination upgradesteps_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgradesteps ControllerConfigGetter,UpgradeStepsState,Machine,Unit +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps_test -destination state_mock_test.go github.com/juju/juju/state EntityFinder,Entity +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Resources,Authorizer,WatcherRegistry func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/agent/upgradesteps/state_mock_test.go b/apiserver/facades/agent/upgradesteps/state_mock_test.go index f00532a7718..739fb78c344 100644 --- a/apiserver/facades/agent/upgradesteps/state_mock_test.go +++ b/apiserver/facades/agent/upgradesteps/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps_test -destination state_mock_test.go github.com/juju/juju/state EntityFinder,Entity +// mockgen -typed -package upgradesteps_test -destination state_mock_test.go github.com/juju/juju/state EntityFinder,Entity // // Package upgradesteps_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockEntityFinder) FindEntity(arg0 names.Tag) (state.Entity, error) { } // FindEntity indicates an expected call of FindEntity. -func (mr *MockEntityFinderMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockEntityFinderMockRecorder) FindEntity(arg0 any) *MockEntityFinderFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockEntityFinder)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockEntityFinder)(nil).FindEntity), arg0) + return &MockEntityFinderFindEntityCall{Call: call} +} + +// MockEntityFinderFindEntityCall wrap *gomock.Call +type MockEntityFinderFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEntityFinderFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockEntityFinderFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEntityFinderFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockEntityFinderFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEntityFinderFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockEntityFinderFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEntity is a mock of Entity interface. @@ -87,7 +111,31 @@ func (m *MockEntity) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockEntityMockRecorder) Tag() *gomock.Call { +func (mr *MockEntityMockRecorder) Tag() *MockEntityTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockEntity)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockEntity)(nil).Tag)) + return &MockEntityTagCall{Call: call} +} + +// MockEntityTagCall wrap *gomock.Call +type MockEntityTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEntityTagCall) Return(arg0 names.Tag) *MockEntityTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEntityTagCall) Do(f func() names.Tag) *MockEntityTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEntityTagCall) DoAndReturn(f func() names.Tag) *MockEntityTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/agent/upgradesteps/upgradesteps_mock_test.go b/apiserver/facades/agent/upgradesteps/upgradesteps_mock_test.go index 6465a5f23b5..5c607e0949a 100644 --- a/apiserver/facades/agent/upgradesteps/upgradesteps_mock_test.go +++ b/apiserver/facades/agent/upgradesteps/upgradesteps_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps_test -destination upgradesteps_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgradesteps ControllerConfigGetter,UpgradeStepsState,Machine,Unit +// mockgen -typed -package upgradesteps_test -destination upgradesteps_mock_test.go github.com/juju/juju/apiserver/facades/agent/upgradesteps ControllerConfigGetter,UpgradeStepsState,Machine,Unit // // Package upgradesteps_test is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockControllerConfigGetter) ControllerConfig(arg0 context.Context) (con } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigGetterMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigGetterControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigGetter)(nil).ControllerConfig), arg0) + return &MockControllerConfigGetterControllerConfigCall{Call: call} +} + +// MockControllerConfigGetterControllerConfigCall wrap *gomock.Call +type MockControllerConfigGetterControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigGetterControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigGetterControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigGetterControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigGetterControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeStepsState is a mock of UpgradeStepsState interface. @@ -91,9 +115,33 @@ func (m *MockUpgradeStepsState) ApplyOperation(arg0 state.ModelOperation) error } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockUpgradeStepsStateMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockUpgradeStepsStateMockRecorder) ApplyOperation(arg0 any) *MockUpgradeStepsStateApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockUpgradeStepsState)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockUpgradeStepsState)(nil).ApplyOperation), arg0) + return &MockUpgradeStepsStateApplyOperationCall{Call: call} +} + +// MockUpgradeStepsStateApplyOperationCall wrap *gomock.Call +type MockUpgradeStepsStateApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeStepsStateApplyOperationCall) Return(arg0 error) *MockUpgradeStepsStateApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeStepsStateApplyOperationCall) Do(f func(state.ModelOperation) error) *MockUpgradeStepsStateApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeStepsStateApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockUpgradeStepsStateApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindEntity mocks base method. @@ -106,9 +154,33 @@ func (m *MockUpgradeStepsState) FindEntity(arg0 names.Tag) (state.Entity, error) } // FindEntity indicates an expected call of FindEntity. -func (mr *MockUpgradeStepsStateMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockUpgradeStepsStateMockRecorder) FindEntity(arg0 any) *MockUpgradeStepsStateFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockUpgradeStepsState)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockUpgradeStepsState)(nil).FindEntity), arg0) + return &MockUpgradeStepsStateFindEntityCall{Call: call} +} + +// MockUpgradeStepsStateFindEntityCall wrap *gomock.Call +type MockUpgradeStepsStateFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeStepsStateFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockUpgradeStepsStateFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeStepsStateFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockUpgradeStepsStateFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeStepsStateFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockUpgradeStepsStateFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -143,9 +215,33 @@ func (m *MockMachine) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMachineMockRecorder) ContainerType() *gomock.Call { +func (mr *MockMachineMockRecorder) ContainerType() *MockMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + return &MockMachineContainerTypeCall{Call: call} +} + +// MockMachineContainerTypeCall wrap *gomock.Call +type MockMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainerTypeCall) Return(arg0 instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainerTypeCall) Do(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModificationStatus mocks base method. @@ -158,9 +254,33 @@ func (m *MockMachine) ModificationStatus() (status.StatusInfo, error) { } // ModificationStatus indicates an expected call of ModificationStatus. -func (mr *MockMachineMockRecorder) ModificationStatus() *gomock.Call { +func (mr *MockMachineMockRecorder) ModificationStatus() *MockMachineModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModificationStatus", reflect.TypeOf((*MockMachine)(nil).ModificationStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModificationStatus", reflect.TypeOf((*MockMachine)(nil).ModificationStatus)) + return &MockMachineModificationStatusCall{Call: call} +} + +// MockMachineModificationStatusCall wrap *gomock.Call +type MockMachineModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineModificationStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockMachineModificationStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineModificationStatusCall) Do(f func() (status.StatusInfo, error)) *MockMachineModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineModificationStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockMachineModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -172,9 +292,33 @@ func (m *MockMachine) SetModificationStatus(arg0 status.StatusInfo) error { } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMachineMockRecorder) SetModificationStatus(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetModificationStatus(arg0 any) *MockMachineSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachine)(nil).SetModificationStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachine)(nil).SetModificationStatus), arg0) + return &MockMachineSetModificationStatusCall{Call: call} +} + +// MockMachineSetModificationStatusCall wrap *gomock.Call +type MockMachineSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetModificationStatusCall) Return(arg0 error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetModificationStatusCall) Do(f func(status.StatusInfo) error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetModificationStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockMachineSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -209,7 +353,31 @@ func (m *MockUnit) SetStateOperation(arg0 *state.UnitState, arg1 state.UnitState } // SetStateOperation indicates an expected call of SetStateOperation. -func (mr *MockUnitMockRecorder) SetStateOperation(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetStateOperation(arg0, arg1 any) *MockUnitSetStateOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateOperation", reflect.TypeOf((*MockUnit)(nil).SetStateOperation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateOperation", reflect.TypeOf((*MockUnit)(nil).SetStateOperation), arg0, arg1) + return &MockUnitSetStateOperationCall{Call: call} +} + +// MockUnitSetStateOperationCall wrap *gomock.Call +type MockUnitSetStateOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetStateOperationCall) Return(arg0 state.ModelOperation) *MockUnitSetStateOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetStateOperationCall) Do(f func(*state.UnitState, state.UnitStateSizeLimits) state.ModelOperation) *MockUnitSetStateOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetStateOperationCall) DoAndReturn(f func(*state.UnitState, state.UnitStateSizeLimits) state.ModelOperation) *MockUnitSetStateOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/action/leader_mock_test.go b/apiserver/facades/client/action/leader_mock_test.go index 99cf3223e9a..c21f9435be3 100644 --- a/apiserver/facades/client/action/leader_mock_test.go +++ b/apiserver/facades/client/action/leader_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package action -destination leader_mock_test.go github.com/juju/juju/core/leadership Reader +// mockgen -typed -package action -destination leader_mock_test.go github.com/juju/juju/core/leadership Reader // // Package action is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockReader) Leaders() (map[string]string, error) { } // Leaders indicates an expected call of Leaders. -func (mr *MockReaderMockRecorder) Leaders() *gomock.Call { +func (mr *MockReaderMockRecorder) Leaders() *MockReaderLeadersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + return &MockReaderLeadersCall{Call: call} +} + +// MockReaderLeadersCall wrap *gomock.Call +type MockReaderLeadersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReaderLeadersCall) Return(arg0 map[string]string, arg1 error) *MockReaderLeadersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReaderLeadersCall) Do(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReaderLeadersCall) DoAndReturn(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/action/package_mock_test.go b/apiserver/facades/client/action/package_mock_test.go index a6cffa48890..6b9d93c4fd1 100644 --- a/apiserver/facades/client/action/package_mock_test.go +++ b/apiserver/facades/client/action/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package action -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/action State,Model +// mockgen -typed -package action -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/action State,Model // // Package action is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockState) AllApplications() ([]*state.Application, error) { } // AllApplications indicates an expected call of AllApplications. -func (mr *MockStateMockRecorder) AllApplications() *gomock.Call { +func (mr *MockStateMockRecorder) AllApplications() *MockStateAllApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockState)(nil).AllApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockState)(nil).AllApplications)) + return &MockStateAllApplicationsCall{Call: call} +} + +// MockStateAllApplicationsCall wrap *gomock.Call +type MockStateAllApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllApplicationsCall) Return(arg0 []*state.Application, arg1 error) *MockStateAllApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllApplicationsCall) Do(f func() ([]*state.Application, error)) *MockStateAllApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllApplicationsCall) DoAndReturn(f func() ([]*state.Application, error)) *MockStateAllApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMachines mocks base method. @@ -65,9 +89,33 @@ func (m *MockState) AllMachines() ([]*state.Machine, error) { } // AllMachines indicates an expected call of AllMachines. -func (mr *MockStateMockRecorder) AllMachines() *gomock.Call { +func (mr *MockStateMockRecorder) AllMachines() *MockStateAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockState)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockState)(nil).AllMachines)) + return &MockStateAllMachinesCall{Call: call} +} + +// MockStateAllMachinesCall wrap *gomock.Call +type MockStateAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllMachinesCall) Return(arg0 []*state.Machine, arg1 error) *MockStateAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllMachinesCall) Do(f func() ([]*state.Machine, error)) *MockStateAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllMachinesCall) DoAndReturn(f func() ([]*state.Machine, error)) *MockStateAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -80,9 +128,33 @@ func (m *MockState) Application(arg0 string) (*state.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Application(arg0 any) *MockStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + return &MockStateApplicationCall{Call: call} +} + +// MockStateApplicationCall wrap *gomock.Call +type MockStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateApplicationCall) Return(arg0 *state.Application, arg1 error) *MockStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateApplicationCall) Do(f func(string) (*state.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateApplicationCall) DoAndReturn(f func(string) (*state.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindEntity mocks base method. @@ -95,9 +167,33 @@ func (m *MockState) FindEntity(arg0 names.Tag) (state.Entity, error) { } // FindEntity indicates an expected call of FindEntity. -func (mr *MockStateMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) FindEntity(arg0 any) *MockStateFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockState)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockState)(nil).FindEntity), arg0) + return &MockStateFindEntityCall{Call: call} +} + +// MockStateFindEntityCall wrap *gomock.Call +type MockStateFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockStateFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockStateFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockStateFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBlockForType mocks base method. @@ -111,9 +207,33 @@ func (m *MockState) GetBlockForType(arg0 state.BlockType) (state.Block, bool, er } // GetBlockForType indicates an expected call of GetBlockForType. -func (mr *MockStateMockRecorder) GetBlockForType(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetBlockForType(arg0 any) *MockStateGetBlockForTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockForType", reflect.TypeOf((*MockState)(nil).GetBlockForType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockForType", reflect.TypeOf((*MockState)(nil).GetBlockForType), arg0) + return &MockStateGetBlockForTypeCall{Call: call} +} + +// MockStateGetBlockForTypeCall wrap *gomock.Call +type MockStateGetBlockForTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetBlockForTypeCall) Return(arg0 state.Block, arg1 bool, arg2 error) *MockStateGetBlockForTypeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetBlockForTypeCall) Do(f func(state.BlockType) (state.Block, bool, error)) *MockStateGetBlockForTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetBlockForTypeCall) DoAndReturn(f func(state.BlockType) (state.Block, bool, error)) *MockStateGetBlockForTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -126,9 +246,33 @@ func (m *MockState) Model() (Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateMockRecorder) Model() *gomock.Call { +func (mr *MockStateMockRecorder) Model() *MockStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + return &MockStateModelCall{Call: call} +} + +// MockStateModelCall wrap *gomock.Call +type MockStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelCall) Return(arg0 Model, arg1 error) *MockStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelCall) Do(f func() (Model, error)) *MockStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelCall) DoAndReturn(f func() (Model, error)) *MockStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchActionLogs mocks base method. @@ -140,9 +284,33 @@ func (m *MockState) WatchActionLogs(arg0 string) state.StringsWatcher { } // WatchActionLogs indicates an expected call of WatchActionLogs. -func (mr *MockStateMockRecorder) WatchActionLogs(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) WatchActionLogs(arg0 any) *MockStateWatchActionLogsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionLogs", reflect.TypeOf((*MockState)(nil).WatchActionLogs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionLogs", reflect.TypeOf((*MockState)(nil).WatchActionLogs), arg0) + return &MockStateWatchActionLogsCall{Call: call} +} + +// MockStateWatchActionLogsCall wrap *gomock.Call +type MockStateWatchActionLogsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchActionLogsCall) Return(arg0 state.StringsWatcher) *MockStateWatchActionLogsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchActionLogsCall) Do(f func(string) state.StringsWatcher) *MockStateWatchActionLogsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchActionLogsCall) DoAndReturn(f func(string) state.StringsWatcher) *MockStateWatchActionLogsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -178,9 +346,33 @@ func (m *MockModel) ActionByTag(arg0 names.ActionTag) (state.Action, error) { } // ActionByTag indicates an expected call of ActionByTag. -func (mr *MockModelMockRecorder) ActionByTag(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) ActionByTag(arg0 any) *MockModelActionByTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionByTag", reflect.TypeOf((*MockModel)(nil).ActionByTag), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionByTag", reflect.TypeOf((*MockModel)(nil).ActionByTag), arg0) + return &MockModelActionByTagCall{Call: call} +} + +// MockModelActionByTagCall wrap *gomock.Call +type MockModelActionByTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelActionByTagCall) Return(arg0 state.Action, arg1 error) *MockModelActionByTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelActionByTagCall) Do(f func(names.ActionTag) (state.Action, error)) *MockModelActionByTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelActionByTagCall) DoAndReturn(f func(names.ActionTag) (state.Action, error)) *MockModelActionByTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddAction mocks base method. @@ -193,9 +385,33 @@ func (m *MockModel) AddAction(arg0 state.ActionReceiver, arg1, arg2 string, arg3 } // AddAction indicates an expected call of AddAction. -func (mr *MockModelMockRecorder) AddAction(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddAction(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockModelAddActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAction", reflect.TypeOf((*MockModel)(nil).AddAction), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAction", reflect.TypeOf((*MockModel)(nil).AddAction), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockModelAddActionCall{Call: call} +} + +// MockModelAddActionCall wrap *gomock.Call +type MockModelAddActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddActionCall) Return(arg0 state.Action, arg1 error) *MockModelAddActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddActionCall) Do(f func(state.ActionReceiver, string, string, map[string]any, *bool, *string) (state.Action, error)) *MockModelAddActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddActionCall) DoAndReturn(f func(state.ActionReceiver, string, string, map[string]any, *bool, *string) (state.Action, error)) *MockModelAddActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnqueueOperation mocks base method. @@ -208,9 +424,33 @@ func (m *MockModel) EnqueueOperation(arg0 string, arg1 int) (string, error) { } // EnqueueOperation indicates an expected call of EnqueueOperation. -func (mr *MockModelMockRecorder) EnqueueOperation(arg0, arg1 any) *gomock.Call { +func (mr *MockModelMockRecorder) EnqueueOperation(arg0, arg1 any) *MockModelEnqueueOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnqueueOperation", reflect.TypeOf((*MockModel)(nil).EnqueueOperation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnqueueOperation", reflect.TypeOf((*MockModel)(nil).EnqueueOperation), arg0, arg1) + return &MockModelEnqueueOperationCall{Call: call} +} + +// MockModelEnqueueOperationCall wrap *gomock.Call +type MockModelEnqueueOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelEnqueueOperationCall) Return(arg0 string, arg1 error) *MockModelEnqueueOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelEnqueueOperationCall) Do(f func(string, int) (string, error)) *MockModelEnqueueOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelEnqueueOperationCall) DoAndReturn(f func(string, int) (string, error)) *MockModelEnqueueOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FailOperationEnqueuing mocks base method. @@ -222,9 +462,33 @@ func (m *MockModel) FailOperationEnqueuing(arg0, arg1 string, arg2 int) error { } // FailOperationEnqueuing indicates an expected call of FailOperationEnqueuing. -func (mr *MockModelMockRecorder) FailOperationEnqueuing(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelMockRecorder) FailOperationEnqueuing(arg0, arg1, arg2 any) *MockModelFailOperationEnqueuingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailOperationEnqueuing", reflect.TypeOf((*MockModel)(nil).FailOperationEnqueuing), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailOperationEnqueuing", reflect.TypeOf((*MockModel)(nil).FailOperationEnqueuing), arg0, arg1, arg2) + return &MockModelFailOperationEnqueuingCall{Call: call} +} + +// MockModelFailOperationEnqueuingCall wrap *gomock.Call +type MockModelFailOperationEnqueuingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelFailOperationEnqueuingCall) Return(arg0 error) *MockModelFailOperationEnqueuingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelFailOperationEnqueuingCall) Do(f func(string, string, int) error) *MockModelFailOperationEnqueuingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelFailOperationEnqueuingCall) DoAndReturn(f func(string, string, int) error) *MockModelFailOperationEnqueuingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindActionsByName mocks base method. @@ -237,9 +501,33 @@ func (m *MockModel) FindActionsByName(arg0 string) ([]state.Action, error) { } // FindActionsByName indicates an expected call of FindActionsByName. -func (mr *MockModelMockRecorder) FindActionsByName(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) FindActionsByName(arg0 any) *MockModelFindActionsByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindActionsByName", reflect.TypeOf((*MockModel)(nil).FindActionsByName), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindActionsByName", reflect.TypeOf((*MockModel)(nil).FindActionsByName), arg0) + return &MockModelFindActionsByNameCall{Call: call} +} + +// MockModelFindActionsByNameCall wrap *gomock.Call +type MockModelFindActionsByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelFindActionsByNameCall) Return(arg0 []state.Action, arg1 error) *MockModelFindActionsByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelFindActionsByNameCall) Do(f func(string) ([]state.Action, error)) *MockModelFindActionsByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelFindActionsByNameCall) DoAndReturn(f func(string) ([]state.Action, error)) *MockModelFindActionsByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListOperations mocks base method. @@ -253,9 +541,33 @@ func (m *MockModel) ListOperations(arg0 []string, arg1 []names.Tag, arg2 []state } // ListOperations indicates an expected call of ListOperations. -func (mr *MockModelMockRecorder) ListOperations(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockModelMockRecorder) ListOperations(arg0, arg1, arg2, arg3, arg4 any) *MockModelListOperationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockModel)(nil).ListOperations), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockModel)(nil).ListOperations), arg0, arg1, arg2, arg3, arg4) + return &MockModelListOperationsCall{Call: call} +} + +// MockModelListOperationsCall wrap *gomock.Call +type MockModelListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelListOperationsCall) Return(arg0 []state.OperationInfo, arg1 bool, arg2 error) *MockModelListOperationsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelListOperationsCall) Do(f func([]string, []names.Tag, []state.ActionStatus, int, int) ([]state.OperationInfo, bool, error)) *MockModelListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelListOperationsCall) DoAndReturn(f func([]string, []names.Tag, []state.ActionStatus, int, int) ([]state.OperationInfo, bool, error)) *MockModelListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -267,9 +579,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OperationWithActions mocks base method. @@ -282,9 +618,33 @@ func (m *MockModel) OperationWithActions(arg0 string) (*state.OperationInfo, err } // OperationWithActions indicates an expected call of OperationWithActions. -func (mr *MockModelMockRecorder) OperationWithActions(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) OperationWithActions(arg0 any) *MockModelOperationWithActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OperationWithActions", reflect.TypeOf((*MockModel)(nil).OperationWithActions), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OperationWithActions", reflect.TypeOf((*MockModel)(nil).OperationWithActions), arg0) + return &MockModelOperationWithActionsCall{Call: call} +} + +// MockModelOperationWithActionsCall wrap *gomock.Call +type MockModelOperationWithActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationWithActionsCall) Return(arg0 *state.OperationInfo, arg1 error) *MockModelOperationWithActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationWithActionsCall) Do(f func(string) (*state.OperationInfo, error)) *MockModelOperationWithActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationWithActionsCall) DoAndReturn(f func(string) (*state.OperationInfo, error)) *MockModelOperationWithActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -296,7 +656,31 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/action/package_test.go b/apiserver/facades/client/action/package_test.go index b3c5c6070ce..57aabe7d83c 100644 --- a/apiserver/facades/client/action/package_test.go +++ b/apiserver/facades/client/action/package_test.go @@ -14,9 +14,9 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package action -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/action State,Model -//go:generate go run go.uber.org/mock/mockgen -package action -destination state_mock_test.go github.com/juju/juju/state Action,ActionReceiver -//go:generate go run go.uber.org/mock/mockgen -package action -destination leader_mock_test.go github.com/juju/juju/core/leadership Reader +//go:generate go run go.uber.org/mock/mockgen -typed -package action -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/action State,Model +//go:generate go run go.uber.org/mock/mockgen -typed -package action -destination state_mock_test.go github.com/juju/juju/state Action,ActionReceiver +//go:generate go run go.uber.org/mock/mockgen -typed -package action -destination leader_mock_test.go github.com/juju/juju/core/leadership Reader type MockBaseSuite struct { State *MockState diff --git a/apiserver/facades/client/action/state_mock_test.go b/apiserver/facades/client/action/state_mock_test.go index c0d29565e96..302635ae695 100644 --- a/apiserver/facades/client/action/state_mock_test.go +++ b/apiserver/facades/client/action/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package action -destination state_mock_test.go github.com/juju/juju/state Action,ActionReceiver +// mockgen -typed -package action -destination state_mock_test.go github.com/juju/juju/state Action,ActionReceiver // // Package action is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockAction) ActionTag() names.ActionTag { } // ActionTag indicates an expected call of ActionTag. -func (mr *MockActionMockRecorder) ActionTag() *gomock.Call { +func (mr *MockActionMockRecorder) ActionTag() *MockActionActionTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionTag", reflect.TypeOf((*MockAction)(nil).ActionTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionTag", reflect.TypeOf((*MockAction)(nil).ActionTag)) + return &MockActionActionTagCall{Call: call} +} + +// MockActionActionTagCall wrap *gomock.Call +type MockActionActionTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionActionTagCall) Return(arg0 names.ActionTag) *MockActionActionTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionActionTagCall) Do(f func() names.ActionTag) *MockActionActionTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionActionTagCall) DoAndReturn(f func() names.ActionTag) *MockActionActionTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Begin mocks base method. @@ -65,9 +89,33 @@ func (m *MockAction) Begin() (state.Action, error) { } // Begin indicates an expected call of Begin. -func (mr *MockActionMockRecorder) Begin() *gomock.Call { +func (mr *MockActionMockRecorder) Begin() *MockActionBeginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Begin", reflect.TypeOf((*MockAction)(nil).Begin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Begin", reflect.TypeOf((*MockAction)(nil).Begin)) + return &MockActionBeginCall{Call: call} +} + +// MockActionBeginCall wrap *gomock.Call +type MockActionBeginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionBeginCall) Return(arg0 state.Action, arg1 error) *MockActionBeginCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionBeginCall) Do(f func() (state.Action, error)) *MockActionBeginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionBeginCall) DoAndReturn(f func() (state.Action, error)) *MockActionBeginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cancel mocks base method. @@ -80,9 +128,33 @@ func (m *MockAction) Cancel() (state.Action, error) { } // Cancel indicates an expected call of Cancel. -func (mr *MockActionMockRecorder) Cancel() *gomock.Call { +func (mr *MockActionMockRecorder) Cancel() *MockActionCancelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockAction)(nil).Cancel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockAction)(nil).Cancel)) + return &MockActionCancelCall{Call: call} +} + +// MockActionCancelCall wrap *gomock.Call +type MockActionCancelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionCancelCall) Return(arg0 state.Action, arg1 error) *MockActionCancelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionCancelCall) Do(f func() (state.Action, error)) *MockActionCancelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionCancelCall) DoAndReturn(f func() (state.Action, error)) *MockActionCancelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Completed mocks base method. @@ -94,9 +166,33 @@ func (m *MockAction) Completed() time.Time { } // Completed indicates an expected call of Completed. -func (mr *MockActionMockRecorder) Completed() *gomock.Call { +func (mr *MockActionMockRecorder) Completed() *MockActionCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Completed", reflect.TypeOf((*MockAction)(nil).Completed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Completed", reflect.TypeOf((*MockAction)(nil).Completed)) + return &MockActionCompletedCall{Call: call} +} + +// MockActionCompletedCall wrap *gomock.Call +type MockActionCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionCompletedCall) Return(arg0 time.Time) *MockActionCompletedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionCompletedCall) Do(f func() time.Time) *MockActionCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionCompletedCall) DoAndReturn(f func() time.Time) *MockActionCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Enqueued mocks base method. @@ -108,9 +204,33 @@ func (m *MockAction) Enqueued() time.Time { } // Enqueued indicates an expected call of Enqueued. -func (mr *MockActionMockRecorder) Enqueued() *gomock.Call { +func (mr *MockActionMockRecorder) Enqueued() *MockActionEnqueuedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enqueued", reflect.TypeOf((*MockAction)(nil).Enqueued)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enqueued", reflect.TypeOf((*MockAction)(nil).Enqueued)) + return &MockActionEnqueuedCall{Call: call} +} + +// MockActionEnqueuedCall wrap *gomock.Call +type MockActionEnqueuedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionEnqueuedCall) Return(arg0 time.Time) *MockActionEnqueuedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionEnqueuedCall) Do(f func() time.Time) *MockActionEnqueuedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionEnqueuedCall) DoAndReturn(f func() time.Time) *MockActionEnqueuedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExecutionGroup mocks base method. @@ -122,9 +242,33 @@ func (m *MockAction) ExecutionGroup() string { } // ExecutionGroup indicates an expected call of ExecutionGroup. -func (mr *MockActionMockRecorder) ExecutionGroup() *gomock.Call { +func (mr *MockActionMockRecorder) ExecutionGroup() *MockActionExecutionGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutionGroup", reflect.TypeOf((*MockAction)(nil).ExecutionGroup)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutionGroup", reflect.TypeOf((*MockAction)(nil).ExecutionGroup)) + return &MockActionExecutionGroupCall{Call: call} +} + +// MockActionExecutionGroupCall wrap *gomock.Call +type MockActionExecutionGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionExecutionGroupCall) Return(arg0 string) *MockActionExecutionGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionExecutionGroupCall) Do(f func() string) *MockActionExecutionGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionExecutionGroupCall) DoAndReturn(f func() string) *MockActionExecutionGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Finish mocks base method. @@ -137,9 +281,33 @@ func (m *MockAction) Finish(arg0 state.ActionResults) (state.Action, error) { } // Finish indicates an expected call of Finish. -func (mr *MockActionMockRecorder) Finish(arg0 any) *gomock.Call { +func (mr *MockActionMockRecorder) Finish(arg0 any) *MockActionFinishCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockAction)(nil).Finish), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockAction)(nil).Finish), arg0) + return &MockActionFinishCall{Call: call} +} + +// MockActionFinishCall wrap *gomock.Call +type MockActionFinishCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionFinishCall) Return(arg0 state.Action, arg1 error) *MockActionFinishCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionFinishCall) Do(f func(state.ActionResults) (state.Action, error)) *MockActionFinishCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionFinishCall) DoAndReturn(f func(state.ActionResults) (state.Action, error)) *MockActionFinishCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -151,9 +319,33 @@ func (m *MockAction) Id() string { } // Id indicates an expected call of Id. -func (mr *MockActionMockRecorder) Id() *gomock.Call { +func (mr *MockActionMockRecorder) Id() *MockActionIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockAction)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockAction)(nil).Id)) + return &MockActionIdCall{Call: call} +} + +// MockActionIdCall wrap *gomock.Call +type MockActionIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionIdCall) Return(arg0 string) *MockActionIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionIdCall) Do(f func() string) *MockActionIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionIdCall) DoAndReturn(f func() string) *MockActionIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Log mocks base method. @@ -165,9 +357,33 @@ func (m *MockAction) Log(arg0 string) error { } // Log indicates an expected call of Log. -func (mr *MockActionMockRecorder) Log(arg0 any) *gomock.Call { +func (mr *MockActionMockRecorder) Log(arg0 any) *MockActionLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockAction)(nil).Log), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockAction)(nil).Log), arg0) + return &MockActionLogCall{Call: call} +} + +// MockActionLogCall wrap *gomock.Call +type MockActionLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionLogCall) Return(arg0 error) *MockActionLogCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionLogCall) Do(f func(string) error) *MockActionLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionLogCall) DoAndReturn(f func(string) error) *MockActionLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Messages mocks base method. @@ -179,9 +395,33 @@ func (m *MockAction) Messages() []state.ActionMessage { } // Messages indicates an expected call of Messages. -func (mr *MockActionMockRecorder) Messages() *gomock.Call { +func (mr *MockActionMockRecorder) Messages() *MockActionMessagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Messages", reflect.TypeOf((*MockAction)(nil).Messages)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Messages", reflect.TypeOf((*MockAction)(nil).Messages)) + return &MockActionMessagesCall{Call: call} +} + +// MockActionMessagesCall wrap *gomock.Call +type MockActionMessagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionMessagesCall) Return(arg0 []state.ActionMessage) *MockActionMessagesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionMessagesCall) Do(f func() []state.ActionMessage) *MockActionMessagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionMessagesCall) DoAndReturn(f func() []state.ActionMessage) *MockActionMessagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -193,9 +433,33 @@ func (m *MockAction) Name() string { } // Name indicates an expected call of Name. -func (mr *MockActionMockRecorder) Name() *gomock.Call { +func (mr *MockActionMockRecorder) Name() *MockActionNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAction)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAction)(nil).Name)) + return &MockActionNameCall{Call: call} +} + +// MockActionNameCall wrap *gomock.Call +type MockActionNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionNameCall) Return(arg0 string) *MockActionNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionNameCall) Do(f func() string) *MockActionNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionNameCall) DoAndReturn(f func() string) *MockActionNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Parallel mocks base method. @@ -207,9 +471,33 @@ func (m *MockAction) Parallel() bool { } // Parallel indicates an expected call of Parallel. -func (mr *MockActionMockRecorder) Parallel() *gomock.Call { +func (mr *MockActionMockRecorder) Parallel() *MockActionParallelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parallel", reflect.TypeOf((*MockAction)(nil).Parallel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parallel", reflect.TypeOf((*MockAction)(nil).Parallel)) + return &MockActionParallelCall{Call: call} +} + +// MockActionParallelCall wrap *gomock.Call +type MockActionParallelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionParallelCall) Return(arg0 bool) *MockActionParallelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionParallelCall) Do(f func() bool) *MockActionParallelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionParallelCall) DoAndReturn(f func() bool) *MockActionParallelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Parameters mocks base method. @@ -221,9 +509,33 @@ func (m *MockAction) Parameters() map[string]any { } // Parameters indicates an expected call of Parameters. -func (mr *MockActionMockRecorder) Parameters() *gomock.Call { +func (mr *MockActionMockRecorder) Parameters() *MockActionParametersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parameters", reflect.TypeOf((*MockAction)(nil).Parameters)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parameters", reflect.TypeOf((*MockAction)(nil).Parameters)) + return &MockActionParametersCall{Call: call} +} + +// MockActionParametersCall wrap *gomock.Call +type MockActionParametersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionParametersCall) Return(arg0 map[string]any) *MockActionParametersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionParametersCall) Do(f func() map[string]any) *MockActionParametersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionParametersCall) DoAndReturn(f func() map[string]any) *MockActionParametersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Receiver mocks base method. @@ -235,9 +547,33 @@ func (m *MockAction) Receiver() string { } // Receiver indicates an expected call of Receiver. -func (mr *MockActionMockRecorder) Receiver() *gomock.Call { +func (mr *MockActionMockRecorder) Receiver() *MockActionReceiverCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Receiver", reflect.TypeOf((*MockAction)(nil).Receiver)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Receiver", reflect.TypeOf((*MockAction)(nil).Receiver)) + return &MockActionReceiverCall{Call: call} +} + +// MockActionReceiverCall wrap *gomock.Call +type MockActionReceiverCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverCall) Return(arg0 string) *MockActionReceiverCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverCall) Do(f func() string) *MockActionReceiverCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverCall) DoAndReturn(f func() string) *MockActionReceiverCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -249,9 +585,33 @@ func (m *MockAction) Refresh() error { } // Refresh indicates an expected call of Refresh. -func (mr *MockActionMockRecorder) Refresh() *gomock.Call { +func (mr *MockActionMockRecorder) Refresh() *MockActionRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockAction)(nil).Refresh)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockAction)(nil).Refresh)) + return &MockActionRefreshCall{Call: call} +} + +// MockActionRefreshCall wrap *gomock.Call +type MockActionRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionRefreshCall) Return(arg0 error) *MockActionRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionRefreshCall) Do(f func() error) *MockActionRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionRefreshCall) DoAndReturn(f func() error) *MockActionRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Results mocks base method. @@ -264,9 +624,33 @@ func (m *MockAction) Results() (map[string]any, string) { } // Results indicates an expected call of Results. -func (mr *MockActionMockRecorder) Results() *gomock.Call { +func (mr *MockActionMockRecorder) Results() *MockActionResultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Results", reflect.TypeOf((*MockAction)(nil).Results)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Results", reflect.TypeOf((*MockAction)(nil).Results)) + return &MockActionResultsCall{Call: call} +} + +// MockActionResultsCall wrap *gomock.Call +type MockActionResultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionResultsCall) Return(arg0 map[string]any, arg1 string) *MockActionResultsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionResultsCall) Do(f func() (map[string]any, string)) *MockActionResultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionResultsCall) DoAndReturn(f func() (map[string]any, string)) *MockActionResultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Started mocks base method. @@ -278,9 +662,33 @@ func (m *MockAction) Started() time.Time { } // Started indicates an expected call of Started. -func (mr *MockActionMockRecorder) Started() *gomock.Call { +func (mr *MockActionMockRecorder) Started() *MockActionStartedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Started", reflect.TypeOf((*MockAction)(nil).Started)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Started", reflect.TypeOf((*MockAction)(nil).Started)) + return &MockActionStartedCall{Call: call} +} + +// MockActionStartedCall wrap *gomock.Call +type MockActionStartedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionStartedCall) Return(arg0 time.Time) *MockActionStartedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionStartedCall) Do(f func() time.Time) *MockActionStartedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionStartedCall) DoAndReturn(f func() time.Time) *MockActionStartedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -292,9 +700,33 @@ func (m *MockAction) Status() state.ActionStatus { } // Status indicates an expected call of Status. -func (mr *MockActionMockRecorder) Status() *gomock.Call { +func (mr *MockActionMockRecorder) Status() *MockActionStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockAction)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockAction)(nil).Status)) + return &MockActionStatusCall{Call: call} +} + +// MockActionStatusCall wrap *gomock.Call +type MockActionStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionStatusCall) Return(arg0 state.ActionStatus) *MockActionStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionStatusCall) Do(f func() state.ActionStatus) *MockActionStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionStatusCall) DoAndReturn(f func() state.ActionStatus) *MockActionStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -306,9 +738,33 @@ func (m *MockAction) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockActionMockRecorder) Tag() *gomock.Call { +func (mr *MockActionMockRecorder) Tag() *MockActionTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockAction)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockAction)(nil).Tag)) + return &MockActionTagCall{Call: call} +} + +// MockActionTagCall wrap *gomock.Call +type MockActionTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionTagCall) Return(arg0 names.Tag) *MockActionTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionTagCall) Do(f func() names.Tag) *MockActionTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionTagCall) DoAndReturn(f func() names.Tag) *MockActionTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockActionReceiver is a mock of ActionReceiver interface. @@ -344,9 +800,33 @@ func (m *MockActionReceiver) Actions() ([]state.Action, error) { } // Actions indicates an expected call of Actions. -func (mr *MockActionReceiverMockRecorder) Actions() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) Actions() *MockActionReceiverActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockActionReceiver)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockActionReceiver)(nil).Actions)) + return &MockActionReceiverActionsCall{Call: call} +} + +// MockActionReceiverActionsCall wrap *gomock.Call +type MockActionReceiverActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverActionsCall) Return(arg0 []state.Action, arg1 error) *MockActionReceiverActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverActionsCall) Do(f func() ([]state.Action, error)) *MockActionReceiverActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverActionsCall) DoAndReturn(f func() ([]state.Action, error)) *MockActionReceiverActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CancelAction mocks base method. @@ -359,9 +839,33 @@ func (m *MockActionReceiver) CancelAction(arg0 state.Action) (state.Action, erro } // CancelAction indicates an expected call of CancelAction. -func (mr *MockActionReceiverMockRecorder) CancelAction(arg0 any) *gomock.Call { +func (mr *MockActionReceiverMockRecorder) CancelAction(arg0 any) *MockActionReceiverCancelActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelAction", reflect.TypeOf((*MockActionReceiver)(nil).CancelAction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelAction", reflect.TypeOf((*MockActionReceiver)(nil).CancelAction), arg0) + return &MockActionReceiverCancelActionCall{Call: call} +} + +// MockActionReceiverCancelActionCall wrap *gomock.Call +type MockActionReceiverCancelActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverCancelActionCall) Return(arg0 state.Action, arg1 error) *MockActionReceiverCancelActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverCancelActionCall) Do(f func(state.Action) (state.Action, error)) *MockActionReceiverCancelActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverCancelActionCall) DoAndReturn(f func(state.Action) (state.Action, error)) *MockActionReceiverCancelActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CompletedActions mocks base method. @@ -374,9 +878,33 @@ func (m *MockActionReceiver) CompletedActions() ([]state.Action, error) { } // CompletedActions indicates an expected call of CompletedActions. -func (mr *MockActionReceiverMockRecorder) CompletedActions() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) CompletedActions() *MockActionReceiverCompletedActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedActions", reflect.TypeOf((*MockActionReceiver)(nil).CompletedActions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedActions", reflect.TypeOf((*MockActionReceiver)(nil).CompletedActions)) + return &MockActionReceiverCompletedActionsCall{Call: call} +} + +// MockActionReceiverCompletedActionsCall wrap *gomock.Call +type MockActionReceiverCompletedActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverCompletedActionsCall) Return(arg0 []state.Action, arg1 error) *MockActionReceiverCompletedActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverCompletedActionsCall) Do(f func() ([]state.Action, error)) *MockActionReceiverCompletedActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverCompletedActionsCall) DoAndReturn(f func() ([]state.Action, error)) *MockActionReceiverCompletedActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PendingActions mocks base method. @@ -389,9 +917,33 @@ func (m *MockActionReceiver) PendingActions() ([]state.Action, error) { } // PendingActions indicates an expected call of PendingActions. -func (mr *MockActionReceiverMockRecorder) PendingActions() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) PendingActions() *MockActionReceiverPendingActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PendingActions", reflect.TypeOf((*MockActionReceiver)(nil).PendingActions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PendingActions", reflect.TypeOf((*MockActionReceiver)(nil).PendingActions)) + return &MockActionReceiverPendingActionsCall{Call: call} +} + +// MockActionReceiverPendingActionsCall wrap *gomock.Call +type MockActionReceiverPendingActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverPendingActionsCall) Return(arg0 []state.Action, arg1 error) *MockActionReceiverPendingActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverPendingActionsCall) Do(f func() ([]state.Action, error)) *MockActionReceiverPendingActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverPendingActionsCall) DoAndReturn(f func() ([]state.Action, error)) *MockActionReceiverPendingActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareActionPayload mocks base method. @@ -406,9 +958,33 @@ func (m *MockActionReceiver) PrepareActionPayload(arg0 string, arg1 map[string]a } // PrepareActionPayload indicates an expected call of PrepareActionPayload. -func (mr *MockActionReceiverMockRecorder) PrepareActionPayload(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockActionReceiverMockRecorder) PrepareActionPayload(arg0, arg1, arg2, arg3 any) *MockActionReceiverPrepareActionPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareActionPayload", reflect.TypeOf((*MockActionReceiver)(nil).PrepareActionPayload), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareActionPayload", reflect.TypeOf((*MockActionReceiver)(nil).PrepareActionPayload), arg0, arg1, arg2, arg3) + return &MockActionReceiverPrepareActionPayloadCall{Call: call} +} + +// MockActionReceiverPrepareActionPayloadCall wrap *gomock.Call +type MockActionReceiverPrepareActionPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverPrepareActionPayloadCall) Return(arg0 map[string]any, arg1 bool, arg2 string, arg3 error) *MockActionReceiverPrepareActionPayloadCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverPrepareActionPayloadCall) Do(f func(string, map[string]any, *bool, *string) (map[string]any, bool, string, error)) *MockActionReceiverPrepareActionPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverPrepareActionPayloadCall) DoAndReturn(f func(string, map[string]any, *bool, *string) (map[string]any, bool, string, error)) *MockActionReceiverPrepareActionPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunningActions mocks base method. @@ -421,9 +997,33 @@ func (m *MockActionReceiver) RunningActions() ([]state.Action, error) { } // RunningActions indicates an expected call of RunningActions. -func (mr *MockActionReceiverMockRecorder) RunningActions() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) RunningActions() *MockActionReceiverRunningActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunningActions", reflect.TypeOf((*MockActionReceiver)(nil).RunningActions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunningActions", reflect.TypeOf((*MockActionReceiver)(nil).RunningActions)) + return &MockActionReceiverRunningActionsCall{Call: call} +} + +// MockActionReceiverRunningActionsCall wrap *gomock.Call +type MockActionReceiverRunningActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverRunningActionsCall) Return(arg0 []state.Action, arg1 error) *MockActionReceiverRunningActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverRunningActionsCall) Do(f func() ([]state.Action, error)) *MockActionReceiverRunningActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverRunningActionsCall) DoAndReturn(f func() ([]state.Action, error)) *MockActionReceiverRunningActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -435,9 +1035,33 @@ func (m *MockActionReceiver) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockActionReceiverMockRecorder) Tag() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) Tag() *MockActionReceiverTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockActionReceiver)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockActionReceiver)(nil).Tag)) + return &MockActionReceiverTagCall{Call: call} +} + +// MockActionReceiverTagCall wrap *gomock.Call +type MockActionReceiverTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverTagCall) Return(arg0 names.Tag) *MockActionReceiverTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverTagCall) Do(f func() names.Tag) *MockActionReceiverTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverTagCall) DoAndReturn(f func() names.Tag) *MockActionReceiverTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchActionNotifications mocks base method. @@ -449,9 +1073,33 @@ func (m *MockActionReceiver) WatchActionNotifications() state.StringsWatcher { } // WatchActionNotifications indicates an expected call of WatchActionNotifications. -func (mr *MockActionReceiverMockRecorder) WatchActionNotifications() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) WatchActionNotifications() *MockActionReceiverWatchActionNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockActionReceiver)(nil).WatchActionNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockActionReceiver)(nil).WatchActionNotifications)) + return &MockActionReceiverWatchActionNotificationsCall{Call: call} +} + +// MockActionReceiverWatchActionNotificationsCall wrap *gomock.Call +type MockActionReceiverWatchActionNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverWatchActionNotificationsCall) Return(arg0 state.StringsWatcher) *MockActionReceiverWatchActionNotificationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverWatchActionNotificationsCall) Do(f func() state.StringsWatcher) *MockActionReceiverWatchActionNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverWatchActionNotificationsCall) DoAndReturn(f func() state.StringsWatcher) *MockActionReceiverWatchActionNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchPendingActionNotifications mocks base method. @@ -463,7 +1111,31 @@ func (m *MockActionReceiver) WatchPendingActionNotifications() state.StringsWatc } // WatchPendingActionNotifications indicates an expected call of WatchPendingActionNotifications. -func (mr *MockActionReceiverMockRecorder) WatchPendingActionNotifications() *gomock.Call { +func (mr *MockActionReceiverMockRecorder) WatchPendingActionNotifications() *MockActionReceiverWatchPendingActionNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchPendingActionNotifications", reflect.TypeOf((*MockActionReceiver)(nil).WatchPendingActionNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchPendingActionNotifications", reflect.TypeOf((*MockActionReceiver)(nil).WatchPendingActionNotifications)) + return &MockActionReceiverWatchPendingActionNotificationsCall{Call: call} +} + +// MockActionReceiverWatchPendingActionNotificationsCall wrap *gomock.Call +type MockActionReceiverWatchPendingActionNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockActionReceiverWatchPendingActionNotificationsCall) Return(arg0 state.StringsWatcher) *MockActionReceiverWatchPendingActionNotificationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockActionReceiverWatchPendingActionNotificationsCall) Do(f func() state.StringsWatcher) *MockActionReceiverWatchPendingActionNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockActionReceiverWatchPendingActionNotificationsCall) DoAndReturn(f func() state.StringsWatcher) *MockActionReceiverWatchPendingActionNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/deployrepository_mocks_test.go b/apiserver/facades/client/application/deployrepository_mocks_test.go index 80122022da9..a65e2188c78 100644 --- a/apiserver/facades/client/application/deployrepository_mocks_test.go +++ b/apiserver/facades/client/application/deployrepository_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package application -destination deployrepository_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Bindings,DeployFromRepositoryState,DeployFromRepositoryValidator,Model,Machine +// mockgen -typed -package application -destination deployrepository_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Bindings,DeployFromRepositoryState,DeployFromRepositoryValidator,Model,Machine // // Package application is a generated GoMock package. @@ -59,9 +59,33 @@ func (m *MockBindings) Map() map[string]string { } // Map indicates an expected call of Map. -func (mr *MockBindingsMockRecorder) Map() *gomock.Call { +func (mr *MockBindingsMockRecorder) Map() *MockBindingsMapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + return &MockBindingsMapCall{Call: call} +} + +// MockBindingsMapCall wrap *gomock.Call +type MockBindingsMapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBindingsMapCall) Return(arg0 map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBindingsMapCall) Do(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBindingsMapCall) DoAndReturn(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MapWithSpaceNames mocks base method. @@ -74,9 +98,33 @@ func (m *MockBindings) MapWithSpaceNames(arg0 network.SpaceInfos) (map[string]st } // MapWithSpaceNames indicates an expected call of MapWithSpaceNames. -func (mr *MockBindingsMockRecorder) MapWithSpaceNames(arg0 any) *gomock.Call { +func (mr *MockBindingsMockRecorder) MapWithSpaceNames(arg0 any) *MockBindingsMapWithSpaceNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapWithSpaceNames", reflect.TypeOf((*MockBindings)(nil).MapWithSpaceNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapWithSpaceNames", reflect.TypeOf((*MockBindings)(nil).MapWithSpaceNames), arg0) + return &MockBindingsMapWithSpaceNamesCall{Call: call} +} + +// MockBindingsMapWithSpaceNamesCall wrap *gomock.Call +type MockBindingsMapWithSpaceNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBindingsMapWithSpaceNamesCall) Return(arg0 map[string]string, arg1 error) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBindingsMapWithSpaceNamesCall) Do(f func(network.SpaceInfos) (map[string]string, error)) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBindingsMapWithSpaceNamesCall) DoAndReturn(f func(network.SpaceInfos) (map[string]string, error)) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDeployFromRepositoryState is a mock of DeployFromRepositoryState interface. @@ -112,9 +160,33 @@ func (m *MockDeployFromRepositoryState) AddApplication(arg0 state.AddApplication } // AddApplication indicates an expected call of AddApplication. -func (mr *MockDeployFromRepositoryStateMockRecorder) AddApplication(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) AddApplication(arg0, arg1 any) *MockDeployFromRepositoryStateAddApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddApplication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddApplication), arg0, arg1) + return &MockDeployFromRepositoryStateAddApplicationCall{Call: call} +} + +// MockDeployFromRepositoryStateAddApplicationCall wrap *gomock.Call +type MockDeployFromRepositoryStateAddApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateAddApplicationCall) Return(arg0 Application, arg1 error) *MockDeployFromRepositoryStateAddApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateAddApplicationCall) Do(f func(state.AddApplicationArgs, objectstore.ObjectStore) (Application, error)) *MockDeployFromRepositoryStateAddApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateAddApplicationCall) DoAndReturn(f func(state.AddApplicationArgs, objectstore.ObjectStore) (Application, error)) *MockDeployFromRepositoryStateAddApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddCharmMetadata mocks base method. @@ -127,9 +199,33 @@ func (m *MockDeployFromRepositoryState) AddCharmMetadata(arg0 state.CharmInfo) ( } // AddCharmMetadata indicates an expected call of AddCharmMetadata. -func (mr *MockDeployFromRepositoryStateMockRecorder) AddCharmMetadata(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) AddCharmMetadata(arg0 any) *MockDeployFromRepositoryStateAddCharmMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddCharmMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddCharmMetadata), arg0) + return &MockDeployFromRepositoryStateAddCharmMetadataCall{Call: call} +} + +// MockDeployFromRepositoryStateAddCharmMetadataCall wrap *gomock.Call +type MockDeployFromRepositoryStateAddCharmMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateAddCharmMetadataCall) Return(arg0 Charm, arg1 error) *MockDeployFromRepositoryStateAddCharmMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateAddCharmMetadataCall) Do(f func(state.CharmInfo) (Charm, error)) *MockDeployFromRepositoryStateAddCharmMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateAddCharmMetadataCall) DoAndReturn(f func(state.CharmInfo) (Charm, error)) *MockDeployFromRepositoryStateAddCharmMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddPendingResource mocks base method. @@ -142,9 +238,33 @@ func (m *MockDeployFromRepositoryState) AddPendingResource(arg0 string, arg1 res } // AddPendingResource indicates an expected call of AddPendingResource. -func (mr *MockDeployFromRepositoryStateMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *MockDeployFromRepositoryStateAddPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).AddPendingResource), arg0, arg1, arg2) + return &MockDeployFromRepositoryStateAddPendingResourceCall{Call: call} +} + +// MockDeployFromRepositoryStateAddPendingResourceCall wrap *gomock.Call +type MockDeployFromRepositoryStateAddPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateAddPendingResourceCall) Return(arg0 string, arg1 error) *MockDeployFromRepositoryStateAddPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateAddPendingResourceCall) Do(f func(string, resource.Resource, objectstore.ObjectStore) (string, error)) *MockDeployFromRepositoryStateAddPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateAddPendingResourceCall) DoAndReturn(f func(string, resource.Resource, objectstore.ObjectStore) (string, error)) *MockDeployFromRepositoryStateAddPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -157,9 +277,33 @@ func (m *MockDeployFromRepositoryState) Charm(arg0 string) (Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockDeployFromRepositoryStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) Charm(arg0 any) *MockDeployFromRepositoryStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).Charm), arg0) + return &MockDeployFromRepositoryStateCharmCall{Call: call} +} + +// MockDeployFromRepositoryStateCharmCall wrap *gomock.Call +type MockDeployFromRepositoryStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateCharmCall) Return(arg0 Charm, arg1 error) *MockDeployFromRepositoryStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateCharmCall) Do(f func(string) (Charm, error)) *MockDeployFromRepositoryStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateCharmCall) DoAndReturn(f func(string) (Charm, error)) *MockDeployFromRepositoryStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -172,9 +316,33 @@ func (m *MockDeployFromRepositoryState) Machine(arg0 string) (Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockDeployFromRepositoryStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) Machine(arg0 any) *MockDeployFromRepositoryStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).Machine), arg0) + return &MockDeployFromRepositoryStateMachineCall{Call: call} +} + +// MockDeployFromRepositoryStateMachineCall wrap *gomock.Call +type MockDeployFromRepositoryStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateMachineCall) Return(arg0 Machine, arg1 error) *MockDeployFromRepositoryStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateMachineCall) Do(f func(string) (Machine, error)) *MockDeployFromRepositoryStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateMachineCall) DoAndReturn(f func(string) (Machine, error)) *MockDeployFromRepositoryStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConstraints mocks base method. @@ -187,9 +355,33 @@ func (m *MockDeployFromRepositoryState) ModelConstraints() (constraints.Value, e } // ModelConstraints indicates an expected call of ModelConstraints. -func (mr *MockDeployFromRepositoryStateMockRecorder) ModelConstraints() *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) ModelConstraints() *MockDeployFromRepositoryStateModelConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ModelConstraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ModelConstraints)) + return &MockDeployFromRepositoryStateModelConstraintsCall{Call: call} +} + +// MockDeployFromRepositoryStateModelConstraintsCall wrap *gomock.Call +type MockDeployFromRepositoryStateModelConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateModelConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockDeployFromRepositoryStateModelConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateModelConstraintsCall) Do(f func() (constraints.Value, error)) *MockDeployFromRepositoryStateModelConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateModelConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockDeployFromRepositoryStateModelConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -201,9 +393,33 @@ func (m *MockDeployFromRepositoryState) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockDeployFromRepositoryStateMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) ModelUUID() *MockDeployFromRepositoryStateModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ModelUUID)) + return &MockDeployFromRepositoryStateModelUUIDCall{Call: call} +} + +// MockDeployFromRepositoryStateModelUUIDCall wrap *gomock.Call +type MockDeployFromRepositoryStateModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateModelUUIDCall) Return(arg0 string) *MockDeployFromRepositoryStateModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateModelUUIDCall) Do(f func() string) *MockDeployFromRepositoryStateModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateModelUUIDCall) DoAndReturn(f func() string) *MockDeployFromRepositoryStateModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -216,9 +432,33 @@ func (m *MockDeployFromRepositoryState) PrepareCharmUpload(arg0 string) (service } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockDeployFromRepositoryStateMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) PrepareCharmUpload(arg0 any) *MockDeployFromRepositoryStatePrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).PrepareCharmUpload), arg0) + return &MockDeployFromRepositoryStatePrepareCharmUploadCall{Call: call} +} + +// MockDeployFromRepositoryStatePrepareCharmUploadCall wrap *gomock.Call +type MockDeployFromRepositoryStatePrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStatePrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockDeployFromRepositoryStatePrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStatePrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockDeployFromRepositoryStatePrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStatePrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockDeployFromRepositoryStatePrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadSequence mocks base method. @@ -231,9 +471,33 @@ func (m *MockDeployFromRepositoryState) ReadSequence(arg0 string) (int, error) { } // ReadSequence indicates an expected call of ReadSequence. -func (mr *MockDeployFromRepositoryStateMockRecorder) ReadSequence(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) ReadSequence(arg0 any) *MockDeployFromRepositoryStateReadSequenceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSequence", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ReadSequence), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSequence", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).ReadSequence), arg0) + return &MockDeployFromRepositoryStateReadSequenceCall{Call: call} +} + +// MockDeployFromRepositoryStateReadSequenceCall wrap *gomock.Call +type MockDeployFromRepositoryStateReadSequenceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateReadSequenceCall) Return(arg0 int, arg1 error) *MockDeployFromRepositoryStateReadSequenceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateReadSequenceCall) Do(f func(string) (int, error)) *MockDeployFromRepositoryStateReadSequenceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateReadSequenceCall) DoAndReturn(f func(string) (int, error)) *MockDeployFromRepositoryStateReadSequenceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemovePendingResources mocks base method. @@ -245,9 +509,33 @@ func (m *MockDeployFromRepositoryState) RemovePendingResources(arg0 string, arg1 } // RemovePendingResources indicates an expected call of RemovePendingResources. -func (mr *MockDeployFromRepositoryStateMockRecorder) RemovePendingResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) RemovePendingResources(arg0, arg1, arg2 any) *MockDeployFromRepositoryStateRemovePendingResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingResources", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).RemovePendingResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingResources", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).RemovePendingResources), arg0, arg1, arg2) + return &MockDeployFromRepositoryStateRemovePendingResourcesCall{Call: call} +} + +// MockDeployFromRepositoryStateRemovePendingResourcesCall wrap *gomock.Call +type MockDeployFromRepositoryStateRemovePendingResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateRemovePendingResourcesCall) Return(arg0 error) *MockDeployFromRepositoryStateRemovePendingResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateRemovePendingResourcesCall) Do(f func(string, map[string]string, objectstore.ObjectStore) error) *MockDeployFromRepositoryStateRemovePendingResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateRemovePendingResourcesCall) DoAndReturn(f func(string, map[string]string, objectstore.ObjectStore) error) *MockDeployFromRepositoryStateRemovePendingResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -260,9 +548,33 @@ func (m *MockDeployFromRepositoryState) UpdateUploadedCharm(arg0 state.CharmInfo } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockDeployFromRepositoryStateMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockDeployFromRepositoryStateMockRecorder) UpdateUploadedCharm(arg0 any) *MockDeployFromRepositoryStateUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockDeployFromRepositoryState)(nil).UpdateUploadedCharm), arg0) + return &MockDeployFromRepositoryStateUpdateUploadedCharmCall{Call: call} +} + +// MockDeployFromRepositoryStateUpdateUploadedCharmCall wrap *gomock.Call +type MockDeployFromRepositoryStateUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryStateUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockDeployFromRepositoryStateUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryStateUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockDeployFromRepositoryStateUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryStateUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockDeployFromRepositoryStateUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDeployFromRepositoryValidator is a mock of DeployFromRepositoryValidator interface. @@ -298,9 +610,33 @@ func (m *MockDeployFromRepositoryValidator) ValidateArg(arg0 context.Context, ar } // ValidateArg indicates an expected call of ValidateArg. -func (mr *MockDeployFromRepositoryValidatorMockRecorder) ValidateArg(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployFromRepositoryValidatorMockRecorder) ValidateArg(arg0, arg1 any) *MockDeployFromRepositoryValidatorValidateArgCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateArg", reflect.TypeOf((*MockDeployFromRepositoryValidator)(nil).ValidateArg), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateArg", reflect.TypeOf((*MockDeployFromRepositoryValidator)(nil).ValidateArg), arg0, arg1) + return &MockDeployFromRepositoryValidatorValidateArgCall{Call: call} +} + +// MockDeployFromRepositoryValidatorValidateArgCall wrap *gomock.Call +type MockDeployFromRepositoryValidatorValidateArgCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployFromRepositoryValidatorValidateArgCall) Return(arg0 deployTemplate, arg1 []error) *MockDeployFromRepositoryValidatorValidateArgCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployFromRepositoryValidatorValidateArgCall) Do(f func(context.Context, params.DeployFromRepositoryArg) (deployTemplate, []error)) *MockDeployFromRepositoryValidatorValidateArgCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployFromRepositoryValidatorValidateArgCall) DoAndReturn(f func(context.Context, params.DeployFromRepositoryArg) (deployTemplate, []error)) *MockDeployFromRepositoryValidatorValidateArgCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -336,9 +672,33 @@ func (m *MockModel) AgentVersion() (version.Number, error) { } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockModelMockRecorder) AgentVersion() *gomock.Call { +func (mr *MockModelMockRecorder) AgentVersion() *MockModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + return &MockModelAgentVersionCall{Call: call} +} + +// MockModelAgentVersionCall wrap *gomock.Call +type MockModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAgentVersionCall) Do(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAgentVersionCall) DoAndReturn(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredentialTag mocks base method. @@ -351,9 +711,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -365,9 +749,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -379,9 +787,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -394,9 +826,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -408,9 +864,33 @@ func (m *MockModel) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockModelMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockModelMockRecorder) ControllerUUID() *MockModelControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + return &MockModelControllerUUIDCall{Call: call} +} + +// MockModelControllerUUIDCall wrap *gomock.Call +type MockModelControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelControllerUUIDCall) Return(arg0 string) *MockModelControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelControllerUUIDCall) Do(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelControllerUUIDCall) DoAndReturn(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -423,9 +903,33 @@ func (m *MockModel) ModelConfig(arg0 context.Context) (*config.Config, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *MockModelModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + return &MockModelModelConfigCall{Call: call} +} + +// MockModelModelConfigCall wrap *gomock.Call +type MockModelModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -437,9 +941,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -451,9 +979,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRangesForMachine mocks base method. @@ -466,9 +1018,33 @@ func (m *MockModel) OpenedPortRangesForMachine(arg0 string) (state.MachinePortRa } // OpenedPortRangesForMachine indicates an expected call of OpenedPortRangesForMachine. -func (mr *MockModelMockRecorder) OpenedPortRangesForMachine(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) OpenedPortRangesForMachine(arg0 any) *MockModelOpenedPortRangesForMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesForMachine", reflect.TypeOf((*MockModel)(nil).OpenedPortRangesForMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesForMachine", reflect.TypeOf((*MockModel)(nil).OpenedPortRangesForMachine), arg0) + return &MockModelOpenedPortRangesForMachineCall{Call: call} +} + +// MockModelOpenedPortRangesForMachineCall wrap *gomock.Call +type MockModelOpenedPortRangesForMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOpenedPortRangesForMachineCall) Return(arg0 state.MachinePortRanges, arg1 error) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOpenedPortRangesForMachineCall) Do(f func(string) (state.MachinePortRanges, error)) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOpenedPortRangesForMachineCall) DoAndReturn(f func(string) (state.MachinePortRanges, error)) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -480,9 +1056,33 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -494,9 +1094,33 @@ func (m *MockModel) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockModelMockRecorder) Tag() *gomock.Call { +func (mr *MockModelMockRecorder) Tag() *MockModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + return &MockModelTagCall{Call: call} +} + +// MockModelTagCall wrap *gomock.Call +type MockModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTagCall) Return(arg0 names.Tag) *MockModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTagCall) Do(f func() names.Tag) *MockModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTagCall) DoAndReturn(f func() names.Tag) *MockModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -508,9 +1132,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UUID mocks base method. @@ -522,9 +1170,33 @@ func (m *MockModel) UUID() string { } // UUID indicates an expected call of UUID. -func (mr *MockModelMockRecorder) UUID() *gomock.Call { +func (mr *MockModelMockRecorder) UUID() *MockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + return &MockModelUUIDCall{Call: call} +} + +// MockModelUUIDCall wrap *gomock.Call +type MockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUUIDCall) Return(arg0 string) *MockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUUIDCall) Do(f func() string) *MockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUUIDCall) DoAndReturn(f func() string) *MockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -559,9 +1231,33 @@ func (m *MockMachine) Base() state.Base { } // Base indicates an expected call of Base. -func (mr *MockMachineMockRecorder) Base() *gomock.Call { +func (mr *MockMachineMockRecorder) Base() *MockMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + return &MockMachineBaseCall{Call: call} +} + +// MockMachineBaseCall wrap *gomock.Call +type MockMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBaseCall) Return(arg0 state.Base) *MockMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBaseCall) Do(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBaseCall) DoAndReturn(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareCharacteristics mocks base method. @@ -574,9 +1270,33 @@ func (m *MockMachine) HardwareCharacteristics() (*instance.HardwareCharacteristi } // HardwareCharacteristics indicates an expected call of HardwareCharacteristics. -func (mr *MockMachineMockRecorder) HardwareCharacteristics() *gomock.Call { +func (mr *MockMachineMockRecorder) HardwareCharacteristics() *MockMachineHardwareCharacteristicsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + return &MockMachineHardwareCharacteristicsCall{Call: call} +} + +// MockMachineHardwareCharacteristicsCall wrap *gomock.Call +type MockMachineHardwareCharacteristicsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineHardwareCharacteristicsCall) Return(arg0 *instance.HardwareCharacteristics, arg1 error) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineHardwareCharacteristicsCall) Do(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineHardwareCharacteristicsCall) DoAndReturn(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLockedForSeriesUpgrade mocks base method. @@ -589,9 +1309,33 @@ func (m *MockMachine) IsLockedForSeriesUpgrade() (bool, error) { } // IsLockedForSeriesUpgrade indicates an expected call of IsLockedForSeriesUpgrade. -func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *gomock.Call { +func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *MockMachineIsLockedForSeriesUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + return &MockMachineIsLockedForSeriesUpgradeCall{Call: call} +} + +// MockMachineIsLockedForSeriesUpgradeCall wrap *gomock.Call +type MockMachineIsLockedForSeriesUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsLockedForSeriesUpgradeCall) Return(arg0 bool, arg1 error) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsLockedForSeriesUpgradeCall) Do(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsLockedForSeriesUpgradeCall) DoAndReturn(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsParentLockedForSeriesUpgrade mocks base method. @@ -604,9 +1348,33 @@ func (m *MockMachine) IsParentLockedForSeriesUpgrade() (bool, error) { } // IsParentLockedForSeriesUpgrade indicates an expected call of IsParentLockedForSeriesUpgrade. -func (mr *MockMachineMockRecorder) IsParentLockedForSeriesUpgrade() *gomock.Call { +func (mr *MockMachineMockRecorder) IsParentLockedForSeriesUpgrade() *MockMachineIsParentLockedForSeriesUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsParentLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsParentLockedForSeriesUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsParentLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsParentLockedForSeriesUpgrade)) + return &MockMachineIsParentLockedForSeriesUpgradeCall{Call: call} +} + +// MockMachineIsParentLockedForSeriesUpgradeCall wrap *gomock.Call +type MockMachineIsParentLockedForSeriesUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) Return(arg0 bool, arg1 error) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) Do(f func() (bool, error)) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) DoAndReturn(f func() (bool, error)) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -619,7 +1387,31 @@ func (m *MockMachine) PublicAddress() (network.SpaceAddress, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockMachineMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockMachineMockRecorder) PublicAddress() *MockMachinePublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + return &MockMachinePublicAddressCall{Call: call} +} + +// MockMachinePublicAddressCall wrap *gomock.Call +type MockMachinePublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePublicAddressCall) Return(arg0 network.SpaceAddress, arg1 error) *MockMachinePublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePublicAddressCall) Do(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePublicAddressCall) DoAndReturn(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/domain_mock.go b/apiserver/facades/client/application/domain_mock.go index dfa1062f788..a5d1e51bbc1 100644 --- a/apiserver/facades/client/application/domain_mock.go +++ b/apiserver/facades/client/application/domain_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package application -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/application MachineService,ApplicationService,StoragePoolGetter,NetworkService,ExternalControllerService +// mockgen -typed -package application -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/application MachineService,ApplicationService,StoragePoolGetter,NetworkService,ExternalControllerService // // Package application is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockMachineService) CreateMachine(arg0 context.Context, arg1 string) er } // CreateMachine indicates an expected call of CreateMachine. -func (mr *MockMachineServiceMockRecorder) CreateMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineServiceMockRecorder) CreateMachine(arg0, arg1 any) *MockMachineServiceCreateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMachine", reflect.TypeOf((*MockMachineService)(nil).CreateMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMachine", reflect.TypeOf((*MockMachineService)(nil).CreateMachine), arg0, arg1) + return &MockMachineServiceCreateMachineCall{Call: call} +} + +// MockMachineServiceCreateMachineCall wrap *gomock.Call +type MockMachineServiceCreateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineServiceCreateMachineCall) Return(arg0 error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineServiceCreateMachineCall) Do(f func(context.Context, string) error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineServiceCreateMachineCall) DoAndReturn(f func(context.Context, string) error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationService is a mock of ApplicationService interface. @@ -93,10 +117,34 @@ func (m *MockApplicationService) AddUnits(arg0 context.Context, arg1 string, arg } // AddUnits indicates an expected call of AddUnits. -func (mr *MockApplicationServiceMockRecorder) AddUnits(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) AddUnits(arg0, arg1 any, arg2 ...any) *MockApplicationServiceAddUnitsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockApplicationService)(nil).AddUnits), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockApplicationService)(nil).AddUnits), varargs...) + return &MockApplicationServiceAddUnitsCall{Call: call} +} + +// MockApplicationServiceAddUnitsCall wrap *gomock.Call +type MockApplicationServiceAddUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceAddUnitsCall) Return(arg0 error) *MockApplicationServiceAddUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceAddUnitsCall) Do(f func(context.Context, string, ...service.AddUnitParams) error) *MockApplicationServiceAddUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceAddUnitsCall) DoAndReturn(f func(context.Context, string, ...service.AddUnitParams) error) *MockApplicationServiceAddUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateApplication mocks base method. @@ -112,10 +160,34 @@ func (m *MockApplicationService) CreateApplication(arg0 context.Context, arg1 st } // CreateApplication indicates an expected call of CreateApplication. -func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *MockApplicationServiceCreateApplicationCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + return &MockApplicationServiceCreateApplicationCall{Call: call} +} + +// MockApplicationServiceCreateApplicationCall wrap *gomock.Call +type MockApplicationServiceCreateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceCreateApplicationCall) Return(arg0 error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceCreateApplicationCall) Do(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceCreateApplicationCall) DoAndReturn(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationCharm mocks base method. @@ -127,9 +199,33 @@ func (m *MockApplicationService) UpdateApplicationCharm(arg0 context.Context, ar } // UpdateApplicationCharm indicates an expected call of UpdateApplicationCharm. -func (mr *MockApplicationServiceMockRecorder) UpdateApplicationCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) UpdateApplicationCharm(arg0, arg1, arg2 any) *MockApplicationServiceUpdateApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationCharm", reflect.TypeOf((*MockApplicationService)(nil).UpdateApplicationCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationCharm", reflect.TypeOf((*MockApplicationService)(nil).UpdateApplicationCharm), arg0, arg1, arg2) + return &MockApplicationServiceUpdateApplicationCharmCall{Call: call} +} + +// MockApplicationServiceUpdateApplicationCharmCall wrap *gomock.Call +type MockApplicationServiceUpdateApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceUpdateApplicationCharmCall) Return(arg0 error) *MockApplicationServiceUpdateApplicationCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceUpdateApplicationCharmCall) Do(f func(context.Context, string, service.UpdateCharmParams) error) *MockApplicationServiceUpdateApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceUpdateApplicationCharmCall) DoAndReturn(f func(context.Context, string, service.UpdateCharmParams) error) *MockApplicationServiceUpdateApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStoragePoolGetter is a mock of StoragePoolGetter interface. @@ -165,9 +261,33 @@ func (m *MockStoragePoolGetter) GetStoragePoolByName(arg0 context.Context, arg1 } // GetStoragePoolByName indicates an expected call of GetStoragePoolByName. -func (mr *MockStoragePoolGetterMockRecorder) GetStoragePoolByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStoragePoolGetterMockRecorder) GetStoragePoolByName(arg0, arg1 any) *MockStoragePoolGetterGetStoragePoolByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStoragePoolGetter)(nil).GetStoragePoolByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStoragePoolGetter)(nil).GetStoragePoolByName), arg0, arg1) + return &MockStoragePoolGetterGetStoragePoolByNameCall{Call: call} +} + +// MockStoragePoolGetterGetStoragePoolByNameCall wrap *gomock.Call +type MockStoragePoolGetterGetStoragePoolByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolGetterGetStoragePoolByNameCall) Return(arg0 *storage.Config, arg1 error) *MockStoragePoolGetterGetStoragePoolByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolGetterGetStoragePoolByNameCall) Do(f func(context.Context, string) (*storage.Config, error)) *MockStoragePoolGetterGetStoragePoolByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolGetterGetStoragePoolByNameCall) DoAndReturn(f func(context.Context, string) (*storage.Config, error)) *MockStoragePoolGetterGetStoragePoolByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -203,9 +323,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Space mocks base method. @@ -218,9 +362,33 @@ func (m *MockNetworkService) Space(arg0 context.Context, arg1 string) (*network. } // Space indicates an expected call of Space. -func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *MockNetworkServiceSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + return &MockNetworkServiceSpaceCall{Call: call} +} + +// MockNetworkServiceSpaceCall wrap *gomock.Call +type MockNetworkServiceSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpaceByName mocks base method. @@ -233,9 +401,33 @@ func (m *MockNetworkService) SpaceByName(arg0 context.Context, arg1 string) (*ne } // SpaceByName indicates an expected call of SpaceByName. -func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *MockNetworkServiceSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + return &MockNetworkServiceSpaceByNameCall{Call: call} +} + +// MockNetworkServiceSpaceByNameCall wrap *gomock.Call +type MockNetworkServiceSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExternalControllerService is a mock of ExternalControllerService interface. @@ -270,7 +462,31 @@ func (m *MockExternalControllerService) UpdateExternalController(arg0 context.Co } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *MockExternalControllerServiceUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + return &MockExternalControllerServiceUpdateExternalControllerCall{Call: call} +} + +// MockExternalControllerServiceUpdateExternalControllerCall wrap *gomock.Call +type MockExternalControllerServiceUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Return(arg0 error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Do(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/application_mock.go b/apiserver/facades/client/application/mocks/application_mock.go index 224781c89ca..04985707f9a 100644 --- a/apiserver/facades/client/application/mocks/application_mock.go +++ b/apiserver/facades/client/application/mocks/application_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/apiserver/facades/client/application Backend,StorageInterface,BlockChecker,Model,CaasBrokerInterface,Application,RemoteApplication,Charm,Relation,Unit,RelationUnit,Machine,Generation,Bindings,Resources +// mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/apiserver/facades/client/application Backend,StorageInterface,BlockChecker,Model,CaasBrokerInterface,Application,RemoteApplication,Charm,Relation,Unit,RelationUnit,Machine,Generation,Bindings,Resources // // Package mocks is a generated GoMock package. @@ -69,9 +69,33 @@ func (m *MockBackend) AddApplication(arg0 state.AddApplicationArgs, arg1 objects } // AddApplication indicates an expected call of AddApplication. -func (mr *MockBackendMockRecorder) AddApplication(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddApplication(arg0, arg1 any) *MockBackendAddApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockBackend)(nil).AddApplication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockBackend)(nil).AddApplication), arg0, arg1) + return &MockBackendAddApplicationCall{Call: call} +} + +// MockBackendAddApplicationCall wrap *gomock.Call +type MockBackendAddApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddApplicationCall) Return(arg0 application.Application, arg1 error) *MockBackendAddApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddApplicationCall) Do(f func(state.AddApplicationArgs, objectstore.ObjectStore) (application.Application, error)) *MockBackendAddApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddApplicationCall) DoAndReturn(f func(state.AddApplicationArgs, objectstore.ObjectStore) (application.Application, error)) *MockBackendAddApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddCharmMetadata mocks base method. @@ -84,9 +108,33 @@ func (m *MockBackend) AddCharmMetadata(arg0 state.CharmInfo) (application.Charm, } // AddCharmMetadata indicates an expected call of AddCharmMetadata. -func (mr *MockBackendMockRecorder) AddCharmMetadata(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddCharmMetadata(arg0 any) *MockBackendAddCharmMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockBackend)(nil).AddCharmMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockBackend)(nil).AddCharmMetadata), arg0) + return &MockBackendAddCharmMetadataCall{Call: call} +} + +// MockBackendAddCharmMetadataCall wrap *gomock.Call +type MockBackendAddCharmMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddCharmMetadataCall) Return(arg0 application.Charm, arg1 error) *MockBackendAddCharmMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddCharmMetadataCall) Do(f func(state.CharmInfo) (application.Charm, error)) *MockBackendAddCharmMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddCharmMetadataCall) DoAndReturn(f func(state.CharmInfo) (application.Charm, error)) *MockBackendAddCharmMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddPendingResource mocks base method. @@ -99,9 +147,33 @@ func (m *MockBackend) AddPendingResource(arg0 string, arg1 resource.Resource, ar } // AddPendingResource indicates an expected call of AddPendingResource. -func (mr *MockBackendMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *MockBackendAddPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockBackend)(nil).AddPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockBackend)(nil).AddPendingResource), arg0, arg1, arg2) + return &MockBackendAddPendingResourceCall{Call: call} +} + +// MockBackendAddPendingResourceCall wrap *gomock.Call +type MockBackendAddPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddPendingResourceCall) Return(arg0 string, arg1 error) *MockBackendAddPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddPendingResourceCall) Do(f func(string, resource.Resource, objectstore.ObjectStore) (string, error)) *MockBackendAddPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddPendingResourceCall) DoAndReturn(f func(string, resource.Resource, objectstore.ObjectStore) (string, error)) *MockBackendAddPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRelation mocks base method. @@ -118,9 +190,33 @@ func (m *MockBackend) AddRelation(arg0 ...state.Endpoint) (application.Relation, } // AddRelation indicates an expected call of AddRelation. -func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *MockBackendAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + return &MockBackendAddRelationCall{Call: call} +} + +// MockBackendAddRelationCall wrap *gomock.Call +type MockBackendAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddRelationCall) Return(arg0 application.Relation, arg1 error) *MockBackendAddRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddRelationCall) Do(f func(...state.Endpoint) (application.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddRelationCall) DoAndReturn(f func(...state.Endpoint) (application.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteApplication mocks base method. @@ -133,9 +229,33 @@ func (m *MockBackend) AddRemoteApplication(arg0 state.AddRemoteApplicationParams } // AddRemoteApplication indicates an expected call of AddRemoteApplication. -func (mr *MockBackendMockRecorder) AddRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddRemoteApplication(arg0 any) *MockBackendAddRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockBackend)(nil).AddRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockBackend)(nil).AddRemoteApplication), arg0) + return &MockBackendAddRemoteApplicationCall{Call: call} +} + +// MockBackendAddRemoteApplicationCall wrap *gomock.Call +type MockBackendAddRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddRemoteApplicationCall) Return(arg0 application.RemoteApplication, arg1 error) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddRemoteApplicationCall) Do(f func(state.AddRemoteApplicationParams) (application.RemoteApplication, error)) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddRemoteApplicationCall) DoAndReturn(f func(state.AddRemoteApplicationParams) (application.RemoteApplication, error)) *MockBackendAddRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelUUIDs mocks base method. @@ -148,9 +268,33 @@ func (m *MockBackend) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockBackendMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockBackendMockRecorder) AllModelUUIDs() *MockBackendAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + return &MockBackendAllModelUUIDsCall{Call: call} +} + +// MockBackendAllModelUUIDsCall wrap *gomock.Call +type MockBackendAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllModelUUIDsCall) Do(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -163,9 +307,33 @@ func (m *MockBackend) Application(arg0 string) (application.Application, error) } // Application indicates an expected call of Application. -func (mr *MockBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Application(arg0 any) *MockBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + return &MockBackendApplicationCall{Call: call} +} + +// MockBackendApplicationCall wrap *gomock.Call +type MockBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationCall) Return(arg0 application.Application, arg1 error) *MockBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationCall) Do(f func(string) (application.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationCall) DoAndReturn(f func(string) (application.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationOfferForUUID mocks base method. @@ -178,9 +346,33 @@ func (m *MockBackend) ApplicationOfferForUUID(arg0 string) (*crossmodel.Applicat } // ApplicationOfferForUUID indicates an expected call of ApplicationOfferForUUID. -func (mr *MockBackendMockRecorder) ApplicationOfferForUUID(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ApplicationOfferForUUID(arg0 any) *MockBackendApplicationOfferForUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockBackend)(nil).ApplicationOfferForUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockBackend)(nil).ApplicationOfferForUUID), arg0) + return &MockBackendApplicationOfferForUUIDCall{Call: call} +} + +// MockBackendApplicationOfferForUUIDCall wrap *gomock.Call +type MockBackendApplicationOfferForUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationOfferForUUIDCall) Return(arg0 *crossmodel.ApplicationOffer, arg1 error) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationOfferForUUIDCall) Do(f func(string) (*crossmodel.ApplicationOffer, error)) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationOfferForUUIDCall) DoAndReturn(f func(string) (*crossmodel.ApplicationOffer, error)) *MockBackendApplicationOfferForUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyOperation mocks base method. @@ -192,9 +384,33 @@ func (m *MockBackend) ApplyOperation(arg0 state.ModelOperation) error { } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockBackendMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ApplyOperation(arg0 any) *MockBackendApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBackend)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBackend)(nil).ApplyOperation), arg0) + return &MockBackendApplyOperationCall{Call: call} +} + +// MockBackendApplyOperationCall wrap *gomock.Call +type MockBackendApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplyOperationCall) Return(arg0 error) *MockBackendApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplyOperationCall) Do(f func(state.ModelOperation) error) *MockBackendApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockBackendApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Branch mocks base method. @@ -207,9 +423,33 @@ func (m *MockBackend) Branch(arg0 string) (application.Generation, error) { } // Branch indicates an expected call of Branch. -func (mr *MockBackendMockRecorder) Branch(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Branch(arg0 any) *MockBackendBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branch", reflect.TypeOf((*MockBackend)(nil).Branch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branch", reflect.TypeOf((*MockBackend)(nil).Branch), arg0) + return &MockBackendBranchCall{Call: call} +} + +// MockBackendBranchCall wrap *gomock.Call +type MockBackendBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendBranchCall) Return(arg0 application.Generation, arg1 error) *MockBackendBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendBranchCall) Do(f func(string) (application.Generation, error)) *MockBackendBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendBranchCall) DoAndReturn(f func(string) (application.Generation, error)) *MockBackendBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -222,9 +462,33 @@ func (m *MockBackend) Charm(arg0 string) (application.Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockBackendMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Charm(arg0 any) *MockBackendCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockBackend)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockBackend)(nil).Charm), arg0) + return &MockBackendCharmCall{Call: call} +} + +// MockBackendCharmCall wrap *gomock.Call +type MockBackendCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendCharmCall) Return(arg0 application.Charm, arg1 error) *MockBackendCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendCharmCall) Do(f func(string) (application.Charm, error)) *MockBackendCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendCharmCall) DoAndReturn(f func(string) (application.Charm, error)) *MockBackendCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -236,9 +500,33 @@ func (m *MockBackend) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockBackendMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerTag() *MockBackendControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + return &MockBackendControllerTagCall{Call: call} +} + +// MockBackendControllerTagCall wrap *gomock.Call +type MockBackendControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerTagCall) Return(arg0 names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerTagCall) Do(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InferActiveRelation mocks base method. @@ -255,9 +543,33 @@ func (m *MockBackend) InferActiveRelation(arg0 ...string) (application.Relation, } // InferActiveRelation indicates an expected call of InferActiveRelation. -func (mr *MockBackendMockRecorder) InferActiveRelation(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) InferActiveRelation(arg0 ...any) *MockBackendInferActiveRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferActiveRelation", reflect.TypeOf((*MockBackend)(nil).InferActiveRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferActiveRelation", reflect.TypeOf((*MockBackend)(nil).InferActiveRelation), arg0...) + return &MockBackendInferActiveRelationCall{Call: call} +} + +// MockBackendInferActiveRelationCall wrap *gomock.Call +type MockBackendInferActiveRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendInferActiveRelationCall) Return(arg0 application.Relation, arg1 error) *MockBackendInferActiveRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendInferActiveRelationCall) Do(f func(...string) (application.Relation, error)) *MockBackendInferActiveRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendInferActiveRelationCall) DoAndReturn(f func(...string) (application.Relation, error)) *MockBackendInferActiveRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InferEndpoints mocks base method. @@ -274,9 +586,33 @@ func (m *MockBackend) InferEndpoints(arg0 ...string) ([]state.Endpoint, error) { } // InferEndpoints indicates an expected call of InferEndpoints. -func (mr *MockBackendMockRecorder) InferEndpoints(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) InferEndpoints(arg0 ...any) *MockBackendInferEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferEndpoints", reflect.TypeOf((*MockBackend)(nil).InferEndpoints), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InferEndpoints", reflect.TypeOf((*MockBackend)(nil).InferEndpoints), arg0...) + return &MockBackendInferEndpointsCall{Call: call} +} + +// MockBackendInferEndpointsCall wrap *gomock.Call +type MockBackendInferEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendInferEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockBackendInferEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendInferEndpointsCall) Do(f func(...string) ([]state.Endpoint, error)) *MockBackendInferEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendInferEndpointsCall) DoAndReturn(f func(...string) ([]state.Endpoint, error)) *MockBackendInferEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -289,9 +625,33 @@ func (m *MockBackend) Machine(arg0 string) (application.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Machine(arg0 any) *MockBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + return &MockBackendMachineCall{Call: call} +} + +// MockBackendMachineCall wrap *gomock.Call +type MockBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendMachineCall) Return(arg0 application.Machine, arg1 error) *MockBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendMachineCall) Do(f func(string) (application.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendMachineCall) DoAndReturn(f func(string) (application.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -304,9 +664,33 @@ func (m *MockBackend) Model() (application.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockBackendMockRecorder) Model() *gomock.Call { +func (mr *MockBackendMockRecorder) Model() *MockBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + return &MockBackendModelCall{Call: call} +} + +// MockBackendModelCall wrap *gomock.Call +type MockBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCall) Return(arg0 application.Model, arg1 error) *MockBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCall) Do(f func() (application.Model, error)) *MockBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCall) DoAndReturn(f func() (application.Model, error)) *MockBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConstraints mocks base method. @@ -319,9 +703,33 @@ func (m *MockBackend) ModelConstraints() (constraints.Value, error) { } // ModelConstraints indicates an expected call of ModelConstraints. -func (mr *MockBackendMockRecorder) ModelConstraints() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelConstraints() *MockBackendModelConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockBackend)(nil).ModelConstraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockBackend)(nil).ModelConstraints)) + return &MockBackendModelConstraintsCall{Call: call} +} + +// MockBackendModelConstraintsCall wrap *gomock.Call +type MockBackendModelConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockBackendModelConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelConstraintsCall) Do(f func() (constraints.Value, error)) *MockBackendModelConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockBackendModelConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -333,9 +741,33 @@ func (m *MockBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelUUID() *MockBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + return &MockBackendModelUUIDCall{Call: call} +} + +// MockBackendModelUUIDCall wrap *gomock.Call +type MockBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelUUIDCall) Return(arg0 string) *MockBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelUUIDCall) Do(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelUUIDCall) DoAndReturn(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferConnectionForRelation mocks base method. @@ -348,9 +780,33 @@ func (m *MockBackend) OfferConnectionForRelation(arg0 string) (application.Offer } // OfferConnectionForRelation indicates an expected call of OfferConnectionForRelation. -func (mr *MockBackendMockRecorder) OfferConnectionForRelation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) OfferConnectionForRelation(arg0 any) *MockBackendOfferConnectionForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockBackend)(nil).OfferConnectionForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockBackend)(nil).OfferConnectionForRelation), arg0) + return &MockBackendOfferConnectionForRelationCall{Call: call} +} + +// MockBackendOfferConnectionForRelationCall wrap *gomock.Call +type MockBackendOfferConnectionForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendOfferConnectionForRelationCall) Return(arg0 application.OfferConnection, arg1 error) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendOfferConnectionForRelationCall) Do(f func(string) (application.OfferConnection, error)) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendOfferConnectionForRelationCall) DoAndReturn(f func(string) (application.OfferConnection, error)) *MockBackendOfferConnectionForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -363,9 +819,33 @@ func (m *MockBackend) PrepareCharmUpload(arg0 string) (services.UploadedCharm, e } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockBackendMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) PrepareCharmUpload(arg0 any) *MockBackendPrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockBackend)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockBackend)(nil).PrepareCharmUpload), arg0) + return &MockBackendPrepareCharmUploadCall{Call: call} +} + +// MockBackendPrepareCharmUploadCall wrap *gomock.Call +type MockBackendPrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendPrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockBackendPrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendPrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockBackendPrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendPrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockBackendPrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadSequence mocks base method. @@ -378,9 +858,33 @@ func (m *MockBackend) ReadSequence(arg0 string) (int, error) { } // ReadSequence indicates an expected call of ReadSequence. -func (mr *MockBackendMockRecorder) ReadSequence(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ReadSequence(arg0 any) *MockBackendReadSequenceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSequence", reflect.TypeOf((*MockBackend)(nil).ReadSequence), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSequence", reflect.TypeOf((*MockBackend)(nil).ReadSequence), arg0) + return &MockBackendReadSequenceCall{Call: call} +} + +// MockBackendReadSequenceCall wrap *gomock.Call +type MockBackendReadSequenceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendReadSequenceCall) Return(arg0 int, arg1 error) *MockBackendReadSequenceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendReadSequenceCall) Do(f func(string) (int, error)) *MockBackendReadSequenceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendReadSequenceCall) DoAndReturn(f func(string) (int, error)) *MockBackendReadSequenceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -393,9 +897,33 @@ func (m *MockBackend) Relation(arg0 int) (application.Relation, error) { } // Relation indicates an expected call of Relation. -func (mr *MockBackendMockRecorder) Relation(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Relation(arg0 any) *MockBackendRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockBackend)(nil).Relation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockBackend)(nil).Relation), arg0) + return &MockBackendRelationCall{Call: call} +} + +// MockBackendRelationCall wrap *gomock.Call +type MockBackendRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRelationCall) Return(arg0 application.Relation, arg1 error) *MockBackendRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRelationCall) Do(f func(int) (application.Relation, error)) *MockBackendRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRelationCall) DoAndReturn(f func(int) (application.Relation, error)) *MockBackendRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplication mocks base method. @@ -408,9 +936,33 @@ func (m *MockBackend) RemoteApplication(arg0 string) (application.RemoteApplicat } // RemoteApplication indicates an expected call of RemoteApplication. -func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *MockBackendRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + return &MockBackendRemoteApplicationCall{Call: call} +} + +// MockBackendRemoteApplicationCall wrap *gomock.Call +type MockBackendRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoteApplicationCall) Return(arg0 application.RemoteApplication, arg1 error) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoteApplicationCall) Do(f func(string) (application.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoteApplicationCall) DoAndReturn(f func(string) (application.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemovePendingResources mocks base method. @@ -422,9 +974,33 @@ func (m *MockBackend) RemovePendingResources(arg0 string, arg1 map[string]string } // RemovePendingResources indicates an expected call of RemovePendingResources. -func (mr *MockBackendMockRecorder) RemovePendingResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendMockRecorder) RemovePendingResources(arg0, arg1, arg2 any) *MockBackendRemovePendingResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingResources", reflect.TypeOf((*MockBackend)(nil).RemovePendingResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingResources", reflect.TypeOf((*MockBackend)(nil).RemovePendingResources), arg0, arg1, arg2) + return &MockBackendRemovePendingResourcesCall{Call: call} +} + +// MockBackendRemovePendingResourcesCall wrap *gomock.Call +type MockBackendRemovePendingResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemovePendingResourcesCall) Return(arg0 error) *MockBackendRemovePendingResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemovePendingResourcesCall) Do(f func(string, map[string]string, objectstore.ObjectStore) error) *MockBackendRemovePendingResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemovePendingResourcesCall) DoAndReturn(f func(string, map[string]string, objectstore.ObjectStore) error) *MockBackendRemovePendingResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Resources mocks base method. @@ -436,9 +1012,33 @@ func (m *MockBackend) Resources(arg0 objectstore.ObjectStore) application.Resour } // Resources indicates an expected call of Resources. -func (mr *MockBackendMockRecorder) Resources(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Resources(arg0 any) *MockBackendResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockBackend)(nil).Resources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockBackend)(nil).Resources), arg0) + return &MockBackendResourcesCall{Call: call} +} + +// MockBackendResourcesCall wrap *gomock.Call +type MockBackendResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendResourcesCall) Return(arg0 application.Resources) *MockBackendResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendResourcesCall) Do(f func(objectstore.ObjectStore) application.Resources) *MockBackendResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendResourcesCall) DoAndReturn(f func(objectstore.ObjectStore) application.Resources) *MockBackendResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveEgressNetworks mocks base method. @@ -451,9 +1051,33 @@ func (m *MockBackend) SaveEgressNetworks(arg0 string, arg1 []string) (state.Rela } // SaveEgressNetworks indicates an expected call of SaveEgressNetworks. -func (mr *MockBackendMockRecorder) SaveEgressNetworks(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) SaveEgressNetworks(arg0, arg1 any) *MockBackendSaveEgressNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveEgressNetworks", reflect.TypeOf((*MockBackend)(nil).SaveEgressNetworks), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveEgressNetworks", reflect.TypeOf((*MockBackend)(nil).SaveEgressNetworks), arg0, arg1) + return &MockBackendSaveEgressNetworksCall{Call: call} +} + +// MockBackendSaveEgressNetworksCall wrap *gomock.Call +type MockBackendSaveEgressNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendSaveEgressNetworksCall) Return(arg0 state.RelationNetworks, arg1 error) *MockBackendSaveEgressNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendSaveEgressNetworksCall) Do(f func(string, []string) (state.RelationNetworks, error)) *MockBackendSaveEgressNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendSaveEgressNetworksCall) DoAndReturn(f func(string, []string) (state.RelationNetworks, error)) *MockBackendSaveEgressNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -466,9 +1090,33 @@ func (m *MockBackend) Unit(arg0 string) (application.Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Unit(arg0 any) *MockBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + return &MockBackendUnitCall{Call: call} +} + +// MockBackendUnitCall wrap *gomock.Call +type MockBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUnitCall) Return(arg0 application.Unit, arg1 error) *MockBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUnitCall) Do(f func(string) (application.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUnitCall) DoAndReturn(f func(string) (application.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitsInError mocks base method. @@ -481,9 +1129,33 @@ func (m *MockBackend) UnitsInError() ([]application.Unit, error) { } // UnitsInError indicates an expected call of UnitsInError. -func (mr *MockBackendMockRecorder) UnitsInError() *gomock.Call { +func (mr *MockBackendMockRecorder) UnitsInError() *MockBackendUnitsInErrorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsInError", reflect.TypeOf((*MockBackend)(nil).UnitsInError)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsInError", reflect.TypeOf((*MockBackend)(nil).UnitsInError)) + return &MockBackendUnitsInErrorCall{Call: call} +} + +// MockBackendUnitsInErrorCall wrap *gomock.Call +type MockBackendUnitsInErrorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUnitsInErrorCall) Return(arg0 []application.Unit, arg1 error) *MockBackendUnitsInErrorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUnitsInErrorCall) Do(f func() ([]application.Unit, error)) *MockBackendUnitsInErrorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUnitsInErrorCall) DoAndReturn(f func() ([]application.Unit, error)) *MockBackendUnitsInErrorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -496,9 +1168,33 @@ func (m *MockBackend) UpdateUploadedCharm(arg0 state.CharmInfo) (services.Upload } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockBackendMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) UpdateUploadedCharm(arg0 any) *MockBackendUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockBackend)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockBackend)(nil).UpdateUploadedCharm), arg0) + return &MockBackendUpdateUploadedCharmCall{Call: call} +} + +// MockBackendUpdateUploadedCharmCall wrap *gomock.Call +type MockBackendUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockBackendUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockBackendUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockBackendUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageInterface is a mock of StorageInterface interface. @@ -533,9 +1229,33 @@ func (m *MockStorageInterface) FilesystemAccess() storagecommon.FilesystemAccess } // FilesystemAccess indicates an expected call of FilesystemAccess. -func (mr *MockStorageInterfaceMockRecorder) FilesystemAccess() *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) FilesystemAccess() *MockStorageInterfaceFilesystemAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilesystemAccess", reflect.TypeOf((*MockStorageInterface)(nil).FilesystemAccess)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilesystemAccess", reflect.TypeOf((*MockStorageInterface)(nil).FilesystemAccess)) + return &MockStorageInterfaceFilesystemAccessCall{Call: call} +} + +// MockStorageInterfaceFilesystemAccessCall wrap *gomock.Call +type MockStorageInterfaceFilesystemAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceFilesystemAccessCall) Return(arg0 storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceFilesystemAccessCall) Do(f func() storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceFilesystemAccessCall) DoAndReturn(f func() storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageInstance mocks base method. @@ -548,9 +1268,33 @@ func (m *MockStorageInterface) StorageInstance(arg0 names.StorageTag) (state.Sto } // StorageInstance indicates an expected call of StorageInstance. -func (mr *MockStorageInterfaceMockRecorder) StorageInstance(arg0 any) *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) StorageInstance(arg0 any) *MockStorageInterfaceStorageInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageInterface)(nil).StorageInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageInterface)(nil).StorageInstance), arg0) + return &MockStorageInterfaceStorageInstanceCall{Call: call} +} + +// MockStorageInterfaceStorageInstanceCall wrap *gomock.Call +type MockStorageInterfaceStorageInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceStorageInstanceCall) Return(arg0 state.StorageInstance, arg1 error) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceStorageInstanceCall) Do(f func(names.StorageTag) (state.StorageInstance, error)) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceStorageInstanceCall) DoAndReturn(f func(names.StorageTag) (state.StorageInstance, error)) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStorageAttachments mocks base method. @@ -563,9 +1307,33 @@ func (m *MockStorageInterface) UnitStorageAttachments(arg0 names.UnitTag) ([]sta } // UnitStorageAttachments indicates an expected call of UnitStorageAttachments. -func (mr *MockStorageInterfaceMockRecorder) UnitStorageAttachments(arg0 any) *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) UnitStorageAttachments(arg0 any) *MockStorageInterfaceUnitStorageAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockStorageInterface)(nil).UnitStorageAttachments), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockStorageInterface)(nil).UnitStorageAttachments), arg0) + return &MockStorageInterfaceUnitStorageAttachmentsCall{Call: call} +} + +// MockStorageInterfaceUnitStorageAttachmentsCall wrap *gomock.Call +type MockStorageInterfaceUnitStorageAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) Return(arg0 []state.StorageAttachment, arg1 error) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) Do(f func(names.UnitTag) ([]state.StorageAttachment, error)) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) DoAndReturn(f func(names.UnitTag) ([]state.StorageAttachment, error)) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VolumeAccess mocks base method. @@ -577,9 +1345,33 @@ func (m *MockStorageInterface) VolumeAccess() storagecommon.VolumeAccess { } // VolumeAccess indicates an expected call of VolumeAccess. -func (mr *MockStorageInterfaceMockRecorder) VolumeAccess() *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) VolumeAccess() *MockStorageInterfaceVolumeAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAccess", reflect.TypeOf((*MockStorageInterface)(nil).VolumeAccess)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAccess", reflect.TypeOf((*MockStorageInterface)(nil).VolumeAccess)) + return &MockStorageInterfaceVolumeAccessCall{Call: call} +} + +// MockStorageInterfaceVolumeAccessCall wrap *gomock.Call +type MockStorageInterfaceVolumeAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceVolumeAccessCall) Return(arg0 storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceVolumeAccessCall) Do(f func() storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceVolumeAccessCall) DoAndReturn(f func() storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBlockChecker is a mock of BlockChecker interface. @@ -614,9 +1406,33 @@ func (m *MockBlockChecker) ChangeAllowed(arg0 context.Context) error { } // ChangeAllowed indicates an expected call of ChangeAllowed. -func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerChangeAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + return &MockBlockCheckerChangeAllowedCall{Call: call} +} + +// MockBlockCheckerChangeAllowedCall wrap *gomock.Call +type MockBlockCheckerChangeAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerChangeAllowedCall) Return(arg0 error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllowed mocks base method. @@ -628,9 +1444,33 @@ func (m *MockBlockChecker) RemoveAllowed(arg0 context.Context) error { } // RemoveAllowed indicates an expected call of RemoveAllowed. -func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerRemoveAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + return &MockBlockCheckerRemoveAllowedCall{Call: call} +} + +// MockBlockCheckerRemoveAllowedCall wrap *gomock.Call +type MockBlockCheckerRemoveAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -666,9 +1506,33 @@ func (m *MockModel) AgentVersion() (version.Number, error) { } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockModelMockRecorder) AgentVersion() *gomock.Call { +func (mr *MockModelMockRecorder) AgentVersion() *MockModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + return &MockModelAgentVersionCall{Call: call} +} + +// MockModelAgentVersionCall wrap *gomock.Call +type MockModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAgentVersionCall) Do(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAgentVersionCall) DoAndReturn(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredentialTag mocks base method. @@ -681,9 +1545,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -695,9 +1583,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -709,9 +1621,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -724,9 +1660,33 @@ func (m *MockModel) Config() (*config0.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config0.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config0.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config0.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -738,9 +1698,33 @@ func (m *MockModel) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockModelMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockModelMockRecorder) ControllerUUID() *MockModelControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + return &MockModelControllerUUIDCall{Call: call} +} + +// MockModelControllerUUIDCall wrap *gomock.Call +type MockModelControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelControllerUUIDCall) Return(arg0 string) *MockModelControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelControllerUUIDCall) Do(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelControllerUUIDCall) DoAndReturn(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -753,9 +1737,33 @@ func (m *MockModel) ModelConfig(arg0 context.Context) (*config0.Config, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *MockModelModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + return &MockModelModelConfigCall{Call: call} +} + +// MockModelModelConfigCall wrap *gomock.Call +type MockModelModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelConfigCall) Return(arg0 *config0.Config, arg1 error) *MockModelModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelConfigCall) Do(f func(context.Context) (*config0.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelConfigCall) DoAndReturn(f func(context.Context) (*config0.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -767,9 +1775,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -781,9 +1813,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRangesForMachine mocks base method. @@ -796,9 +1852,33 @@ func (m *MockModel) OpenedPortRangesForMachine(arg0 string) (state.MachinePortRa } // OpenedPortRangesForMachine indicates an expected call of OpenedPortRangesForMachine. -func (mr *MockModelMockRecorder) OpenedPortRangesForMachine(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) OpenedPortRangesForMachine(arg0 any) *MockModelOpenedPortRangesForMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesForMachine", reflect.TypeOf((*MockModel)(nil).OpenedPortRangesForMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesForMachine", reflect.TypeOf((*MockModel)(nil).OpenedPortRangesForMachine), arg0) + return &MockModelOpenedPortRangesForMachineCall{Call: call} +} + +// MockModelOpenedPortRangesForMachineCall wrap *gomock.Call +type MockModelOpenedPortRangesForMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOpenedPortRangesForMachineCall) Return(arg0 state.MachinePortRanges, arg1 error) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOpenedPortRangesForMachineCall) Do(f func(string) (state.MachinePortRanges, error)) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOpenedPortRangesForMachineCall) DoAndReturn(f func(string) (state.MachinePortRanges, error)) *MockModelOpenedPortRangesForMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -810,9 +1890,33 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -824,9 +1928,33 @@ func (m *MockModel) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockModelMockRecorder) Tag() *gomock.Call { +func (mr *MockModelMockRecorder) Tag() *MockModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + return &MockModelTagCall{Call: call} +} + +// MockModelTagCall wrap *gomock.Call +type MockModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTagCall) Return(arg0 names.Tag) *MockModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTagCall) Do(f func() names.Tag) *MockModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTagCall) DoAndReturn(f func() names.Tag) *MockModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -838,9 +1966,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UUID mocks base method. @@ -852,9 +2004,33 @@ func (m *MockModel) UUID() string { } // UUID indicates an expected call of UUID. -func (mr *MockModelMockRecorder) UUID() *gomock.Call { +func (mr *MockModelMockRecorder) UUID() *MockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + return &MockModelUUIDCall{Call: call} +} + +// MockModelUUIDCall wrap *gomock.Call +type MockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUUIDCall) Return(arg0 string) *MockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUUIDCall) Do(f func() string) *MockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUUIDCall) DoAndReturn(f func() string) *MockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCaasBrokerInterface is a mock of CaasBrokerInterface interface. @@ -889,9 +2065,33 @@ func (m *MockCaasBrokerInterface) ValidateStorageClass(arg0 context.Context, arg } // ValidateStorageClass indicates an expected call of ValidateStorageClass. -func (mr *MockCaasBrokerInterfaceMockRecorder) ValidateStorageClass(arg0, arg1 any) *gomock.Call { +func (mr *MockCaasBrokerInterfaceMockRecorder) ValidateStorageClass(arg0, arg1 any) *MockCaasBrokerInterfaceValidateStorageClassCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockCaasBrokerInterface)(nil).ValidateStorageClass), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockCaasBrokerInterface)(nil).ValidateStorageClass), arg0, arg1) + return &MockCaasBrokerInterfaceValidateStorageClassCall{Call: call} +} + +// MockCaasBrokerInterfaceValidateStorageClassCall wrap *gomock.Call +type MockCaasBrokerInterfaceValidateStorageClassCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCaasBrokerInterfaceValidateStorageClassCall) Return(arg0 error) *MockCaasBrokerInterfaceValidateStorageClassCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCaasBrokerInterfaceValidateStorageClassCall) Do(f func(context.Context, map[string]any) error) *MockCaasBrokerInterfaceValidateStorageClassCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCaasBrokerInterfaceValidateStorageClassCall) DoAndReturn(f func(context.Context, map[string]any) error) *MockCaasBrokerInterfaceValidateStorageClassCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -904,9 +2104,33 @@ func (m *MockCaasBrokerInterface) Version() (*version.Number, error) { } // Version indicates an expected call of Version. -func (mr *MockCaasBrokerInterfaceMockRecorder) Version() *gomock.Call { +func (mr *MockCaasBrokerInterfaceMockRecorder) Version() *MockCaasBrokerInterfaceVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCaasBrokerInterface)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCaasBrokerInterface)(nil).Version)) + return &MockCaasBrokerInterfaceVersionCall{Call: call} +} + +// MockCaasBrokerInterfaceVersionCall wrap *gomock.Call +type MockCaasBrokerInterfaceVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCaasBrokerInterfaceVersionCall) Return(arg0 *version.Number, arg1 error) *MockCaasBrokerInterfaceVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCaasBrokerInterfaceVersionCall) Do(f func() (*version.Number, error)) *MockCaasBrokerInterfaceVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCaasBrokerInterfaceVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockCaasBrokerInterfaceVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -942,9 +2166,33 @@ func (m *MockApplication) AddUnit(arg0 state.AddUnitParams) (application.Unit, e } // AddUnit indicates an expected call of AddUnit. -func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *MockApplicationAddUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + return &MockApplicationAddUnitCall{Call: call} +} + +// MockApplicationAddUnitCall wrap *gomock.Call +type MockApplicationAddUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddUnitCall) Return(arg0 application.Unit, arg1 error) *MockApplicationAddUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddUnitCall) Do(f func(state.AddUnitParams) (application.Unit, error)) *MockApplicationAddUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddUnitCall) DoAndReturn(f func(state.AddUnitParams) (application.Unit, error)) *MockApplicationAddUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentTools mocks base method. @@ -957,9 +2205,33 @@ func (m *MockApplication) AgentTools() (*tools.Tools, error) { } // AgentTools indicates an expected call of AgentTools. -func (mr *MockApplicationMockRecorder) AgentTools() *gomock.Call { +func (mr *MockApplicationMockRecorder) AgentTools() *MockApplicationAgentToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockApplication)(nil).AgentTools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockApplication)(nil).AgentTools)) + return &MockApplicationAgentToolsCall{Call: call} +} + +// MockApplicationAgentToolsCall wrap *gomock.Call +type MockApplicationAgentToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAgentToolsCall) Return(arg0 *tools.Tools, arg1 error) *MockApplicationAgentToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAgentToolsCall) Do(f func() (*tools.Tools, error)) *MockApplicationAgentToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAgentToolsCall) DoAndReturn(f func() (*tools.Tools, error)) *MockApplicationAgentToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllUnits mocks base method. @@ -972,9 +2244,33 @@ func (m *MockApplication) AllUnits() ([]application.Unit, error) { } // AllUnits indicates an expected call of AllUnits. -func (mr *MockApplicationMockRecorder) AllUnits() *gomock.Call { +func (mr *MockApplicationMockRecorder) AllUnits() *MockApplicationAllUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + return &MockApplicationAllUnitsCall{Call: call} +} + +// MockApplicationAllUnitsCall wrap *gomock.Call +type MockApplicationAllUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAllUnitsCall) Return(arg0 []application.Unit, arg1 error) *MockApplicationAllUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAllUnitsCall) Do(f func() ([]application.Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAllUnitsCall) DoAndReturn(f func() ([]application.Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationConfig mocks base method. @@ -987,9 +2283,33 @@ func (m *MockApplication) ApplicationConfig() (config.ConfigAttributes, error) { } // ApplicationConfig indicates an expected call of ApplicationConfig. -func (mr *MockApplicationMockRecorder) ApplicationConfig() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationConfig() *MockApplicationApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + return &MockApplicationApplicationConfigCall{Call: call} +} + +// MockApplicationApplicationConfigCall wrap *gomock.Call +type MockApplicationApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationConfigCall) Return(arg0 config.ConfigAttributes, arg1 error) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationConfigCall) Do(f func() (config.ConfigAttributes, error)) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationConfigCall) DoAndReturn(f func() (config.ConfigAttributes, error)) *MockApplicationApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationTag mocks base method. @@ -1001,9 +2321,33 @@ func (m *MockApplication) ApplicationTag() names.ApplicationTag { } // ApplicationTag indicates an expected call of ApplicationTag. -func (mr *MockApplicationMockRecorder) ApplicationTag() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationTag() *MockApplicationApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + return &MockApplicationApplicationTagCall{Call: call} +} + +// MockApplicationApplicationTagCall wrap *gomock.Call +type MockApplicationApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ChangeScale mocks base method. @@ -1016,9 +2360,33 @@ func (m *MockApplication) ChangeScale(arg0 int) (int, error) { } // ChangeScale indicates an expected call of ChangeScale. -func (mr *MockApplicationMockRecorder) ChangeScale(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) ChangeScale(arg0 any) *MockApplicationChangeScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeScale", reflect.TypeOf((*MockApplication)(nil).ChangeScale), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeScale", reflect.TypeOf((*MockApplication)(nil).ChangeScale), arg0) + return &MockApplicationChangeScaleCall{Call: call} +} + +// MockApplicationChangeScaleCall wrap *gomock.Call +type MockApplicationChangeScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationChangeScaleCall) Return(arg0 int, arg1 error) *MockApplicationChangeScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationChangeScaleCall) Do(f func(int) (int, error)) *MockApplicationChangeScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationChangeScaleCall) DoAndReturn(f func(int) (int, error)) *MockApplicationChangeScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -1032,9 +2400,33 @@ func (m *MockApplication) Charm() (application.Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 application.Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (application.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (application.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmConfig mocks base method. @@ -1047,9 +2439,33 @@ func (m *MockApplication) CharmConfig(arg0 string) (charm.Settings, error) { } // CharmConfig indicates an expected call of CharmConfig. -func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *MockApplicationCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + return &MockApplicationCharmConfigCall{Call: call} +} + +// MockApplicationCharmConfigCall wrap *gomock.Call +type MockApplicationCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmConfigCall) Return(arg0 charm.Settings, arg1 error) *MockApplicationCharmConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmConfigCall) Do(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmConfigCall) DoAndReturn(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -1061,9 +2477,33 @@ func (m *MockApplication) CharmOrigin() *state.CharmOrigin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -1076,9 +2516,33 @@ func (m *MockApplication) CharmURL() (*string, bool) { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 *string, arg1 bool) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClearExposed mocks base method. @@ -1090,9 +2554,33 @@ func (m *MockApplication) ClearExposed() error { } // ClearExposed indicates an expected call of ClearExposed. -func (mr *MockApplicationMockRecorder) ClearExposed() *gomock.Call { +func (mr *MockApplicationMockRecorder) ClearExposed() *MockApplicationClearExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearExposed", reflect.TypeOf((*MockApplication)(nil).ClearExposed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearExposed", reflect.TypeOf((*MockApplication)(nil).ClearExposed)) + return &MockApplicationClearExposedCall{Call: call} +} + +// MockApplicationClearExposedCall wrap *gomock.Call +type MockApplicationClearExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationClearExposedCall) Return(arg0 error) *MockApplicationClearExposedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationClearExposedCall) Do(f func() error) *MockApplicationClearExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationClearExposedCall) DoAndReturn(f func() error) *MockApplicationClearExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -1105,9 +2593,33 @@ func (m *MockApplication) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockApplicationMockRecorder) Constraints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Constraints() *MockApplicationConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + return &MockApplicationConstraintsCall{Call: call} +} + +// MockApplicationConstraintsCall wrap *gomock.Call +type MockApplicationConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockApplicationConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationConstraintsCall) Do(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1119,9 +2631,33 @@ func (m *MockApplication) Destroy(arg0 objectstore.ObjectStore) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockApplicationMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Destroy(arg0 any) *MockApplicationDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockApplication)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockApplication)(nil).Destroy), arg0) + return &MockApplicationDestroyCall{Call: call} +} + +// MockApplicationDestroyCall wrap *gomock.Call +type MockApplicationDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDestroyCall) Return(arg0 error) *MockApplicationDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDestroyCall) Do(f func(objectstore.ObjectStore) error) *MockApplicationDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDestroyCall) DoAndReturn(f func(objectstore.ObjectStore) error) *MockApplicationDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyOperation mocks base method. @@ -1133,9 +2669,33 @@ func (m *MockApplication) DestroyOperation(arg0 objectstore.ObjectStore) *state. } // DestroyOperation indicates an expected call of DestroyOperation. -func (mr *MockApplicationMockRecorder) DestroyOperation(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) DestroyOperation(arg0 any) *MockApplicationDestroyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockApplication)(nil).DestroyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockApplication)(nil).DestroyOperation), arg0) + return &MockApplicationDestroyOperationCall{Call: call} +} + +// MockApplicationDestroyOperationCall wrap *gomock.Call +type MockApplicationDestroyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDestroyOperationCall) Return(arg0 *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDestroyOperationCall) Do(f func(objectstore.ObjectStore) *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDestroyOperationCall) DoAndReturn(f func(objectstore.ObjectStore) *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointBindings mocks base method. @@ -1148,9 +2708,33 @@ func (m *MockApplication) EndpointBindings() (application.Bindings, error) { } // EndpointBindings indicates an expected call of EndpointBindings. -func (mr *MockApplicationMockRecorder) EndpointBindings() *gomock.Call { +func (mr *MockApplicationMockRecorder) EndpointBindings() *MockApplicationEndpointBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + return &MockApplicationEndpointBindingsCall{Call: call} +} + +// MockApplicationEndpointBindingsCall wrap *gomock.Call +type MockApplicationEndpointBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEndpointBindingsCall) Return(arg0 application.Bindings, arg1 error) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEndpointBindingsCall) Do(f func() (application.Bindings, error)) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEndpointBindingsCall) DoAndReturn(f func() (application.Bindings, error)) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -1163,9 +2747,33 @@ func (m *MockApplication) Endpoints() ([]state.Endpoint, error) { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Endpoints() *MockApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplication)(nil).Endpoints)) + return &MockApplicationEndpointsCall{Call: call} +} + +// MockApplicationEndpointsCall wrap *gomock.Call +type MockApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockApplicationEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEndpointsCall) Do(f func() ([]state.Endpoint, error)) *MockApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEndpointsCall) DoAndReturn(f func() ([]state.Endpoint, error)) *MockApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExposedEndpoints mocks base method. @@ -1177,9 +2785,33 @@ func (m *MockApplication) ExposedEndpoints() map[string]state.ExposedEndpoint { } // ExposedEndpoints indicates an expected call of ExposedEndpoints. -func (mr *MockApplicationMockRecorder) ExposedEndpoints() *gomock.Call { +func (mr *MockApplicationMockRecorder) ExposedEndpoints() *MockApplicationExposedEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + return &MockApplicationExposedEndpointsCall{Call: call} +} + +// MockApplicationExposedEndpointsCall wrap *gomock.Call +type MockApplicationExposedEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposedEndpointsCall) Return(arg0 map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposedEndpointsCall) Do(f func() map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposedEndpointsCall) DoAndReturn(f func() map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsExposed mocks base method. @@ -1191,9 +2823,33 @@ func (m *MockApplication) IsExposed() bool { } // IsExposed indicates an expected call of IsExposed. -func (mr *MockApplicationMockRecorder) IsExposed() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsExposed() *MockApplicationIsExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockApplication)(nil).IsExposed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockApplication)(nil).IsExposed)) + return &MockApplicationIsExposedCall{Call: call} +} + +// MockApplicationIsExposedCall wrap *gomock.Call +type MockApplicationIsExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsExposedCall) Return(arg0 bool) *MockApplicationIsExposedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsExposedCall) Do(f func() bool) *MockApplicationIsExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsExposedCall) DoAndReturn(f func() bool) *MockApplicationIsExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsPrincipal mocks base method. @@ -1205,9 +2861,33 @@ func (m *MockApplication) IsPrincipal() bool { } // IsPrincipal indicates an expected call of IsPrincipal. -func (mr *MockApplicationMockRecorder) IsPrincipal() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsPrincipal() *MockApplicationIsPrincipalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + return &MockApplicationIsPrincipalCall{Call: call} +} + +// MockApplicationIsPrincipalCall wrap *gomock.Call +type MockApplicationIsPrincipalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsPrincipalCall) Return(arg0 bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsPrincipalCall) Do(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsPrincipalCall) DoAndReturn(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsRemote mocks base method. @@ -1219,9 +2899,33 @@ func (m *MockApplication) IsRemote() bool { } // IsRemote indicates an expected call of IsRemote. -func (mr *MockApplicationMockRecorder) IsRemote() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsRemote() *MockApplicationIsRemoteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRemote", reflect.TypeOf((*MockApplication)(nil).IsRemote)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRemote", reflect.TypeOf((*MockApplication)(nil).IsRemote)) + return &MockApplicationIsRemoteCall{Call: call} +} + +// MockApplicationIsRemoteCall wrap *gomock.Call +type MockApplicationIsRemoteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsRemoteCall) Return(arg0 bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsRemoteCall) Do(f func() bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsRemoteCall) DoAndReturn(f func() bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -1233,9 +2937,33 @@ func (m *MockApplication) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockApplicationMockRecorder) Life() *gomock.Call { +func (mr *MockApplicationMockRecorder) Life() *MockApplicationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + return &MockApplicationLifeCall{Call: call} +} + +// MockApplicationLifeCall wrap *gomock.Call +type MockApplicationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationLifeCall) Return(arg0 state.Life) *MockApplicationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationLifeCall) Do(f func() state.Life) *MockApplicationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationLifeCall) DoAndReturn(f func() state.Life) *MockApplicationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MergeBindings mocks base method. @@ -1247,9 +2975,33 @@ func (m *MockApplication) MergeBindings(arg0 *state.Bindings, arg1 bool) error { } // MergeBindings indicates an expected call of MergeBindings. -func (mr *MockApplicationMockRecorder) MergeBindings(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) MergeBindings(arg0, arg1 any) *MockApplicationMergeBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplication)(nil).MergeBindings), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplication)(nil).MergeBindings), arg0, arg1) + return &MockApplicationMergeBindingsCall{Call: call} +} + +// MockApplicationMergeBindingsCall wrap *gomock.Call +type MockApplicationMergeBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMergeBindingsCall) Return(arg0 error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMergeBindingsCall) Do(f func(*state.Bindings, bool) error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMergeBindingsCall) DoAndReturn(f func(*state.Bindings, bool) error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MergeExposeSettings mocks base method. @@ -1261,9 +3013,33 @@ func (m *MockApplication) MergeExposeSettings(arg0 map[string]state.ExposedEndpo } // MergeExposeSettings indicates an expected call of MergeExposeSettings. -func (mr *MockApplicationMockRecorder) MergeExposeSettings(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) MergeExposeSettings(arg0 any) *MockApplicationMergeExposeSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeExposeSettings", reflect.TypeOf((*MockApplication)(nil).MergeExposeSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeExposeSettings", reflect.TypeOf((*MockApplication)(nil).MergeExposeSettings), arg0) + return &MockApplicationMergeExposeSettingsCall{Call: call} +} + +// MockApplicationMergeExposeSettingsCall wrap *gomock.Call +type MockApplicationMergeExposeSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMergeExposeSettingsCall) Return(arg0 error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMergeExposeSettingsCall) Do(f func(map[string]state.ExposedEndpoint) error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMergeExposeSettingsCall) DoAndReturn(f func(map[string]state.ExposedEndpoint) error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -1275,9 +3051,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relations mocks base method. @@ -1290,9 +3090,33 @@ func (m *MockApplication) Relations() ([]application.Relation, error) { } // Relations indicates an expected call of Relations. -func (mr *MockApplicationMockRecorder) Relations() *gomock.Call { +func (mr *MockApplicationMockRecorder) Relations() *MockApplicationRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + return &MockApplicationRelationsCall{Call: call} +} + +// MockApplicationRelationsCall wrap *gomock.Call +type MockApplicationRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationRelationsCall) Return(arg0 []application.Relation, arg1 error) *MockApplicationRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationRelationsCall) Do(f func() ([]application.Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationRelationsCall) DoAndReturn(f func() ([]application.Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharm mocks base method. @@ -1304,9 +3128,33 @@ func (m *MockApplication) SetCharm(arg0 state.SetCharmConfig, arg1 objectstore.O } // SetCharm indicates an expected call of SetCharm. -func (mr *MockApplicationMockRecorder) SetCharm(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetCharm(arg0, arg1 any) *MockApplicationSetCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplication)(nil).SetCharm), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplication)(nil).SetCharm), arg0, arg1) + return &MockApplicationSetCharmCall{Call: call} +} + +// MockApplicationSetCharmCall wrap *gomock.Call +type MockApplicationSetCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetCharmCall) Return(arg0 error) *MockApplicationSetCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetCharmCall) Do(f func(state.SetCharmConfig, objectstore.ObjectStore) error) *MockApplicationSetCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetCharmCall) DoAndReturn(f func(state.SetCharmConfig, objectstore.ObjectStore) error) *MockApplicationSetCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -1318,9 +3166,33 @@ func (m *MockApplication) SetConstraints(arg0 constraints.Value) error { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *MockApplicationSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + return &MockApplicationSetConstraintsCall{Call: call} +} + +// MockApplicationSetConstraintsCall wrap *gomock.Call +type MockApplicationSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetConstraintsCall) Return(arg0 error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetConstraintsCall) Do(f func(constraints.Value) error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetConstraintsCall) DoAndReturn(f func(constraints.Value) error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMinUnits mocks base method. @@ -1332,9 +3204,33 @@ func (m *MockApplication) SetMinUnits(arg0 int) error { } // SetMinUnits indicates an expected call of SetMinUnits. -func (mr *MockApplicationMockRecorder) SetMinUnits(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetMinUnits(arg0 any) *MockApplicationSetMinUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMinUnits", reflect.TypeOf((*MockApplication)(nil).SetMinUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMinUnits", reflect.TypeOf((*MockApplication)(nil).SetMinUnits), arg0) + return &MockApplicationSetMinUnitsCall{Call: call} +} + +// MockApplicationSetMinUnitsCall wrap *gomock.Call +type MockApplicationSetMinUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetMinUnitsCall) Return(arg0 error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetMinUnitsCall) Do(f func(int) error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetMinUnitsCall) DoAndReturn(f func(int) error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetScale mocks base method. @@ -1346,9 +3242,33 @@ func (m *MockApplication) SetScale(arg0 int, arg1 int64, arg2 bool) error { } // SetScale indicates an expected call of SetScale. -func (mr *MockApplicationMockRecorder) SetScale(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetScale(arg0, arg1, arg2 any) *MockApplicationSetScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetScale", reflect.TypeOf((*MockApplication)(nil).SetScale), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetScale", reflect.TypeOf((*MockApplication)(nil).SetScale), arg0, arg1, arg2) + return &MockApplicationSetScaleCall{Call: call} +} + +// MockApplicationSetScaleCall wrap *gomock.Call +type MockApplicationSetScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetScaleCall) Return(arg0 error) *MockApplicationSetScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetScaleCall) Do(f func(int, int64, bool) error) *MockApplicationSetScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetScaleCall) DoAndReturn(f func(int, int64, bool) error) *MockApplicationSetScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnsetExposeSettings mocks base method. @@ -1360,9 +3280,33 @@ func (m *MockApplication) UnsetExposeSettings(arg0 []string) error { } // UnsetExposeSettings indicates an expected call of UnsetExposeSettings. -func (mr *MockApplicationMockRecorder) UnsetExposeSettings(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UnsetExposeSettings(arg0 any) *MockApplicationUnsetExposeSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetExposeSettings", reflect.TypeOf((*MockApplication)(nil).UnsetExposeSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetExposeSettings", reflect.TypeOf((*MockApplication)(nil).UnsetExposeSettings), arg0) + return &MockApplicationUnsetExposeSettingsCall{Call: call} +} + +// MockApplicationUnsetExposeSettingsCall wrap *gomock.Call +type MockApplicationUnsetExposeSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnsetExposeSettingsCall) Return(arg0 error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnsetExposeSettingsCall) Do(f func([]string) error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnsetExposeSettingsCall) DoAndReturn(f func([]string) error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationBase mocks base method. @@ -1374,9 +3318,33 @@ func (m *MockApplication) UpdateApplicationBase(arg0 state.Base, arg1 bool) erro } // UpdateApplicationBase indicates an expected call of UpdateApplicationBase. -func (mr *MockApplicationMockRecorder) UpdateApplicationBase(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateApplicationBase(arg0, arg1 any) *MockApplicationUpdateApplicationBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationBase", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationBase), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationBase", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationBase), arg0, arg1) + return &MockApplicationUpdateApplicationBaseCall{Call: call} +} + +// MockApplicationUpdateApplicationBaseCall wrap *gomock.Call +type MockApplicationUpdateApplicationBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateApplicationBaseCall) Return(arg0 error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateApplicationBaseCall) Do(f func(state.Base, bool) error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateApplicationBaseCall) DoAndReturn(f func(state.Base, bool) error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationConfig mocks base method. @@ -1388,9 +3356,33 @@ func (m *MockApplication) UpdateApplicationConfig(arg0 config.ConfigAttributes, } // UpdateApplicationConfig indicates an expected call of UpdateApplicationConfig. -func (mr *MockApplicationMockRecorder) UpdateApplicationConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateApplicationConfig(arg0, arg1, arg2, arg3 any) *MockApplicationUpdateApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationConfig", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationConfig), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationConfig", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationConfig), arg0, arg1, arg2, arg3) + return &MockApplicationUpdateApplicationConfigCall{Call: call} +} + +// MockApplicationUpdateApplicationConfigCall wrap *gomock.Call +type MockApplicationUpdateApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateApplicationConfigCall) Return(arg0 error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateApplicationConfigCall) Do(f func(config.ConfigAttributes, []string, environschema.Fields, schema.Defaults) error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateApplicationConfigCall) DoAndReturn(f func(config.ConfigAttributes, []string, environschema.Fields, schema.Defaults) error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCharmConfig mocks base method. @@ -1402,9 +3394,33 @@ func (m *MockApplication) UpdateCharmConfig(arg0 string, arg1 charm.Settings) er } // UpdateCharmConfig indicates an expected call of UpdateCharmConfig. -func (mr *MockApplicationMockRecorder) UpdateCharmConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateCharmConfig(arg0, arg1 any) *MockApplicationUpdateCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmConfig", reflect.TypeOf((*MockApplication)(nil).UpdateCharmConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmConfig", reflect.TypeOf((*MockApplication)(nil).UpdateCharmConfig), arg0, arg1) + return &MockApplicationUpdateCharmConfigCall{Call: call} +} + +// MockApplicationUpdateCharmConfigCall wrap *gomock.Call +type MockApplicationUpdateCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateCharmConfigCall) Return(arg0 error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateCharmConfigCall) Do(f func(string, charm.Settings) error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateCharmConfigCall) DoAndReturn(f func(string, charm.Settings) error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplication is a mock of RemoteApplication interface. @@ -1439,9 +3455,33 @@ func (m *MockRemoteApplication) AddEndpoints(arg0 []charm.Relation) error { } // AddEndpoints indicates an expected call of AddEndpoints. -func (mr *MockRemoteApplicationMockRecorder) AddEndpoints(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) AddEndpoints(arg0 any) *MockRemoteApplicationAddEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoints", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoints", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoints), arg0) + return &MockRemoteApplicationAddEndpointsCall{Call: call} +} + +// MockRemoteApplicationAddEndpointsCall wrap *gomock.Call +type MockRemoteApplicationAddEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationAddEndpointsCall) Return(arg0 error) *MockRemoteApplicationAddEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationAddEndpointsCall) Do(f func([]charm.Relation) error) *MockRemoteApplicationAddEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationAddEndpointsCall) DoAndReturn(f func([]charm.Relation) error) *MockRemoteApplicationAddEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1453,9 +3493,33 @@ func (m *MockRemoteApplication) Destroy() error { } // Destroy indicates an expected call of Destroy. -func (mr *MockRemoteApplicationMockRecorder) Destroy() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Destroy() *MockRemoteApplicationDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockRemoteApplication)(nil).Destroy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockRemoteApplication)(nil).Destroy)) + return &MockRemoteApplicationDestroyCall{Call: call} +} + +// MockRemoteApplicationDestroyCall wrap *gomock.Call +type MockRemoteApplicationDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationDestroyCall) Return(arg0 error) *MockRemoteApplicationDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationDestroyCall) Do(f func() error) *MockRemoteApplicationDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationDestroyCall) DoAndReturn(f func() error) *MockRemoteApplicationDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyOperation mocks base method. @@ -1467,9 +3531,33 @@ func (m *MockRemoteApplication) DestroyOperation(arg0 bool) *state.DestroyRemote } // DestroyOperation indicates an expected call of DestroyOperation. -func (mr *MockRemoteApplicationMockRecorder) DestroyOperation(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) DestroyOperation(arg0 any) *MockRemoteApplicationDestroyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockRemoteApplication)(nil).DestroyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockRemoteApplication)(nil).DestroyOperation), arg0) + return &MockRemoteApplicationDestroyOperationCall{Call: call} +} + +// MockRemoteApplicationDestroyOperationCall wrap *gomock.Call +type MockRemoteApplicationDestroyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationDestroyOperationCall) Return(arg0 *state.DestroyRemoteApplicationOperation) *MockRemoteApplicationDestroyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationDestroyOperationCall) Do(f func(bool) *state.DestroyRemoteApplicationOperation) *MockRemoteApplicationDestroyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationDestroyOperationCall) DoAndReturn(f func(bool) *state.DestroyRemoteApplicationOperation) *MockRemoteApplicationDestroyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -1482,9 +3570,33 @@ func (m *MockRemoteApplication) Endpoints() ([]state.Endpoint, error) { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockRemoteApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Endpoints() *MockRemoteApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + return &MockRemoteApplicationEndpointsCall{Call: call} +} + +// MockRemoteApplicationEndpointsCall wrap *gomock.Call +type MockRemoteApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationEndpointsCall) Do(f func() ([]state.Endpoint, error)) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationEndpointsCall) DoAndReturn(f func() ([]state.Endpoint, error)) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -1496,9 +3608,33 @@ func (m *MockRemoteApplication) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockRemoteApplicationMockRecorder) Life() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Life() *MockRemoteApplicationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockRemoteApplication)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockRemoteApplication)(nil).Life)) + return &MockRemoteApplicationLifeCall{Call: call} +} + +// MockRemoteApplicationLifeCall wrap *gomock.Call +type MockRemoteApplicationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationLifeCall) Return(arg0 state.Life) *MockRemoteApplicationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationLifeCall) Do(f func() state.Life) *MockRemoteApplicationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationLifeCall) DoAndReturn(f func() state.Life) *MockRemoteApplicationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -1510,9 +3646,33 @@ func (m *MockRemoteApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockRemoteApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Name() *MockRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + return &MockRemoteApplicationNameCall{Call: call} +} + +// MockRemoteApplicationNameCall wrap *gomock.Call +type MockRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationNameCall) Return(arg0 string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationNameCall) Do(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationNameCall) DoAndReturn(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModel mocks base method. @@ -1524,9 +3684,33 @@ func (m *MockRemoteApplication) SourceModel() names.ModelTag { } // SourceModel indicates an expected call of SourceModel. -func (mr *MockRemoteApplicationMockRecorder) SourceModel() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) SourceModel() *MockRemoteApplicationSourceModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModel", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModel", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModel)) + return &MockRemoteApplicationSourceModelCall{Call: call} +} + +// MockRemoteApplicationSourceModelCall wrap *gomock.Call +type MockRemoteApplicationSourceModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSourceModelCall) Return(arg0 names.ModelTag) *MockRemoteApplicationSourceModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSourceModelCall) Do(f func() names.ModelTag) *MockRemoteApplicationSourceModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSourceModelCall) DoAndReturn(f func() names.ModelTag) *MockRemoteApplicationSourceModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -1539,9 +3723,33 @@ func (m *MockRemoteApplication) Status() (status.StatusInfo, error) { } // Status indicates an expected call of Status. -func (mr *MockRemoteApplicationMockRecorder) Status() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Status() *MockRemoteApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + return &MockRemoteApplicationStatusCall{Call: call} +} + +// MockRemoteApplicationStatusCall wrap *gomock.Call +type MockRemoteApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationStatusCall) Do(f func() (status.StatusInfo, error)) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockRemoteApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -1576,9 +3784,33 @@ func (m *MockCharm) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmMockRecorder) Actions() *MockCharmActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + return &MockCharmActionsCall{Call: call} +} + +// MockCharmActionsCall wrap *gomock.Call +type MockCharmActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmActionsCall) Return(arg0 *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmActionsCall) Do(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -1590,9 +3822,33 @@ func (m *MockCharm) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmMockRecorder) Config() *gomock.Call { +func (mr *MockCharmMockRecorder) Config() *MockCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + return &MockCharmConfigCall{Call: call} +} + +// MockCharmConfigCall wrap *gomock.Call +type MockCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmConfigCall) Return(arg0 *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmConfigCall) Do(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUploaded mocks base method. @@ -1604,9 +3860,33 @@ func (m *MockCharm) IsUploaded() bool { } // IsUploaded indicates an expected call of IsUploaded. -func (mr *MockCharmMockRecorder) IsUploaded() *gomock.Call { +func (mr *MockCharmMockRecorder) IsUploaded() *MockCharmIsUploadedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockCharm)(nil).IsUploaded)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockCharm)(nil).IsUploaded)) + return &MockCharmIsUploadedCall{Call: call} +} + +// MockCharmIsUploadedCall wrap *gomock.Call +type MockCharmIsUploadedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmIsUploadedCall) Return(arg0 bool) *MockCharmIsUploadedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmIsUploadedCall) Do(f func() bool) *MockCharmIsUploadedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmIsUploadedCall) DoAndReturn(f func() bool) *MockCharmIsUploadedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -1618,9 +3898,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -1632,9 +3936,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -1646,9 +3974,33 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelation is a mock of Relation interface. @@ -1684,9 +4036,33 @@ func (m *MockRelation) AllRemoteUnits(arg0 string) ([]application.RelationUnit, } // AllRemoteUnits indicates an expected call of AllRemoteUnits. -func (mr *MockRelationMockRecorder) AllRemoteUnits(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) AllRemoteUnits(arg0 any) *MockRelationAllRemoteUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteUnits", reflect.TypeOf((*MockRelation)(nil).AllRemoteUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteUnits", reflect.TypeOf((*MockRelation)(nil).AllRemoteUnits), arg0) + return &MockRelationAllRemoteUnitsCall{Call: call} +} + +// MockRelationAllRemoteUnitsCall wrap *gomock.Call +type MockRelationAllRemoteUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationAllRemoteUnitsCall) Return(arg0 []application.RelationUnit, arg1 error) *MockRelationAllRemoteUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationAllRemoteUnitsCall) Do(f func(string) ([]application.RelationUnit, error)) *MockRelationAllRemoteUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationAllRemoteUnitsCall) DoAndReturn(f func(string) ([]application.RelationUnit, error)) *MockRelationAllRemoteUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationSettings mocks base method. @@ -1699,9 +4075,33 @@ func (m *MockRelation) ApplicationSettings(arg0 string) (map[string]any, error) } // ApplicationSettings indicates an expected call of ApplicationSettings. -func (mr *MockRelationMockRecorder) ApplicationSettings(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) ApplicationSettings(arg0 any) *MockRelationApplicationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelation)(nil).ApplicationSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelation)(nil).ApplicationSettings), arg0) + return &MockRelationApplicationSettingsCall{Call: call} +} + +// MockRelationApplicationSettingsCall wrap *gomock.Call +type MockRelationApplicationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationApplicationSettingsCall) Return(arg0 map[string]any, arg1 error) *MockRelationApplicationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationApplicationSettingsCall) Do(f func(string) (map[string]any, error)) *MockRelationApplicationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationApplicationSettingsCall) DoAndReturn(f func(string) (map[string]any, error)) *MockRelationApplicationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1713,9 +4113,33 @@ func (m *MockRelation) Destroy(arg0 objectstore.ObjectStore) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockRelationMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Destroy(arg0 any) *MockRelationDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockRelation)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockRelation)(nil).Destroy), arg0) + return &MockRelationDestroyCall{Call: call} +} + +// MockRelationDestroyCall wrap *gomock.Call +type MockRelationDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationDestroyCall) Return(arg0 error) *MockRelationDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationDestroyCall) Do(f func(objectstore.ObjectStore) error) *MockRelationDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationDestroyCall) DoAndReturn(f func(objectstore.ObjectStore) error) *MockRelationDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyWithForce mocks base method. @@ -1728,9 +4152,33 @@ func (m *MockRelation) DestroyWithForce(arg0 bool, arg1 time.Duration) ([]error, } // DestroyWithForce indicates an expected call of DestroyWithForce. -func (mr *MockRelationMockRecorder) DestroyWithForce(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationMockRecorder) DestroyWithForce(arg0, arg1 any) *MockRelationDestroyWithForceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyWithForce", reflect.TypeOf((*MockRelation)(nil).DestroyWithForce), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyWithForce", reflect.TypeOf((*MockRelation)(nil).DestroyWithForce), arg0, arg1) + return &MockRelationDestroyWithForceCall{Call: call} +} + +// MockRelationDestroyWithForceCall wrap *gomock.Call +type MockRelationDestroyWithForceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationDestroyWithForceCall) Return(arg0 []error, arg1 error) *MockRelationDestroyWithForceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationDestroyWithForceCall) Do(f func(bool, time.Duration) ([]error, error)) *MockRelationDestroyWithForceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationDestroyWithForceCall) DoAndReturn(f func(bool, time.Duration) ([]error, error)) *MockRelationDestroyWithForceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoint mocks base method. @@ -1743,9 +4191,33 @@ func (m *MockRelation) Endpoint(arg0 string) (state.Endpoint, error) { } // Endpoint indicates an expected call of Endpoint. -func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *MockRelationEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + return &MockRelationEndpointCall{Call: call} +} + +// MockRelationEndpointCall wrap *gomock.Call +type MockRelationEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationEndpointCall) Return(arg0 state.Endpoint, arg1 error) *MockRelationEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationEndpointCall) Do(f func(string) (state.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationEndpointCall) DoAndReturn(f func(string) (state.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -1757,9 +4229,33 @@ func (m *MockRelation) Endpoints() []state.Endpoint { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockRelationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockRelationMockRecorder) Endpoints() *MockRelationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRelation)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRelation)(nil).Endpoints)) + return &MockRelationEndpointsCall{Call: call} +} + +// MockRelationEndpointsCall wrap *gomock.Call +type MockRelationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationEndpointsCall) Return(arg0 []state.Endpoint) *MockRelationEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationEndpointsCall) Do(f func() []state.Endpoint) *MockRelationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationEndpointsCall) DoAndReturn(f func() []state.Endpoint) *MockRelationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -1771,9 +4267,33 @@ func (m *MockRelation) Id() int { } // Id indicates an expected call of Id. -func (mr *MockRelationMockRecorder) Id() *gomock.Call { +func (mr *MockRelationMockRecorder) Id() *MockRelationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockRelation)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockRelation)(nil).Id)) + return &MockRelationIdCall{Call: call} +} + +// MockRelationIdCall wrap *gomock.Call +type MockRelationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationIdCall) Return(arg0 int) *MockRelationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationIdCall) Do(f func() int) *MockRelationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationIdCall) DoAndReturn(f func() int) *MockRelationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelatedEndpoints mocks base method. @@ -1786,9 +4306,33 @@ func (m *MockRelation) RelatedEndpoints(arg0 string) ([]state.Endpoint, error) { } // RelatedEndpoints indicates an expected call of RelatedEndpoints. -func (mr *MockRelationMockRecorder) RelatedEndpoints(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) RelatedEndpoints(arg0 any) *MockRelationRelatedEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelatedEndpoints", reflect.TypeOf((*MockRelation)(nil).RelatedEndpoints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelatedEndpoints", reflect.TypeOf((*MockRelation)(nil).RelatedEndpoints), arg0) + return &MockRelationRelatedEndpointsCall{Call: call} +} + +// MockRelationRelatedEndpointsCall wrap *gomock.Call +type MockRelationRelatedEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationRelatedEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationRelatedEndpointsCall) Do(f func(string) ([]state.Endpoint, error)) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationRelatedEndpointsCall) DoAndReturn(f func(string) ([]state.Endpoint, error)) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -1800,9 +4344,33 @@ func (m *MockRelation) SetStatus(arg0 status.StatusInfo) error { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockRelationMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) SetStatus(arg0 any) *MockRelationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRelation)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRelation)(nil).SetStatus), arg0) + return &MockRelationSetStatusCall{Call: call} +} + +// MockRelationSetStatusCall wrap *gomock.Call +type MockRelationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSetStatusCall) Return(arg0 error) *MockRelationSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSetStatusCall) Do(f func(status.StatusInfo) error) *MockRelationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSetStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockRelationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSuspended mocks base method. @@ -1814,9 +4382,33 @@ func (m *MockRelation) SetSuspended(arg0 bool, arg1 string) error { } // SetSuspended indicates an expected call of SetSuspended. -func (mr *MockRelationMockRecorder) SetSuspended(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationMockRecorder) SetSuspended(arg0, arg1 any) *MockRelationSetSuspendedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSuspended", reflect.TypeOf((*MockRelation)(nil).SetSuspended), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSuspended", reflect.TypeOf((*MockRelation)(nil).SetSuspended), arg0, arg1) + return &MockRelationSetSuspendedCall{Call: call} +} + +// MockRelationSetSuspendedCall wrap *gomock.Call +type MockRelationSetSuspendedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSetSuspendedCall) Return(arg0 error) *MockRelationSetSuspendedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSetSuspendedCall) Do(f func(bool, string) error) *MockRelationSetSuspendedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSetSuspendedCall) DoAndReturn(f func(bool, string) error) *MockRelationSetSuspendedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Suspended mocks base method. @@ -1828,9 +4420,33 @@ func (m *MockRelation) Suspended() bool { } // Suspended indicates an expected call of Suspended. -func (mr *MockRelationMockRecorder) Suspended() *gomock.Call { +func (mr *MockRelationMockRecorder) Suspended() *MockRelationSuspendedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockRelation)(nil).Suspended)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockRelation)(nil).Suspended)) + return &MockRelationSuspendedCall{Call: call} +} + +// MockRelationSuspendedCall wrap *gomock.Call +type MockRelationSuspendedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSuspendedCall) Return(arg0 bool) *MockRelationSuspendedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSuspendedCall) Do(f func() bool) *MockRelationSuspendedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSuspendedCall) DoAndReturn(f func() bool) *MockRelationSuspendedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SuspendedReason mocks base method. @@ -1842,9 +4458,33 @@ func (m *MockRelation) SuspendedReason() string { } // SuspendedReason indicates an expected call of SuspendedReason. -func (mr *MockRelationMockRecorder) SuspendedReason() *gomock.Call { +func (mr *MockRelationMockRecorder) SuspendedReason() *MockRelationSuspendedReasonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuspendedReason", reflect.TypeOf((*MockRelation)(nil).SuspendedReason)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuspendedReason", reflect.TypeOf((*MockRelation)(nil).SuspendedReason)) + return &MockRelationSuspendedReasonCall{Call: call} +} + +// MockRelationSuspendedReasonCall wrap *gomock.Call +type MockRelationSuspendedReasonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSuspendedReasonCall) Return(arg0 string) *MockRelationSuspendedReasonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSuspendedReasonCall) Do(f func() string) *MockRelationSuspendedReasonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSuspendedReasonCall) DoAndReturn(f func() string) *MockRelationSuspendedReasonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1856,9 +4496,33 @@ func (m *MockRelation) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockRelationMockRecorder) Tag() *gomock.Call { +func (mr *MockRelationMockRecorder) Tag() *MockRelationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRelation)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRelation)(nil).Tag)) + return &MockRelationTagCall{Call: call} +} + +// MockRelationTagCall wrap *gomock.Call +type MockRelationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationTagCall) Return(arg0 names.Tag) *MockRelationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationTagCall) Do(f func() names.Tag) *MockRelationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationTagCall) DoAndReturn(f func() names.Tag) *MockRelationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -1871,9 +4535,33 @@ func (m *MockRelation) Unit(arg0 string) (application.RelationUnit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockRelationMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Unit(arg0 any) *MockRelationUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockRelation)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockRelation)(nil).Unit), arg0) + return &MockRelationUnitCall{Call: call} +} + +// MockRelationUnitCall wrap *gomock.Call +type MockRelationUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitCall) Return(arg0 application.RelationUnit, arg1 error) *MockRelationUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitCall) Do(f func(string) (application.RelationUnit, error)) *MockRelationUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitCall) DoAndReturn(f func(string) (application.RelationUnit, error)) *MockRelationUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -1909,9 +4597,33 @@ func (m *MockUnit) AgentTools() (*tools.Tools, error) { } // AgentTools indicates an expected call of AgentTools. -func (mr *MockUnitMockRecorder) AgentTools() *gomock.Call { +func (mr *MockUnitMockRecorder) AgentTools() *MockUnitAgentToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockUnit)(nil).AgentTools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockUnit)(nil).AgentTools)) + return &MockUnitAgentToolsCall{Call: call} +} + +// MockUnitAgentToolsCall wrap *gomock.Call +type MockUnitAgentToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAgentToolsCall) Return(arg0 *tools.Tools, arg1 error) *MockUnitAgentToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAgentToolsCall) Do(f func() (*tools.Tools, error)) *MockUnitAgentToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAgentToolsCall) DoAndReturn(f func() (*tools.Tools, error)) *MockUnitAgentToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationName mocks base method. @@ -1923,9 +4635,33 @@ func (m *MockUnit) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockUnitMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockUnitMockRecorder) ApplicationName() *MockUnitApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + return &MockUnitApplicationNameCall{Call: call} +} + +// MockUnitApplicationNameCall wrap *gomock.Call +type MockUnitApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationNameCall) Return(arg0 string) *MockUnitApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationNameCall) Do(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationNameCall) DoAndReturn(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignWithPlacement mocks base method. @@ -1937,9 +4673,33 @@ func (m *MockUnit) AssignWithPlacement(arg0 *instance.Placement, arg1 network.Sp } // AssignWithPlacement indicates an expected call of AssignWithPlacement. -func (mr *MockUnitMockRecorder) AssignWithPlacement(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) AssignWithPlacement(arg0, arg1 any) *MockUnitAssignWithPlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignWithPlacement", reflect.TypeOf((*MockUnit)(nil).AssignWithPlacement), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignWithPlacement", reflect.TypeOf((*MockUnit)(nil).AssignWithPlacement), arg0, arg1) + return &MockUnitAssignWithPlacementCall{Call: call} +} + +// MockUnitAssignWithPlacementCall wrap *gomock.Call +type MockUnitAssignWithPlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignWithPlacementCall) Return(arg0 error) *MockUnitAssignWithPlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignWithPlacementCall) Do(f func(*instance.Placement, network.SpaceInfos) error) *MockUnitAssignWithPlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignWithPlacementCall) DoAndReturn(f func(*instance.Placement, network.SpaceInfos) error) *MockUnitAssignWithPlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignWithPolicy mocks base method. @@ -1951,9 +4711,33 @@ func (m *MockUnit) AssignWithPolicy(arg0 state.AssignmentPolicy) error { } // AssignWithPolicy indicates an expected call of AssignWithPolicy. -func (mr *MockUnitMockRecorder) AssignWithPolicy(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) AssignWithPolicy(arg0 any) *MockUnitAssignWithPolicyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignWithPolicy", reflect.TypeOf((*MockUnit)(nil).AssignWithPolicy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignWithPolicy", reflect.TypeOf((*MockUnit)(nil).AssignWithPolicy), arg0) + return &MockUnitAssignWithPolicyCall{Call: call} +} + +// MockUnitAssignWithPolicyCall wrap *gomock.Call +type MockUnitAssignWithPolicyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignWithPolicyCall) Return(arg0 error) *MockUnitAssignWithPolicyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignWithPolicyCall) Do(f func(state.AssignmentPolicy) error) *MockUnitAssignWithPolicyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignWithPolicyCall) DoAndReturn(f func(state.AssignmentPolicy) error) *MockUnitAssignWithPolicyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedMachineId mocks base method. @@ -1966,9 +4750,33 @@ func (m *MockUnit) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockUnitMockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockUnitMockRecorder) AssignedMachineId() *MockUnitAssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + return &MockUnitAssignedMachineIdCall{Call: call} +} + +// MockUnitAssignedMachineIdCall wrap *gomock.Call +type MockUnitAssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignedMachineIdCall) Return(arg0 string, arg1 error) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignedMachineIdCall) Do(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerInfo mocks base method. @@ -1981,9 +4789,33 @@ func (m *MockUnit) ContainerInfo() (state.CloudContainer, error) { } // ContainerInfo indicates an expected call of ContainerInfo. -func (mr *MockUnitMockRecorder) ContainerInfo() *gomock.Call { +func (mr *MockUnitMockRecorder) ContainerInfo() *MockUnitContainerInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerInfo", reflect.TypeOf((*MockUnit)(nil).ContainerInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerInfo", reflect.TypeOf((*MockUnit)(nil).ContainerInfo)) + return &MockUnitContainerInfoCall{Call: call} +} + +// MockUnitContainerInfoCall wrap *gomock.Call +type MockUnitContainerInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitContainerInfoCall) Return(arg0 state.CloudContainer, arg1 error) *MockUnitContainerInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitContainerInfoCall) Do(f func() (state.CloudContainer, error)) *MockUnitContainerInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitContainerInfoCall) DoAndReturn(f func() (state.CloudContainer, error)) *MockUnitContainerInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1995,9 +4827,33 @@ func (m *MockUnit) Destroy(arg0 objectstore.ObjectStore) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockUnitMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Destroy(arg0 any) *MockUnitDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockUnit)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockUnit)(nil).Destroy), arg0) + return &MockUnitDestroyCall{Call: call} +} + +// MockUnitDestroyCall wrap *gomock.Call +type MockUnitDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitDestroyCall) Return(arg0 error) *MockUnitDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitDestroyCall) Do(f func(objectstore.ObjectStore) error) *MockUnitDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitDestroyCall) DoAndReturn(f func(objectstore.ObjectStore) error) *MockUnitDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyOperation mocks base method. @@ -2009,9 +4865,33 @@ func (m *MockUnit) DestroyOperation(arg0 objectstore.ObjectStore) *state.Destroy } // DestroyOperation indicates an expected call of DestroyOperation. -func (mr *MockUnitMockRecorder) DestroyOperation(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) DestroyOperation(arg0 any) *MockUnitDestroyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockUnit)(nil).DestroyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockUnit)(nil).DestroyOperation), arg0) + return &MockUnitDestroyOperationCall{Call: call} +} + +// MockUnitDestroyOperationCall wrap *gomock.Call +type MockUnitDestroyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitDestroyOperationCall) Return(arg0 *state.DestroyUnitOperation) *MockUnitDestroyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitDestroyOperationCall) Do(f func(objectstore.ObjectStore) *state.DestroyUnitOperation) *MockUnitDestroyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitDestroyOperationCall) DoAndReturn(f func(objectstore.ObjectStore) *state.DestroyUnitOperation) *MockUnitDestroyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsPrincipal mocks base method. @@ -2023,9 +4903,33 @@ func (m *MockUnit) IsPrincipal() bool { } // IsPrincipal indicates an expected call of IsPrincipal. -func (mr *MockUnitMockRecorder) IsPrincipal() *gomock.Call { +func (mr *MockUnitMockRecorder) IsPrincipal() *MockUnitIsPrincipalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockUnit)(nil).IsPrincipal)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockUnit)(nil).IsPrincipal)) + return &MockUnitIsPrincipalCall{Call: call} +} + +// MockUnitIsPrincipalCall wrap *gomock.Call +type MockUnitIsPrincipalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitIsPrincipalCall) Return(arg0 bool) *MockUnitIsPrincipalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitIsPrincipalCall) Do(f func() bool) *MockUnitIsPrincipalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitIsPrincipalCall) DoAndReturn(f func() bool) *MockUnitIsPrincipalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -2037,9 +4941,33 @@ func (m *MockUnit) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockUnitMockRecorder) Life() *gomock.Call { +func (mr *MockUnitMockRecorder) Life() *MockUnitLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + return &MockUnitLifeCall{Call: call} +} + +// MockUnitLifeCall wrap *gomock.Call +type MockUnitLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLifeCall) Return(arg0 state.Life) *MockUnitLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLifeCall) Do(f func() state.Life) *MockUnitLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLifeCall) DoAndReturn(f func() state.Life) *MockUnitLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -2051,9 +4979,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Resolve mocks base method. @@ -2065,9 +5017,33 @@ func (m *MockUnit) Resolve(arg0 bool) error { } // Resolve indicates an expected call of Resolve. -func (mr *MockUnitMockRecorder) Resolve(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Resolve(arg0 any) *MockUnitResolveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockUnit)(nil).Resolve), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockUnit)(nil).Resolve), arg0) + return &MockUnitResolveCall{Call: call} +} + +// MockUnitResolveCall wrap *gomock.Call +type MockUnitResolveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitResolveCall) Return(arg0 error) *MockUnitResolveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitResolveCall) Do(f func(bool) error) *MockUnitResolveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitResolveCall) DoAndReturn(f func(bool) error) *MockUnitResolveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -2079,9 +5055,33 @@ func (m *MockUnit) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockUnitMockRecorder) Tag() *gomock.Call { +func (mr *MockUnitMockRecorder) Tag() *MockUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + return &MockUnitTagCall{Call: call} +} + +// MockUnitTagCall wrap *gomock.Call +type MockUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitTagCall) Return(arg0 names.Tag) *MockUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitTagCall) Do(f func() names.Tag) *MockUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitTagCall) DoAndReturn(f func() names.Tag) *MockUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitTag mocks base method. @@ -2093,9 +5093,33 @@ func (m *MockUnit) UnitTag() names.UnitTag { } // UnitTag indicates an expected call of UnitTag. -func (mr *MockUnitMockRecorder) UnitTag() *gomock.Call { +func (mr *MockUnitMockRecorder) UnitTag() *MockUnitUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + return &MockUnitUnitTagCall{Call: call} +} + +// MockUnitUnitTagCall wrap *gomock.Call +type MockUnitUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUnitTagCall) Return(arg0 names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUnitTagCall) Do(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUnitTagCall) DoAndReturn(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WorkloadVersion mocks base method. @@ -2108,9 +5132,33 @@ func (m *MockUnit) WorkloadVersion() (string, error) { } // WorkloadVersion indicates an expected call of WorkloadVersion. -func (mr *MockUnitMockRecorder) WorkloadVersion() *gomock.Call { +func (mr *MockUnitMockRecorder) WorkloadVersion() *MockUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadVersion", reflect.TypeOf((*MockUnit)(nil).WorkloadVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadVersion", reflect.TypeOf((*MockUnit)(nil).WorkloadVersion)) + return &MockUnitWorkloadVersionCall{Call: call} +} + +// MockUnitWorkloadVersionCall wrap *gomock.Call +type MockUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWorkloadVersionCall) Return(arg0 string, arg1 error) *MockUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWorkloadVersionCall) Do(f func() (string, error)) *MockUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWorkloadVersionCall) DoAndReturn(f func() (string, error)) *MockUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationUnit is a mock of RelationUnit interface. @@ -2146,9 +5194,33 @@ func (m *MockRelationUnit) InScope() (bool, error) { } // InScope indicates an expected call of InScope. -func (mr *MockRelationUnitMockRecorder) InScope() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) InScope() *MockRelationUnitInScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InScope", reflect.TypeOf((*MockRelationUnit)(nil).InScope)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InScope", reflect.TypeOf((*MockRelationUnit)(nil).InScope)) + return &MockRelationUnitInScopeCall{Call: call} +} + +// MockRelationUnitInScopeCall wrap *gomock.Call +type MockRelationUnitInScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitInScopeCall) Return(arg0 bool, arg1 error) *MockRelationUnitInScopeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitInScopeCall) Do(f func() (bool, error)) *MockRelationUnitInScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitInScopeCall) DoAndReturn(f func() (bool, error)) *MockRelationUnitInScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Settings mocks base method. @@ -2161,9 +5233,33 @@ func (m *MockRelationUnit) Settings() (map[string]any, error) { } // Settings indicates an expected call of Settings. -func (mr *MockRelationUnitMockRecorder) Settings() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) Settings() *MockRelationUnitSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockRelationUnit)(nil).Settings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockRelationUnit)(nil).Settings)) + return &MockRelationUnitSettingsCall{Call: call} +} + +// MockRelationUnitSettingsCall wrap *gomock.Call +type MockRelationUnitSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitSettingsCall) Return(arg0 map[string]any, arg1 error) *MockRelationUnitSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitSettingsCall) Do(f func() (map[string]any, error)) *MockRelationUnitSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitSettingsCall) DoAndReturn(f func() (map[string]any, error)) *MockRelationUnitSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitName mocks base method. @@ -2175,9 +5271,33 @@ func (m *MockRelationUnit) UnitName() string { } // UnitName indicates an expected call of UnitName. -func (mr *MockRelationUnitMockRecorder) UnitName() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) UnitName() *MockRelationUnitUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockRelationUnit)(nil).UnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockRelationUnit)(nil).UnitName)) + return &MockRelationUnitUnitNameCall{Call: call} +} + +// MockRelationUnitUnitNameCall wrap *gomock.Call +type MockRelationUnitUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitUnitNameCall) Return(arg0 string) *MockRelationUnitUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitUnitNameCall) Do(f func() string) *MockRelationUnitUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitUnitNameCall) DoAndReturn(f func() string) *MockRelationUnitUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -2212,9 +5332,33 @@ func (m *MockMachine) Base() state.Base { } // Base indicates an expected call of Base. -func (mr *MockMachineMockRecorder) Base() *gomock.Call { +func (mr *MockMachineMockRecorder) Base() *MockMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + return &MockMachineBaseCall{Call: call} +} + +// MockMachineBaseCall wrap *gomock.Call +type MockMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBaseCall) Return(arg0 state.Base) *MockMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBaseCall) Do(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBaseCall) DoAndReturn(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareCharacteristics mocks base method. @@ -2227,9 +5371,33 @@ func (m *MockMachine) HardwareCharacteristics() (*instance.HardwareCharacteristi } // HardwareCharacteristics indicates an expected call of HardwareCharacteristics. -func (mr *MockMachineMockRecorder) HardwareCharacteristics() *gomock.Call { +func (mr *MockMachineMockRecorder) HardwareCharacteristics() *MockMachineHardwareCharacteristicsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + return &MockMachineHardwareCharacteristicsCall{Call: call} +} + +// MockMachineHardwareCharacteristicsCall wrap *gomock.Call +type MockMachineHardwareCharacteristicsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineHardwareCharacteristicsCall) Return(arg0 *instance.HardwareCharacteristics, arg1 error) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineHardwareCharacteristicsCall) Do(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineHardwareCharacteristicsCall) DoAndReturn(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLockedForSeriesUpgrade mocks base method. @@ -2242,9 +5410,33 @@ func (m *MockMachine) IsLockedForSeriesUpgrade() (bool, error) { } // IsLockedForSeriesUpgrade indicates an expected call of IsLockedForSeriesUpgrade. -func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *gomock.Call { +func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *MockMachineIsLockedForSeriesUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + return &MockMachineIsLockedForSeriesUpgradeCall{Call: call} +} + +// MockMachineIsLockedForSeriesUpgradeCall wrap *gomock.Call +type MockMachineIsLockedForSeriesUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsLockedForSeriesUpgradeCall) Return(arg0 bool, arg1 error) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsLockedForSeriesUpgradeCall) Do(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsLockedForSeriesUpgradeCall) DoAndReturn(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsParentLockedForSeriesUpgrade mocks base method. @@ -2257,9 +5449,33 @@ func (m *MockMachine) IsParentLockedForSeriesUpgrade() (bool, error) { } // IsParentLockedForSeriesUpgrade indicates an expected call of IsParentLockedForSeriesUpgrade. -func (mr *MockMachineMockRecorder) IsParentLockedForSeriesUpgrade() *gomock.Call { +func (mr *MockMachineMockRecorder) IsParentLockedForSeriesUpgrade() *MockMachineIsParentLockedForSeriesUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsParentLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsParentLockedForSeriesUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsParentLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsParentLockedForSeriesUpgrade)) + return &MockMachineIsParentLockedForSeriesUpgradeCall{Call: call} +} + +// MockMachineIsParentLockedForSeriesUpgradeCall wrap *gomock.Call +type MockMachineIsParentLockedForSeriesUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) Return(arg0 bool, arg1 error) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) Do(f func() (bool, error)) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsParentLockedForSeriesUpgradeCall) DoAndReturn(f func() (bool, error)) *MockMachineIsParentLockedForSeriesUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -2272,9 +5488,33 @@ func (m *MockMachine) PublicAddress() (network.SpaceAddress, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockMachineMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockMachineMockRecorder) PublicAddress() *MockMachinePublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + return &MockMachinePublicAddressCall{Call: call} +} + +// MockMachinePublicAddressCall wrap *gomock.Call +type MockMachinePublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePublicAddressCall) Return(arg0 network.SpaceAddress, arg1 error) *MockMachinePublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePublicAddressCall) Do(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePublicAddressCall) DoAndReturn(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockGeneration is a mock of Generation interface. @@ -2309,9 +5549,33 @@ func (m *MockGeneration) AssignApplication(arg0 string) error { } // AssignApplication indicates an expected call of AssignApplication. -func (mr *MockGenerationMockRecorder) AssignApplication(arg0 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) AssignApplication(arg0 any) *MockGenerationAssignApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignApplication", reflect.TypeOf((*MockGeneration)(nil).AssignApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignApplication", reflect.TypeOf((*MockGeneration)(nil).AssignApplication), arg0) + return &MockGenerationAssignApplicationCall{Call: call} +} + +// MockGenerationAssignApplicationCall wrap *gomock.Call +type MockGenerationAssignApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAssignApplicationCall) Return(arg0 error) *MockGenerationAssignApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAssignApplicationCall) Do(f func(string) error) *MockGenerationAssignApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAssignApplicationCall) DoAndReturn(f func(string) error) *MockGenerationAssignApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBindings is a mock of Bindings interface. @@ -2346,9 +5610,33 @@ func (m *MockBindings) Map() map[string]string { } // Map indicates an expected call of Map. -func (mr *MockBindingsMockRecorder) Map() *gomock.Call { +func (mr *MockBindingsMockRecorder) Map() *MockBindingsMapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + return &MockBindingsMapCall{Call: call} +} + +// MockBindingsMapCall wrap *gomock.Call +type MockBindingsMapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBindingsMapCall) Return(arg0 map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBindingsMapCall) Do(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBindingsMapCall) DoAndReturn(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MapWithSpaceNames mocks base method. @@ -2361,9 +5649,33 @@ func (m *MockBindings) MapWithSpaceNames(arg0 network.SpaceInfos) (map[string]st } // MapWithSpaceNames indicates an expected call of MapWithSpaceNames. -func (mr *MockBindingsMockRecorder) MapWithSpaceNames(arg0 any) *gomock.Call { +func (mr *MockBindingsMockRecorder) MapWithSpaceNames(arg0 any) *MockBindingsMapWithSpaceNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapWithSpaceNames", reflect.TypeOf((*MockBindings)(nil).MapWithSpaceNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapWithSpaceNames", reflect.TypeOf((*MockBindings)(nil).MapWithSpaceNames), arg0) + return &MockBindingsMapWithSpaceNamesCall{Call: call} +} + +// MockBindingsMapWithSpaceNamesCall wrap *gomock.Call +type MockBindingsMapWithSpaceNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBindingsMapWithSpaceNamesCall) Return(arg0 map[string]string, arg1 error) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBindingsMapWithSpaceNamesCall) Do(f func(network.SpaceInfos) (map[string]string, error)) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBindingsMapWithSpaceNamesCall) DoAndReturn(f func(network.SpaceInfos) (map[string]string, error)) *MockBindingsMapWithSpaceNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockResources is a mock of Resources interface. @@ -2398,7 +5710,31 @@ func (m *MockResources) RemovePendingAppResources(arg0 string, arg1 map[string]s } // RemovePendingAppResources indicates an expected call of RemovePendingAppResources. -func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *MockResourcesRemovePendingAppResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + return &MockResourcesRemovePendingAppResourcesCall{Call: call} +} + +// MockResourcesRemovePendingAppResourcesCall wrap *gomock.Call +type MockResourcesRemovePendingAppResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRemovePendingAppResourcesCall) Return(arg0 error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRemovePendingAppResourcesCall) Do(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRemovePendingAppResourcesCall) DoAndReturn(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/leadership_mock.go b/apiserver/facades/client/application/mocks/leadership_mock.go index ea69e6db3c5..b150eb8393d 100644 --- a/apiserver/facades/client/application/mocks/leadership_mock.go +++ b/apiserver/facades/client/application/mocks/leadership_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Reader +// mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Reader // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockReader) Leaders() (map[string]string, error) { } // Leaders indicates an expected call of Leaders. -func (mr *MockReaderMockRecorder) Leaders() *gomock.Call { +func (mr *MockReaderMockRecorder) Leaders() *MockReaderLeadersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + return &MockReaderLeadersCall{Call: call} +} + +// MockReaderLeadersCall wrap *gomock.Call +type MockReaderLeadersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReaderLeadersCall) Return(arg0 map[string]string, arg1 error) *MockReaderLeadersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReaderLeadersCall) Do(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReaderLeadersCall) DoAndReturn(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/lxdprofile_mock.go b/apiserver/facades/client/application/mocks/lxdprofile_mock.go index a6c1757b902..fa52f5e31f2 100644 --- a/apiserver/facades/client/application/mocks/lxdprofile_mock.go +++ b/apiserver/facades/client/application/mocks/lxdprofile_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/charm/v13 LXDProfiler +// mockgen -typed -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/charm/v13 LXDProfiler // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockLXDProfiler) LXDProfile() *charm.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockLXDProfilerMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) LXDProfile() *MockLXDProfilerLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfile)) + return &MockLXDProfilerLXDProfileCall{Call: call} +} + +// MockLXDProfilerLXDProfileCall wrap *gomock.Call +type MockLXDProfilerLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerLXDProfileCall) Return(arg0 *charm.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerLXDProfileCall) Do(f func() *charm.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerLXDProfileCall) DoAndReturn(f func() *charm.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/objectstore_mock.go b/apiserver/facades/client/application/mocks/objectstore_mock.go index 265c81473d7..14284f54b97 100644 --- a/apiserver/facades/client/application/mocks/objectstore_mock.go +++ b/apiserver/facades/client/application/mocks/objectstore_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/objectstore_mock.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package mocks -destination mocks/objectstore_mock.go github.com/juju/juju/core/objectstore ObjectStore // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/offer_mock.go b/apiserver/facades/client/application/mocks/offer_mock.go index 3e093360500..0772a02f342 100644 --- a/apiserver/facades/client/application/mocks/offer_mock.go +++ b/apiserver/facades/client/application/mocks/offer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/offer_mock.go github.com/juju/juju/apiserver/facades/client/application OfferConnection +// mockgen -typed -package mocks -destination mocks/offer_mock.go github.com/juju/juju/apiserver/facades/client/application OfferConnection // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockOfferConnection) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockOfferConnectionMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) OfferUUID() *MockOfferConnectionOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockOfferConnection)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockOfferConnection)(nil).OfferUUID)) + return &MockOfferConnectionOfferUUIDCall{Call: call} +} + +// MockOfferConnectionOfferUUIDCall wrap *gomock.Call +type MockOfferConnectionOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionOfferUUIDCall) Return(arg0 string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionOfferUUIDCall) Do(f func() string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionOfferUUIDCall) DoAndReturn(f func() string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserName mocks base method. @@ -61,7 +85,31 @@ func (m *MockOfferConnection) UserName() string { } // UserName indicates an expected call of UserName. -func (mr *MockOfferConnectionMockRecorder) UserName() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) UserName() *MockOfferConnectionUserNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockOfferConnection)(nil).UserName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockOfferConnection)(nil).UserName)) + return &MockOfferConnectionUserNameCall{Call: call} +} + +// MockOfferConnectionUserNameCall wrap *gomock.Call +type MockOfferConnectionUserNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionUserNameCall) Return(arg0 string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionUserNameCall) Do(f func() string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionUserNameCall) DoAndReturn(f func() string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/state_mock.go b/apiserver/facades/client/application/mocks/state_mock.go index 5836e8a85c2..b92b44f397b 100644 --- a/apiserver/facades/client/application/mocks/state_mock.go +++ b/apiserver/facades/client/application/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/state StorageAttachment,StorageInstance,MachinePortRanges,UnitPortRanges,CloudContainer +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/state StorageAttachment,StorageInstance,MachinePortRanges,UnitPortRanges,CloudContainer // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockStorageAttachment) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockStorageAttachmentMockRecorder) Life() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) Life() *MockStorageAttachmentLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageAttachment)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageAttachment)(nil).Life)) + return &MockStorageAttachmentLifeCall{Call: call} +} + +// MockStorageAttachmentLifeCall wrap *gomock.Call +type MockStorageAttachmentLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentLifeCall) Return(arg0 state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentLifeCall) Do(f func() state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentLifeCall) DoAndReturn(f func() state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageInstance mocks base method. @@ -64,9 +88,33 @@ func (m *MockStorageAttachment) StorageInstance() names.StorageTag { } // StorageInstance indicates an expected call of StorageInstance. -func (mr *MockStorageAttachmentMockRecorder) StorageInstance() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) StorageInstance() *MockStorageAttachmentStorageInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageAttachment)(nil).StorageInstance)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageAttachment)(nil).StorageInstance)) + return &MockStorageAttachmentStorageInstanceCall{Call: call} +} + +// MockStorageAttachmentStorageInstanceCall wrap *gomock.Call +type MockStorageAttachmentStorageInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentStorageInstanceCall) Return(arg0 names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentStorageInstanceCall) Do(f func() names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentStorageInstanceCall) DoAndReturn(f func() names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -78,9 +126,33 @@ func (m *MockStorageAttachment) Unit() names.UnitTag { } // Unit indicates an expected call of Unit. -func (mr *MockStorageAttachmentMockRecorder) Unit() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) Unit() *MockStorageAttachmentUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStorageAttachment)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStorageAttachment)(nil).Unit)) + return &MockStorageAttachmentUnitCall{Call: call} +} + +// MockStorageAttachmentUnitCall wrap *gomock.Call +type MockStorageAttachmentUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentUnitCall) Return(arg0 names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentUnitCall) Do(f func() names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentUnitCall) DoAndReturn(f func() names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageInstance is a mock of StorageInstance interface. @@ -115,9 +187,33 @@ func (m *MockStorageInstance) Kind() state.StorageKind { } // Kind indicates an expected call of Kind. -func (mr *MockStorageInstanceMockRecorder) Kind() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Kind() *MockStorageInstanceKindCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kind", reflect.TypeOf((*MockStorageInstance)(nil).Kind)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kind", reflect.TypeOf((*MockStorageInstance)(nil).Kind)) + return &MockStorageInstanceKindCall{Call: call} +} + +// MockStorageInstanceKindCall wrap *gomock.Call +type MockStorageInstanceKindCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceKindCall) Return(arg0 state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceKindCall) Do(f func() state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceKindCall) DoAndReturn(f func() state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -129,9 +225,33 @@ func (m *MockStorageInstance) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockStorageInstanceMockRecorder) Life() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Life() *MockStorageInstanceLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageInstance)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageInstance)(nil).Life)) + return &MockStorageInstanceLifeCall{Call: call} +} + +// MockStorageInstanceLifeCall wrap *gomock.Call +type MockStorageInstanceLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceLifeCall) Return(arg0 state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceLifeCall) Do(f func() state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceLifeCall) DoAndReturn(f func() state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -144,9 +264,33 @@ func (m *MockStorageInstance) Owner() (names.Tag, bool) { } // Owner indicates an expected call of Owner. -func (mr *MockStorageInstanceMockRecorder) Owner() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Owner() *MockStorageInstanceOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockStorageInstance)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockStorageInstance)(nil).Owner)) + return &MockStorageInstanceOwnerCall{Call: call} +} + +// MockStorageInstanceOwnerCall wrap *gomock.Call +type MockStorageInstanceOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceOwnerCall) Return(arg0 names.Tag, arg1 bool) *MockStorageInstanceOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceOwnerCall) Do(f func() (names.Tag, bool)) *MockStorageInstanceOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceOwnerCall) DoAndReturn(f func() (names.Tag, bool)) *MockStorageInstanceOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pool mocks base method. @@ -158,9 +302,33 @@ func (m *MockStorageInstance) Pool() string { } // Pool indicates an expected call of Pool. -func (mr *MockStorageInstanceMockRecorder) Pool() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Pool() *MockStorageInstancePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pool", reflect.TypeOf((*MockStorageInstance)(nil).Pool)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pool", reflect.TypeOf((*MockStorageInstance)(nil).Pool)) + return &MockStorageInstancePoolCall{Call: call} +} + +// MockStorageInstancePoolCall wrap *gomock.Call +type MockStorageInstancePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstancePoolCall) Return(arg0 string) *MockStorageInstancePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstancePoolCall) Do(f func() string) *MockStorageInstancePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstancePoolCall) DoAndReturn(f func() string) *MockStorageInstancePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageName mocks base method. @@ -172,9 +340,33 @@ func (m *MockStorageInstance) StorageName() string { } // StorageName indicates an expected call of StorageName. -func (mr *MockStorageInstanceMockRecorder) StorageName() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) StorageName() *MockStorageInstanceStorageNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageName", reflect.TypeOf((*MockStorageInstance)(nil).StorageName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageName", reflect.TypeOf((*MockStorageInstance)(nil).StorageName)) + return &MockStorageInstanceStorageNameCall{Call: call} +} + +// MockStorageInstanceStorageNameCall wrap *gomock.Call +type MockStorageInstanceStorageNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceStorageNameCall) Return(arg0 string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceStorageNameCall) Do(f func() string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceStorageNameCall) DoAndReturn(f func() string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageTag mocks base method. @@ -186,9 +378,33 @@ func (m *MockStorageInstance) StorageTag() names.StorageTag { } // StorageTag indicates an expected call of StorageTag. -func (mr *MockStorageInstanceMockRecorder) StorageTag() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) StorageTag() *MockStorageInstanceStorageTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTag", reflect.TypeOf((*MockStorageInstance)(nil).StorageTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTag", reflect.TypeOf((*MockStorageInstance)(nil).StorageTag)) + return &MockStorageInstanceStorageTagCall{Call: call} +} + +// MockStorageInstanceStorageTagCall wrap *gomock.Call +type MockStorageInstanceStorageTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceStorageTagCall) Return(arg0 names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceStorageTagCall) Do(f func() names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceStorageTagCall) DoAndReturn(f func() names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -200,9 +416,33 @@ func (m *MockStorageInstance) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockStorageInstanceMockRecorder) Tag() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Tag() *MockStorageInstanceTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockStorageInstance)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockStorageInstance)(nil).Tag)) + return &MockStorageInstanceTagCall{Call: call} +} + +// MockStorageInstanceTagCall wrap *gomock.Call +type MockStorageInstanceTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceTagCall) Return(arg0 names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceTagCall) Do(f func() names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceTagCall) DoAndReturn(f func() names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachinePortRanges is a mock of MachinePortRanges interface. @@ -237,9 +477,33 @@ func (m *MockMachinePortRanges) ByUnit() map[string]state.UnitPortRanges { } // ByUnit indicates an expected call of ByUnit. -func (mr *MockMachinePortRangesMockRecorder) ByUnit() *gomock.Call { +func (mr *MockMachinePortRangesMockRecorder) ByUnit() *MockMachinePortRangesByUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockMachinePortRanges)(nil).ByUnit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockMachinePortRanges)(nil).ByUnit)) + return &MockMachinePortRangesByUnitCall{Call: call} +} + +// MockMachinePortRangesByUnitCall wrap *gomock.Call +type MockMachinePortRangesByUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePortRangesByUnitCall) Return(arg0 map[string]state.UnitPortRanges) *MockMachinePortRangesByUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePortRangesByUnitCall) Do(f func() map[string]state.UnitPortRanges) *MockMachinePortRangesByUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePortRangesByUnitCall) DoAndReturn(f func() map[string]state.UnitPortRanges) *MockMachinePortRangesByUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Changes mocks base method. @@ -251,9 +515,33 @@ func (m *MockMachinePortRanges) Changes() state.ModelOperation { } // Changes indicates an expected call of Changes. -func (mr *MockMachinePortRangesMockRecorder) Changes() *gomock.Call { +func (mr *MockMachinePortRangesMockRecorder) Changes() *MockMachinePortRangesChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockMachinePortRanges)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockMachinePortRanges)(nil).Changes)) + return &MockMachinePortRangesChangesCall{Call: call} +} + +// MockMachinePortRangesChangesCall wrap *gomock.Call +type MockMachinePortRangesChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePortRangesChangesCall) Return(arg0 state.ModelOperation) *MockMachinePortRangesChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePortRangesChangesCall) Do(f func() state.ModelOperation) *MockMachinePortRangesChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePortRangesChangesCall) DoAndReturn(f func() state.ModelOperation) *MockMachinePortRangesChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForUnit mocks base method. @@ -265,9 +553,33 @@ func (m *MockMachinePortRanges) ForUnit(arg0 string) state.UnitPortRanges { } // ForUnit indicates an expected call of ForUnit. -func (mr *MockMachinePortRangesMockRecorder) ForUnit(arg0 any) *gomock.Call { +func (mr *MockMachinePortRangesMockRecorder) ForUnit(arg0 any) *MockMachinePortRangesForUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForUnit", reflect.TypeOf((*MockMachinePortRanges)(nil).ForUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForUnit", reflect.TypeOf((*MockMachinePortRanges)(nil).ForUnit), arg0) + return &MockMachinePortRangesForUnitCall{Call: call} +} + +// MockMachinePortRangesForUnitCall wrap *gomock.Call +type MockMachinePortRangesForUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePortRangesForUnitCall) Return(arg0 state.UnitPortRanges) *MockMachinePortRangesForUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePortRangesForUnitCall) Do(f func(string) state.UnitPortRanges) *MockMachinePortRangesForUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePortRangesForUnitCall) DoAndReturn(f func(string) state.UnitPortRanges) *MockMachinePortRangesForUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineID mocks base method. @@ -279,9 +591,33 @@ func (m *MockMachinePortRanges) MachineID() string { } // MachineID indicates an expected call of MachineID. -func (mr *MockMachinePortRangesMockRecorder) MachineID() *gomock.Call { +func (mr *MockMachinePortRangesMockRecorder) MachineID() *MockMachinePortRangesMachineIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineID", reflect.TypeOf((*MockMachinePortRanges)(nil).MachineID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineID", reflect.TypeOf((*MockMachinePortRanges)(nil).MachineID)) + return &MockMachinePortRangesMachineIDCall{Call: call} +} + +// MockMachinePortRangesMachineIDCall wrap *gomock.Call +type MockMachinePortRangesMachineIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePortRangesMachineIDCall) Return(arg0 string) *MockMachinePortRangesMachineIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePortRangesMachineIDCall) Do(f func() string) *MockMachinePortRangesMachineIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePortRangesMachineIDCall) DoAndReturn(f func() string) *MockMachinePortRangesMachineIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UniquePortRanges mocks base method. @@ -293,9 +629,33 @@ func (m *MockMachinePortRanges) UniquePortRanges() []network.PortRange { } // UniquePortRanges indicates an expected call of UniquePortRanges. -func (mr *MockMachinePortRangesMockRecorder) UniquePortRanges() *gomock.Call { +func (mr *MockMachinePortRangesMockRecorder) UniquePortRanges() *MockMachinePortRangesUniquePortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockMachinePortRanges)(nil).UniquePortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockMachinePortRanges)(nil).UniquePortRanges)) + return &MockMachinePortRangesUniquePortRangesCall{Call: call} +} + +// MockMachinePortRangesUniquePortRangesCall wrap *gomock.Call +type MockMachinePortRangesUniquePortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePortRangesUniquePortRangesCall) Return(arg0 []network.PortRange) *MockMachinePortRangesUniquePortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePortRangesUniquePortRangesCall) Do(f func() []network.PortRange) *MockMachinePortRangesUniquePortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePortRangesUniquePortRangesCall) DoAndReturn(f func() []network.PortRange) *MockMachinePortRangesUniquePortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnitPortRanges is a mock of UnitPortRanges interface. @@ -330,9 +690,33 @@ func (m *MockUnitPortRanges) ByEndpoint() network.GroupedPortRanges { } // ByEndpoint indicates an expected call of ByEndpoint. -func (mr *MockUnitPortRangesMockRecorder) ByEndpoint() *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) ByEndpoint() *MockUnitPortRangesByEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ByEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ByEndpoint)) + return &MockUnitPortRangesByEndpointCall{Call: call} +} + +// MockUnitPortRangesByEndpointCall wrap *gomock.Call +type MockUnitPortRangesByEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesByEndpointCall) Return(arg0 network.GroupedPortRanges) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesByEndpointCall) Do(f func() network.GroupedPortRanges) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesByEndpointCall) DoAndReturn(f func() network.GroupedPortRanges) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Changes mocks base method. @@ -344,9 +728,33 @@ func (m *MockUnitPortRanges) Changes() state.ModelOperation { } // Changes indicates an expected call of Changes. -func (mr *MockUnitPortRangesMockRecorder) Changes() *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) Changes() *MockUnitPortRangesChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockUnitPortRanges)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockUnitPortRanges)(nil).Changes)) + return &MockUnitPortRangesChangesCall{Call: call} +} + +// MockUnitPortRangesChangesCall wrap *gomock.Call +type MockUnitPortRangesChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesChangesCall) Return(arg0 state.ModelOperation) *MockUnitPortRangesChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesChangesCall) Do(f func() state.ModelOperation) *MockUnitPortRangesChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesChangesCall) DoAndReturn(f func() state.ModelOperation) *MockUnitPortRangesChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -356,9 +764,33 @@ func (m *MockUnitPortRanges) Close(arg0 string, arg1 network.PortRange) { } // Close indicates an expected call of Close. -func (mr *MockUnitPortRangesMockRecorder) Close(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) Close(arg0, arg1 any) *MockUnitPortRangesCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUnitPortRanges)(nil).Close), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUnitPortRanges)(nil).Close), arg0, arg1) + return &MockUnitPortRangesCloseCall{Call: call} +} + +// MockUnitPortRangesCloseCall wrap *gomock.Call +type MockUnitPortRangesCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesCloseCall) Return() *MockUnitPortRangesCloseCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesCloseCall) Do(f func(string, network.PortRange)) *MockUnitPortRangesCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesCloseCall) DoAndReturn(f func(string, network.PortRange)) *MockUnitPortRangesCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForEndpoint mocks base method. @@ -370,9 +802,33 @@ func (m *MockUnitPortRanges) ForEndpoint(arg0 string) []network.PortRange { } // ForEndpoint indicates an expected call of ForEndpoint. -func (mr *MockUnitPortRangesMockRecorder) ForEndpoint(arg0 any) *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) ForEndpoint(arg0 any) *MockUnitPortRangesForEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ForEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ForEndpoint), arg0) + return &MockUnitPortRangesForEndpointCall{Call: call} +} + +// MockUnitPortRangesForEndpointCall wrap *gomock.Call +type MockUnitPortRangesForEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesForEndpointCall) Return(arg0 []network.PortRange) *MockUnitPortRangesForEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesForEndpointCall) Do(f func(string) []network.PortRange) *MockUnitPortRangesForEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesForEndpointCall) DoAndReturn(f func(string) []network.PortRange) *MockUnitPortRangesForEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -382,9 +838,33 @@ func (m *MockUnitPortRanges) Open(arg0 string, arg1 network.PortRange) { } // Open indicates an expected call of Open. -func (mr *MockUnitPortRangesMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) Open(arg0, arg1 any) *MockUnitPortRangesOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockUnitPortRanges)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockUnitPortRanges)(nil).Open), arg0, arg1) + return &MockUnitPortRangesOpenCall{Call: call} +} + +// MockUnitPortRangesOpenCall wrap *gomock.Call +type MockUnitPortRangesOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesOpenCall) Return() *MockUnitPortRangesOpenCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesOpenCall) Do(f func(string, network.PortRange)) *MockUnitPortRangesOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesOpenCall) DoAndReturn(f func(string, network.PortRange)) *MockUnitPortRangesOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UniquePortRanges mocks base method. @@ -396,9 +876,33 @@ func (m *MockUnitPortRanges) UniquePortRanges() []network.PortRange { } // UniquePortRanges indicates an expected call of UniquePortRanges. -func (mr *MockUnitPortRangesMockRecorder) UniquePortRanges() *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) UniquePortRanges() *MockUnitPortRangesUniquePortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockUnitPortRanges)(nil).UniquePortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockUnitPortRanges)(nil).UniquePortRanges)) + return &MockUnitPortRangesUniquePortRangesCall{Call: call} +} + +// MockUnitPortRangesUniquePortRangesCall wrap *gomock.Call +type MockUnitPortRangesUniquePortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesUniquePortRangesCall) Return(arg0 []network.PortRange) *MockUnitPortRangesUniquePortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesUniquePortRangesCall) Do(f func() []network.PortRange) *MockUnitPortRangesUniquePortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesUniquePortRangesCall) DoAndReturn(f func() []network.PortRange) *MockUnitPortRangesUniquePortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitName mocks base method. @@ -410,9 +914,33 @@ func (m *MockUnitPortRanges) UnitName() string { } // UnitName indicates an expected call of UnitName. -func (mr *MockUnitPortRangesMockRecorder) UnitName() *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) UnitName() *MockUnitPortRangesUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockUnitPortRanges)(nil).UnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockUnitPortRanges)(nil).UnitName)) + return &MockUnitPortRangesUnitNameCall{Call: call} +} + +// MockUnitPortRangesUnitNameCall wrap *gomock.Call +type MockUnitPortRangesUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesUnitNameCall) Return(arg0 string) *MockUnitPortRangesUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesUnitNameCall) Do(f func() string) *MockUnitPortRangesUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesUnitNameCall) DoAndReturn(f func() string) *MockUnitPortRangesUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudContainer is a mock of CloudContainer interface. @@ -447,9 +975,33 @@ func (m *MockCloudContainer) Address() *network.SpaceAddress { } // Address indicates an expected call of Address. -func (mr *MockCloudContainerMockRecorder) Address() *gomock.Call { +func (mr *MockCloudContainerMockRecorder) Address() *MockCloudContainerAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockCloudContainer)(nil).Address)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockCloudContainer)(nil).Address)) + return &MockCloudContainerAddressCall{Call: call} +} + +// MockCloudContainerAddressCall wrap *gomock.Call +type MockCloudContainerAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudContainerAddressCall) Return(arg0 *network.SpaceAddress) *MockCloudContainerAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudContainerAddressCall) Do(f func() *network.SpaceAddress) *MockCloudContainerAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudContainerAddressCall) DoAndReturn(f func() *network.SpaceAddress) *MockCloudContainerAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ports mocks base method. @@ -461,9 +1013,33 @@ func (m *MockCloudContainer) Ports() []string { } // Ports indicates an expected call of Ports. -func (mr *MockCloudContainerMockRecorder) Ports() *gomock.Call { +func (mr *MockCloudContainerMockRecorder) Ports() *MockCloudContainerPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ports", reflect.TypeOf((*MockCloudContainer)(nil).Ports)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ports", reflect.TypeOf((*MockCloudContainer)(nil).Ports)) + return &MockCloudContainerPortsCall{Call: call} +} + +// MockCloudContainerPortsCall wrap *gomock.Call +type MockCloudContainerPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudContainerPortsCall) Return(arg0 []string) *MockCloudContainerPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudContainerPortsCall) Do(f func() []string) *MockCloudContainerPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudContainerPortsCall) DoAndReturn(f func() []string) *MockCloudContainerPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderId mocks base method. @@ -475,9 +1051,33 @@ func (m *MockCloudContainer) ProviderId() string { } // ProviderId indicates an expected call of ProviderId. -func (mr *MockCloudContainerMockRecorder) ProviderId() *gomock.Call { +func (mr *MockCloudContainerMockRecorder) ProviderId() *MockCloudContainerProviderIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockCloudContainer)(nil).ProviderId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockCloudContainer)(nil).ProviderId)) + return &MockCloudContainerProviderIdCall{Call: call} +} + +// MockCloudContainerProviderIdCall wrap *gomock.Call +type MockCloudContainerProviderIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudContainerProviderIdCall) Return(arg0 string) *MockCloudContainerProviderIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudContainerProviderIdCall) Do(f func() string) *MockCloudContainerProviderIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudContainerProviderIdCall) DoAndReturn(f func() string) *MockCloudContainerProviderIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -489,7 +1089,31 @@ func (m *MockCloudContainer) Unit() string { } // Unit indicates an expected call of Unit. -func (mr *MockCloudContainerMockRecorder) Unit() *gomock.Call { +func (mr *MockCloudContainerMockRecorder) Unit() *MockCloudContainerUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockCloudContainer)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockCloudContainer)(nil).Unit)) + return &MockCloudContainerUnitCall{Call: call} +} + +// MockCloudContainerUnitCall wrap *gomock.Call +type MockCloudContainerUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudContainerUnitCall) Return(arg0 string) *MockCloudContainerUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudContainerUnitCall) Do(f func() string) *MockCloudContainerUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudContainerUnitCall) DoAndReturn(f func() string) *MockCloudContainerUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/mocks/storage_mock.go b/apiserver/facades/client/application/mocks/storage_mock.go index 020ae361893..f56ab152c37 100644 --- a/apiserver/facades/client/application/mocks/storage_mock.go +++ b/apiserver/facades/client/application/mocks/storage_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/storage_mock.go github.com/juju/juju/internal/storage ProviderRegistry +// mockgen -typed -package mocks -destination mocks/storage_mock.go github.com/juju/juju/internal/storage ProviderRegistry // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockProviderRegistry) StorageProvider(arg0 storage.ProviderType) (stora } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockProviderRegistryMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockProviderRegistryMockRecorder) StorageProvider(arg0 any) *MockProviderRegistryStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProvider), arg0) + return &MockProviderRegistryStorageProviderCall{Call: call} +} + +// MockProviderRegistryStorageProviderCall wrap *gomock.Call +type MockProviderRegistryStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderRegistryStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderRegistryStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderRegistryStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -64,7 +88,31 @@ func (m *MockProviderRegistry) StorageProviderTypes() ([]storage.ProviderType, e } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockProviderRegistryMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockProviderRegistryMockRecorder) StorageProviderTypes() *MockProviderRegistryStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProviderTypes)) + return &MockProviderRegistryStorageProviderTypesCall{Call: call} +} + +// MockProviderRegistryStorageProviderTypesCall wrap *gomock.Call +type MockProviderRegistryStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderRegistryStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderRegistryStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderRegistryStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/package_test.go b/apiserver/facades/client/application/package_test.go index 140d7291f78..2b6d9b615c5 100644 --- a/apiserver/facades/client/application/package_test.go +++ b/apiserver/facades/client/application/package_test.go @@ -13,14 +13,14 @@ func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/charm/v13 LXDProfiler -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/state StorageAttachment,StorageInstance,MachinePortRanges,UnitPortRanges,CloudContainer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/storage_mock.go github.com/juju/juju/internal/storage ProviderRegistry -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Reader -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/apiserver/facades/client/application Backend,StorageInterface,BlockChecker,Model,CaasBrokerInterface,Application,RemoteApplication,Charm,Relation,Unit,RelationUnit,Machine,Generation,Bindings,Resources -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/offer_mock.go github.com/juju/juju/apiserver/facades/client/application OfferConnection -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/objectstore_mock.go github.com/juju/juju/core/objectstore ObjectStore -//go:generate go run go.uber.org/mock/mockgen -package application -destination updatebase_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Application,Charm,UpdateBaseState,UpdateBaseValidator,CharmhubClient -//go:generate go run go.uber.org/mock/mockgen -package application -destination deployrepository_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Bindings,DeployFromRepositoryState,DeployFromRepositoryValidator,Model,Machine -//go:generate go run go.uber.org/mock/mockgen -package application -destination repository_mocks_test.go github.com/juju/juju/core/charm Repository,RepositoryFactory -//go:generate go run go.uber.org/mock/mockgen -package application -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/application MachineService,ApplicationService,StoragePoolGetter,NetworkService,ExternalControllerService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/charm/v13 LXDProfiler +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/state StorageAttachment,StorageInstance,MachinePortRanges,UnitPortRanges,CloudContainer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/storage_mock.go github.com/juju/juju/internal/storage ProviderRegistry +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Reader +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/apiserver/facades/client/application Backend,StorageInterface,BlockChecker,Model,CaasBrokerInterface,Application,RemoteApplication,Charm,Relation,Unit,RelationUnit,Machine,Generation,Bindings,Resources +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/offer_mock.go github.com/juju/juju/apiserver/facades/client/application OfferConnection +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/objectstore_mock.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package application -destination updatebase_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Application,Charm,UpdateBaseState,UpdateBaseValidator,CharmhubClient +//go:generate go run go.uber.org/mock/mockgen -typed -package application -destination deployrepository_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Bindings,DeployFromRepositoryState,DeployFromRepositoryValidator,Model,Machine +//go:generate go run go.uber.org/mock/mockgen -typed -package application -destination repository_mocks_test.go github.com/juju/juju/core/charm Repository,RepositoryFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package application -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/application MachineService,ApplicationService,StoragePoolGetter,NetworkService,ExternalControllerService diff --git a/apiserver/facades/client/application/repository_mocks_test.go b/apiserver/facades/client/application/repository_mocks_test.go index 289a391714e..cc940c46546 100644 --- a/apiserver/facades/client/application/repository_mocks_test.go +++ b/apiserver/facades/client/application/repository_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package application -destination repository_mocks_test.go github.com/juju/juju/core/charm Repository,RepositoryFactory +// mockgen -typed -package application -destination repository_mocks_test.go github.com/juju/juju/core/charm Repository,RepositoryFactory // // Package application is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockRepository) DownloadCharm(arg0 context.Context, arg1 string, arg2 c } // DownloadCharm indicates an expected call of DownloadCharm. -func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *MockRepositoryDownloadCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + return &MockRepositoryDownloadCharmCall{Call: call} +} + +// MockRepositoryDownloadCharmCall wrap *gomock.Call +type MockRepositoryDownloadCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryDownloadCharmCall) Return(arg0 charm0.CharmArchive, arg1 charm0.Origin, arg2 error) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryDownloadCharmCall) Do(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryDownloadCharmCall) DoAndReturn(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetDownloadURL mocks base method. @@ -70,9 +94,33 @@ func (m *MockRepository) GetDownloadURL(arg0 context.Context, arg1 string, arg2 } // GetDownloadURL indicates an expected call of GetDownloadURL. -func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *MockRepositoryGetDownloadURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + return &MockRepositoryGetDownloadURLCall{Call: call} +} + +// MockRepositoryGetDownloadURLCall wrap *gomock.Call +type MockRepositoryGetDownloadURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetDownloadURLCall) Return(arg0 *url.URL, arg1 charm0.Origin, arg2 error) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetDownloadURLCall) Do(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetDownloadURLCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetEssentialMetadata mocks base method. @@ -89,10 +137,34 @@ func (m *MockRepository) GetEssentialMetadata(arg0 context.Context, arg1 ...char } // GetEssentialMetadata indicates an expected call of GetEssentialMetadata. -func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *MockRepositoryGetEssentialMetadataCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + return &MockRepositoryGetEssentialMetadataCall{Call: call} +} + +// MockRepositoryGetEssentialMetadataCall wrap *gomock.Call +type MockRepositoryGetEssentialMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetEssentialMetadataCall) Return(arg0 []charm0.EssentialMetadata, arg1 error) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetEssentialMetadataCall) Do(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetEssentialMetadataCall) DoAndReturn(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -105,9 +177,33 @@ func (m *MockRepository) ListResources(arg0 context.Context, arg1 string, arg2 c } // ListResources indicates an expected call of ListResources. -func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *MockRepositoryListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + return &MockRepositoryListResourcesCall{Call: call} +} + +// MockRepositoryListResourcesCall wrap *gomock.Call +type MockRepositoryListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryListResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryListResourcesCall) Do(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryListResourcesCall) DoAndReturn(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveForDeploy mocks base method. @@ -120,9 +216,33 @@ func (m *MockRepository) ResolveForDeploy(arg0 context.Context, arg1 charm0.Char } // ResolveForDeploy indicates an expected call of ResolveForDeploy. -func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *MockRepositoryResolveForDeployCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + return &MockRepositoryResolveForDeployCall{Call: call} +} + +// MockRepositoryResolveForDeployCall wrap *gomock.Call +type MockRepositoryResolveForDeployCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveForDeployCall) Return(arg0 charm0.ResolvedDataForDeploy, arg1 error) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveForDeployCall) Do(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveForDeployCall) DoAndReturn(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveResources mocks base method. @@ -135,9 +255,33 @@ func (m *MockRepository) ResolveResources(arg0 context.Context, arg1 []resource. } // ResolveResources indicates an expected call of ResolveResources. -func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *MockRepositoryResolveResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + return &MockRepositoryResolveResourcesCall{Call: call} +} + +// MockRepositoryResolveResourcesCall wrap *gomock.Call +type MockRepositoryResolveResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveResourcesCall) Do(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveResourcesCall) DoAndReturn(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveWithPreferredChannel mocks base method. @@ -152,9 +296,33 @@ func (m *MockRepository) ResolveWithPreferredChannel(arg0 context.Context, arg1 } // ResolveWithPreferredChannel indicates an expected call of ResolveWithPreferredChannel. -func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *MockRepositoryResolveWithPreferredChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + return &MockRepositoryResolveWithPreferredChannelCall{Call: call} +} + +// MockRepositoryResolveWithPreferredChannelCall wrap *gomock.Call +type MockRepositoryResolveWithPreferredChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveWithPreferredChannelCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []charm0.Platform, arg3 error) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveWithPreferredChannelCall) Do(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveWithPreferredChannelCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRepositoryFactory is a mock of RepositoryFactory interface. @@ -190,7 +358,31 @@ func (m *MockRepositoryFactory) GetCharmRepository(arg0 context.Context, arg1 ch } // GetCharmRepository indicates an expected call of GetCharmRepository. -func (mr *MockRepositoryFactoryMockRecorder) GetCharmRepository(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryFactoryMockRecorder) GetCharmRepository(arg0, arg1 any) *MockRepositoryFactoryGetCharmRepositoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryFactory)(nil).GetCharmRepository), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryFactory)(nil).GetCharmRepository), arg0, arg1) + return &MockRepositoryFactoryGetCharmRepositoryCall{Call: call} +} + +// MockRepositoryFactoryGetCharmRepositoryCall wrap *gomock.Call +type MockRepositoryFactoryGetCharmRepositoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryFactoryGetCharmRepositoryCall) Return(arg0 charm0.Repository, arg1 error) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryFactoryGetCharmRepositoryCall) Do(f func(context.Context, charm0.Source) (charm0.Repository, error)) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryFactoryGetCharmRepositoryCall) DoAndReturn(f func(context.Context, charm0.Source) (charm0.Repository, error)) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/application/updatebase_mocks_test.go b/apiserver/facades/client/application/updatebase_mocks_test.go index 54e520ae5e3..748c5337ec5 100644 --- a/apiserver/facades/client/application/updatebase_mocks_test.go +++ b/apiserver/facades/client/application/updatebase_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package application -destination updatebase_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Application,Charm,UpdateBaseState,UpdateBaseValidator,CharmhubClient +// mockgen -typed -package application -destination updatebase_mocks_test.go github.com/juju/juju/apiserver/facades/client/application Application,Charm,UpdateBaseState,UpdateBaseValidator,CharmhubClient // // Package application is a generated GoMock package. @@ -61,9 +61,33 @@ func (m *MockApplication) AddUnit(arg0 state.AddUnitParams) (Unit, error) { } // AddUnit indicates an expected call of AddUnit. -func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *MockApplicationAddUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + return &MockApplicationAddUnitCall{Call: call} +} + +// MockApplicationAddUnitCall wrap *gomock.Call +type MockApplicationAddUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddUnitCall) Return(arg0 Unit, arg1 error) *MockApplicationAddUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddUnitCall) Do(f func(state.AddUnitParams) (Unit, error)) *MockApplicationAddUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddUnitCall) DoAndReturn(f func(state.AddUnitParams) (Unit, error)) *MockApplicationAddUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentTools mocks base method. @@ -76,9 +100,33 @@ func (m *MockApplication) AgentTools() (*tools.Tools, error) { } // AgentTools indicates an expected call of AgentTools. -func (mr *MockApplicationMockRecorder) AgentTools() *gomock.Call { +func (mr *MockApplicationMockRecorder) AgentTools() *MockApplicationAgentToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockApplication)(nil).AgentTools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTools", reflect.TypeOf((*MockApplication)(nil).AgentTools)) + return &MockApplicationAgentToolsCall{Call: call} +} + +// MockApplicationAgentToolsCall wrap *gomock.Call +type MockApplicationAgentToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAgentToolsCall) Return(arg0 *tools.Tools, arg1 error) *MockApplicationAgentToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAgentToolsCall) Do(f func() (*tools.Tools, error)) *MockApplicationAgentToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAgentToolsCall) DoAndReturn(f func() (*tools.Tools, error)) *MockApplicationAgentToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllUnits mocks base method. @@ -91,9 +139,33 @@ func (m *MockApplication) AllUnits() ([]Unit, error) { } // AllUnits indicates an expected call of AllUnits. -func (mr *MockApplicationMockRecorder) AllUnits() *gomock.Call { +func (mr *MockApplicationMockRecorder) AllUnits() *MockApplicationAllUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + return &MockApplicationAllUnitsCall{Call: call} +} + +// MockApplicationAllUnitsCall wrap *gomock.Call +type MockApplicationAllUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAllUnitsCall) Return(arg0 []Unit, arg1 error) *MockApplicationAllUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAllUnitsCall) Do(f func() ([]Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAllUnitsCall) DoAndReturn(f func() ([]Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationConfig mocks base method. @@ -106,9 +178,33 @@ func (m *MockApplication) ApplicationConfig() (config.ConfigAttributes, error) { } // ApplicationConfig indicates an expected call of ApplicationConfig. -func (mr *MockApplicationMockRecorder) ApplicationConfig() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationConfig() *MockApplicationApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + return &MockApplicationApplicationConfigCall{Call: call} +} + +// MockApplicationApplicationConfigCall wrap *gomock.Call +type MockApplicationApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationConfigCall) Return(arg0 config.ConfigAttributes, arg1 error) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationConfigCall) Do(f func() (config.ConfigAttributes, error)) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationConfigCall) DoAndReturn(f func() (config.ConfigAttributes, error)) *MockApplicationApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationTag mocks base method. @@ -120,9 +216,33 @@ func (m *MockApplication) ApplicationTag() names.ApplicationTag { } // ApplicationTag indicates an expected call of ApplicationTag. -func (mr *MockApplicationMockRecorder) ApplicationTag() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationTag() *MockApplicationApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + return &MockApplicationApplicationTagCall{Call: call} +} + +// MockApplicationApplicationTagCall wrap *gomock.Call +type MockApplicationApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ChangeScale mocks base method. @@ -135,9 +255,33 @@ func (m *MockApplication) ChangeScale(arg0 int) (int, error) { } // ChangeScale indicates an expected call of ChangeScale. -func (mr *MockApplicationMockRecorder) ChangeScale(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) ChangeScale(arg0 any) *MockApplicationChangeScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeScale", reflect.TypeOf((*MockApplication)(nil).ChangeScale), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeScale", reflect.TypeOf((*MockApplication)(nil).ChangeScale), arg0) + return &MockApplicationChangeScaleCall{Call: call} +} + +// MockApplicationChangeScaleCall wrap *gomock.Call +type MockApplicationChangeScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationChangeScaleCall) Return(arg0 int, arg1 error) *MockApplicationChangeScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationChangeScaleCall) Do(f func(int) (int, error)) *MockApplicationChangeScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationChangeScaleCall) DoAndReturn(f func(int) (int, error)) *MockApplicationChangeScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -151,9 +295,33 @@ func (m *MockApplication) Charm() (Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmConfig mocks base method. @@ -166,9 +334,33 @@ func (m *MockApplication) CharmConfig(arg0 string) (charm.Settings, error) { } // CharmConfig indicates an expected call of CharmConfig. -func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *MockApplicationCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + return &MockApplicationCharmConfigCall{Call: call} +} + +// MockApplicationCharmConfigCall wrap *gomock.Call +type MockApplicationCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmConfigCall) Return(arg0 charm.Settings, arg1 error) *MockApplicationCharmConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmConfigCall) Do(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmConfigCall) DoAndReturn(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -180,9 +372,33 @@ func (m *MockApplication) CharmOrigin() *state.CharmOrigin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -195,9 +411,33 @@ func (m *MockApplication) CharmURL() (*string, bool) { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 *string, arg1 bool) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClearExposed mocks base method. @@ -209,9 +449,33 @@ func (m *MockApplication) ClearExposed() error { } // ClearExposed indicates an expected call of ClearExposed. -func (mr *MockApplicationMockRecorder) ClearExposed() *gomock.Call { +func (mr *MockApplicationMockRecorder) ClearExposed() *MockApplicationClearExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearExposed", reflect.TypeOf((*MockApplication)(nil).ClearExposed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearExposed", reflect.TypeOf((*MockApplication)(nil).ClearExposed)) + return &MockApplicationClearExposedCall{Call: call} +} + +// MockApplicationClearExposedCall wrap *gomock.Call +type MockApplicationClearExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationClearExposedCall) Return(arg0 error) *MockApplicationClearExposedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationClearExposedCall) Do(f func() error) *MockApplicationClearExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationClearExposedCall) DoAndReturn(f func() error) *MockApplicationClearExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -224,9 +488,33 @@ func (m *MockApplication) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockApplicationMockRecorder) Constraints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Constraints() *MockApplicationConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + return &MockApplicationConstraintsCall{Call: call} +} + +// MockApplicationConstraintsCall wrap *gomock.Call +type MockApplicationConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockApplicationConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationConstraintsCall) Do(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -238,9 +526,33 @@ func (m *MockApplication) Destroy(arg0 objectstore.ObjectStore) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockApplicationMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Destroy(arg0 any) *MockApplicationDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockApplication)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockApplication)(nil).Destroy), arg0) + return &MockApplicationDestroyCall{Call: call} +} + +// MockApplicationDestroyCall wrap *gomock.Call +type MockApplicationDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDestroyCall) Return(arg0 error) *MockApplicationDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDestroyCall) Do(f func(objectstore.ObjectStore) error) *MockApplicationDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDestroyCall) DoAndReturn(f func(objectstore.ObjectStore) error) *MockApplicationDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyOperation mocks base method. @@ -252,9 +564,33 @@ func (m *MockApplication) DestroyOperation(arg0 objectstore.ObjectStore) *state. } // DestroyOperation indicates an expected call of DestroyOperation. -func (mr *MockApplicationMockRecorder) DestroyOperation(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) DestroyOperation(arg0 any) *MockApplicationDestroyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockApplication)(nil).DestroyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyOperation", reflect.TypeOf((*MockApplication)(nil).DestroyOperation), arg0) + return &MockApplicationDestroyOperationCall{Call: call} +} + +// MockApplicationDestroyOperationCall wrap *gomock.Call +type MockApplicationDestroyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDestroyOperationCall) Return(arg0 *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDestroyOperationCall) Do(f func(objectstore.ObjectStore) *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDestroyOperationCall) DoAndReturn(f func(objectstore.ObjectStore) *state.DestroyApplicationOperation) *MockApplicationDestroyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointBindings mocks base method. @@ -267,9 +603,33 @@ func (m *MockApplication) EndpointBindings() (Bindings, error) { } // EndpointBindings indicates an expected call of EndpointBindings. -func (mr *MockApplicationMockRecorder) EndpointBindings() *gomock.Call { +func (mr *MockApplicationMockRecorder) EndpointBindings() *MockApplicationEndpointBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + return &MockApplicationEndpointBindingsCall{Call: call} +} + +// MockApplicationEndpointBindingsCall wrap *gomock.Call +type MockApplicationEndpointBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEndpointBindingsCall) Return(arg0 Bindings, arg1 error) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEndpointBindingsCall) Do(f func() (Bindings, error)) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEndpointBindingsCall) DoAndReturn(f func() (Bindings, error)) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -282,9 +642,33 @@ func (m *MockApplication) Endpoints() ([]state.Endpoint, error) { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Endpoints() *MockApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplication)(nil).Endpoints)) + return &MockApplicationEndpointsCall{Call: call} +} + +// MockApplicationEndpointsCall wrap *gomock.Call +type MockApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockApplicationEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEndpointsCall) Do(f func() ([]state.Endpoint, error)) *MockApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEndpointsCall) DoAndReturn(f func() ([]state.Endpoint, error)) *MockApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExposedEndpoints mocks base method. @@ -296,9 +680,33 @@ func (m *MockApplication) ExposedEndpoints() map[string]state.ExposedEndpoint { } // ExposedEndpoints indicates an expected call of ExposedEndpoints. -func (mr *MockApplicationMockRecorder) ExposedEndpoints() *gomock.Call { +func (mr *MockApplicationMockRecorder) ExposedEndpoints() *MockApplicationExposedEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + return &MockApplicationExposedEndpointsCall{Call: call} +} + +// MockApplicationExposedEndpointsCall wrap *gomock.Call +type MockApplicationExposedEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposedEndpointsCall) Return(arg0 map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposedEndpointsCall) Do(f func() map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposedEndpointsCall) DoAndReturn(f func() map[string]state.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsExposed mocks base method. @@ -310,9 +718,33 @@ func (m *MockApplication) IsExposed() bool { } // IsExposed indicates an expected call of IsExposed. -func (mr *MockApplicationMockRecorder) IsExposed() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsExposed() *MockApplicationIsExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockApplication)(nil).IsExposed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockApplication)(nil).IsExposed)) + return &MockApplicationIsExposedCall{Call: call} +} + +// MockApplicationIsExposedCall wrap *gomock.Call +type MockApplicationIsExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsExposedCall) Return(arg0 bool) *MockApplicationIsExposedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsExposedCall) Do(f func() bool) *MockApplicationIsExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsExposedCall) DoAndReturn(f func() bool) *MockApplicationIsExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsPrincipal mocks base method. @@ -324,9 +756,33 @@ func (m *MockApplication) IsPrincipal() bool { } // IsPrincipal indicates an expected call of IsPrincipal. -func (mr *MockApplicationMockRecorder) IsPrincipal() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsPrincipal() *MockApplicationIsPrincipalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + return &MockApplicationIsPrincipalCall{Call: call} +} + +// MockApplicationIsPrincipalCall wrap *gomock.Call +type MockApplicationIsPrincipalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsPrincipalCall) Return(arg0 bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsPrincipalCall) Do(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsPrincipalCall) DoAndReturn(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsRemote mocks base method. @@ -338,9 +794,33 @@ func (m *MockApplication) IsRemote() bool { } // IsRemote indicates an expected call of IsRemote. -func (mr *MockApplicationMockRecorder) IsRemote() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsRemote() *MockApplicationIsRemoteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRemote", reflect.TypeOf((*MockApplication)(nil).IsRemote)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRemote", reflect.TypeOf((*MockApplication)(nil).IsRemote)) + return &MockApplicationIsRemoteCall{Call: call} +} + +// MockApplicationIsRemoteCall wrap *gomock.Call +type MockApplicationIsRemoteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsRemoteCall) Return(arg0 bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsRemoteCall) Do(f func() bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsRemoteCall) DoAndReturn(f func() bool) *MockApplicationIsRemoteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -352,9 +832,33 @@ func (m *MockApplication) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockApplicationMockRecorder) Life() *gomock.Call { +func (mr *MockApplicationMockRecorder) Life() *MockApplicationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + return &MockApplicationLifeCall{Call: call} +} + +// MockApplicationLifeCall wrap *gomock.Call +type MockApplicationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationLifeCall) Return(arg0 state.Life) *MockApplicationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationLifeCall) Do(f func() state.Life) *MockApplicationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationLifeCall) DoAndReturn(f func() state.Life) *MockApplicationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MergeBindings mocks base method. @@ -366,9 +870,33 @@ func (m *MockApplication) MergeBindings(arg0 *state.Bindings, arg1 bool) error { } // MergeBindings indicates an expected call of MergeBindings. -func (mr *MockApplicationMockRecorder) MergeBindings(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) MergeBindings(arg0, arg1 any) *MockApplicationMergeBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplication)(nil).MergeBindings), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplication)(nil).MergeBindings), arg0, arg1) + return &MockApplicationMergeBindingsCall{Call: call} +} + +// MockApplicationMergeBindingsCall wrap *gomock.Call +type MockApplicationMergeBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMergeBindingsCall) Return(arg0 error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMergeBindingsCall) Do(f func(*state.Bindings, bool) error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMergeBindingsCall) DoAndReturn(f func(*state.Bindings, bool) error) *MockApplicationMergeBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MergeExposeSettings mocks base method. @@ -380,9 +908,33 @@ func (m *MockApplication) MergeExposeSettings(arg0 map[string]state.ExposedEndpo } // MergeExposeSettings indicates an expected call of MergeExposeSettings. -func (mr *MockApplicationMockRecorder) MergeExposeSettings(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) MergeExposeSettings(arg0 any) *MockApplicationMergeExposeSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeExposeSettings", reflect.TypeOf((*MockApplication)(nil).MergeExposeSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeExposeSettings", reflect.TypeOf((*MockApplication)(nil).MergeExposeSettings), arg0) + return &MockApplicationMergeExposeSettingsCall{Call: call} +} + +// MockApplicationMergeExposeSettingsCall wrap *gomock.Call +type MockApplicationMergeExposeSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMergeExposeSettingsCall) Return(arg0 error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMergeExposeSettingsCall) Do(f func(map[string]state.ExposedEndpoint) error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMergeExposeSettingsCall) DoAndReturn(f func(map[string]state.ExposedEndpoint) error) *MockApplicationMergeExposeSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -394,9 +946,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relations mocks base method. @@ -409,9 +985,33 @@ func (m *MockApplication) Relations() ([]Relation, error) { } // Relations indicates an expected call of Relations. -func (mr *MockApplicationMockRecorder) Relations() *gomock.Call { +func (mr *MockApplicationMockRecorder) Relations() *MockApplicationRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + return &MockApplicationRelationsCall{Call: call} +} + +// MockApplicationRelationsCall wrap *gomock.Call +type MockApplicationRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationRelationsCall) Return(arg0 []Relation, arg1 error) *MockApplicationRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationRelationsCall) Do(f func() ([]Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationRelationsCall) DoAndReturn(f func() ([]Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharm mocks base method. @@ -423,9 +1023,33 @@ func (m *MockApplication) SetCharm(arg0 state.SetCharmConfig, arg1 objectstore.O } // SetCharm indicates an expected call of SetCharm. -func (mr *MockApplicationMockRecorder) SetCharm(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetCharm(arg0, arg1 any) *MockApplicationSetCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplication)(nil).SetCharm), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplication)(nil).SetCharm), arg0, arg1) + return &MockApplicationSetCharmCall{Call: call} +} + +// MockApplicationSetCharmCall wrap *gomock.Call +type MockApplicationSetCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetCharmCall) Return(arg0 error) *MockApplicationSetCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetCharmCall) Do(f func(state.SetCharmConfig, objectstore.ObjectStore) error) *MockApplicationSetCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetCharmCall) DoAndReturn(f func(state.SetCharmConfig, objectstore.ObjectStore) error) *MockApplicationSetCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -437,9 +1061,33 @@ func (m *MockApplication) SetConstraints(arg0 constraints.Value) error { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *MockApplicationSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + return &MockApplicationSetConstraintsCall{Call: call} +} + +// MockApplicationSetConstraintsCall wrap *gomock.Call +type MockApplicationSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetConstraintsCall) Return(arg0 error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetConstraintsCall) Do(f func(constraints.Value) error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetConstraintsCall) DoAndReturn(f func(constraints.Value) error) *MockApplicationSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMinUnits mocks base method. @@ -451,9 +1099,33 @@ func (m *MockApplication) SetMinUnits(arg0 int) error { } // SetMinUnits indicates an expected call of SetMinUnits. -func (mr *MockApplicationMockRecorder) SetMinUnits(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetMinUnits(arg0 any) *MockApplicationSetMinUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMinUnits", reflect.TypeOf((*MockApplication)(nil).SetMinUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMinUnits", reflect.TypeOf((*MockApplication)(nil).SetMinUnits), arg0) + return &MockApplicationSetMinUnitsCall{Call: call} +} + +// MockApplicationSetMinUnitsCall wrap *gomock.Call +type MockApplicationSetMinUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetMinUnitsCall) Return(arg0 error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetMinUnitsCall) Do(f func(int) error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetMinUnitsCall) DoAndReturn(f func(int) error) *MockApplicationSetMinUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetScale mocks base method. @@ -465,9 +1137,33 @@ func (m *MockApplication) SetScale(arg0 int, arg1 int64, arg2 bool) error { } // SetScale indicates an expected call of SetScale. -func (mr *MockApplicationMockRecorder) SetScale(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetScale(arg0, arg1, arg2 any) *MockApplicationSetScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetScale", reflect.TypeOf((*MockApplication)(nil).SetScale), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetScale", reflect.TypeOf((*MockApplication)(nil).SetScale), arg0, arg1, arg2) + return &MockApplicationSetScaleCall{Call: call} +} + +// MockApplicationSetScaleCall wrap *gomock.Call +type MockApplicationSetScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetScaleCall) Return(arg0 error) *MockApplicationSetScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetScaleCall) Do(f func(int, int64, bool) error) *MockApplicationSetScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetScaleCall) DoAndReturn(f func(int, int64, bool) error) *MockApplicationSetScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnsetExposeSettings mocks base method. @@ -479,9 +1175,33 @@ func (m *MockApplication) UnsetExposeSettings(arg0 []string) error { } // UnsetExposeSettings indicates an expected call of UnsetExposeSettings. -func (mr *MockApplicationMockRecorder) UnsetExposeSettings(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UnsetExposeSettings(arg0 any) *MockApplicationUnsetExposeSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetExposeSettings", reflect.TypeOf((*MockApplication)(nil).UnsetExposeSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetExposeSettings", reflect.TypeOf((*MockApplication)(nil).UnsetExposeSettings), arg0) + return &MockApplicationUnsetExposeSettingsCall{Call: call} +} + +// MockApplicationUnsetExposeSettingsCall wrap *gomock.Call +type MockApplicationUnsetExposeSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnsetExposeSettingsCall) Return(arg0 error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnsetExposeSettingsCall) Do(f func([]string) error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnsetExposeSettingsCall) DoAndReturn(f func([]string) error) *MockApplicationUnsetExposeSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationBase mocks base method. @@ -493,9 +1213,33 @@ func (m *MockApplication) UpdateApplicationBase(arg0 state.Base, arg1 bool) erro } // UpdateApplicationBase indicates an expected call of UpdateApplicationBase. -func (mr *MockApplicationMockRecorder) UpdateApplicationBase(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateApplicationBase(arg0, arg1 any) *MockApplicationUpdateApplicationBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationBase", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationBase), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationBase", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationBase), arg0, arg1) + return &MockApplicationUpdateApplicationBaseCall{Call: call} +} + +// MockApplicationUpdateApplicationBaseCall wrap *gomock.Call +type MockApplicationUpdateApplicationBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateApplicationBaseCall) Return(arg0 error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateApplicationBaseCall) Do(f func(state.Base, bool) error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateApplicationBaseCall) DoAndReturn(f func(state.Base, bool) error) *MockApplicationUpdateApplicationBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationConfig mocks base method. @@ -507,9 +1251,33 @@ func (m *MockApplication) UpdateApplicationConfig(arg0 config.ConfigAttributes, } // UpdateApplicationConfig indicates an expected call of UpdateApplicationConfig. -func (mr *MockApplicationMockRecorder) UpdateApplicationConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateApplicationConfig(arg0, arg1, arg2, arg3 any) *MockApplicationUpdateApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationConfig", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationConfig), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationConfig", reflect.TypeOf((*MockApplication)(nil).UpdateApplicationConfig), arg0, arg1, arg2, arg3) + return &MockApplicationUpdateApplicationConfigCall{Call: call} +} + +// MockApplicationUpdateApplicationConfigCall wrap *gomock.Call +type MockApplicationUpdateApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateApplicationConfigCall) Return(arg0 error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateApplicationConfigCall) Do(f func(config.ConfigAttributes, []string, environschema.Fields, schema.Defaults) error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateApplicationConfigCall) DoAndReturn(f func(config.ConfigAttributes, []string, environschema.Fields, schema.Defaults) error) *MockApplicationUpdateApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCharmConfig mocks base method. @@ -521,9 +1289,33 @@ func (m *MockApplication) UpdateCharmConfig(arg0 string, arg1 charm.Settings) er } // UpdateCharmConfig indicates an expected call of UpdateCharmConfig. -func (mr *MockApplicationMockRecorder) UpdateCharmConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateCharmConfig(arg0, arg1 any) *MockApplicationUpdateCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmConfig", reflect.TypeOf((*MockApplication)(nil).UpdateCharmConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCharmConfig", reflect.TypeOf((*MockApplication)(nil).UpdateCharmConfig), arg0, arg1) + return &MockApplicationUpdateCharmConfigCall{Call: call} +} + +// MockApplicationUpdateCharmConfigCall wrap *gomock.Call +type MockApplicationUpdateCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateCharmConfigCall) Return(arg0 error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateCharmConfigCall) Do(f func(string, charm.Settings) error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateCharmConfigCall) DoAndReturn(f func(string, charm.Settings) error) *MockApplicationUpdateCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -558,9 +1350,33 @@ func (m *MockCharm) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmMockRecorder) Actions() *MockCharmActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + return &MockCharmActionsCall{Call: call} +} + +// MockCharmActionsCall wrap *gomock.Call +type MockCharmActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmActionsCall) Return(arg0 *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmActionsCall) Do(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -572,9 +1388,33 @@ func (m *MockCharm) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmMockRecorder) Config() *gomock.Call { +func (mr *MockCharmMockRecorder) Config() *MockCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + return &MockCharmConfigCall{Call: call} +} + +// MockCharmConfigCall wrap *gomock.Call +type MockCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmConfigCall) Return(arg0 *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmConfigCall) Do(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUploaded mocks base method. @@ -586,9 +1426,33 @@ func (m *MockCharm) IsUploaded() bool { } // IsUploaded indicates an expected call of IsUploaded. -func (mr *MockCharmMockRecorder) IsUploaded() *gomock.Call { +func (mr *MockCharmMockRecorder) IsUploaded() *MockCharmIsUploadedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockCharm)(nil).IsUploaded)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockCharm)(nil).IsUploaded)) + return &MockCharmIsUploadedCall{Call: call} +} + +// MockCharmIsUploadedCall wrap *gomock.Call +type MockCharmIsUploadedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmIsUploadedCall) Return(arg0 bool) *MockCharmIsUploadedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmIsUploadedCall) Do(f func() bool) *MockCharmIsUploadedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmIsUploadedCall) DoAndReturn(f func() bool) *MockCharmIsUploadedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -600,9 +1464,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -614,9 +1502,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -628,9 +1540,33 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpdateBaseState is a mock of UpdateBaseState interface. @@ -666,9 +1602,33 @@ func (m *MockUpdateBaseState) Application(arg0 string) (Application, error) { } // Application indicates an expected call of Application. -func (mr *MockUpdateBaseStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockUpdateBaseStateMockRecorder) Application(arg0 any) *MockUpdateBaseStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUpdateBaseState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUpdateBaseState)(nil).Application), arg0) + return &MockUpdateBaseStateApplicationCall{Call: call} +} + +// MockUpdateBaseStateApplicationCall wrap *gomock.Call +type MockUpdateBaseStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateBaseStateApplicationCall) Return(arg0 Application, arg1 error) *MockUpdateBaseStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateBaseStateApplicationCall) Do(f func(string) (Application, error)) *MockUpdateBaseStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateBaseStateApplicationCall) DoAndReturn(f func(string) (Application, error)) *MockUpdateBaseStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpdateBaseValidator is a mock of UpdateBaseValidator interface. @@ -703,9 +1663,33 @@ func (m *MockUpdateBaseValidator) ValidateApplication(arg0 context.Context, arg1 } // ValidateApplication indicates an expected call of ValidateApplication. -func (mr *MockUpdateBaseValidatorMockRecorder) ValidateApplication(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUpdateBaseValidatorMockRecorder) ValidateApplication(arg0, arg1, arg2, arg3 any) *MockUpdateBaseValidatorValidateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateApplication", reflect.TypeOf((*MockUpdateBaseValidator)(nil).ValidateApplication), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateApplication", reflect.TypeOf((*MockUpdateBaseValidator)(nil).ValidateApplication), arg0, arg1, arg2, arg3) + return &MockUpdateBaseValidatorValidateApplicationCall{Call: call} +} + +// MockUpdateBaseValidatorValidateApplicationCall wrap *gomock.Call +type MockUpdateBaseValidatorValidateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateBaseValidatorValidateApplicationCall) Return(arg0 error) *MockUpdateBaseValidatorValidateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateBaseValidatorValidateApplicationCall) Do(f func(context.Context, Application, base.Base, bool) error) *MockUpdateBaseValidatorValidateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateBaseValidatorValidateApplicationCall) DoAndReturn(f func(context.Context, Application, base.Base, bool) error) *MockUpdateBaseValidatorValidateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmhubClient is a mock of CharmhubClient interface. @@ -741,7 +1725,31 @@ func (m *MockCharmhubClient) Refresh(arg0 context.Context, arg1 charmhub.Refresh } // Refresh indicates an expected call of Refresh. -func (mr *MockCharmhubClientMockRecorder) Refresh(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmhubClientMockRecorder) Refresh(arg0, arg1 any) *MockCharmhubClientRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmhubClient)(nil).Refresh), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmhubClient)(nil).Refresh), arg0, arg1) + return &MockCharmhubClientRefreshCall{Call: call} +} + +// MockCharmhubClientRefreshCall wrap *gomock.Call +type MockCharmhubClientRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmhubClientRefreshCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmhubClientRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmhubClientRefreshCall) Do(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmhubClientRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmhubClientRefreshCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmhubClientRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/bundle/package_mock_test.go b/apiserver/facades/client/bundle/package_mock_test.go index 2fcad6dd252..2a2b5a53d52 100644 --- a/apiserver/facades/client/bundle/package_mock_test.go +++ b/apiserver/facades/client/bundle/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bundle_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/bundle NetworkService +// mockgen -typed -package bundle_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/bundle NetworkService // // Package bundle_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/bundle/package_test.go b/apiserver/facades/client/bundle/package_test.go index 810444ed7f1..29996939e1e 100644 --- a/apiserver/facades/client/bundle/package_test.go +++ b/apiserver/facades/client/bundle/package_test.go @@ -9,7 +9,7 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package bundle_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/bundle NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package bundle_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/bundle NetworkService func Test(t *stdtesting.T) { testing.MgoTestPackage(t) } diff --git a/apiserver/facades/client/charms/mocks/repository.go b/apiserver/facades/client/charms/mocks/repository.go index ef3db27f2aa..dbb06e196a4 100644 --- a/apiserver/facades/client/charms/mocks/repository.go +++ b/apiserver/facades/client/charms/mocks/repository.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/repository.go github.com/juju/juju/core/charm Repository,RepositoryFactory,CharmArchive +// mockgen -typed -package mocks -destination mocks/repository.go github.com/juju/juju/core/charm Repository,RepositoryFactory,CharmArchive // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockRepository) DownloadCharm(arg0 context.Context, arg1 string, arg2 c } // DownloadCharm indicates an expected call of DownloadCharm. -func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *MockRepositoryDownloadCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + return &MockRepositoryDownloadCharmCall{Call: call} +} + +// MockRepositoryDownloadCharmCall wrap *gomock.Call +type MockRepositoryDownloadCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryDownloadCharmCall) Return(arg0 charm0.CharmArchive, arg1 charm0.Origin, arg2 error) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryDownloadCharmCall) Do(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryDownloadCharmCall) DoAndReturn(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetDownloadURL mocks base method. @@ -70,9 +94,33 @@ func (m *MockRepository) GetDownloadURL(arg0 context.Context, arg1 string, arg2 } // GetDownloadURL indicates an expected call of GetDownloadURL. -func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *MockRepositoryGetDownloadURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + return &MockRepositoryGetDownloadURLCall{Call: call} +} + +// MockRepositoryGetDownloadURLCall wrap *gomock.Call +type MockRepositoryGetDownloadURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetDownloadURLCall) Return(arg0 *url.URL, arg1 charm0.Origin, arg2 error) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetDownloadURLCall) Do(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetDownloadURLCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetEssentialMetadata mocks base method. @@ -89,10 +137,34 @@ func (m *MockRepository) GetEssentialMetadata(arg0 context.Context, arg1 ...char } // GetEssentialMetadata indicates an expected call of GetEssentialMetadata. -func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *MockRepositoryGetEssentialMetadataCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + return &MockRepositoryGetEssentialMetadataCall{Call: call} +} + +// MockRepositoryGetEssentialMetadataCall wrap *gomock.Call +type MockRepositoryGetEssentialMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetEssentialMetadataCall) Return(arg0 []charm0.EssentialMetadata, arg1 error) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetEssentialMetadataCall) Do(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetEssentialMetadataCall) DoAndReturn(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -105,9 +177,33 @@ func (m *MockRepository) ListResources(arg0 context.Context, arg1 string, arg2 c } // ListResources indicates an expected call of ListResources. -func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *MockRepositoryListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + return &MockRepositoryListResourcesCall{Call: call} +} + +// MockRepositoryListResourcesCall wrap *gomock.Call +type MockRepositoryListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryListResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryListResourcesCall) Do(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryListResourcesCall) DoAndReturn(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveForDeploy mocks base method. @@ -120,9 +216,33 @@ func (m *MockRepository) ResolveForDeploy(arg0 context.Context, arg1 charm0.Char } // ResolveForDeploy indicates an expected call of ResolveForDeploy. -func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *MockRepositoryResolveForDeployCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + return &MockRepositoryResolveForDeployCall{Call: call} +} + +// MockRepositoryResolveForDeployCall wrap *gomock.Call +type MockRepositoryResolveForDeployCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveForDeployCall) Return(arg0 charm0.ResolvedDataForDeploy, arg1 error) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveForDeployCall) Do(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveForDeployCall) DoAndReturn(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveResources mocks base method. @@ -135,9 +255,33 @@ func (m *MockRepository) ResolveResources(arg0 context.Context, arg1 []resource. } // ResolveResources indicates an expected call of ResolveResources. -func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *MockRepositoryResolveResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + return &MockRepositoryResolveResourcesCall{Call: call} +} + +// MockRepositoryResolveResourcesCall wrap *gomock.Call +type MockRepositoryResolveResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveResourcesCall) Do(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveResourcesCall) DoAndReturn(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveWithPreferredChannel mocks base method. @@ -152,9 +296,33 @@ func (m *MockRepository) ResolveWithPreferredChannel(arg0 context.Context, arg1 } // ResolveWithPreferredChannel indicates an expected call of ResolveWithPreferredChannel. -func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *MockRepositoryResolveWithPreferredChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + return &MockRepositoryResolveWithPreferredChannelCall{Call: call} +} + +// MockRepositoryResolveWithPreferredChannelCall wrap *gomock.Call +type MockRepositoryResolveWithPreferredChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveWithPreferredChannelCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []charm0.Platform, arg3 error) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveWithPreferredChannelCall) Do(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveWithPreferredChannelCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRepositoryFactory is a mock of RepositoryFactory interface. @@ -190,9 +358,33 @@ func (m *MockRepositoryFactory) GetCharmRepository(arg0 context.Context, arg1 ch } // GetCharmRepository indicates an expected call of GetCharmRepository. -func (mr *MockRepositoryFactoryMockRecorder) GetCharmRepository(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryFactoryMockRecorder) GetCharmRepository(arg0, arg1 any) *MockRepositoryFactoryGetCharmRepositoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryFactory)(nil).GetCharmRepository), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryFactory)(nil).GetCharmRepository), arg0, arg1) + return &MockRepositoryFactoryGetCharmRepositoryCall{Call: call} +} + +// MockRepositoryFactoryGetCharmRepositoryCall wrap *gomock.Call +type MockRepositoryFactoryGetCharmRepositoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryFactoryGetCharmRepositoryCall) Return(arg0 charm0.Repository, arg1 error) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryFactoryGetCharmRepositoryCall) Do(f func(context.Context, charm0.Source) (charm0.Repository, error)) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryFactoryGetCharmRepositoryCall) DoAndReturn(f func(context.Context, charm0.Source) (charm0.Repository, error)) *MockRepositoryFactoryGetCharmRepositoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmArchive is a mock of CharmArchive interface. @@ -227,9 +419,33 @@ func (m *MockCharmArchive) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmArchiveMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Actions() *MockCharmArchiveActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharmArchive)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharmArchive)(nil).Actions)) + return &MockCharmArchiveActionsCall{Call: call} +} + +// MockCharmArchiveActionsCall wrap *gomock.Call +type MockCharmArchiveActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveActionsCall) Return(arg0 *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveActionsCall) Do(f func() *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -241,9 +457,33 @@ func (m *MockCharmArchive) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmArchiveMockRecorder) Config() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Config() *MockCharmArchiveConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharmArchive)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharmArchive)(nil).Config)) + return &MockCharmArchiveConfigCall{Call: call} +} + +// MockCharmArchiveConfigCall wrap *gomock.Call +type MockCharmArchiveConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveConfigCall) Return(arg0 *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveConfigCall) Do(f func() *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfile mocks base method. @@ -255,9 +495,33 @@ func (m *MockCharmArchive) LXDProfile() *charm.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockCharmArchiveMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) LXDProfile() *MockCharmArchiveLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharmArchive)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharmArchive)(nil).LXDProfile)) + return &MockCharmArchiveLXDProfileCall{Call: call} +} + +// MockCharmArchiveLXDProfileCall wrap *gomock.Call +type MockCharmArchiveLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveLXDProfileCall) Return(arg0 *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveLXDProfileCall) Do(f func() *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveLXDProfileCall) DoAndReturn(f func() *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -269,9 +533,33 @@ func (m *MockCharmArchive) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmArchiveMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Manifest() *MockCharmArchiveManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmArchive)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmArchive)(nil).Manifest)) + return &MockCharmArchiveManifestCall{Call: call} +} + +// MockCharmArchiveManifestCall wrap *gomock.Call +type MockCharmArchiveManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveManifestCall) Return(arg0 *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveManifestCall) Do(f func() *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -283,9 +571,33 @@ func (m *MockCharmArchive) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmArchiveMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Meta() *MockCharmArchiveMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmArchive)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmArchive)(nil).Meta)) + return &MockCharmArchiveMetaCall{Call: call} +} + +// MockCharmArchiveMetaCall wrap *gomock.Call +type MockCharmArchiveMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveMetaCall) Return(arg0 *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveMetaCall) Do(f func() *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -297,9 +609,33 @@ func (m *MockCharmArchive) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmArchiveMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Revision() *MockCharmArchiveRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharmArchive)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharmArchive)(nil).Revision)) + return &MockCharmArchiveRevisionCall{Call: call} +} + +// MockCharmArchiveRevisionCall wrap *gomock.Call +type MockCharmArchiveRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveRevisionCall) Return(arg0 int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveRevisionCall) Do(f func() int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveRevisionCall) DoAndReturn(f func() int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -311,7 +647,31 @@ func (m *MockCharmArchive) Version() string { } // Version indicates an expected call of Version. -func (mr *MockCharmArchiveMockRecorder) Version() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Version() *MockCharmArchiveVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCharmArchive)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCharmArchive)(nil).Version)) + return &MockCharmArchiveVersionCall{Call: call} +} + +// MockCharmArchiveVersionCall wrap *gomock.Call +type MockCharmArchiveVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveVersionCall) Return(arg0 string) *MockCharmArchiveVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveVersionCall) Do(f func() string) *MockCharmArchiveVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveVersionCall) DoAndReturn(f func() string) *MockCharmArchiveVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/charms/mocks/state_mock.go b/apiserver/facades/client/charms/mocks/state_mock.go index 726c7d17da9..a48d76ab6f3 100644 --- a/apiserver/facades/client/charms/mocks/state_mock.go +++ b/apiserver/facades/client/charms/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/charms/interfaces BackendState,BackendModel,Application,Machine,Unit,Downloader +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/charms/interfaces BackendState,BackendModel,Application,Machine,Unit,Downloader // // Package mocks is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockBackendState) AddCharmMetadata(arg0 state.CharmInfo) (*state.Charm, } // AddCharmMetadata indicates an expected call of AddCharmMetadata. -func (mr *MockBackendStateMockRecorder) AddCharmMetadata(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) AddCharmMetadata(arg0 any) *MockBackendStateAddCharmMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockBackendState)(nil).AddCharmMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmMetadata", reflect.TypeOf((*MockBackendState)(nil).AddCharmMetadata), arg0) + return &MockBackendStateAddCharmMetadataCall{Call: call} +} + +// MockBackendStateAddCharmMetadataCall wrap *gomock.Call +type MockBackendStateAddCharmMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateAddCharmMetadataCall) Return(arg0 *state.Charm, arg1 error) *MockBackendStateAddCharmMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateAddCharmMetadataCall) Do(f func(state.CharmInfo) (*state.Charm, error)) *MockBackendStateAddCharmMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateAddCharmMetadataCall) DoAndReturn(f func(state.CharmInfo) (*state.Charm, error)) *MockBackendStateAddCharmMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllCharms mocks base method. @@ -73,9 +97,33 @@ func (m *MockBackendState) AllCharms() ([]*state.Charm, error) { } // AllCharms indicates an expected call of AllCharms. -func (mr *MockBackendStateMockRecorder) AllCharms() *gomock.Call { +func (mr *MockBackendStateMockRecorder) AllCharms() *MockBackendStateAllCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCharms", reflect.TypeOf((*MockBackendState)(nil).AllCharms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCharms", reflect.TypeOf((*MockBackendState)(nil).AllCharms)) + return &MockBackendStateAllCharmsCall{Call: call} +} + +// MockBackendStateAllCharmsCall wrap *gomock.Call +type MockBackendStateAllCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateAllCharmsCall) Return(arg0 []*state.Charm, arg1 error) *MockBackendStateAllCharmsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateAllCharmsCall) Do(f func() ([]*state.Charm, error)) *MockBackendStateAllCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateAllCharmsCall) DoAndReturn(f func() ([]*state.Charm, error)) *MockBackendStateAllCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -88,9 +136,33 @@ func (m *MockBackendState) Application(arg0 string) (interfaces.Application, err } // Application indicates an expected call of Application. -func (mr *MockBackendStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) Application(arg0 any) *MockBackendStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackendState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackendState)(nil).Application), arg0) + return &MockBackendStateApplicationCall{Call: call} +} + +// MockBackendStateApplicationCall wrap *gomock.Call +type MockBackendStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateApplicationCall) Return(arg0 interfaces.Application, arg1 error) *MockBackendStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateApplicationCall) Do(f func(string) (interfaces.Application, error)) *MockBackendStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateApplicationCall) DoAndReturn(f func(string) (interfaces.Application, error)) *MockBackendStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -103,9 +175,33 @@ func (m *MockBackendState) Charm(arg0 string) (*state.Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockBackendStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) Charm(arg0 any) *MockBackendStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockBackendState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockBackendState)(nil).Charm), arg0) + return &MockBackendStateCharmCall{Call: call} +} + +// MockBackendStateCharmCall wrap *gomock.Call +type MockBackendStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateCharmCall) Return(arg0 *state.Charm, arg1 error) *MockBackendStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateCharmCall) Do(f func(string) (*state.Charm, error)) *MockBackendStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateCharmCall) DoAndReturn(f func(string) (*state.Charm, error)) *MockBackendStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -117,9 +213,33 @@ func (m *MockBackendState) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockBackendStateMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockBackendStateMockRecorder) ControllerTag() *MockBackendStateControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackendState)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackendState)(nil).ControllerTag)) + return &MockBackendStateControllerTagCall{Call: call} +} + +// MockBackendStateControllerTagCall wrap *gomock.Call +type MockBackendStateControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateControllerTagCall) Return(arg0 names.ControllerTag) *MockBackendStateControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateControllerTagCall) Do(f func() names.ControllerTag) *MockBackendStateControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockBackendStateControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -132,9 +252,33 @@ func (m *MockBackendState) Machine(arg0 string) (interfaces.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockBackendStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) Machine(arg0 any) *MockBackendStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackendState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackendState)(nil).Machine), arg0) + return &MockBackendStateMachineCall{Call: call} +} + +// MockBackendStateMachineCall wrap *gomock.Call +type MockBackendStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateMachineCall) Return(arg0 interfaces.Machine, arg1 error) *MockBackendStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateMachineCall) Do(f func(string) (interfaces.Machine, error)) *MockBackendStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateMachineCall) DoAndReturn(f func(string) (interfaces.Machine, error)) *MockBackendStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConstraints mocks base method. @@ -147,9 +291,33 @@ func (m *MockBackendState) ModelConstraints() (constraints.Value, error) { } // ModelConstraints indicates an expected call of ModelConstraints. -func (mr *MockBackendStateMockRecorder) ModelConstraints() *gomock.Call { +func (mr *MockBackendStateMockRecorder) ModelConstraints() *MockBackendStateModelConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockBackendState)(nil).ModelConstraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConstraints", reflect.TypeOf((*MockBackendState)(nil).ModelConstraints)) + return &MockBackendStateModelConstraintsCall{Call: call} +} + +// MockBackendStateModelConstraintsCall wrap *gomock.Call +type MockBackendStateModelConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateModelConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockBackendStateModelConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateModelConstraintsCall) Do(f func() (constraints.Value, error)) *MockBackendStateModelConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateModelConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockBackendStateModelConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -161,9 +329,33 @@ func (m *MockBackendState) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBackendStateMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBackendStateMockRecorder) ModelUUID() *MockBackendStateModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackendState)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackendState)(nil).ModelUUID)) + return &MockBackendStateModelUUIDCall{Call: call} +} + +// MockBackendStateModelUUIDCall wrap *gomock.Call +type MockBackendStateModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateModelUUIDCall) Return(arg0 string) *MockBackendStateModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateModelUUIDCall) Do(f func() string) *MockBackendStateModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateModelUUIDCall) DoAndReturn(f func() string) *MockBackendStateModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -176,9 +368,33 @@ func (m *MockBackendState) PrepareCharmUpload(arg0 string) (services.UploadedCha } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockBackendStateMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) PrepareCharmUpload(arg0 any) *MockBackendStatePrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockBackendState)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockBackendState)(nil).PrepareCharmUpload), arg0) + return &MockBackendStatePrepareCharmUploadCall{Call: call} +} + +// MockBackendStatePrepareCharmUploadCall wrap *gomock.Call +type MockBackendStatePrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStatePrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockBackendStatePrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStatePrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockBackendStatePrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStatePrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockBackendStatePrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -191,9 +407,33 @@ func (m *MockBackendState) UpdateUploadedCharm(arg0 state.CharmInfo) (services.U } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockBackendStateMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockBackendStateMockRecorder) UpdateUploadedCharm(arg0 any) *MockBackendStateUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockBackendState)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockBackendState)(nil).UpdateUploadedCharm), arg0) + return &MockBackendStateUpdateUploadedCharmCall{Call: call} +} + +// MockBackendStateUpdateUploadedCharmCall wrap *gomock.Call +type MockBackendStateUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendStateUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockBackendStateUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendStateUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockBackendStateUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendStateUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockBackendStateUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBackendModel is a mock of BackendModel interface. @@ -228,9 +468,33 @@ func (m *MockBackendModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockBackendModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockBackendModelMockRecorder) CloudRegion() *MockBackendModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockBackendModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockBackendModel)(nil).CloudRegion)) + return &MockBackendModelCloudRegionCall{Call: call} +} + +// MockBackendModelCloudRegionCall wrap *gomock.Call +type MockBackendModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCloudRegionCall) Return(arg0 string) *MockBackendModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCloudRegionCall) Do(f func() string) *MockBackendModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCloudRegionCall) DoAndReturn(f func() string) *MockBackendModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -243,9 +507,33 @@ func (m *MockBackendModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockBackendModelMockRecorder) Config() *gomock.Call { +func (mr *MockBackendModelMockRecorder) Config() *MockBackendModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBackendModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBackendModel)(nil).Config)) + return &MockBackendModelConfigCall{Call: call} +} + +// MockBackendModelConfigCall wrap *gomock.Call +type MockBackendModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockBackendModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelConfigCall) Do(f func() (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -257,9 +545,33 @@ func (m *MockBackendModel) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockBackendModelMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockBackendModelMockRecorder) ControllerUUID() *MockBackendModelControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockBackendModel)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockBackendModel)(nil).ControllerUUID)) + return &MockBackendModelControllerUUIDCall{Call: call} +} + +// MockBackendModelControllerUUIDCall wrap *gomock.Call +type MockBackendModelControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelControllerUUIDCall) Return(arg0 string) *MockBackendModelControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelControllerUUIDCall) Do(f func() string) *MockBackendModelControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelControllerUUIDCall) DoAndReturn(f func() string) *MockBackendModelControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -271,9 +583,33 @@ func (m *MockBackendModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackendModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackendModelMockRecorder) ModelTag() *MockBackendModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackendModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackendModel)(nil).ModelTag)) + return &MockBackendModelModelTagCall{Call: call} +} + +// MockBackendModelModelTagCall wrap *gomock.Call +type MockBackendModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelModelTagCall) Return(arg0 names.ModelTag) *MockBackendModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelModelTagCall) Do(f func() names.ModelTag) *MockBackendModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackendModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -285,9 +621,33 @@ func (m *MockBackendModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockBackendModelMockRecorder) Type() *gomock.Call { +func (mr *MockBackendModelMockRecorder) Type() *MockBackendModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockBackendModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockBackendModel)(nil).Type)) + return &MockBackendModelTypeCall{Call: call} +} + +// MockBackendModelTypeCall wrap *gomock.Call +type MockBackendModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelTypeCall) Return(arg0 state.ModelType) *MockBackendModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelTypeCall) Do(f func() state.ModelType) *MockBackendModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelTypeCall) DoAndReturn(f func() state.ModelType) *MockBackendModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -323,9 +683,33 @@ func (m *MockApplication) AllUnits() ([]interfaces.Unit, error) { } // AllUnits indicates an expected call of AllUnits. -func (mr *MockApplicationMockRecorder) AllUnits() *gomock.Call { +func (mr *MockApplicationMockRecorder) AllUnits() *MockApplicationAllUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllUnits", reflect.TypeOf((*MockApplication)(nil).AllUnits)) + return &MockApplicationAllUnitsCall{Call: call} +} + +// MockApplicationAllUnitsCall wrap *gomock.Call +type MockApplicationAllUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAllUnitsCall) Return(arg0 []interfaces.Unit, arg1 error) *MockApplicationAllUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAllUnitsCall) Do(f func() ([]interfaces.Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAllUnitsCall) DoAndReturn(f func() ([]interfaces.Unit, error)) *MockApplicationAllUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -338,9 +722,33 @@ func (m *MockApplication) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockApplicationMockRecorder) Constraints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Constraints() *MockApplicationConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + return &MockApplicationConstraintsCall{Call: call} +} + +// MockApplicationConstraintsCall wrap *gomock.Call +type MockApplicationConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockApplicationConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationConstraintsCall) Do(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockApplicationConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsPrincipal mocks base method. @@ -352,9 +760,33 @@ func (m *MockApplication) IsPrincipal() bool { } // IsPrincipal indicates an expected call of IsPrincipal. -func (mr *MockApplicationMockRecorder) IsPrincipal() *gomock.Call { +func (mr *MockApplicationMockRecorder) IsPrincipal() *MockApplicationIsPrincipalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPrincipal", reflect.TypeOf((*MockApplication)(nil).IsPrincipal)) + return &MockApplicationIsPrincipalCall{Call: call} +} + +// MockApplicationIsPrincipalCall wrap *gomock.Call +type MockApplicationIsPrincipalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationIsPrincipalCall) Return(arg0 bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationIsPrincipalCall) Do(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationIsPrincipalCall) DoAndReturn(f func() bool) *MockApplicationIsPrincipalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -390,9 +822,33 @@ func (m *MockMachine) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockMachineMockRecorder) Constraints() *gomock.Call { +func (mr *MockMachineMockRecorder) Constraints() *MockMachineConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + return &MockMachineConstraintsCall{Call: call} +} + +// MockMachineConstraintsCall wrap *gomock.Call +type MockMachineConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockMachineConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineConstraintsCall) Do(f func() (constraints.Value, error)) *MockMachineConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockMachineConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareCharacteristics mocks base method. @@ -405,9 +861,33 @@ func (m *MockMachine) HardwareCharacteristics() (*instance.HardwareCharacteristi } // HardwareCharacteristics indicates an expected call of HardwareCharacteristics. -func (mr *MockMachineMockRecorder) HardwareCharacteristics() *gomock.Call { +func (mr *MockMachineMockRecorder) HardwareCharacteristics() *MockMachineHardwareCharacteristicsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + return &MockMachineHardwareCharacteristicsCall{Call: call} +} + +// MockMachineHardwareCharacteristicsCall wrap *gomock.Call +type MockMachineHardwareCharacteristicsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineHardwareCharacteristicsCall) Return(arg0 *instance.HardwareCharacteristics, arg1 error) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineHardwareCharacteristicsCall) Do(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineHardwareCharacteristicsCall) DoAndReturn(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -443,9 +923,33 @@ func (m *MockUnit) AssignedMachineId() (string, error) { } // AssignedMachineId indicates an expected call of AssignedMachineId. -func (mr *MockUnitMockRecorder) AssignedMachineId() *gomock.Call { +func (mr *MockUnitMockRecorder) AssignedMachineId() *MockUnitAssignedMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockUnit)(nil).AssignedMachineId)) + return &MockUnitAssignedMachineIdCall{Call: call} +} + +// MockUnitAssignedMachineIdCall wrap *gomock.Call +type MockUnitAssignedMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignedMachineIdCall) Return(arg0 string, arg1 error) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignedMachineIdCall) Do(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignedMachineIdCall) DoAndReturn(f func() (string, error)) *MockUnitAssignedMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDownloader is a mock of Downloader interface. @@ -481,7 +985,31 @@ func (m *MockDownloader) DownloadAndStore(arg0 context.Context, arg1 *charm.URL, } // DownloadAndStore indicates an expected call of DownloadAndStore. -func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *MockDownloaderDownloadAndStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + return &MockDownloaderDownloadAndStoreCall{Call: call} +} + +// MockDownloaderDownloadAndStoreCall wrap *gomock.Call +type MockDownloaderDownloadAndStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDownloaderDownloadAndStoreCall) Return(arg0 charm0.Origin, arg1 error) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDownloaderDownloadAndStoreCall) Do(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDownloaderDownloadAndStoreCall) DoAndReturn(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/charms/package_test.go b/apiserver/facades/client/charms/package_test.go index 12092a32475..4ef43e92ad0 100644 --- a/apiserver/facades/client/charms/package_test.go +++ b/apiserver/facades/client/charms/package_test.go @@ -13,5 +13,5 @@ func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/charms/interfaces BackendState,BackendModel,Application,Machine,Unit,Downloader -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/repository.go github.com/juju/juju/core/charm Repository,RepositoryFactory,CharmArchive +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/charms/interfaces BackendState,BackendModel,Application,Machine,Unit,Downloader +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/repository.go github.com/juju/juju/core/charm Repository,RepositoryFactory,CharmArchive diff --git a/apiserver/facades/client/client/common_mock_test.go b/apiserver/facades/client/client/common_mock_test.go index 452620e6014..1cb205a1f00 100644 --- a/apiserver/facades/client/client/common_mock_test.go +++ b/apiserver/facades/client/client/common_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package client_test -destination common_mock_test.go github.com/juju/juju/apiserver/common ToolsFinder +// mockgen -typed -package client_test -destination common_mock_test.go github.com/juju/juju/apiserver/common ToolsFinder // // Package client_test is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockToolsFinder) FindAgents(arg0 context.Context, arg1 common.FindAgent } // FindAgents indicates an expected call of FindAgents. -func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *gomock.Call { +func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *MockToolsFinderFindAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + return &MockToolsFinderFindAgentsCall{Call: call} +} + +// MockToolsFinderFindAgentsCall wrap *gomock.Call +type MockToolsFinderFindAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsFinderFindAgentsCall) Return(arg0 tools.List, arg1 error) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsFinderFindAgentsCall) Do(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsFinderFindAgentsCall) DoAndReturn(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/client/facade_mock_test.go b/apiserver/facades/client/client/facade_mock_test.go index 4c7f97f93bd..c6a72e3507c 100644 --- a/apiserver/facades/client/client/facade_mock_test.go +++ b/apiserver/facades/client/client/facade_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package client_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Authorizer +// mockgen -typed -package client_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Authorizer // // Package client_test is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -77,9 +125,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -91,9 +163,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -105,9 +201,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -119,9 +239,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -147,9 +315,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -161,9 +353,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -175,9 +391,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -189,7 +429,31 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/client/package_mock_test.go b/apiserver/facades/client/client/package_mock_test.go index d570d684d34..c1fd6a426e3 100644 --- a/apiserver/facades/client/client/package_mock_test.go +++ b/apiserver/facades/client/client/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package client_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/client Backend,Model,BlockDeviceService,ControllerConfigService,NetworkService +// mockgen -typed -package client_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/client Backend,Model,BlockDeviceService,ControllerConfigService,NetworkService // // Package client_test is a generated GoMock package. @@ -66,9 +66,33 @@ func (m *MockBackend) AddRelation(arg0 ...state.Endpoint) (*state.Relation, erro } // AddRelation indicates an expected call of AddRelation. -func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddRelation(arg0 ...any) *MockBackendAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockBackend)(nil).AddRelation), arg0...) + return &MockBackendAddRelationCall{Call: call} +} + +// MockBackendAddRelationCall wrap *gomock.Call +type MockBackendAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddRelationCall) Return(arg0 *state.Relation, arg1 error) *MockBackendAddRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddRelationCall) Do(f func(...state.Endpoint) (*state.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddRelationCall) DoAndReturn(f func(...state.Endpoint) (*state.Relation, error)) *MockBackendAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllApplicationOffers mocks base method. @@ -81,9 +105,33 @@ func (m *MockBackend) AllApplicationOffers() ([]*crossmodel.ApplicationOffer, er } // AllApplicationOffers indicates an expected call of AllApplicationOffers. -func (mr *MockBackendMockRecorder) AllApplicationOffers() *gomock.Call { +func (mr *MockBackendMockRecorder) AllApplicationOffers() *MockBackendAllApplicationOffersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplicationOffers", reflect.TypeOf((*MockBackend)(nil).AllApplicationOffers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplicationOffers", reflect.TypeOf((*MockBackend)(nil).AllApplicationOffers)) + return &MockBackendAllApplicationOffersCall{Call: call} +} + +// MockBackendAllApplicationOffersCall wrap *gomock.Call +type MockBackendAllApplicationOffersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllApplicationOffersCall) Return(arg0 []*crossmodel.ApplicationOffer, arg1 error) *MockBackendAllApplicationOffersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllApplicationOffersCall) Do(f func() ([]*crossmodel.ApplicationOffer, error)) *MockBackendAllApplicationOffersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllApplicationOffersCall) DoAndReturn(f func() ([]*crossmodel.ApplicationOffer, error)) *MockBackendAllApplicationOffersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllApplications mocks base method. @@ -96,9 +144,33 @@ func (m *MockBackend) AllApplications() ([]*state.Application, error) { } // AllApplications indicates an expected call of AllApplications. -func (mr *MockBackendMockRecorder) AllApplications() *gomock.Call { +func (mr *MockBackendMockRecorder) AllApplications() *MockBackendAllApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockBackend)(nil).AllApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockBackend)(nil).AllApplications)) + return &MockBackendAllApplicationsCall{Call: call} +} + +// MockBackendAllApplicationsCall wrap *gomock.Call +type MockBackendAllApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllApplicationsCall) Return(arg0 []*state.Application, arg1 error) *MockBackendAllApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllApplicationsCall) Do(f func() ([]*state.Application, error)) *MockBackendAllApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllApplicationsCall) DoAndReturn(f func() ([]*state.Application, error)) *MockBackendAllApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllIPAddresses mocks base method. @@ -111,9 +183,33 @@ func (m *MockBackend) AllIPAddresses() ([]*state.Address, error) { } // AllIPAddresses indicates an expected call of AllIPAddresses. -func (mr *MockBackendMockRecorder) AllIPAddresses() *gomock.Call { +func (mr *MockBackendMockRecorder) AllIPAddresses() *MockBackendAllIPAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllIPAddresses", reflect.TypeOf((*MockBackend)(nil).AllIPAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllIPAddresses", reflect.TypeOf((*MockBackend)(nil).AllIPAddresses)) + return &MockBackendAllIPAddressesCall{Call: call} +} + +// MockBackendAllIPAddressesCall wrap *gomock.Call +type MockBackendAllIPAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllIPAddressesCall) Return(arg0 []*state.Address, arg1 error) *MockBackendAllIPAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllIPAddressesCall) Do(f func() ([]*state.Address, error)) *MockBackendAllIPAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllIPAddressesCall) DoAndReturn(f func() ([]*state.Address, error)) *MockBackendAllIPAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllLinkLayerDevices mocks base method. @@ -126,9 +222,33 @@ func (m *MockBackend) AllLinkLayerDevices() ([]*state.LinkLayerDevice, error) { } // AllLinkLayerDevices indicates an expected call of AllLinkLayerDevices. -func (mr *MockBackendMockRecorder) AllLinkLayerDevices() *gomock.Call { +func (mr *MockBackendMockRecorder) AllLinkLayerDevices() *MockBackendAllLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockBackend)(nil).AllLinkLayerDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockBackend)(nil).AllLinkLayerDevices)) + return &MockBackendAllLinkLayerDevicesCall{Call: call} +} + +// MockBackendAllLinkLayerDevicesCall wrap *gomock.Call +type MockBackendAllLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllLinkLayerDevicesCall) Return(arg0 []*state.LinkLayerDevice, arg1 error) *MockBackendAllLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllLinkLayerDevicesCall) Do(f func() ([]*state.LinkLayerDevice, error)) *MockBackendAllLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllLinkLayerDevicesCall) DoAndReturn(f func() ([]*state.LinkLayerDevice, error)) *MockBackendAllLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMachines mocks base method. @@ -141,9 +261,33 @@ func (m *MockBackend) AllMachines() ([]*state.Machine, error) { } // AllMachines indicates an expected call of AllMachines. -func (mr *MockBackendMockRecorder) AllMachines() *gomock.Call { +func (mr *MockBackendMockRecorder) AllMachines() *MockBackendAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBackend)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBackend)(nil).AllMachines)) + return &MockBackendAllMachinesCall{Call: call} +} + +// MockBackendAllMachinesCall wrap *gomock.Call +type MockBackendAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllMachinesCall) Return(arg0 []*state.Machine, arg1 error) *MockBackendAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllMachinesCall) Do(f func() ([]*state.Machine, error)) *MockBackendAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllMachinesCall) DoAndReturn(f func() ([]*state.Machine, error)) *MockBackendAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRelations mocks base method. @@ -156,9 +300,33 @@ func (m *MockBackend) AllRelations() ([]*state.Relation, error) { } // AllRelations indicates an expected call of AllRelations. -func (mr *MockBackendMockRecorder) AllRelations() *gomock.Call { +func (mr *MockBackendMockRecorder) AllRelations() *MockBackendAllRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelations", reflect.TypeOf((*MockBackend)(nil).AllRelations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelations", reflect.TypeOf((*MockBackend)(nil).AllRelations)) + return &MockBackendAllRelationsCall{Call: call} +} + +// MockBackendAllRelationsCall wrap *gomock.Call +type MockBackendAllRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllRelationsCall) Return(arg0 []*state.Relation, arg1 error) *MockBackendAllRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllRelationsCall) Do(f func() ([]*state.Relation, error)) *MockBackendAllRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllRelationsCall) DoAndReturn(f func() ([]*state.Relation, error)) *MockBackendAllRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRemoteApplications mocks base method. @@ -171,9 +339,33 @@ func (m *MockBackend) AllRemoteApplications() ([]*state.RemoteApplication, error } // AllRemoteApplications indicates an expected call of AllRemoteApplications. -func (mr *MockBackendMockRecorder) AllRemoteApplications() *gomock.Call { +func (mr *MockBackendMockRecorder) AllRemoteApplications() *MockBackendAllRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockBackend)(nil).AllRemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockBackend)(nil).AllRemoteApplications)) + return &MockBackendAllRemoteApplicationsCall{Call: call} +} + +// MockBackendAllRemoteApplicationsCall wrap *gomock.Call +type MockBackendAllRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllRemoteApplicationsCall) Return(arg0 []*state.RemoteApplication, arg1 error) *MockBackendAllRemoteApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllRemoteApplicationsCall) Do(f func() ([]*state.RemoteApplication, error)) *MockBackendAllRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllRemoteApplicationsCall) DoAndReturn(f func() ([]*state.RemoteApplication, error)) *MockBackendAllRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -186,9 +378,33 @@ func (m *MockBackend) Application(arg0 string) (client.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Application(arg0 any) *MockBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + return &MockBackendApplicationCall{Call: call} +} + +// MockBackendApplicationCall wrap *gomock.Call +type MockBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationCall) Return(arg0 client.Application, arg1 error) *MockBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationCall) Do(f func(string) (client.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationCall) DoAndReturn(f func(string) (client.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNodes mocks base method. @@ -201,9 +417,33 @@ func (m *MockBackend) ControllerNodes() ([]state.ControllerNode, error) { } // ControllerNodes indicates an expected call of ControllerNodes. -func (mr *MockBackendMockRecorder) ControllerNodes() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerNodes() *MockBackendControllerNodesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNodes", reflect.TypeOf((*MockBackend)(nil).ControllerNodes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNodes", reflect.TypeOf((*MockBackend)(nil).ControllerNodes)) + return &MockBackendControllerNodesCall{Call: call} +} + +// MockBackendControllerNodesCall wrap *gomock.Call +type MockBackendControllerNodesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerNodesCall) Return(arg0 []state.ControllerNode, arg1 error) *MockBackendControllerNodesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerNodesCall) Do(f func() ([]state.ControllerNode, error)) *MockBackendControllerNodesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerNodesCall) DoAndReturn(f func() ([]state.ControllerNode, error)) *MockBackendControllerNodesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -215,9 +455,33 @@ func (m *MockBackend) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockBackendMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerTag() *MockBackendControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + return &MockBackendControllerTagCall{Call: call} +} + +// MockBackendControllerTagCall wrap *gomock.Call +type MockBackendControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerTagCall) Return(arg0 names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerTagCall) Do(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTimestamp mocks base method. @@ -230,9 +494,33 @@ func (m *MockBackend) ControllerTimestamp() (*time.Time, error) { } // ControllerTimestamp indicates an expected call of ControllerTimestamp. -func (mr *MockBackendMockRecorder) ControllerTimestamp() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerTimestamp() *MockBackendControllerTimestampCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTimestamp", reflect.TypeOf((*MockBackend)(nil).ControllerTimestamp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTimestamp", reflect.TypeOf((*MockBackend)(nil).ControllerTimestamp)) + return &MockBackendControllerTimestampCall{Call: call} +} + +// MockBackendControllerTimestampCall wrap *gomock.Call +type MockBackendControllerTimestampCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerTimestampCall) Return(arg0 *time.Time, arg1 error) *MockBackendControllerTimestampCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerTimestampCall) Do(f func() (*time.Time, error)) *MockBackendControllerTimestampCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerTimestampCall) DoAndReturn(f func() (*time.Time, error)) *MockBackendControllerTimestampCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HAPrimaryMachine mocks base method. @@ -245,9 +533,33 @@ func (m *MockBackend) HAPrimaryMachine() (names.MachineTag, error) { } // HAPrimaryMachine indicates an expected call of HAPrimaryMachine. -func (mr *MockBackendMockRecorder) HAPrimaryMachine() *gomock.Call { +func (mr *MockBackendMockRecorder) HAPrimaryMachine() *MockBackendHAPrimaryMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HAPrimaryMachine", reflect.TypeOf((*MockBackend)(nil).HAPrimaryMachine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HAPrimaryMachine", reflect.TypeOf((*MockBackend)(nil).HAPrimaryMachine)) + return &MockBackendHAPrimaryMachineCall{Call: call} +} + +// MockBackendHAPrimaryMachineCall wrap *gomock.Call +type MockBackendHAPrimaryMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendHAPrimaryMachineCall) Return(arg0 names.MachineTag, arg1 error) *MockBackendHAPrimaryMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendHAPrimaryMachineCall) Do(f func() (names.MachineTag, error)) *MockBackendHAPrimaryMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendHAPrimaryMachineCall) DoAndReturn(f func() (names.MachineTag, error)) *MockBackendHAPrimaryMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LatestPlaceholderCharm mocks base method. @@ -260,9 +572,33 @@ func (m *MockBackend) LatestPlaceholderCharm(arg0 *charm.URL) (*state.Charm, err } // LatestPlaceholderCharm indicates an expected call of LatestPlaceholderCharm. -func (mr *MockBackendMockRecorder) LatestPlaceholderCharm(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) LatestPlaceholderCharm(arg0 any) *MockBackendLatestPlaceholderCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestPlaceholderCharm", reflect.TypeOf((*MockBackend)(nil).LatestPlaceholderCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestPlaceholderCharm", reflect.TypeOf((*MockBackend)(nil).LatestPlaceholderCharm), arg0) + return &MockBackendLatestPlaceholderCharmCall{Call: call} +} + +// MockBackendLatestPlaceholderCharmCall wrap *gomock.Call +type MockBackendLatestPlaceholderCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendLatestPlaceholderCharmCall) Return(arg0 *state.Charm, arg1 error) *MockBackendLatestPlaceholderCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendLatestPlaceholderCharmCall) Do(f func(*charm.URL) (*state.Charm, error)) *MockBackendLatestPlaceholderCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendLatestPlaceholderCharmCall) DoAndReturn(f func(*charm.URL) (*state.Charm, error)) *MockBackendLatestPlaceholderCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -275,9 +611,33 @@ func (m *MockBackend) Machine(arg0 string) (*state.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Machine(arg0 any) *MockBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + return &MockBackendMachineCall{Call: call} +} + +// MockBackendMachineCall wrap *gomock.Call +type MockBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendMachineCall) Return(arg0 *state.Machine, arg1 error) *MockBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendMachineCall) Do(f func(string) (*state.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendMachineCall) DoAndReturn(f func(string) (*state.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -290,9 +650,33 @@ func (m *MockBackend) Model() (client.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockBackendMockRecorder) Model() *gomock.Call { +func (mr *MockBackendMockRecorder) Model() *MockBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + return &MockBackendModelCall{Call: call} +} + +// MockBackendModelCall wrap *gomock.Call +type MockBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCall) Return(arg0 client.Model, arg1 error) *MockBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCall) Do(f func() (client.Model, error)) *MockBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCall) DoAndReturn(f func() (client.Model, error)) *MockBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -305,9 +689,33 @@ func (m *MockBackend) ModelConfig() (*config.Config, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockBackendMockRecorder) ModelConfig() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelConfig() *MockBackendModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBackend)(nil).ModelConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBackend)(nil).ModelConfig)) + return &MockBackendModelConfigCall{Call: call} +} + +// MockBackendModelConfigCall wrap *gomock.Call +type MockBackendModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockBackendModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelConfigCall) Do(f func() (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockBackendModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -319,9 +727,33 @@ func (m *MockBackend) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackendMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelTag() *MockBackendModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + return &MockBackendModelTagCall{Call: call} +} + +// MockBackendModelTagCall wrap *gomock.Call +type MockBackendModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelTagCall) Return(arg0 names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelTagCall) Do(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -333,9 +765,33 @@ func (m *MockBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelUUID() *MockBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + return &MockBackendModelUUIDCall{Call: call} +} + +// MockBackendModelUUIDCall wrap *gomock.Call +type MockBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelUUIDCall) Return(arg0 string) *MockBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelUUIDCall) Do(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelUUIDCall) DoAndReturn(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplication mocks base method. @@ -348,9 +804,33 @@ func (m *MockBackend) RemoteApplication(arg0 string) (*state.RemoteApplication, } // RemoteApplication indicates an expected call of RemoteApplication. -func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) RemoteApplication(arg0 any) *MockBackendRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockBackend)(nil).RemoteApplication), arg0) + return &MockBackendRemoteApplicationCall{Call: call} +} + +// MockBackendRemoteApplicationCall wrap *gomock.Call +type MockBackendRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoteApplicationCall) Return(arg0 *state.RemoteApplication, arg1 error) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoteApplicationCall) Do(f func(string) (*state.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoteApplicationCall) DoAndReturn(f func(string) (*state.RemoteApplication, error)) *MockBackendRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteConnectionStatus mocks base method. @@ -363,9 +843,33 @@ func (m *MockBackend) RemoteConnectionStatus(arg0 string) (*state.RemoteConnecti } // RemoteConnectionStatus indicates an expected call of RemoteConnectionStatus. -func (mr *MockBackendMockRecorder) RemoteConnectionStatus(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) RemoteConnectionStatus(arg0 any) *MockBackendRemoteConnectionStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteConnectionStatus", reflect.TypeOf((*MockBackend)(nil).RemoteConnectionStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteConnectionStatus", reflect.TypeOf((*MockBackend)(nil).RemoteConnectionStatus), arg0) + return &MockBackendRemoteConnectionStatusCall{Call: call} +} + +// MockBackendRemoteConnectionStatusCall wrap *gomock.Call +type MockBackendRemoteConnectionStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoteConnectionStatusCall) Return(arg0 *state.RemoteConnectionStatus, arg1 error) *MockBackendRemoteConnectionStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoteConnectionStatusCall) Do(f func(string) (*state.RemoteConnectionStatus, error)) *MockBackendRemoteConnectionStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoteConnectionStatusCall) DoAndReturn(f func(string) (*state.RemoteConnectionStatus, error)) *MockBackendRemoteConnectionStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -378,9 +882,33 @@ func (m *MockBackend) Unit(arg0 string) (client.Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Unit(arg0 any) *MockBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + return &MockBackendUnitCall{Call: call} +} + +// MockBackendUnitCall wrap *gomock.Call +type MockBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUnitCall) Return(arg0 client.Unit, arg1 error) *MockBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUnitCall) Do(f func(string) (client.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUnitCall) DoAndReturn(f func(string) (client.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -416,9 +944,33 @@ func (m *MockModel) AddUser(arg0 state.UserAccessSpec) (permission.UserAccess, e } // AddUser indicates an expected call of AddUser. -func (mr *MockModelMockRecorder) AddUser(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddUser(arg0 any) *MockModelAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockModel)(nil).AddUser), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockModel)(nil).AddUser), arg0) + return &MockModelAddUserCall{Call: call} +} + +// MockModelAddUserCall wrap *gomock.Call +type MockModelAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddUserCall) Return(arg0 permission.UserAccess, arg1 error) *MockModelAddUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddUserCall) Do(f func(state.UserAccessSpec) (permission.UserAccess, error)) *MockModelAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddUserCall) DoAndReturn(f func(state.UserAccessSpec) (permission.UserAccess, error)) *MockModelAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredentialTag mocks base method. @@ -431,9 +983,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -445,9 +1021,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -459,9 +1059,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -474,9 +1098,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LatestToolsVersion mocks base method. @@ -488,9 +1136,33 @@ func (m *MockModel) LatestToolsVersion() version.Number { } // LatestToolsVersion indicates an expected call of LatestToolsVersion. -func (mr *MockModelMockRecorder) LatestToolsVersion() *gomock.Call { +func (mr *MockModelMockRecorder) LatestToolsVersion() *MockModelLatestToolsVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestToolsVersion", reflect.TypeOf((*MockModel)(nil).LatestToolsVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestToolsVersion", reflect.TypeOf((*MockModel)(nil).LatestToolsVersion)) + return &MockModelLatestToolsVersionCall{Call: call} +} + +// MockModelLatestToolsVersionCall wrap *gomock.Call +type MockModelLatestToolsVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelLatestToolsVersionCall) Return(arg0 version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelLatestToolsVersionCall) Do(f func() version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelLatestToolsVersionCall) DoAndReturn(f func() version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -502,9 +1174,33 @@ func (m *MockModel) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockModelMockRecorder) Life() *gomock.Call { +func (mr *MockModelMockRecorder) Life() *MockModelLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockModel)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockModel)(nil).Life)) + return &MockModelLifeCall{Call: call} +} + +// MockModelLifeCall wrap *gomock.Call +type MockModelLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelLifeCall) Return(arg0 state.Life) *MockModelLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelLifeCall) Do(f func() state.Life) *MockModelLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelLifeCall) DoAndReturn(f func() state.Life) *MockModelLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -516,9 +1212,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -530,9 +1250,33 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -545,9 +1289,33 @@ func (m *MockModel) Status() (status.StatusInfo, error) { } // Status indicates an expected call of Status. -func (mr *MockModelMockRecorder) Status() *gomock.Call { +func (mr *MockModelMockRecorder) Status() *MockModelStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockModel)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockModel)(nil).Status)) + return &MockModelStatusCall{Call: call} +} + +// MockModelStatusCall wrap *gomock.Call +type MockModelStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockModelStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStatusCall) Do(f func() (status.StatusInfo, error)) *MockModelStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockModelStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusHistory mocks base method. @@ -560,9 +1328,33 @@ func (m *MockModel) StatusHistory(arg0 status.StatusHistoryFilter) ([]status.Sta } // StatusHistory indicates an expected call of StatusHistory. -func (mr *MockModelMockRecorder) StatusHistory(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) StatusHistory(arg0 any) *MockModelStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockModel)(nil).StatusHistory), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockModel)(nil).StatusHistory), arg0) + return &MockModelStatusHistoryCall{Call: call} +} + +// MockModelStatusHistoryCall wrap *gomock.Call +type MockModelStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStatusHistoryCall) Return(arg0 []status.StatusInfo, arg1 error) *MockModelStatusHistoryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStatusHistoryCall) Do(f func(status.StatusHistoryFilter) ([]status.StatusInfo, error)) *MockModelStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStatusHistoryCall) DoAndReturn(f func(status.StatusHistoryFilter) ([]status.StatusInfo, error)) *MockModelStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -574,9 +1366,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UUID mocks base method. @@ -588,9 +1404,33 @@ func (m *MockModel) UUID() string { } // UUID indicates an expected call of UUID. -func (mr *MockModelMockRecorder) UUID() *gomock.Call { +func (mr *MockModelMockRecorder) UUID() *MockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + return &MockModelUUIDCall{Call: call} +} + +// MockModelUUIDCall wrap *gomock.Call +type MockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUUIDCall) Return(arg0 string) *MockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUUIDCall) Do(f func() string) *MockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUUIDCall) DoAndReturn(f func() string) *MockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Users mocks base method. @@ -603,9 +1443,33 @@ func (m *MockModel) Users() ([]permission.UserAccess, error) { } // Users indicates an expected call of Users. -func (mr *MockModelMockRecorder) Users() *gomock.Call { +func (mr *MockModelMockRecorder) Users() *MockModelUsersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Users", reflect.TypeOf((*MockModel)(nil).Users)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Users", reflect.TypeOf((*MockModel)(nil).Users)) + return &MockModelUsersCall{Call: call} +} + +// MockModelUsersCall wrap *gomock.Call +type MockModelUsersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUsersCall) Return(arg0 []permission.UserAccess, arg1 error) *MockModelUsersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUsersCall) Do(f func() ([]permission.UserAccess, error)) *MockModelUsersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUsersCall) DoAndReturn(f func() ([]permission.UserAccess, error)) *MockModelUsersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBlockDeviceService is a mock of BlockDeviceService interface. @@ -641,9 +1505,33 @@ func (m *MockBlockDeviceService) BlockDevices(arg0 context.Context, arg1 string) } // BlockDevices indicates an expected call of BlockDevices. -func (mr *MockBlockDeviceServiceMockRecorder) BlockDevices(arg0, arg1 any) *gomock.Call { +func (mr *MockBlockDeviceServiceMockRecorder) BlockDevices(arg0, arg1 any) *MockBlockDeviceServiceBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).BlockDevices), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockBlockDeviceService)(nil).BlockDevices), arg0, arg1) + return &MockBlockDeviceServiceBlockDevicesCall{Call: call} +} + +// MockBlockDeviceServiceBlockDevicesCall wrap *gomock.Call +type MockBlockDeviceServiceBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockDeviceServiceBlockDevicesCall) Return(arg0 []blockdevice.BlockDevice, arg1 error) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockDeviceServiceBlockDevicesCall) Do(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockDeviceServiceBlockDevicesCall) DoAndReturn(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockBlockDeviceServiceBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -679,9 +1567,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -717,9 +1629,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -732,7 +1668,31 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/client/package_test.go b/apiserver/facades/client/client/package_test.go index af4f4ec4553..22ff8bdc110 100644 --- a/apiserver/facades/client/client/package_test.go +++ b/apiserver/facades/client/client/package_test.go @@ -9,9 +9,9 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package client_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/client Backend,Model,BlockDeviceService,ControllerConfigService,NetworkService -//go:generate go run go.uber.org/mock/mockgen -package client_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Authorizer -//go:generate go run go.uber.org/mock/mockgen -package client_test -destination common_mock_test.go github.com/juju/juju/apiserver/common ToolsFinder +//go:generate go run go.uber.org/mock/mockgen -typed -package client_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/client Backend,Model,BlockDeviceService,ControllerConfigService,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package client_test -destination facade_mock_test.go github.com/juju/juju/apiserver/facade Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package client_test -destination common_mock_test.go github.com/juju/juju/apiserver/common ToolsFinder func TestPackage(t *stdtesting.T) { coretesting.MgoTestPackage(t) } diff --git a/apiserver/facades/client/cloud/mocks/cloud_mock.go b/apiserver/facades/client/cloud/mocks/cloud_mock.go index 338ae1f5255..199a47d4598 100644 --- a/apiserver/facades/client/cloud/mocks/cloud_mock.go +++ b/apiserver/facades/client/cloud/mocks/cloud_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/cloud_mock.go github.com/juju/juju/apiserver/facades/client/cloud CredentialService,CloudService,CloudAccessService +// mockgen -typed -package mocks -destination mocks/cloud_mock.go github.com/juju/juju/apiserver/facades/client/cloud CredentialService,CloudService,CloudAccessService // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockCredentialService) AllCloudCredentialsForOwner(arg0 context.Context } // AllCloudCredentialsForOwner indicates an expected call of AllCloudCredentialsForOwner. -func (mr *MockCredentialServiceMockRecorder) AllCloudCredentialsForOwner(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) AllCloudCredentialsForOwner(arg0, arg1 any) *MockCredentialServiceAllCloudCredentialsForOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCloudCredentialsForOwner", reflect.TypeOf((*MockCredentialService)(nil).AllCloudCredentialsForOwner), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCloudCredentialsForOwner", reflect.TypeOf((*MockCredentialService)(nil).AllCloudCredentialsForOwner), arg0, arg1) + return &MockCredentialServiceAllCloudCredentialsForOwnerCall{Call: call} +} + +// MockCredentialServiceAllCloudCredentialsForOwnerCall wrap *gomock.Call +type MockCredentialServiceAllCloudCredentialsForOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceAllCloudCredentialsForOwnerCall) Return(arg0 map[credential.Key]cloud.Credential, arg1 error) *MockCredentialServiceAllCloudCredentialsForOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceAllCloudCredentialsForOwnerCall) Do(f func(context.Context, string) (map[credential.Key]cloud.Credential, error)) *MockCredentialServiceAllCloudCredentialsForOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceAllCloudCredentialsForOwnerCall) DoAndReturn(f func(context.Context, string) (map[credential.Key]cloud.Credential, error)) *MockCredentialServiceAllCloudCredentialsForOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckAndRevokeCredential mocks base method. @@ -69,9 +93,33 @@ func (m *MockCredentialService) CheckAndRevokeCredential(arg0 context.Context, a } // CheckAndRevokeCredential indicates an expected call of CheckAndRevokeCredential. -func (mr *MockCredentialServiceMockRecorder) CheckAndRevokeCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CheckAndRevokeCredential(arg0, arg1, arg2 any) *MockCredentialServiceCheckAndRevokeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndRevokeCredential", reflect.TypeOf((*MockCredentialService)(nil).CheckAndRevokeCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndRevokeCredential", reflect.TypeOf((*MockCredentialService)(nil).CheckAndRevokeCredential), arg0, arg1, arg2) + return &MockCredentialServiceCheckAndRevokeCredentialCall{Call: call} +} + +// MockCredentialServiceCheckAndRevokeCredentialCall wrap *gomock.Call +type MockCredentialServiceCheckAndRevokeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCheckAndRevokeCredentialCall) Return(arg0 error) *MockCredentialServiceCheckAndRevokeCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCheckAndRevokeCredentialCall) Do(f func(context.Context, credential.Key, bool) error) *MockCredentialServiceCheckAndRevokeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCheckAndRevokeCredentialCall) DoAndReturn(f func(context.Context, credential.Key, bool) error) *MockCredentialServiceCheckAndRevokeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckAndUpdateCredential mocks base method. @@ -84,9 +132,33 @@ func (m *MockCredentialService) CheckAndUpdateCredential(arg0 context.Context, a } // CheckAndUpdateCredential indicates an expected call of CheckAndUpdateCredential. -func (mr *MockCredentialServiceMockRecorder) CheckAndUpdateCredential(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CheckAndUpdateCredential(arg0, arg1, arg2, arg3 any) *MockCredentialServiceCheckAndUpdateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndUpdateCredential", reflect.TypeOf((*MockCredentialService)(nil).CheckAndUpdateCredential), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndUpdateCredential", reflect.TypeOf((*MockCredentialService)(nil).CheckAndUpdateCredential), arg0, arg1, arg2, arg3) + return &MockCredentialServiceCheckAndUpdateCredentialCall{Call: call} +} + +// MockCredentialServiceCheckAndUpdateCredentialCall wrap *gomock.Call +type MockCredentialServiceCheckAndUpdateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCheckAndUpdateCredentialCall) Return(arg0 []service.UpdateCredentialModelResult, arg1 error) *MockCredentialServiceCheckAndUpdateCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCheckAndUpdateCredentialCall) Do(f func(context.Context, credential.Key, cloud.Credential, bool) ([]service.UpdateCredentialModelResult, error)) *MockCredentialServiceCheckAndUpdateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCheckAndUpdateCredentialCall) DoAndReturn(f func(context.Context, credential.Key, cloud.Credential, bool) ([]service.UpdateCredentialModelResult, error)) *MockCredentialServiceCheckAndUpdateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredential mocks base method. @@ -99,9 +171,33 @@ func (m *MockCredentialService) CloudCredential(arg0 context.Context, arg1 crede } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockCredentialServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + return &MockCredentialServiceCloudCredentialCall{Call: call} +} + +// MockCredentialServiceCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredentialsForOwner mocks base method. @@ -114,9 +210,33 @@ func (m *MockCredentialService) CloudCredentialsForOwner(arg0 context.Context, a } // CloudCredentialsForOwner indicates an expected call of CloudCredentialsForOwner. -func (mr *MockCredentialServiceMockRecorder) CloudCredentialsForOwner(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredentialsForOwner(arg0, arg1, arg2 any) *MockCredentialServiceCloudCredentialsForOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsForOwner", reflect.TypeOf((*MockCredentialService)(nil).CloudCredentialsForOwner), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsForOwner", reflect.TypeOf((*MockCredentialService)(nil).CloudCredentialsForOwner), arg0, arg1, arg2) + return &MockCredentialServiceCloudCredentialsForOwnerCall{Call: call} +} + +// MockCredentialServiceCloudCredentialsForOwnerCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialsForOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialsForOwnerCall) Return(arg0 map[string]cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialsForOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialsForOwnerCall) Do(f func(context.Context, string, string) (map[string]cloud.Credential, error)) *MockCredentialServiceCloudCredentialsForOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialsForOwnerCall) DoAndReturn(f func(context.Context, string, string) (map[string]cloud.Credential, error)) *MockCredentialServiceCloudCredentialsForOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveCloudCredential mocks base method. @@ -128,9 +248,33 @@ func (m *MockCredentialService) RemoveCloudCredential(arg0 context.Context, arg1 } // RemoveCloudCredential indicates an expected call of RemoveCloudCredential. -func (mr *MockCredentialServiceMockRecorder) RemoveCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) RemoveCloudCredential(arg0, arg1 any) *MockCredentialServiceRemoveCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredential", reflect.TypeOf((*MockCredentialService)(nil).RemoveCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredential", reflect.TypeOf((*MockCredentialService)(nil).RemoveCloudCredential), arg0, arg1) + return &MockCredentialServiceRemoveCloudCredentialCall{Call: call} +} + +// MockCredentialServiceRemoveCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceRemoveCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceRemoveCloudCredentialCall) Return(arg0 error) *MockCredentialServiceRemoveCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceRemoveCloudCredentialCall) Do(f func(context.Context, credential.Key) error) *MockCredentialServiceRemoveCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceRemoveCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) error) *MockCredentialServiceRemoveCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCloudCredential mocks base method. @@ -142,9 +286,33 @@ func (m *MockCredentialService) UpdateCloudCredential(arg0 context.Context, arg1 } // UpdateCloudCredential indicates an expected call of UpdateCloudCredential. -func (mr *MockCredentialServiceMockRecorder) UpdateCloudCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) UpdateCloudCredential(arg0, arg1, arg2 any) *MockCredentialServiceUpdateCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloudCredential", reflect.TypeOf((*MockCredentialService)(nil).UpdateCloudCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloudCredential", reflect.TypeOf((*MockCredentialService)(nil).UpdateCloudCredential), arg0, arg1, arg2) + return &MockCredentialServiceUpdateCloudCredentialCall{Call: call} +} + +// MockCredentialServiceUpdateCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceUpdateCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceUpdateCloudCredentialCall) Return(arg0 error) *MockCredentialServiceUpdateCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceUpdateCloudCredentialCall) Do(f func(context.Context, credential.Key, cloud.Credential) error) *MockCredentialServiceUpdateCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceUpdateCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key, cloud.Credential) error) *MockCredentialServiceUpdateCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCredential mocks base method. @@ -157,9 +325,33 @@ func (m *MockCredentialService) WatchCredential(arg0 context.Context, arg1 crede } // WatchCredential indicates an expected call of WatchCredential. -func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *MockCredentialServiceWatchCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + return &MockCredentialServiceWatchCredentialCall{Call: call} +} + +// MockCredentialServiceWatchCredentialCall wrap *gomock.Call +type MockCredentialServiceWatchCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceWatchCredentialCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceWatchCredentialCall) Do(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceWatchCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudService is a mock of CloudService interface. @@ -195,9 +387,33 @@ func (m *MockCloudService) Cloud(arg0 context.Context, arg1 string) (*cloud.Clou } // Cloud indicates an expected call of Cloud. -func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *MockCloudServiceCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + return &MockCloudServiceCloudCall{Call: call} +} + +// MockCloudServiceCloudCall wrap *gomock.Call +type MockCloudServiceCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceCloudCall) Return(arg0 *cloud.Cloud, arg1 error) *MockCloudServiceCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceCloudCall) Do(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceCloudCall) DoAndReturn(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCloud mocks base method. @@ -209,9 +425,33 @@ func (m *MockCloudService) CreateCloud(arg0 context.Context, arg1 string, arg2 c } // CreateCloud indicates an expected call of CreateCloud. -func (mr *MockCloudServiceMockRecorder) CreateCloud(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) CreateCloud(arg0, arg1, arg2 any) *MockCloudServiceCreateCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCloud", reflect.TypeOf((*MockCloudService)(nil).CreateCloud), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCloud", reflect.TypeOf((*MockCloudService)(nil).CreateCloud), arg0, arg1, arg2) + return &MockCloudServiceCreateCloudCall{Call: call} +} + +// MockCloudServiceCreateCloudCall wrap *gomock.Call +type MockCloudServiceCreateCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceCreateCloudCall) Return(arg0 error) *MockCloudServiceCreateCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceCreateCloudCall) Do(f func(context.Context, string, cloud.Cloud) error) *MockCloudServiceCreateCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceCreateCloudCall) DoAndReturn(f func(context.Context, string, cloud.Cloud) error) *MockCloudServiceCreateCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCloud mocks base method. @@ -223,9 +463,33 @@ func (m *MockCloudService) DeleteCloud(arg0 context.Context, arg1 string) error } // DeleteCloud indicates an expected call of DeleteCloud. -func (mr *MockCloudServiceMockRecorder) DeleteCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) DeleteCloud(arg0, arg1 any) *MockCloudServiceDeleteCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCloud", reflect.TypeOf((*MockCloudService)(nil).DeleteCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCloud", reflect.TypeOf((*MockCloudService)(nil).DeleteCloud), arg0, arg1) + return &MockCloudServiceDeleteCloudCall{Call: call} +} + +// MockCloudServiceDeleteCloudCall wrap *gomock.Call +type MockCloudServiceDeleteCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceDeleteCloudCall) Return(arg0 error) *MockCloudServiceDeleteCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceDeleteCloudCall) Do(f func(context.Context, string) error) *MockCloudServiceDeleteCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceDeleteCloudCall) DoAndReturn(f func(context.Context, string) error) *MockCloudServiceDeleteCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListAll mocks base method. @@ -238,9 +502,33 @@ func (m *MockCloudService) ListAll(arg0 context.Context) ([]cloud.Cloud, error) } // ListAll indicates an expected call of ListAll. -func (mr *MockCloudServiceMockRecorder) ListAll(arg0 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) ListAll(arg0 any) *MockCloudServiceListAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAll", reflect.TypeOf((*MockCloudService)(nil).ListAll), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAll", reflect.TypeOf((*MockCloudService)(nil).ListAll), arg0) + return &MockCloudServiceListAllCall{Call: call} +} + +// MockCloudServiceListAllCall wrap *gomock.Call +type MockCloudServiceListAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceListAllCall) Return(arg0 []cloud.Cloud, arg1 error) *MockCloudServiceListAllCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceListAllCall) Do(f func(context.Context) ([]cloud.Cloud, error)) *MockCloudServiceListAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceListAllCall) DoAndReturn(f func(context.Context) ([]cloud.Cloud, error)) *MockCloudServiceListAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCloud mocks base method. @@ -252,9 +540,33 @@ func (m *MockCloudService) UpdateCloud(arg0 context.Context, arg1 cloud.Cloud) e } // UpdateCloud indicates an expected call of UpdateCloud. -func (mr *MockCloudServiceMockRecorder) UpdateCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) UpdateCloud(arg0, arg1 any) *MockCloudServiceUpdateCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockCloudService)(nil).UpdateCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockCloudService)(nil).UpdateCloud), arg0, arg1) + return &MockCloudServiceUpdateCloudCall{Call: call} +} + +// MockCloudServiceUpdateCloudCall wrap *gomock.Call +type MockCloudServiceUpdateCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceUpdateCloudCall) Return(arg0 error) *MockCloudServiceUpdateCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceUpdateCloudCall) Do(f func(context.Context, cloud.Cloud) error) *MockCloudServiceUpdateCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceUpdateCloudCall) DoAndReturn(f func(context.Context, cloud.Cloud) error) *MockCloudServiceUpdateCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudAccessService is a mock of CloudAccessService interface. @@ -290,9 +602,33 @@ func (m *MockCloudAccessService) AllModelAccessForCloudCredential(arg0 context.C } // AllModelAccessForCloudCredential indicates an expected call of AllModelAccessForCloudCredential. -func (mr *MockCloudAccessServiceMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *MockCloudAccessServiceAllModelAccessForCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockCloudAccessService)(nil).AllModelAccessForCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockCloudAccessService)(nil).AllModelAccessForCloudCredential), arg0, arg1) + return &MockCloudAccessServiceAllModelAccessForCloudCredentialCall{Call: call} +} + +// MockCloudAccessServiceAllModelAccessForCloudCredentialCall wrap *gomock.Call +type MockCloudAccessServiceAllModelAccessForCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceAllModelAccessForCloudCredentialCall) Return(arg0 []access.CredentialOwnerModelAccess, arg1 error) *MockCloudAccessServiceAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceAllModelAccessForCloudCredentialCall) Do(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockCloudAccessServiceAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceAllModelAccessForCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockCloudAccessServiceAllModelAccessForCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePermission mocks base method. @@ -305,9 +641,33 @@ func (m *MockCloudAccessService) CreatePermission(arg0 context.Context, arg1 per } // CreatePermission indicates an expected call of CreatePermission. -func (mr *MockCloudAccessServiceMockRecorder) CreatePermission(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) CreatePermission(arg0, arg1 any) *MockCloudAccessServiceCreatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockCloudAccessService)(nil).CreatePermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockCloudAccessService)(nil).CreatePermission), arg0, arg1) + return &MockCloudAccessServiceCreatePermissionCall{Call: call} +} + +// MockCloudAccessServiceCreatePermissionCall wrap *gomock.Call +type MockCloudAccessServiceCreatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceCreatePermissionCall) Return(arg0 permission.UserAccess, arg1 error) *MockCloudAccessServiceCreatePermissionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceCreatePermissionCall) Do(f func(context.Context, permission.UserAccessSpec) (permission.UserAccess, error)) *MockCloudAccessServiceCreatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceCreatePermissionCall) DoAndReturn(f func(context.Context, permission.UserAccessSpec) (permission.UserAccess, error)) *MockCloudAccessServiceCreatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllAccessForUserAndObjectType mocks base method. @@ -320,9 +680,33 @@ func (m *MockCloudAccessService) ReadAllAccessForUserAndObjectType(arg0 context. } // ReadAllAccessForUserAndObjectType indicates an expected call of ReadAllAccessForUserAndObjectType. -func (mr *MockCloudAccessServiceMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockCloudAccessService)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockCloudAccessService)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + return &MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall{Call: call} +} + +// MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall wrap *gomock.Call +type MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall) Return(arg0 []permission.UserAccess, arg1 error) *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall) Do(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall) DoAndReturn(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockCloudAccessServiceReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllUserAccessForTarget mocks base method. @@ -335,9 +719,33 @@ func (m *MockCloudAccessService) ReadAllUserAccessForTarget(arg0 context.Context } // ReadAllUserAccessForTarget indicates an expected call of ReadAllUserAccessForTarget. -func (mr *MockCloudAccessServiceMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *MockCloudAccessServiceReadAllUserAccessForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockCloudAccessService)(nil).ReadAllUserAccessForTarget), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockCloudAccessService)(nil).ReadAllUserAccessForTarget), arg0, arg1) + return &MockCloudAccessServiceReadAllUserAccessForTargetCall{Call: call} +} + +// MockCloudAccessServiceReadAllUserAccessForTargetCall wrap *gomock.Call +type MockCloudAccessServiceReadAllUserAccessForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceReadAllUserAccessForTargetCall) Return(arg0 []permission.UserAccess, arg1 error) *MockCloudAccessServiceReadAllUserAccessForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceReadAllUserAccessForTargetCall) Do(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockCloudAccessServiceReadAllUserAccessForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceReadAllUserAccessForTargetCall) DoAndReturn(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockCloudAccessServiceReadAllUserAccessForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessLevelForTarget mocks base method. @@ -350,9 +758,33 @@ func (m *MockCloudAccessService) ReadUserAccessLevelForTarget(arg0 context.Conte } // ReadUserAccessLevelForTarget indicates an expected call of ReadUserAccessLevelForTarget. -func (mr *MockCloudAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *MockCloudAccessServiceReadUserAccessLevelForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockCloudAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockCloudAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + return &MockCloudAccessServiceReadUserAccessLevelForTargetCall{Call: call} +} + +// MockCloudAccessServiceReadUserAccessLevelForTargetCall wrap *gomock.Call +type MockCloudAccessServiceReadUserAccessLevelForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceReadUserAccessLevelForTargetCall) Return(arg0 permission.Access, arg1 error) *MockCloudAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceReadUserAccessLevelForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockCloudAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceReadUserAccessLevelForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockCloudAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePermission mocks base method. @@ -364,7 +796,31 @@ func (m *MockCloudAccessService) UpdatePermission(arg0 context.Context, arg1 acc } // UpdatePermission indicates an expected call of UpdatePermission. -func (mr *MockCloudAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *MockCloudAccessServiceUpdatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockCloudAccessService)(nil).UpdatePermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockCloudAccessService)(nil).UpdatePermission), arg0, arg1) + return &MockCloudAccessServiceUpdatePermissionCall{Call: call} +} + +// MockCloudAccessServiceUpdatePermissionCall wrap *gomock.Call +type MockCloudAccessServiceUpdatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudAccessServiceUpdatePermissionCall) Return(arg0 error) *MockCloudAccessServiceUpdatePermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudAccessServiceUpdatePermissionCall) Do(f func(context.Context, access.UpdatePermissionArgs) error) *MockCloudAccessServiceUpdatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudAccessServiceUpdatePermissionCall) DoAndReturn(f func(context.Context, access.UpdatePermissionArgs) error) *MockCloudAccessServiceUpdatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/cloud/mocks/credential_mock.go b/apiserver/facades/client/cloud/mocks/credential_mock.go index f194b3e1d41..450a4b5391a 100644 --- a/apiserver/facades/client/cloud/mocks/credential_mock.go +++ b/apiserver/facades/client/cloud/mocks/credential_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/credential_mock.go github.com/juju/juju/domain/credential/service CredentialValidator +// mockgen -typed -package mocks -destination mocks/credential_mock.go github.com/juju/juju/domain/credential/service CredentialValidator // // Package mocks is a generated GoMock package. @@ -52,7 +52,31 @@ func (m *MockCredentialValidator) Validate(arg0 context.Context, arg1 service.Cr } // Validate indicates an expected call of Validate. -func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *MockCredentialValidatorValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + return &MockCredentialValidatorValidateCall{Call: call} +} + +// MockCredentialValidatorValidateCall wrap *gomock.Call +type MockCredentialValidatorValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialValidatorValidateCall) Return(arg0 []error, arg1 error) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialValidatorValidateCall) Do(f func(context.Context, service.CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialValidatorValidateCall) DoAndReturn(f func(context.Context, service.CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/cloud/package_test.go b/apiserver/facades/client/cloud/package_test.go index 80c17a8cd92..568abcb1e90 100644 --- a/apiserver/facades/client/cloud/package_test.go +++ b/apiserver/facades/client/cloud/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/cloud_mock.go github.com/juju/juju/apiserver/facades/client/cloud CredentialService,CloudService,CloudAccessService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/credential_mock.go github.com/juju/juju/domain/credential/service CredentialValidator +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/cloud_mock.go github.com/juju/juju/apiserver/facades/client/cloud CredentialService,CloudService,CloudAccessService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/credential_mock.go github.com/juju/juju/domain/credential/service CredentialValidator func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/controller/mocks/domain_mock.go b/apiserver/facades/client/controller/mocks/domain_mock.go index bd281225fa6..6dc983e38a7 100644 --- a/apiserver/facades/client/controller/mocks/domain_mock.go +++ b/apiserver/facades/client/controller/mocks/domain_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/client/controller ControllerAccessService,ControllerConfigService +// mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/client/controller ControllerAccessService,ControllerConfigService // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockControllerAccessService) ReadUserAccessLevelForTarget(arg0 context. } // ReadUserAccessLevelForTarget indicates an expected call of ReadUserAccessLevelForTarget. -func (mr *MockControllerAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockControllerAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *MockControllerAccessServiceReadUserAccessLevelForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockControllerAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockControllerAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + return &MockControllerAccessServiceReadUserAccessLevelForTargetCall{Call: call} +} + +// MockControllerAccessServiceReadUserAccessLevelForTargetCall wrap *gomock.Call +type MockControllerAccessServiceReadUserAccessLevelForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAccessServiceReadUserAccessLevelForTargetCall) Return(arg0 permission.Access, arg1 error) *MockControllerAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAccessServiceReadUserAccessLevelForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockControllerAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAccessServiceReadUserAccessLevelForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockControllerAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePermission mocks base method. @@ -66,9 +90,33 @@ func (m *MockControllerAccessService) UpdatePermission(arg0 context.Context, arg } // UpdatePermission indicates an expected call of UpdatePermission. -func (mr *MockControllerAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *gomock.Call { +func (mr *MockControllerAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *MockControllerAccessServiceUpdatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockControllerAccessService)(nil).UpdatePermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockControllerAccessService)(nil).UpdatePermission), arg0, arg1) + return &MockControllerAccessServiceUpdatePermissionCall{Call: call} +} + +// MockControllerAccessServiceUpdatePermissionCall wrap *gomock.Call +type MockControllerAccessServiceUpdatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAccessServiceUpdatePermissionCall) Return(arg0 error) *MockControllerAccessServiceUpdatePermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAccessServiceUpdatePermissionCall) Do(f func(context.Context, access.UpdatePermissionArgs) error) *MockControllerAccessServiceUpdatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAccessServiceUpdatePermissionCall) DoAndReturn(f func(context.Context, access.UpdatePermissionArgs) error) *MockControllerAccessServiceUpdatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -104,9 +152,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateControllerConfig mocks base method. @@ -118,7 +190,31 @@ func (m *MockControllerConfigService) UpdateControllerConfig(arg0 context.Contex } // UpdateControllerConfig indicates an expected call of UpdateControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) UpdateControllerConfig(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) UpdateControllerConfig(arg0, arg1, arg2 any) *MockControllerConfigServiceUpdateControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).UpdateControllerConfig), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).UpdateControllerConfig), arg0, arg1, arg2) + return &MockControllerConfigServiceUpdateControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceUpdateControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceUpdateControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceUpdateControllerConfigCall) Return(arg0 error) *MockControllerConfigServiceUpdateControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceUpdateControllerConfigCall) Do(f func(context.Context, controller.Config, []string) error) *MockControllerConfigServiceUpdateControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceUpdateControllerConfigCall) DoAndReturn(f func(context.Context, controller.Config, []string) error) *MockControllerConfigServiceUpdateControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/controller/mocks/state_mock.go b/apiserver/facades/client/controller/mocks/state_mock.go index acb94a6fee2..2205c2b9a08 100644 --- a/apiserver/facades/client/controller/mocks/state_mock.go +++ b/apiserver/facades/client/controller/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/controller Backend,Application,Relation +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/controller Backend,Application,Relation // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockBackend) AllBlocksForController() ([]state.Block, error) { } // AllBlocksForController indicates an expected call of AllBlocksForController. -func (mr *MockBackendMockRecorder) AllBlocksForController() *gomock.Call { +func (mr *MockBackendMockRecorder) AllBlocksForController() *MockBackendAllBlocksForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBlocksForController", reflect.TypeOf((*MockBackend)(nil).AllBlocksForController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBlocksForController", reflect.TypeOf((*MockBackend)(nil).AllBlocksForController)) + return &MockBackendAllBlocksForControllerCall{Call: call} +} + +// MockBackendAllBlocksForControllerCall wrap *gomock.Call +type MockBackendAllBlocksForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllBlocksForControllerCall) Return(arg0 []state.Block, arg1 error) *MockBackendAllBlocksForControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllBlocksForControllerCall) Do(f func() ([]state.Block, error)) *MockBackendAllBlocksForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllBlocksForControllerCall) DoAndReturn(f func() ([]state.Block, error)) *MockBackendAllBlocksForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelUUIDs mocks base method. @@ -66,9 +90,33 @@ func (m *MockBackend) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockBackendMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockBackendMockRecorder) AllModelUUIDs() *MockBackendAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockBackend)(nil).AllModelUUIDs)) + return &MockBackendAllModelUUIDsCall{Call: call} +} + +// MockBackendAllModelUUIDsCall wrap *gomock.Call +type MockBackendAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllModelUUIDsCall) Do(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockBackendAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -81,9 +129,33 @@ func (m *MockBackend) Application(arg0 string) (controller.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Application(arg0 any) *MockBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + return &MockBackendApplicationCall{Call: call} +} + +// MockBackendApplicationCall wrap *gomock.Call +type MockBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationCall) Return(arg0 controller.Application, arg1 error) *MockBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationCall) Do(f func(string) (controller.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationCall) DoAndReturn(f func(string) (controller.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerModelUUID mocks base method. @@ -95,9 +167,33 @@ func (m *MockBackend) ControllerModelUUID() string { } // ControllerModelUUID indicates an expected call of ControllerModelUUID. -func (mr *MockBackendMockRecorder) ControllerModelUUID() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerModelUUID() *MockBackendControllerModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModelUUID", reflect.TypeOf((*MockBackend)(nil).ControllerModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModelUUID", reflect.TypeOf((*MockBackend)(nil).ControllerModelUUID)) + return &MockBackendControllerModelUUIDCall{Call: call} +} + +// MockBackendControllerModelUUIDCall wrap *gomock.Call +type MockBackendControllerModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerModelUUIDCall) Return(arg0 string) *MockBackendControllerModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerModelUUIDCall) Do(f func() string) *MockBackendControllerModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerModelUUIDCall) DoAndReturn(f func() string) *MockBackendControllerModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -110,9 +206,33 @@ func (m *MockBackend) Model() (*state.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockBackendMockRecorder) Model() *gomock.Call { +func (mr *MockBackendMockRecorder) Model() *MockBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + return &MockBackendModelCall{Call: call} +} + +// MockBackendModelCall wrap *gomock.Call +type MockBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCall) Return(arg0 *state.Model, arg1 error) *MockBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCall) Do(f func() (*state.Model, error)) *MockBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCall) DoAndReturn(f func() (*state.Model, error)) *MockBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelExists mocks base method. @@ -125,9 +245,33 @@ func (m *MockBackend) ModelExists(arg0 string) (bool, error) { } // ModelExists indicates an expected call of ModelExists. -func (mr *MockBackendMockRecorder) ModelExists(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ModelExists(arg0 any) *MockBackendModelExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelExists", reflect.TypeOf((*MockBackend)(nil).ModelExists), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelExists", reflect.TypeOf((*MockBackend)(nil).ModelExists), arg0) + return &MockBackendModelExistsCall{Call: call} +} + +// MockBackendModelExistsCall wrap *gomock.Call +type MockBackendModelExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelExistsCall) Return(arg0 bool, arg1 error) *MockBackendModelExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelExistsCall) Do(f func(string) (bool, error)) *MockBackendModelExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelExistsCall) DoAndReturn(f func(string) (bool, error)) *MockBackendModelExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoVersion mocks base method. @@ -140,9 +284,33 @@ func (m *MockBackend) MongoVersion() (string, error) { } // MongoVersion indicates an expected call of MongoVersion. -func (mr *MockBackendMockRecorder) MongoVersion() *gomock.Call { +func (mr *MockBackendMockRecorder) MongoVersion() *MockBackendMongoVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockBackend)(nil).MongoVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockBackend)(nil).MongoVersion)) + return &MockBackendMongoVersionCall{Call: call} +} + +// MockBackendMongoVersionCall wrap *gomock.Call +type MockBackendMongoVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendMongoVersionCall) Return(arg0 string, arg1 error) *MockBackendMongoVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendMongoVersionCall) Do(f func() (string, error)) *MockBackendMongoVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendMongoVersionCall) DoAndReturn(f func() (string, error)) *MockBackendMongoVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllBlocksForController mocks base method. @@ -154,9 +322,33 @@ func (m *MockBackend) RemoveAllBlocksForController() error { } // RemoveAllBlocksForController indicates an expected call of RemoveAllBlocksForController. -func (mr *MockBackendMockRecorder) RemoveAllBlocksForController() *gomock.Call { +func (mr *MockBackendMockRecorder) RemoveAllBlocksForController() *MockBackendRemoveAllBlocksForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllBlocksForController", reflect.TypeOf((*MockBackend)(nil).RemoveAllBlocksForController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllBlocksForController", reflect.TypeOf((*MockBackend)(nil).RemoveAllBlocksForController)) + return &MockBackendRemoveAllBlocksForControllerCall{Call: call} +} + +// MockBackendRemoveAllBlocksForControllerCall wrap *gomock.Call +type MockBackendRemoveAllBlocksForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoveAllBlocksForControllerCall) Return(arg0 error) *MockBackendRemoveAllBlocksForControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoveAllBlocksForControllerCall) Do(f func() error) *MockBackendRemoveAllBlocksForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoveAllBlocksForControllerCall) DoAndReturn(f func() error) *MockBackendRemoveAllBlocksForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -192,9 +384,33 @@ func (m *MockApplication) CharmConfig(arg0 string) (charm.Settings, error) { } // CharmConfig indicates an expected call of CharmConfig. -func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmConfig(arg0 any) *MockApplicationCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig), arg0) + return &MockApplicationCharmConfigCall{Call: call} +} + +// MockApplicationCharmConfigCall wrap *gomock.Call +type MockApplicationCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmConfigCall) Return(arg0 charm.Settings, arg1 error) *MockApplicationCharmConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmConfigCall) Do(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmConfigCall) DoAndReturn(f func(string) (charm.Settings, error)) *MockApplicationCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -206,9 +422,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relations mocks base method. @@ -221,9 +461,33 @@ func (m *MockApplication) Relations() ([]controller.Relation, error) { } // Relations indicates an expected call of Relations. -func (mr *MockApplicationMockRecorder) Relations() *gomock.Call { +func (mr *MockApplicationMockRecorder) Relations() *MockApplicationRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockApplication)(nil).Relations)) + return &MockApplicationRelationsCall{Call: call} +} + +// MockApplicationRelationsCall wrap *gomock.Call +type MockApplicationRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationRelationsCall) Return(arg0 []controller.Relation, arg1 error) *MockApplicationRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationRelationsCall) Do(f func() ([]controller.Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationRelationsCall) DoAndReturn(f func() ([]controller.Relation, error)) *MockApplicationRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelation is a mock of Relation interface. @@ -259,9 +523,33 @@ func (m *MockRelation) ApplicationSettings(arg0 string) (map[string]any, error) } // ApplicationSettings indicates an expected call of ApplicationSettings. -func (mr *MockRelationMockRecorder) ApplicationSettings(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) ApplicationSettings(arg0 any) *MockRelationApplicationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelation)(nil).ApplicationSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelation)(nil).ApplicationSettings), arg0) + return &MockRelationApplicationSettingsCall{Call: call} +} + +// MockRelationApplicationSettingsCall wrap *gomock.Call +type MockRelationApplicationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationApplicationSettingsCall) Return(arg0 map[string]any, arg1 error) *MockRelationApplicationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationApplicationSettingsCall) Do(f func(string) (map[string]any, error)) *MockRelationApplicationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationApplicationSettingsCall) DoAndReturn(f func(string) (map[string]any, error)) *MockRelationApplicationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoint mocks base method. @@ -274,9 +562,33 @@ func (m *MockRelation) Endpoint(arg0 string) (state.Endpoint, error) { } // Endpoint indicates an expected call of Endpoint. -func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *MockRelationEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + return &MockRelationEndpointCall{Call: call} +} + +// MockRelationEndpointCall wrap *gomock.Call +type MockRelationEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationEndpointCall) Return(arg0 state.Endpoint, arg1 error) *MockRelationEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationEndpointCall) Do(f func(string) (state.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationEndpointCall) DoAndReturn(f func(string) (state.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -288,9 +600,33 @@ func (m *MockRelation) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockRelationMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockRelationMockRecorder) ModelUUID() *MockRelationModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRelation)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRelation)(nil).ModelUUID)) + return &MockRelationModelUUIDCall{Call: call} +} + +// MockRelationModelUUIDCall wrap *gomock.Call +type MockRelationModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationModelUUIDCall) Return(arg0 string) *MockRelationModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationModelUUIDCall) Do(f func() string) *MockRelationModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationModelUUIDCall) DoAndReturn(f func() string) *MockRelationModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelatedEndpoints mocks base method. @@ -303,7 +639,31 @@ func (m *MockRelation) RelatedEndpoints(arg0 string) ([]state.Endpoint, error) { } // RelatedEndpoints indicates an expected call of RelatedEndpoints. -func (mr *MockRelationMockRecorder) RelatedEndpoints(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) RelatedEndpoints(arg0 any) *MockRelationRelatedEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelatedEndpoints", reflect.TypeOf((*MockRelation)(nil).RelatedEndpoints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelatedEndpoints", reflect.TypeOf((*MockRelation)(nil).RelatedEndpoints), arg0) + return &MockRelationRelatedEndpointsCall{Call: call} +} + +// MockRelationRelatedEndpointsCall wrap *gomock.Call +type MockRelationRelatedEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationRelatedEndpointsCall) Return(arg0 []state.Endpoint, arg1 error) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationRelatedEndpointsCall) Do(f func(string) ([]state.Endpoint, error)) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationRelatedEndpointsCall) DoAndReturn(f func(string) ([]state.Endpoint, error)) *MockRelationRelatedEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/controller/package_test.go b/apiserver/facades/client/controller/package_test.go index f8198bd4221..2c496e64372 100644 --- a/apiserver/facades/client/controller/package_test.go +++ b/apiserver/facades/client/controller/package_test.go @@ -9,8 +9,8 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/controller Backend,Application,Relation -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/client/controller ControllerAccessService,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/controller Backend,Application,Relation +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/facades/client/controller ControllerAccessService,ControllerConfigService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/client/keymanager/mocks/keymanager_mock.go b/apiserver/facades/client/keymanager/mocks/keymanager_mock.go index f5e896a5964..9dd542b7793 100644 --- a/apiserver/facades/client/keymanager/mocks/keymanager_mock.go +++ b/apiserver/facades/client/keymanager/mocks/keymanager_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/keymanager_mock.go github.com/juju/juju/apiserver/facades/client/keymanager Model,BlockChecker +// mockgen -typed -package mocks -destination mocks/keymanager_mock.go github.com/juju/juju/apiserver/facades/client/keymanager Model,BlockChecker // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockModel) ModelConfig(arg0 context.Context) (*config.Config, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) ModelConfig(arg0 any) *MockModelModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModel)(nil).ModelConfig), arg0) + return &MockModelModelConfigCall{Call: call} +} + +// MockModelModelConfigCall wrap *gomock.Call +type MockModelModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -66,9 +90,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateModelConfig mocks base method. @@ -84,10 +132,34 @@ func (m *MockModel) UpdateModelConfig(arg0 config.ConfigSchemaSourceGetter, arg1 } // UpdateModelConfig indicates an expected call of UpdateModelConfig. -func (mr *MockModelMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockModelMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *MockModelUpdateModelConfigCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockModel)(nil).UpdateModelConfig), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockModel)(nil).UpdateModelConfig), varargs...) + return &MockModelUpdateModelConfigCall{Call: call} +} + +// MockModelUpdateModelConfigCall wrap *gomock.Call +type MockModelUpdateModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUpdateModelConfigCall) Return(arg0 error) *MockModelUpdateModelConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUpdateModelConfigCall) Do(f func(config.ConfigSchemaSourceGetter, map[string]any, []string, ...state.ValidateConfigFunc) error) *MockModelUpdateModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUpdateModelConfigCall) DoAndReturn(f func(config.ConfigSchemaSourceGetter, map[string]any, []string, ...state.ValidateConfigFunc) error) *MockModelUpdateModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBlockChecker is a mock of BlockChecker interface. @@ -122,9 +194,33 @@ func (m *MockBlockChecker) ChangeAllowed(arg0 context.Context) error { } // ChangeAllowed indicates an expected call of ChangeAllowed. -func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerChangeAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + return &MockBlockCheckerChangeAllowedCall{Call: call} +} + +// MockBlockCheckerChangeAllowedCall wrap *gomock.Call +type MockBlockCheckerChangeAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerChangeAllowedCall) Return(arg0 error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllowed mocks base method. @@ -136,7 +232,31 @@ func (m *MockBlockChecker) RemoveAllowed(arg0 context.Context) error { } // RemoveAllowed indicates an expected call of RemoveAllowed. -func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerRemoveAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + return &MockBlockCheckerRemoveAllowedCall{Call: call} +} + +// MockBlockCheckerRemoveAllowedCall wrap *gomock.Call +type MockBlockCheckerRemoveAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/keymanager/package_test.go b/apiserver/facades/client/keymanager/package_test.go index 6b0faa7c93c..22fe971a6f6 100644 --- a/apiserver/facades/client/keymanager/package_test.go +++ b/apiserver/facades/client/keymanager/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/keymanager_mock.go github.com/juju/juju/apiserver/facades/client/keymanager Model,BlockChecker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/keymanager_mock.go github.com/juju/juju/apiserver/facades/client/keymanager Model,BlockChecker func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/machinemanager/environ_mock_test.go b/apiserver/facades/client/machinemanager/environ_mock_test.go index 2ff76a1b8bf..a9dc842fe16 100644 --- a/apiserver/facades/client/machinemanager/environ_mock_test.go +++ b/apiserver/facades/client/machinemanager/environ_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination environ_mock_test.go github.com/juju/juju/environs Environ +// mockgen -typed -package machinemanager_test -destination environ_mock_test.go github.com/juju/juju/environs Environ // // Package machinemanager_test is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -71,9 +95,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -86,9 +134,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -101,9 +173,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -115,9 +211,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -130,9 +250,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -145,9 +289,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -159,9 +327,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -173,9 +365,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -187,9 +403,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -202,9 +442,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -217,9 +481,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -231,9 +519,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -245,9 +557,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -259,9 +595,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -273,9 +633,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -288,9 +672,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -306,10 +714,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -322,9 +754,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -337,7 +793,31 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/machinemanager/objectstore_mock_test.go b/apiserver/facades/client/machinemanager/objectstore_mock_test.go index 2493919ba78..cecc396a682 100644 --- a/apiserver/facades/client/machinemanager/objectstore_mock_test.go +++ b/apiserver/facades/client/machinemanager/objectstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package machinemanager_test -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore // // Package machinemanager_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/machinemanager/package_mock_test.go b/apiserver/facades/client/machinemanager/package_mock_test.go index cc28118d2e5..90a18704cc6 100644 --- a/apiserver/facades/client/machinemanager/package_mock_test.go +++ b/apiserver/facades/client/machinemanager/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/machinemanager Leadership,Authorizer,UpgradeSeries,UpgradeSeriesState,UpgradeBaseValidator,ControllerBackend,InstanceConfigBackend,Backend,StorageInterface,Pool,Model,Machine,Application,Unit,Charm,CharmhubClient,ControllerConfigService,MachineService,NetworkService +// mockgen -typed -package machinemanager_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/machinemanager Leadership,Authorizer,UpgradeSeries,UpgradeSeriesState,UpgradeBaseValidator,ControllerBackend,InstanceConfigBackend,Backend,StorageInterface,Pool,Model,Machine,Application,Unit,Charm,CharmhubClient,ControllerConfigService,MachineService,NetworkService // // Package machinemanager_test is a generated GoMock package. @@ -67,9 +67,33 @@ func (m *MockLeadership) GetMachineApplicationNames(arg0 context.Context, arg1 s } // GetMachineApplicationNames indicates an expected call of GetMachineApplicationNames. -func (mr *MockLeadershipMockRecorder) GetMachineApplicationNames(arg0, arg1 any) *gomock.Call { +func (mr *MockLeadershipMockRecorder) GetMachineApplicationNames(arg0, arg1 any) *MockLeadershipGetMachineApplicationNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMachineApplicationNames", reflect.TypeOf((*MockLeadership)(nil).GetMachineApplicationNames), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMachineApplicationNames", reflect.TypeOf((*MockLeadership)(nil).GetMachineApplicationNames), arg0, arg1) + return &MockLeadershipGetMachineApplicationNamesCall{Call: call} +} + +// MockLeadershipGetMachineApplicationNamesCall wrap *gomock.Call +type MockLeadershipGetMachineApplicationNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipGetMachineApplicationNamesCall) Return(arg0 []string, arg1 error) *MockLeadershipGetMachineApplicationNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipGetMachineApplicationNamesCall) Do(f func(context.Context, string) ([]string, error)) *MockLeadershipGetMachineApplicationNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipGetMachineApplicationNamesCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockLeadershipGetMachineApplicationNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnpinApplicationLeadersByName mocks base method. @@ -82,9 +106,33 @@ func (m *MockLeadership) UnpinApplicationLeadersByName(arg0 context.Context, arg } // UnpinApplicationLeadersByName indicates an expected call of UnpinApplicationLeadersByName. -func (mr *MockLeadershipMockRecorder) UnpinApplicationLeadersByName(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockLeadershipMockRecorder) UnpinApplicationLeadersByName(arg0, arg1, arg2 any) *MockLeadershipUnpinApplicationLeadersByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinApplicationLeadersByName", reflect.TypeOf((*MockLeadership)(nil).UnpinApplicationLeadersByName), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinApplicationLeadersByName", reflect.TypeOf((*MockLeadership)(nil).UnpinApplicationLeadersByName), arg0, arg1, arg2) + return &MockLeadershipUnpinApplicationLeadersByNameCall{Call: call} +} + +// MockLeadershipUnpinApplicationLeadersByNameCall wrap *gomock.Call +type MockLeadershipUnpinApplicationLeadersByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipUnpinApplicationLeadersByNameCall) Return(arg0 params.PinApplicationsResults, arg1 error) *MockLeadershipUnpinApplicationLeadersByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipUnpinApplicationLeadersByNameCall) Do(f func(context.Context, names.Tag, []string) (params.PinApplicationsResults, error)) *MockLeadershipUnpinApplicationLeadersByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipUnpinApplicationLeadersByNameCall) DoAndReturn(f func(context.Context, names.Tag, []string) (params.PinApplicationsResults, error)) *MockLeadershipUnpinApplicationLeadersByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAuthorizer is a mock of Authorizer interface. @@ -119,9 +167,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CanRead mocks base method. @@ -133,9 +205,33 @@ func (m *MockAuthorizer) CanRead() error { } // CanRead indicates an expected call of CanRead. -func (mr *MockAuthorizerMockRecorder) CanRead() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) CanRead() *MockAuthorizerCanReadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanRead", reflect.TypeOf((*MockAuthorizer)(nil).CanRead)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanRead", reflect.TypeOf((*MockAuthorizer)(nil).CanRead)) + return &MockAuthorizerCanReadCall{Call: call} +} + +// MockAuthorizerCanReadCall wrap *gomock.Call +type MockAuthorizerCanReadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerCanReadCall) Return(arg0 error) *MockAuthorizerCanReadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerCanReadCall) Do(f func() error) *MockAuthorizerCanReadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerCanReadCall) DoAndReturn(f func() error) *MockAuthorizerCanReadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CanWrite mocks base method. @@ -147,9 +243,33 @@ func (m *MockAuthorizer) CanWrite() error { } // CanWrite indicates an expected call of CanWrite. -func (mr *MockAuthorizerMockRecorder) CanWrite() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) CanWrite() *MockAuthorizerCanWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanWrite", reflect.TypeOf((*MockAuthorizer)(nil).CanWrite)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanWrite", reflect.TypeOf((*MockAuthorizer)(nil).CanWrite)) + return &MockAuthorizerCanWriteCall{Call: call} +} + +// MockAuthorizerCanWriteCall wrap *gomock.Call +type MockAuthorizerCanWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerCanWriteCall) Return(arg0 error) *MockAuthorizerCanWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerCanWriteCall) Do(f func() error) *MockAuthorizerCanWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerCanWriteCall) DoAndReturn(f func() error) *MockAuthorizerCanWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeSeries is a mock of UpgradeSeries interface. @@ -184,9 +304,33 @@ func (m *MockUpgradeSeries) Complete(arg0 string) error { } // Complete indicates an expected call of Complete. -func (mr *MockUpgradeSeriesMockRecorder) Complete(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesMockRecorder) Complete(arg0 any) *MockUpgradeSeriesCompleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Complete", reflect.TypeOf((*MockUpgradeSeries)(nil).Complete), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Complete", reflect.TypeOf((*MockUpgradeSeries)(nil).Complete), arg0) + return &MockUpgradeSeriesCompleteCall{Call: call} +} + +// MockUpgradeSeriesCompleteCall wrap *gomock.Call +type MockUpgradeSeriesCompleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesCompleteCall) Return(arg0 error) *MockUpgradeSeriesCompleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesCompleteCall) Do(f func(string) error) *MockUpgradeSeriesCompleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesCompleteCall) DoAndReturn(f func(string) error) *MockUpgradeSeriesCompleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Prepare mocks base method. @@ -198,9 +342,33 @@ func (m *MockUpgradeSeries) Prepare(arg0 context.Context, arg1, arg2 string, arg } // Prepare indicates an expected call of Prepare. -func (mr *MockUpgradeSeriesMockRecorder) Prepare(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUpgradeSeriesMockRecorder) Prepare(arg0, arg1, arg2, arg3 any) *MockUpgradeSeriesPrepareCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockUpgradeSeries)(nil).Prepare), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockUpgradeSeries)(nil).Prepare), arg0, arg1, arg2, arg3) + return &MockUpgradeSeriesPrepareCall{Call: call} +} + +// MockUpgradeSeriesPrepareCall wrap *gomock.Call +type MockUpgradeSeriesPrepareCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesPrepareCall) Return(arg0 error) *MockUpgradeSeriesPrepareCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesPrepareCall) Do(f func(context.Context, string, string, bool) error) *MockUpgradeSeriesPrepareCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesPrepareCall) DoAndReturn(f func(context.Context, string, string, bool) error) *MockUpgradeSeriesPrepareCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -213,9 +381,33 @@ func (m *MockUpgradeSeries) Validate(arg0 context.Context, arg1 []machinemanager } // Validate indicates an expected call of Validate. -func (mr *MockUpgradeSeriesMockRecorder) Validate(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeSeriesMockRecorder) Validate(arg0, arg1 any) *MockUpgradeSeriesValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockUpgradeSeries)(nil).Validate), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockUpgradeSeries)(nil).Validate), arg0, arg1) + return &MockUpgradeSeriesValidateCall{Call: call} +} + +// MockUpgradeSeriesValidateCall wrap *gomock.Call +type MockUpgradeSeriesValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesValidateCall) Return(arg0 []machinemanager.ValidationResult, arg1 error) *MockUpgradeSeriesValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesValidateCall) Do(f func(context.Context, []machinemanager.ValidationEntity) ([]machinemanager.ValidationResult, error)) *MockUpgradeSeriesValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesValidateCall) DoAndReturn(f func(context.Context, []machinemanager.ValidationEntity) ([]machinemanager.ValidationResult, error)) *MockUpgradeSeriesValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeSeriesState is a mock of UpgradeSeriesState interface. @@ -251,9 +443,33 @@ func (m *MockUpgradeSeriesState) ApplicationsFromMachine(arg0 machinemanager.Mac } // ApplicationsFromMachine indicates an expected call of ApplicationsFromMachine. -func (mr *MockUpgradeSeriesStateMockRecorder) ApplicationsFromMachine(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesStateMockRecorder) ApplicationsFromMachine(arg0 any) *MockUpgradeSeriesStateApplicationsFromMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsFromMachine", reflect.TypeOf((*MockUpgradeSeriesState)(nil).ApplicationsFromMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsFromMachine", reflect.TypeOf((*MockUpgradeSeriesState)(nil).ApplicationsFromMachine), arg0) + return &MockUpgradeSeriesStateApplicationsFromMachineCall{Call: call} +} + +// MockUpgradeSeriesStateApplicationsFromMachineCall wrap *gomock.Call +type MockUpgradeSeriesStateApplicationsFromMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesStateApplicationsFromMachineCall) Return(arg0 []machinemanager.Application, arg1 error) *MockUpgradeSeriesStateApplicationsFromMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesStateApplicationsFromMachineCall) Do(f func(machinemanager.Machine) ([]machinemanager.Application, error)) *MockUpgradeSeriesStateApplicationsFromMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesStateApplicationsFromMachineCall) DoAndReturn(f func(machinemanager.Machine) ([]machinemanager.Application, error)) *MockUpgradeSeriesStateApplicationsFromMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineFromTag mocks base method. @@ -266,9 +482,33 @@ func (m *MockUpgradeSeriesState) MachineFromTag(arg0 string) (machinemanager.Mac } // MachineFromTag indicates an expected call of MachineFromTag. -func (mr *MockUpgradeSeriesStateMockRecorder) MachineFromTag(arg0 any) *gomock.Call { +func (mr *MockUpgradeSeriesStateMockRecorder) MachineFromTag(arg0 any) *MockUpgradeSeriesStateMachineFromTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineFromTag", reflect.TypeOf((*MockUpgradeSeriesState)(nil).MachineFromTag), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineFromTag", reflect.TypeOf((*MockUpgradeSeriesState)(nil).MachineFromTag), arg0) + return &MockUpgradeSeriesStateMachineFromTagCall{Call: call} +} + +// MockUpgradeSeriesStateMachineFromTagCall wrap *gomock.Call +type MockUpgradeSeriesStateMachineFromTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeSeriesStateMachineFromTagCall) Return(arg0 machinemanager.Machine, arg1 error) *MockUpgradeSeriesStateMachineFromTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeSeriesStateMachineFromTagCall) Do(f func(string) (machinemanager.Machine, error)) *MockUpgradeSeriesStateMachineFromTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeSeriesStateMachineFromTagCall) DoAndReturn(f func(string) (machinemanager.Machine, error)) *MockUpgradeSeriesStateMachineFromTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeBaseValidator is a mock of UpgradeBaseValidator interface. @@ -303,9 +543,33 @@ func (m *MockUpgradeBaseValidator) ValidateApplications(arg0 context.Context, ar } // ValidateApplications indicates an expected call of ValidateApplications. -func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateApplications(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateApplications(arg0, arg1, arg2, arg3 any) *MockUpgradeBaseValidatorValidateApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateApplications", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateApplications), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateApplications", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateApplications), arg0, arg1, arg2, arg3) + return &MockUpgradeBaseValidatorValidateApplicationsCall{Call: call} +} + +// MockUpgradeBaseValidatorValidateApplicationsCall wrap *gomock.Call +type MockUpgradeBaseValidatorValidateApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeBaseValidatorValidateApplicationsCall) Return(arg0 error) *MockUpgradeBaseValidatorValidateApplicationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeBaseValidatorValidateApplicationsCall) Do(f func(context.Context, []machinemanager.Application, base.Base, bool) error) *MockUpgradeBaseValidatorValidateApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeBaseValidatorValidateApplicationsCall) DoAndReturn(f func(context.Context, []machinemanager.Application, base.Base, bool) error) *MockUpgradeBaseValidatorValidateApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateBase mocks base method. @@ -317,9 +581,33 @@ func (m *MockUpgradeBaseValidator) ValidateBase(arg0, arg1 base.Base, arg2 strin } // ValidateBase indicates an expected call of ValidateBase. -func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateBase(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateBase(arg0, arg1, arg2 any) *MockUpgradeBaseValidatorValidateBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBase", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateBase), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBase", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateBase), arg0, arg1, arg2) + return &MockUpgradeBaseValidatorValidateBaseCall{Call: call} +} + +// MockUpgradeBaseValidatorValidateBaseCall wrap *gomock.Call +type MockUpgradeBaseValidatorValidateBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeBaseValidatorValidateBaseCall) Return(arg0 error) *MockUpgradeBaseValidatorValidateBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeBaseValidatorValidateBaseCall) Do(f func(base.Base, base.Base, string) error) *MockUpgradeBaseValidatorValidateBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeBaseValidatorValidateBaseCall) DoAndReturn(f func(base.Base, base.Base, string) error) *MockUpgradeBaseValidatorValidateBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateMachine mocks base method. @@ -331,9 +619,33 @@ func (m *MockUpgradeBaseValidator) ValidateMachine(arg0 machinemanager.Machine) } // ValidateMachine indicates an expected call of ValidateMachine. -func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateMachine(arg0 any) *gomock.Call { +func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateMachine(arg0 any) *MockUpgradeBaseValidatorValidateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateMachine", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateMachine", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateMachine), arg0) + return &MockUpgradeBaseValidatorValidateMachineCall{Call: call} +} + +// MockUpgradeBaseValidatorValidateMachineCall wrap *gomock.Call +type MockUpgradeBaseValidatorValidateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeBaseValidatorValidateMachineCall) Return(arg0 error) *MockUpgradeBaseValidatorValidateMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeBaseValidatorValidateMachineCall) Do(f func(machinemanager.Machine) error) *MockUpgradeBaseValidatorValidateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeBaseValidatorValidateMachineCall) DoAndReturn(f func(machinemanager.Machine) error) *MockUpgradeBaseValidatorValidateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateUnits mocks base method. @@ -345,9 +657,33 @@ func (m *MockUpgradeBaseValidator) ValidateUnits(arg0 []machinemanager.Unit) err } // ValidateUnits indicates an expected call of ValidateUnits. -func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateUnits(arg0 any) *gomock.Call { +func (mr *MockUpgradeBaseValidatorMockRecorder) ValidateUnits(arg0 any) *MockUpgradeBaseValidatorValidateUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateUnits", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateUnits", reflect.TypeOf((*MockUpgradeBaseValidator)(nil).ValidateUnits), arg0) + return &MockUpgradeBaseValidatorValidateUnitsCall{Call: call} +} + +// MockUpgradeBaseValidatorValidateUnitsCall wrap *gomock.Call +type MockUpgradeBaseValidatorValidateUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeBaseValidatorValidateUnitsCall) Return(arg0 error) *MockUpgradeBaseValidatorValidateUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeBaseValidatorValidateUnitsCall) Do(f func([]machinemanager.Unit) error) *MockUpgradeBaseValidatorValidateUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeBaseValidatorValidateUnitsCall) DoAndReturn(f func([]machinemanager.Unit) error) *MockUpgradeBaseValidatorValidateUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerBackend is a mock of ControllerBackend interface. @@ -383,9 +719,33 @@ func (m *MockControllerBackend) APIHostPortsForAgents(arg0 controller.Config) ([ } // APIHostPortsForAgents indicates an expected call of APIHostPortsForAgents. -func (mr *MockControllerBackendMockRecorder) APIHostPortsForAgents(arg0 any) *gomock.Call { +func (mr *MockControllerBackendMockRecorder) APIHostPortsForAgents(arg0 any) *MockControllerBackendAPIHostPortsForAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockControllerBackend)(nil).APIHostPortsForAgents), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForAgents", reflect.TypeOf((*MockControllerBackend)(nil).APIHostPortsForAgents), arg0) + return &MockControllerBackendAPIHostPortsForAgentsCall{Call: call} +} + +// MockControllerBackendAPIHostPortsForAgentsCall wrap *gomock.Call +type MockControllerBackendAPIHostPortsForAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerBackendAPIHostPortsForAgentsCall) Return(arg0 []network.SpaceHostPorts, arg1 error) *MockControllerBackendAPIHostPortsForAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerBackendAPIHostPortsForAgentsCall) Do(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerBackendAPIHostPortsForAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerBackendAPIHostPortsForAgentsCall) DoAndReturn(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerBackendAPIHostPortsForAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -397,9 +757,33 @@ func (m *MockControllerBackend) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockControllerBackendMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockControllerBackendMockRecorder) ControllerTag() *MockControllerBackendControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockControllerBackend)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockControllerBackend)(nil).ControllerTag)) + return &MockControllerBackendControllerTagCall{Call: call} +} + +// MockControllerBackendControllerTagCall wrap *gomock.Call +type MockControllerBackendControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerBackendControllerTagCall) Return(arg0 names.ControllerTag) *MockControllerBackendControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerBackendControllerTagCall) Do(f func() names.ControllerTag) *MockControllerBackendControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerBackendControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockControllerBackendControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceConfigBackend is a mock of InstanceConfigBackend interface. @@ -435,9 +819,33 @@ func (m *MockInstanceConfigBackend) Machine(arg0 string) (machinemanager.Machine } // Machine indicates an expected call of Machine. -func (mr *MockInstanceConfigBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockInstanceConfigBackendMockRecorder) Machine(arg0 any) *MockInstanceConfigBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceConfigBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceConfigBackend)(nil).Machine), arg0) + return &MockInstanceConfigBackendMachineCall{Call: call} +} + +// MockInstanceConfigBackendMachineCall wrap *gomock.Call +type MockInstanceConfigBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfigBackendMachineCall) Return(arg0 machinemanager.Machine, arg1 error) *MockInstanceConfigBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfigBackendMachineCall) Do(f func(string) (machinemanager.Machine, error)) *MockInstanceConfigBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfigBackendMachineCall) DoAndReturn(f func(string) (machinemanager.Machine, error)) *MockInstanceConfigBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -450,9 +858,33 @@ func (m *MockInstanceConfigBackend) Model() (machinemanager.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockInstanceConfigBackendMockRecorder) Model() *gomock.Call { +func (mr *MockInstanceConfigBackendMockRecorder) Model() *MockInstanceConfigBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockInstanceConfigBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockInstanceConfigBackend)(nil).Model)) + return &MockInstanceConfigBackendModelCall{Call: call} +} + +// MockInstanceConfigBackendModelCall wrap *gomock.Call +type MockInstanceConfigBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfigBackendModelCall) Return(arg0 machinemanager.Model, arg1 error) *MockInstanceConfigBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfigBackendModelCall) Do(f func() (machinemanager.Model, error)) *MockInstanceConfigBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfigBackendModelCall) DoAndReturn(f func() (machinemanager.Model, error)) *MockInstanceConfigBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ToolsStorage mocks base method. @@ -465,9 +897,33 @@ func (m *MockInstanceConfigBackend) ToolsStorage(arg0 objectstore.ObjectStore) ( } // ToolsStorage indicates an expected call of ToolsStorage. -func (mr *MockInstanceConfigBackendMockRecorder) ToolsStorage(arg0 any) *gomock.Call { +func (mr *MockInstanceConfigBackendMockRecorder) ToolsStorage(arg0 any) *MockInstanceConfigBackendToolsStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockInstanceConfigBackend)(nil).ToolsStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockInstanceConfigBackend)(nil).ToolsStorage), arg0) + return &MockInstanceConfigBackendToolsStorageCall{Call: call} +} + +// MockInstanceConfigBackendToolsStorageCall wrap *gomock.Call +type MockInstanceConfigBackendToolsStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfigBackendToolsStorageCall) Return(arg0 binarystorage.StorageCloser, arg1 error) *MockInstanceConfigBackendToolsStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfigBackendToolsStorageCall) Do(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockInstanceConfigBackendToolsStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfigBackendToolsStorageCall) DoAndReturn(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockInstanceConfigBackendToolsStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBackend is a mock of Backend interface. @@ -503,9 +959,33 @@ func (m *MockBackend) AddMachineInsideMachine(arg0 state.MachineTemplate, arg1 s } // AddMachineInsideMachine indicates an expected call of AddMachineInsideMachine. -func (mr *MockBackendMockRecorder) AddMachineInsideMachine(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddMachineInsideMachine(arg0, arg1, arg2 any) *MockBackendAddMachineInsideMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachineInsideMachine", reflect.TypeOf((*MockBackend)(nil).AddMachineInsideMachine), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachineInsideMachine", reflect.TypeOf((*MockBackend)(nil).AddMachineInsideMachine), arg0, arg1, arg2) + return &MockBackendAddMachineInsideMachineCall{Call: call} +} + +// MockBackendAddMachineInsideMachineCall wrap *gomock.Call +type MockBackendAddMachineInsideMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddMachineInsideMachineCall) Return(arg0 machinemanager.Machine, arg1 error) *MockBackendAddMachineInsideMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddMachineInsideMachineCall) Do(f func(state.MachineTemplate, string, instance.ContainerType) (machinemanager.Machine, error)) *MockBackendAddMachineInsideMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddMachineInsideMachineCall) DoAndReturn(f func(state.MachineTemplate, string, instance.ContainerType) (machinemanager.Machine, error)) *MockBackendAddMachineInsideMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddMachineInsideNewMachine mocks base method. @@ -518,9 +998,33 @@ func (m *MockBackend) AddMachineInsideNewMachine(arg0, arg1 state.MachineTemplat } // AddMachineInsideNewMachine indicates an expected call of AddMachineInsideNewMachine. -func (mr *MockBackendMockRecorder) AddMachineInsideNewMachine(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddMachineInsideNewMachine(arg0, arg1, arg2 any) *MockBackendAddMachineInsideNewMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachineInsideNewMachine", reflect.TypeOf((*MockBackend)(nil).AddMachineInsideNewMachine), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachineInsideNewMachine", reflect.TypeOf((*MockBackend)(nil).AddMachineInsideNewMachine), arg0, arg1, arg2) + return &MockBackendAddMachineInsideNewMachineCall{Call: call} +} + +// MockBackendAddMachineInsideNewMachineCall wrap *gomock.Call +type MockBackendAddMachineInsideNewMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddMachineInsideNewMachineCall) Return(arg0 machinemanager.Machine, arg1 error) *MockBackendAddMachineInsideNewMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddMachineInsideNewMachineCall) Do(f func(state.MachineTemplate, state.MachineTemplate, instance.ContainerType) (machinemanager.Machine, error)) *MockBackendAddMachineInsideNewMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddMachineInsideNewMachineCall) DoAndReturn(f func(state.MachineTemplate, state.MachineTemplate, instance.ContainerType) (machinemanager.Machine, error)) *MockBackendAddMachineInsideNewMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddOneMachine mocks base method. @@ -533,9 +1037,33 @@ func (m *MockBackend) AddOneMachine(arg0 state.MachineTemplate) (machinemanager. } // AddOneMachine indicates an expected call of AddOneMachine. -func (mr *MockBackendMockRecorder) AddOneMachine(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddOneMachine(arg0 any) *MockBackendAddOneMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOneMachine", reflect.TypeOf((*MockBackend)(nil).AddOneMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOneMachine", reflect.TypeOf((*MockBackend)(nil).AddOneMachine), arg0) + return &MockBackendAddOneMachineCall{Call: call} +} + +// MockBackendAddOneMachineCall wrap *gomock.Call +type MockBackendAddOneMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddOneMachineCall) Return(arg0 machinemanager.Machine, arg1 error) *MockBackendAddOneMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddOneMachineCall) Do(f func(state.MachineTemplate) (machinemanager.Machine, error)) *MockBackendAddOneMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddOneMachineCall) DoAndReturn(f func(state.MachineTemplate) (machinemanager.Machine, error)) *MockBackendAddOneMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMachines mocks base method. @@ -548,9 +1076,33 @@ func (m *MockBackend) AllMachines() ([]machinemanager.Machine, error) { } // AllMachines indicates an expected call of AllMachines. -func (mr *MockBackendMockRecorder) AllMachines() *gomock.Call { +func (mr *MockBackendMockRecorder) AllMachines() *MockBackendAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBackend)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBackend)(nil).AllMachines)) + return &MockBackendAllMachinesCall{Call: call} +} + +// MockBackendAllMachinesCall wrap *gomock.Call +type MockBackendAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllMachinesCall) Return(arg0 []machinemanager.Machine, arg1 error) *MockBackendAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllMachinesCall) Do(f func() ([]machinemanager.Machine, error)) *MockBackendAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllMachinesCall) DoAndReturn(f func() ([]machinemanager.Machine, error)) *MockBackendAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -563,9 +1115,33 @@ func (m *MockBackend) Application(arg0 string) (machinemanager.Application, erro } // Application indicates an expected call of Application. -func (mr *MockBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Application(arg0 any) *MockBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBackend)(nil).Application), arg0) + return &MockBackendApplicationCall{Call: call} +} + +// MockBackendApplicationCall wrap *gomock.Call +type MockBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendApplicationCall) Return(arg0 machinemanager.Application, arg1 error) *MockBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendApplicationCall) Do(f func(string) (machinemanager.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendApplicationCall) DoAndReturn(f func(string) (machinemanager.Application, error)) *MockBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBlockForType mocks base method. @@ -579,9 +1155,33 @@ func (m *MockBackend) GetBlockForType(arg0 state.BlockType) (state.Block, bool, } // GetBlockForType indicates an expected call of GetBlockForType. -func (mr *MockBackendMockRecorder) GetBlockForType(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetBlockForType(arg0 any) *MockBackendGetBlockForTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockForType", reflect.TypeOf((*MockBackend)(nil).GetBlockForType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockForType", reflect.TypeOf((*MockBackend)(nil).GetBlockForType), arg0) + return &MockBackendGetBlockForTypeCall{Call: call} +} + +// MockBackendGetBlockForTypeCall wrap *gomock.Call +type MockBackendGetBlockForTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetBlockForTypeCall) Return(arg0 state.Block, arg1 bool, arg2 error) *MockBackendGetBlockForTypeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetBlockForTypeCall) Do(f func(state.BlockType) (state.Block, bool, error)) *MockBackendGetBlockForTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetBlockForTypeCall) DoAndReturn(f func(state.BlockType) (state.Block, bool, error)) *MockBackendGetBlockForTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -594,9 +1194,33 @@ func (m *MockBackend) Machine(arg0 string) (machinemanager.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockBackendMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Machine(arg0 any) *MockBackendMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockBackend)(nil).Machine), arg0) + return &MockBackendMachineCall{Call: call} +} + +// MockBackendMachineCall wrap *gomock.Call +type MockBackendMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendMachineCall) Return(arg0 machinemanager.Machine, arg1 error) *MockBackendMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendMachineCall) Do(f func(string) (machinemanager.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendMachineCall) DoAndReturn(f func(string) (machinemanager.Machine, error)) *MockBackendMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -609,9 +1233,33 @@ func (m *MockBackend) Model() (machinemanager.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockBackendMockRecorder) Model() *gomock.Call { +func (mr *MockBackendMockRecorder) Model() *MockBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + return &MockBackendModelCall{Call: call} +} + +// MockBackendModelCall wrap *gomock.Call +type MockBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCall) Return(arg0 machinemanager.Model, arg1 error) *MockBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCall) Do(f func() (machinemanager.Model, error)) *MockBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCall) DoAndReturn(f func() (machinemanager.Model, error)) *MockBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ToolsStorage mocks base method. @@ -624,9 +1272,33 @@ func (m *MockBackend) ToolsStorage(arg0 objectstore.ObjectStore) (binarystorage. } // ToolsStorage indicates an expected call of ToolsStorage. -func (mr *MockBackendMockRecorder) ToolsStorage(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ToolsStorage(arg0 any) *MockBackendToolsStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockBackend)(nil).ToolsStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockBackend)(nil).ToolsStorage), arg0) + return &MockBackendToolsStorageCall{Call: call} +} + +// MockBackendToolsStorageCall wrap *gomock.Call +type MockBackendToolsStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendToolsStorageCall) Return(arg0 binarystorage.StorageCloser, arg1 error) *MockBackendToolsStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendToolsStorageCall) Do(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockBackendToolsStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendToolsStorageCall) DoAndReturn(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockBackendToolsStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -639,9 +1311,33 @@ func (m *MockBackend) Unit(arg0 string) (machinemanager.Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Unit(arg0 any) *MockBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockBackend)(nil).Unit), arg0) + return &MockBackendUnitCall{Call: call} +} + +// MockBackendUnitCall wrap *gomock.Call +type MockBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendUnitCall) Return(arg0 machinemanager.Unit, arg1 error) *MockBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendUnitCall) Do(f func(string) (machinemanager.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendUnitCall) DoAndReturn(f func(string) (machinemanager.Unit, error)) *MockBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageInterface is a mock of StorageInterface interface. @@ -676,9 +1372,33 @@ func (m *MockStorageInterface) FilesystemAccess() storagecommon.FilesystemAccess } // FilesystemAccess indicates an expected call of FilesystemAccess. -func (mr *MockStorageInterfaceMockRecorder) FilesystemAccess() *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) FilesystemAccess() *MockStorageInterfaceFilesystemAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilesystemAccess", reflect.TypeOf((*MockStorageInterface)(nil).FilesystemAccess)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilesystemAccess", reflect.TypeOf((*MockStorageInterface)(nil).FilesystemAccess)) + return &MockStorageInterfaceFilesystemAccessCall{Call: call} +} + +// MockStorageInterfaceFilesystemAccessCall wrap *gomock.Call +type MockStorageInterfaceFilesystemAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceFilesystemAccessCall) Return(arg0 storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceFilesystemAccessCall) Do(f func() storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceFilesystemAccessCall) DoAndReturn(f func() storagecommon.FilesystemAccess) *MockStorageInterfaceFilesystemAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageInstance mocks base method. @@ -691,9 +1411,33 @@ func (m *MockStorageInterface) StorageInstance(arg0 names.StorageTag) (state.Sto } // StorageInstance indicates an expected call of StorageInstance. -func (mr *MockStorageInterfaceMockRecorder) StorageInstance(arg0 any) *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) StorageInstance(arg0 any) *MockStorageInterfaceStorageInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageInterface)(nil).StorageInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageInterface)(nil).StorageInstance), arg0) + return &MockStorageInterfaceStorageInstanceCall{Call: call} +} + +// MockStorageInterfaceStorageInstanceCall wrap *gomock.Call +type MockStorageInterfaceStorageInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceStorageInstanceCall) Return(arg0 state.StorageInstance, arg1 error) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceStorageInstanceCall) Do(f func(names.StorageTag) (state.StorageInstance, error)) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceStorageInstanceCall) DoAndReturn(f func(names.StorageTag) (state.StorageInstance, error)) *MockStorageInterfaceStorageInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStorageAttachments mocks base method. @@ -706,9 +1450,33 @@ func (m *MockStorageInterface) UnitStorageAttachments(arg0 names.UnitTag) ([]sta } // UnitStorageAttachments indicates an expected call of UnitStorageAttachments. -func (mr *MockStorageInterfaceMockRecorder) UnitStorageAttachments(arg0 any) *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) UnitStorageAttachments(arg0 any) *MockStorageInterfaceUnitStorageAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockStorageInterface)(nil).UnitStorageAttachments), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockStorageInterface)(nil).UnitStorageAttachments), arg0) + return &MockStorageInterfaceUnitStorageAttachmentsCall{Call: call} +} + +// MockStorageInterfaceUnitStorageAttachmentsCall wrap *gomock.Call +type MockStorageInterfaceUnitStorageAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) Return(arg0 []state.StorageAttachment, arg1 error) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) Do(f func(names.UnitTag) ([]state.StorageAttachment, error)) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceUnitStorageAttachmentsCall) DoAndReturn(f func(names.UnitTag) ([]state.StorageAttachment, error)) *MockStorageInterfaceUnitStorageAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VolumeAccess mocks base method. @@ -720,9 +1488,33 @@ func (m *MockStorageInterface) VolumeAccess() storagecommon.VolumeAccess { } // VolumeAccess indicates an expected call of VolumeAccess. -func (mr *MockStorageInterfaceMockRecorder) VolumeAccess() *gomock.Call { +func (mr *MockStorageInterfaceMockRecorder) VolumeAccess() *MockStorageInterfaceVolumeAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAccess", reflect.TypeOf((*MockStorageInterface)(nil).VolumeAccess)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAccess", reflect.TypeOf((*MockStorageInterface)(nil).VolumeAccess)) + return &MockStorageInterfaceVolumeAccessCall{Call: call} +} + +// MockStorageInterfaceVolumeAccessCall wrap *gomock.Call +type MockStorageInterfaceVolumeAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInterfaceVolumeAccessCall) Return(arg0 storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInterfaceVolumeAccessCall) Do(f func() storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInterfaceVolumeAccessCall) DoAndReturn(f func() storagecommon.VolumeAccess) *MockStorageInterfaceVolumeAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPool is a mock of Pool interface. @@ -759,9 +1551,33 @@ func (m *MockPool) GetModel(arg0 string) (machinemanager.Model, func(), error) { } // GetModel indicates an expected call of GetModel. -func (mr *MockPoolMockRecorder) GetModel(arg0 any) *gomock.Call { +func (mr *MockPoolMockRecorder) GetModel(arg0 any) *MockPoolGetModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModel", reflect.TypeOf((*MockPool)(nil).GetModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModel", reflect.TypeOf((*MockPool)(nil).GetModel), arg0) + return &MockPoolGetModelCall{Call: call} +} + +// MockPoolGetModelCall wrap *gomock.Call +type MockPoolGetModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolGetModelCall) Return(arg0 machinemanager.Model, arg1 func(), arg2 error) *MockPoolGetModelCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolGetModelCall) Do(f func(string) (machinemanager.Model, func(), error)) *MockPoolGetModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolGetModelCall) DoAndReturn(f func(string) (machinemanager.Model, func(), error)) *MockPoolGetModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemState mocks base method. @@ -774,9 +1590,33 @@ func (m *MockPool) SystemState() (machinemanager.ControllerBackend, error) { } // SystemState indicates an expected call of SystemState. -func (mr *MockPoolMockRecorder) SystemState() *gomock.Call { +func (mr *MockPoolMockRecorder) SystemState() *MockPoolSystemStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemState", reflect.TypeOf((*MockPool)(nil).SystemState)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemState", reflect.TypeOf((*MockPool)(nil).SystemState)) + return &MockPoolSystemStateCall{Call: call} +} + +// MockPoolSystemStateCall wrap *gomock.Call +type MockPoolSystemStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolSystemStateCall) Return(arg0 machinemanager.ControllerBackend, arg1 error) *MockPoolSystemStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolSystemStateCall) Do(f func() (machinemanager.ControllerBackend, error)) *MockPoolSystemStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolSystemStateCall) DoAndReturn(f func() (machinemanager.ControllerBackend, error)) *MockPoolSystemStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -812,9 +1652,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -826,9 +1690,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -840,9 +1728,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -855,9 +1767,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -869,9 +1805,33 @@ func (m *MockModel) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockModelMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockModelMockRecorder) ControllerUUID() *MockModelControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + return &MockModelControllerUUIDCall{Call: call} +} + +// MockModelControllerUUIDCall wrap *gomock.Call +type MockModelControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelControllerUUIDCall) Return(arg0 string) *MockModelControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelControllerUUIDCall) Do(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelControllerUUIDCall) DoAndReturn(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -883,9 +1843,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -897,9 +1881,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -911,9 +1919,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UUID mocks base method. @@ -925,9 +1957,33 @@ func (m *MockModel) UUID() string { } // UUID indicates an expected call of UUID. -func (mr *MockModelMockRecorder) UUID() *gomock.Call { +func (mr *MockModelMockRecorder) UUID() *MockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + return &MockModelUUIDCall{Call: call} +} + +// MockModelUUIDCall wrap *gomock.Call +type MockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUUIDCall) Return(arg0 string) *MockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUUIDCall) Do(f func() string) *MockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUUIDCall) DoAndReturn(f func() string) *MockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -963,9 +2019,33 @@ func (m *MockMachine) ApplicationNames() ([]string, error) { } // ApplicationNames indicates an expected call of ApplicationNames. -func (mr *MockMachineMockRecorder) ApplicationNames() *gomock.Call { +func (mr *MockMachineMockRecorder) ApplicationNames() *MockMachineApplicationNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationNames", reflect.TypeOf((*MockMachine)(nil).ApplicationNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationNames", reflect.TypeOf((*MockMachine)(nil).ApplicationNames)) + return &MockMachineApplicationNamesCall{Call: call} +} + +// MockMachineApplicationNamesCall wrap *gomock.Call +type MockMachineApplicationNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineApplicationNamesCall) Return(arg0 []string, arg1 error) *MockMachineApplicationNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineApplicationNamesCall) Do(f func() ([]string, error)) *MockMachineApplicationNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineApplicationNamesCall) DoAndReturn(f func() ([]string, error)) *MockMachineApplicationNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Base mocks base method. @@ -977,9 +2057,33 @@ func (m *MockMachine) Base() state.Base { } // Base indicates an expected call of Base. -func (mr *MockMachineMockRecorder) Base() *gomock.Call { +func (mr *MockMachineMockRecorder) Base() *MockMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + return &MockMachineBaseCall{Call: call} +} + +// MockMachineBaseCall wrap *gomock.Call +type MockMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBaseCall) Return(arg0 state.Base) *MockMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBaseCall) Do(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBaseCall) DoAndReturn(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CompleteUpgradeSeries mocks base method. @@ -991,9 +2095,33 @@ func (m *MockMachine) CompleteUpgradeSeries() error { } // CompleteUpgradeSeries indicates an expected call of CompleteUpgradeSeries. -func (mr *MockMachineMockRecorder) CompleteUpgradeSeries() *gomock.Call { +func (mr *MockMachineMockRecorder) CompleteUpgradeSeries() *MockMachineCompleteUpgradeSeriesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteUpgradeSeries", reflect.TypeOf((*MockMachine)(nil).CompleteUpgradeSeries)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteUpgradeSeries", reflect.TypeOf((*MockMachine)(nil).CompleteUpgradeSeries)) + return &MockMachineCompleteUpgradeSeriesCall{Call: call} +} + +// MockMachineCompleteUpgradeSeriesCall wrap *gomock.Call +type MockMachineCompleteUpgradeSeriesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineCompleteUpgradeSeriesCall) Return(arg0 error) *MockMachineCompleteUpgradeSeriesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineCompleteUpgradeSeriesCall) Do(f func() error) *MockMachineCompleteUpgradeSeriesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineCompleteUpgradeSeriesCall) DoAndReturn(f func() error) *MockMachineCompleteUpgradeSeriesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Containers mocks base method. @@ -1006,9 +2134,33 @@ func (m *MockMachine) Containers() ([]string, error) { } // Containers indicates an expected call of Containers. -func (mr *MockMachineMockRecorder) Containers() *gomock.Call { +func (mr *MockMachineMockRecorder) Containers() *MockMachineContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Containers", reflect.TypeOf((*MockMachine)(nil).Containers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Containers", reflect.TypeOf((*MockMachine)(nil).Containers)) + return &MockMachineContainersCall{Call: call} +} + +// MockMachineContainersCall wrap *gomock.Call +type MockMachineContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainersCall) Return(arg0 []string, arg1 error) *MockMachineContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainersCall) Do(f func() ([]string, error)) *MockMachineContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainersCall) DoAndReturn(f func() ([]string, error)) *MockMachineContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateUpgradeSeriesLock mocks base method. @@ -1020,9 +2172,33 @@ func (m *MockMachine) CreateUpgradeSeriesLock(arg0 []string, arg1 state.Base) er } // CreateUpgradeSeriesLock indicates an expected call of CreateUpgradeSeriesLock. -func (mr *MockMachineMockRecorder) CreateUpgradeSeriesLock(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineMockRecorder) CreateUpgradeSeriesLock(arg0, arg1 any) *MockMachineCreateUpgradeSeriesLockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgradeSeriesLock", reflect.TypeOf((*MockMachine)(nil).CreateUpgradeSeriesLock), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgradeSeriesLock", reflect.TypeOf((*MockMachine)(nil).CreateUpgradeSeriesLock), arg0, arg1) + return &MockMachineCreateUpgradeSeriesLockCall{Call: call} +} + +// MockMachineCreateUpgradeSeriesLockCall wrap *gomock.Call +type MockMachineCreateUpgradeSeriesLockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineCreateUpgradeSeriesLockCall) Return(arg0 error) *MockMachineCreateUpgradeSeriesLockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineCreateUpgradeSeriesLockCall) Do(f func([]string, state.Base) error) *MockMachineCreateUpgradeSeriesLockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineCreateUpgradeSeriesLockCall) DoAndReturn(f func([]string, state.Base) error) *MockMachineCreateUpgradeSeriesLockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1034,9 +2210,33 @@ func (m *MockMachine) Destroy(arg0 objectstore.ObjectStore) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockMachineMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) Destroy(arg0 any) *MockMachineDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockMachine)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockMachine)(nil).Destroy), arg0) + return &MockMachineDestroyCall{Call: call} +} + +// MockMachineDestroyCall wrap *gomock.Call +type MockMachineDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineDestroyCall) Return(arg0 error) *MockMachineDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineDestroyCall) Do(f func(objectstore.ObjectStore) error) *MockMachineDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineDestroyCall) DoAndReturn(f func(objectstore.ObjectStore) error) *MockMachineDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForceDestroy mocks base method. @@ -1048,9 +2248,33 @@ func (m *MockMachine) ForceDestroy(arg0 time.Duration) error { } // ForceDestroy indicates an expected call of ForceDestroy. -func (mr *MockMachineMockRecorder) ForceDestroy(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) ForceDestroy(arg0 any) *MockMachineForceDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceDestroy", reflect.TypeOf((*MockMachine)(nil).ForceDestroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceDestroy", reflect.TypeOf((*MockMachine)(nil).ForceDestroy), arg0) + return &MockMachineForceDestroyCall{Call: call} +} + +// MockMachineForceDestroyCall wrap *gomock.Call +type MockMachineForceDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineForceDestroyCall) Return(arg0 error) *MockMachineForceDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineForceDestroyCall) Do(f func(time.Duration) error) *MockMachineForceDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineForceDestroyCall) DoAndReturn(f func(time.Duration) error) *MockMachineForceDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUpgradeSeriesMessages mocks base method. @@ -1064,9 +2288,33 @@ func (m *MockMachine) GetUpgradeSeriesMessages() ([]string, bool, error) { } // GetUpgradeSeriesMessages indicates an expected call of GetUpgradeSeriesMessages. -func (mr *MockMachineMockRecorder) GetUpgradeSeriesMessages() *gomock.Call { +func (mr *MockMachineMockRecorder) GetUpgradeSeriesMessages() *MockMachineGetUpgradeSeriesMessagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpgradeSeriesMessages", reflect.TypeOf((*MockMachine)(nil).GetUpgradeSeriesMessages)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpgradeSeriesMessages", reflect.TypeOf((*MockMachine)(nil).GetUpgradeSeriesMessages)) + return &MockMachineGetUpgradeSeriesMessagesCall{Call: call} +} + +// MockMachineGetUpgradeSeriesMessagesCall wrap *gomock.Call +type MockMachineGetUpgradeSeriesMessagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineGetUpgradeSeriesMessagesCall) Return(arg0 []string, arg1 bool, arg2 error) *MockMachineGetUpgradeSeriesMessagesCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineGetUpgradeSeriesMessagesCall) Do(f func() ([]string, bool, error)) *MockMachineGetUpgradeSeriesMessagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineGetUpgradeSeriesMessagesCall) DoAndReturn(f func() ([]string, bool, error)) *MockMachineGetUpgradeSeriesMessagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareCharacteristics mocks base method. @@ -1079,9 +2327,33 @@ func (m *MockMachine) HardwareCharacteristics() (*instance.HardwareCharacteristi } // HardwareCharacteristics indicates an expected call of HardwareCharacteristics. -func (mr *MockMachineMockRecorder) HardwareCharacteristics() *gomock.Call { +func (mr *MockMachineMockRecorder) HardwareCharacteristics() *MockMachineHardwareCharacteristicsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareCharacteristics", reflect.TypeOf((*MockMachine)(nil).HardwareCharacteristics)) + return &MockMachineHardwareCharacteristicsCall{Call: call} +} + +// MockMachineHardwareCharacteristicsCall wrap *gomock.Call +type MockMachineHardwareCharacteristicsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineHardwareCharacteristicsCall) Return(arg0 *instance.HardwareCharacteristics, arg1 error) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineHardwareCharacteristicsCall) Do(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineHardwareCharacteristicsCall) DoAndReturn(f func() (*instance.HardwareCharacteristics, error)) *MockMachineHardwareCharacteristicsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -1093,9 +2365,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceStatus mocks base method. @@ -1108,9 +2404,33 @@ func (m *MockMachine) InstanceStatus() (status.StatusInfo, error) { } // InstanceStatus indicates an expected call of InstanceStatus. -func (mr *MockMachineMockRecorder) InstanceStatus() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceStatus() *MockMachineInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachine)(nil).InstanceStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachine)(nil).InstanceStatus)) + return &MockMachineInstanceStatusCall{Call: call} +} + +// MockMachineInstanceStatusCall wrap *gomock.Call +type MockMachineInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockMachineInstanceStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceStatusCall) Do(f func() (status.StatusInfo, error)) *MockMachineInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockMachineInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLockedForSeriesUpgrade mocks base method. @@ -1123,9 +2443,33 @@ func (m *MockMachine) IsLockedForSeriesUpgrade() (bool, error) { } // IsLockedForSeriesUpgrade indicates an expected call of IsLockedForSeriesUpgrade. -func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *gomock.Call { +func (mr *MockMachineMockRecorder) IsLockedForSeriesUpgrade() *MockMachineIsLockedForSeriesUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLockedForSeriesUpgrade", reflect.TypeOf((*MockMachine)(nil).IsLockedForSeriesUpgrade)) + return &MockMachineIsLockedForSeriesUpgradeCall{Call: call} +} + +// MockMachineIsLockedForSeriesUpgradeCall wrap *gomock.Call +type MockMachineIsLockedForSeriesUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsLockedForSeriesUpgradeCall) Return(arg0 bool, arg1 error) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsLockedForSeriesUpgradeCall) Do(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsLockedForSeriesUpgradeCall) DoAndReturn(f func() (bool, error)) *MockMachineIsLockedForSeriesUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManager mocks base method. @@ -1137,9 +2481,33 @@ func (m *MockMachine) IsManager() bool { } // IsManager indicates an expected call of IsManager. -func (mr *MockMachineMockRecorder) IsManager() *gomock.Call { +func (mr *MockMachineMockRecorder) IsManager() *MockMachineIsManagerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManager", reflect.TypeOf((*MockMachine)(nil).IsManager)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManager", reflect.TypeOf((*MockMachine)(nil).IsManager)) + return &MockMachineIsManagerCall{Call: call} +} + +// MockMachineIsManagerCall wrap *gomock.Call +type MockMachineIsManagerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsManagerCall) Return(arg0 bool) *MockMachineIsManagerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsManagerCall) Do(f func() bool) *MockMachineIsManagerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsManagerCall) DoAndReturn(f func() bool) *MockMachineIsManagerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Principals mocks base method. @@ -1151,9 +2519,33 @@ func (m *MockMachine) Principals() []string { } // Principals indicates an expected call of Principals. -func (mr *MockMachineMockRecorder) Principals() *gomock.Call { +func (mr *MockMachineMockRecorder) Principals() *MockMachinePrincipalsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Principals", reflect.TypeOf((*MockMachine)(nil).Principals)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Principals", reflect.TypeOf((*MockMachine)(nil).Principals)) + return &MockMachinePrincipalsCall{Call: call} +} + +// MockMachinePrincipalsCall wrap *gomock.Call +type MockMachinePrincipalsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePrincipalsCall) Return(arg0 []string) *MockMachinePrincipalsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePrincipalsCall) Do(f func() []string) *MockMachinePrincipalsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePrincipalsCall) DoAndReturn(f func() []string) *MockMachinePrincipalsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUpgradeSeriesLock mocks base method. @@ -1165,9 +2557,33 @@ func (m *MockMachine) RemoveUpgradeSeriesLock() error { } // RemoveUpgradeSeriesLock indicates an expected call of RemoveUpgradeSeriesLock. -func (mr *MockMachineMockRecorder) RemoveUpgradeSeriesLock() *gomock.Call { +func (mr *MockMachineMockRecorder) RemoveUpgradeSeriesLock() *MockMachineRemoveUpgradeSeriesLockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUpgradeSeriesLock", reflect.TypeOf((*MockMachine)(nil).RemoveUpgradeSeriesLock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUpgradeSeriesLock", reflect.TypeOf((*MockMachine)(nil).RemoveUpgradeSeriesLock)) + return &MockMachineRemoveUpgradeSeriesLockCall{Call: call} +} + +// MockMachineRemoveUpgradeSeriesLockCall wrap *gomock.Call +type MockMachineRemoveUpgradeSeriesLockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineRemoveUpgradeSeriesLockCall) Return(arg0 error) *MockMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineRemoveUpgradeSeriesLockCall) Do(f func() error) *MockMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineRemoveUpgradeSeriesLockCall) DoAndReturn(f func() error) *MockMachineRemoveUpgradeSeriesLockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -1179,9 +2595,33 @@ func (m *MockMachine) SetInstanceStatus(arg0 status.StatusInfo) error { } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockMachineMockRecorder) SetInstanceStatus(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetInstanceStatus(arg0 any) *MockMachineSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachine)(nil).SetInstanceStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachine)(nil).SetInstanceStatus), arg0) + return &MockMachineSetInstanceStatusCall{Call: call} +} + +// MockMachineSetInstanceStatusCall wrap *gomock.Call +type MockMachineSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetInstanceStatusCall) Return(arg0 error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetInstanceStatusCall) Do(f func(status.StatusInfo) error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetInstanceStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetKeepInstance mocks base method. @@ -1193,9 +2633,33 @@ func (m *MockMachine) SetKeepInstance(arg0 bool) error { } // SetKeepInstance indicates an expected call of SetKeepInstance. -func (mr *MockMachineMockRecorder) SetKeepInstance(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetKeepInstance(arg0 any) *MockMachineSetKeepInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetKeepInstance", reflect.TypeOf((*MockMachine)(nil).SetKeepInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetKeepInstance", reflect.TypeOf((*MockMachine)(nil).SetKeepInstance), arg0) + return &MockMachineSetKeepInstanceCall{Call: call} +} + +// MockMachineSetKeepInstanceCall wrap *gomock.Call +type MockMachineSetKeepInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetKeepInstanceCall) Return(arg0 error) *MockMachineSetKeepInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetKeepInstanceCall) Do(f func(bool) error) *MockMachineSetKeepInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetKeepInstanceCall) DoAndReturn(f func(bool) error) *MockMachineSetKeepInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -1207,9 +2671,33 @@ func (m *MockMachine) SetPassword(arg0 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockMachineMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetPassword(arg0 any) *MockMachineSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachine)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachine)(nil).SetPassword), arg0) + return &MockMachineSetPasswordCall{Call: call} +} + +// MockMachineSetPasswordCall wrap *gomock.Call +type MockMachineSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetPasswordCall) Return(arg0 error) *MockMachineSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetPasswordCall) Do(f func(string) error) *MockMachineSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetPasswordCall) DoAndReturn(f func(string) error) *MockMachineSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradeSeriesStatus mocks base method. @@ -1221,9 +2709,33 @@ func (m *MockMachine) SetUpgradeSeriesStatus(arg0 model.UpgradeSeriesStatus, arg } // SetUpgradeSeriesStatus indicates an expected call of SetUpgradeSeriesStatus. -func (mr *MockMachineMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *MockMachineSetUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockMachine)(nil).SetUpgradeSeriesStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockMachine)(nil).SetUpgradeSeriesStatus), arg0, arg1) + return &MockMachineSetUpgradeSeriesStatusCall{Call: call} +} + +// MockMachineSetUpgradeSeriesStatusCall wrap *gomock.Call +type MockMachineSetUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetUpgradeSeriesStatusCall) Return(arg0 error) *MockMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetUpgradeSeriesStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetUpgradeSeriesStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockMachineSetUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1235,9 +2747,33 @@ func (m *MockMachine) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockMachineMockRecorder) Tag() *gomock.Call { +func (mr *MockMachineMockRecorder) Tag() *MockMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + return &MockMachineTagCall{Call: call} +} + +// MockMachineTagCall wrap *gomock.Call +type MockMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineTagCall) Return(arg0 names.Tag) *MockMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineTagCall) Do(f func() names.Tag) *MockMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineTagCall) DoAndReturn(f func() names.Tag) *MockMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -1250,9 +2786,33 @@ func (m *MockMachine) Units() ([]machinemanager.Unit, error) { } // Units indicates an expected call of Units. -func (mr *MockMachineMockRecorder) Units() *gomock.Call { +func (mr *MockMachineMockRecorder) Units() *MockMachineUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + return &MockMachineUnitsCall{Call: call} +} + +// MockMachineUnitsCall wrap *gomock.Call +type MockMachineUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineUnitsCall) Return(arg0 []machinemanager.Unit, arg1 error) *MockMachineUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineUnitsCall) Do(f func() ([]machinemanager.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineUnitsCall) DoAndReturn(f func() ([]machinemanager.Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesStatus mocks base method. @@ -1265,9 +2825,33 @@ func (m *MockMachine) UpgradeSeriesStatus() (model.UpgradeSeriesStatus, error) { } // UpgradeSeriesStatus indicates an expected call of UpgradeSeriesStatus. -func (mr *MockMachineMockRecorder) UpgradeSeriesStatus() *gomock.Call { +func (mr *MockMachineMockRecorder) UpgradeSeriesStatus() *MockMachineUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockMachine)(nil).UpgradeSeriesStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockMachine)(nil).UpgradeSeriesStatus)) + return &MockMachineUpgradeSeriesStatusCall{Call: call} +} + +// MockMachineUpgradeSeriesStatusCall wrap *gomock.Call +type MockMachineUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineUpgradeSeriesStatusCall) Return(arg0 model.UpgradeSeriesStatus, arg1 error) *MockMachineUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineUpgradeSeriesStatusCall) Do(f func() (model.UpgradeSeriesStatus, error)) *MockMachineUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineUpgradeSeriesStatusCall) DoAndReturn(f func() (model.UpgradeSeriesStatus, error)) *MockMachineUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpgradeSeriesNotifications mocks base method. @@ -1280,9 +2864,33 @@ func (m *MockMachine) WatchUpgradeSeriesNotifications() (state.NotifyWatcher, er } // WatchUpgradeSeriesNotifications indicates an expected call of WatchUpgradeSeriesNotifications. -func (mr *MockMachineMockRecorder) WatchUpgradeSeriesNotifications() *gomock.Call { +func (mr *MockMachineMockRecorder) WatchUpgradeSeriesNotifications() *MockMachineWatchUpgradeSeriesNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockMachine)(nil).WatchUpgradeSeriesNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockMachine)(nil).WatchUpgradeSeriesNotifications)) + return &MockMachineWatchUpgradeSeriesNotificationsCall{Call: call} +} + +// MockMachineWatchUpgradeSeriesNotificationsCall wrap *gomock.Call +type MockMachineWatchUpgradeSeriesNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchUpgradeSeriesNotificationsCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchUpgradeSeriesNotificationsCall) Do(f func() (state.NotifyWatcher, error)) *MockMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchUpgradeSeriesNotificationsCall) DoAndReturn(f func() (state.NotifyWatcher, error)) *MockMachineWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -1319,9 +2927,33 @@ func (m *MockApplication) Charm() (machinemanager.Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 machinemanager.Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (machinemanager.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (machinemanager.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -1333,9 +2965,33 @@ func (m *MockApplication) CharmOrigin() *state.CharmOrigin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -1347,9 +3003,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -1385,9 +3065,33 @@ func (m *MockUnit) AgentStatus() (status.StatusInfo, error) { } // AgentStatus indicates an expected call of AgentStatus. -func (mr *MockUnitMockRecorder) AgentStatus() *gomock.Call { +func (mr *MockUnitMockRecorder) AgentStatus() *MockUnitAgentStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentStatus", reflect.TypeOf((*MockUnit)(nil).AgentStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentStatus", reflect.TypeOf((*MockUnit)(nil).AgentStatus)) + return &MockUnitAgentStatusCall{Call: call} +} + +// MockUnitAgentStatusCall wrap *gomock.Call +type MockUnitAgentStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAgentStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockUnitAgentStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAgentStatusCall) Do(f func() (status.StatusInfo, error)) *MockUnitAgentStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAgentStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockUnitAgentStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -1399,9 +3103,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -1414,9 +3142,33 @@ func (m *MockUnit) Status() (status.StatusInfo, error) { } // Status indicates an expected call of Status. -func (mr *MockUnitMockRecorder) Status() *gomock.Call { +func (mr *MockUnitMockRecorder) Status() *MockUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockUnit)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockUnit)(nil).Status)) + return &MockUnitStatusCall{Call: call} +} + +// MockUnitStatusCall wrap *gomock.Call +type MockUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStatusCall) Return(arg0 status.StatusInfo, arg1 error) *MockUnitStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStatusCall) Do(f func() (status.StatusInfo, error)) *MockUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStatusCall) DoAndReturn(f func() (status.StatusInfo, error)) *MockUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitTag mocks base method. @@ -1428,9 +3180,33 @@ func (m *MockUnit) UnitTag() names.UnitTag { } // UnitTag indicates an expected call of UnitTag. -func (mr *MockUnitMockRecorder) UnitTag() *gomock.Call { +func (mr *MockUnitMockRecorder) UnitTag() *MockUnitUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + return &MockUnitUnitTagCall{Call: call} +} + +// MockUnitUnitTagCall wrap *gomock.Call +type MockUnitUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUnitTagCall) Return(arg0 names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUnitTagCall) Do(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUnitTagCall) DoAndReturn(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -1465,9 +3241,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -1479,9 +3279,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmhubClient is a mock of CharmhubClient interface. @@ -1517,9 +3341,33 @@ func (m *MockCharmhubClient) Refresh(arg0 context.Context, arg1 charmhub.Refresh } // Refresh indicates an expected call of Refresh. -func (mr *MockCharmhubClientMockRecorder) Refresh(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmhubClientMockRecorder) Refresh(arg0, arg1 any) *MockCharmhubClientRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmhubClient)(nil).Refresh), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmhubClient)(nil).Refresh), arg0, arg1) + return &MockCharmhubClientRefreshCall{Call: call} +} + +// MockCharmhubClientRefreshCall wrap *gomock.Call +type MockCharmhubClientRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmhubClientRefreshCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmhubClientRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmhubClientRefreshCall) Do(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmhubClientRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmhubClientRefreshCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmhubClientRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -1555,9 +3403,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachineService is a mock of MachineService interface. @@ -1592,9 +3464,33 @@ func (m *MockMachineService) CreateMachine(arg0 context.Context, arg1 string) er } // CreateMachine indicates an expected call of CreateMachine. -func (mr *MockMachineServiceMockRecorder) CreateMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineServiceMockRecorder) CreateMachine(arg0, arg1 any) *MockMachineServiceCreateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMachine", reflect.TypeOf((*MockMachineService)(nil).CreateMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMachine", reflect.TypeOf((*MockMachineService)(nil).CreateMachine), arg0, arg1) + return &MockMachineServiceCreateMachineCall{Call: call} +} + +// MockMachineServiceCreateMachineCall wrap *gomock.Call +type MockMachineServiceCreateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineServiceCreateMachineCall) Return(arg0 error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineServiceCreateMachineCall) Do(f func(context.Context, string) error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineServiceCreateMachineCall) DoAndReturn(f func(context.Context, string) error) *MockMachineServiceCreateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteMachine mocks base method. @@ -1606,9 +3502,33 @@ func (m *MockMachineService) DeleteMachine(arg0 context.Context, arg1 string) er } // DeleteMachine indicates an expected call of DeleteMachine. -func (mr *MockMachineServiceMockRecorder) DeleteMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineServiceMockRecorder) DeleteMachine(arg0, arg1 any) *MockMachineServiceDeleteMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMachine", reflect.TypeOf((*MockMachineService)(nil).DeleteMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMachine", reflect.TypeOf((*MockMachineService)(nil).DeleteMachine), arg0, arg1) + return &MockMachineServiceDeleteMachineCall{Call: call} +} + +// MockMachineServiceDeleteMachineCall wrap *gomock.Call +type MockMachineServiceDeleteMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineServiceDeleteMachineCall) Return(arg0 error) *MockMachineServiceDeleteMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineServiceDeleteMachineCall) Do(f func(context.Context, string) error) *MockMachineServiceDeleteMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineServiceDeleteMachineCall) DoAndReturn(f func(context.Context, string) error) *MockMachineServiceDeleteMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -1644,7 +3564,31 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/machinemanager/package_test.go b/apiserver/facades/client/machinemanager/package_test.go index 9740c3f7492..72c66c5b0c7 100644 --- a/apiserver/facades/client/machinemanager/package_test.go +++ b/apiserver/facades/client/machinemanager/package_test.go @@ -9,12 +9,12 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/machinemanager Leadership,Authorizer,UpgradeSeries,UpgradeSeriesState,UpgradeBaseValidator,ControllerBackend,InstanceConfigBackend,Backend,StorageInterface,Pool,Model,Machine,Application,Unit,Charm,CharmhubClient,ControllerConfigService,MachineService,NetworkService -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination state_mock_test.go github.com/juju/juju/state StorageAttachment,StorageInstance,Block -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination state_storage_mock_test.go github.com/juju/juju/state/binarystorage StorageCloser -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination volume_access_mock_test.go github.com/juju/juju/apiserver/common/storagecommon VolumeAccess -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination environ_mock_test.go github.com/juju/juju/environs Environ -//go:generate go run go.uber.org/mock/mockgen -package machinemanager_test -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/machinemanager Leadership,Authorizer,UpgradeSeries,UpgradeSeriesState,UpgradeBaseValidator,ControllerBackend,InstanceConfigBackend,Backend,StorageInterface,Pool,Model,Machine,Application,Unit,Charm,CharmhubClient,ControllerConfigService,MachineService,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination state_mock_test.go github.com/juju/juju/state StorageAttachment,StorageInstance,Block +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination state_storage_mock_test.go github.com/juju/juju/state/binarystorage StorageCloser +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination volume_access_mock_test.go github.com/juju/juju/apiserver/common/storagecommon VolumeAccess +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination environ_mock_test.go github.com/juju/juju/environs Environ +//go:generate go run go.uber.org/mock/mockgen -typed -package machinemanager_test -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore func TestPackage(t *testing.T) { // TODO(wallyworld) - needed until instance config tests converted to gomock coretesting.MgoTestPackage(t) diff --git a/apiserver/facades/client/machinemanager/state_mock_test.go b/apiserver/facades/client/machinemanager/state_mock_test.go index 88c2ce02ddb..d49d2a0c8f3 100644 --- a/apiserver/facades/client/machinemanager/state_mock_test.go +++ b/apiserver/facades/client/machinemanager/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination state_mock_test.go github.com/juju/juju/state StorageAttachment,StorageInstance,Block +// mockgen -typed -package machinemanager_test -destination state_mock_test.go github.com/juju/juju/state StorageAttachment,StorageInstance,Block // // Package machinemanager_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockStorageAttachment) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockStorageAttachmentMockRecorder) Life() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) Life() *MockStorageAttachmentLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageAttachment)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageAttachment)(nil).Life)) + return &MockStorageAttachmentLifeCall{Call: call} +} + +// MockStorageAttachmentLifeCall wrap *gomock.Call +type MockStorageAttachmentLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentLifeCall) Return(arg0 state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentLifeCall) Do(f func() state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentLifeCall) DoAndReturn(f func() state.Life) *MockStorageAttachmentLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageInstance mocks base method. @@ -64,9 +88,33 @@ func (m *MockStorageAttachment) StorageInstance() names.StorageTag { } // StorageInstance indicates an expected call of StorageInstance. -func (mr *MockStorageAttachmentMockRecorder) StorageInstance() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) StorageInstance() *MockStorageAttachmentStorageInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageAttachment)(nil).StorageInstance)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstance", reflect.TypeOf((*MockStorageAttachment)(nil).StorageInstance)) + return &MockStorageAttachmentStorageInstanceCall{Call: call} +} + +// MockStorageAttachmentStorageInstanceCall wrap *gomock.Call +type MockStorageAttachmentStorageInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentStorageInstanceCall) Return(arg0 names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentStorageInstanceCall) Do(f func() names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentStorageInstanceCall) DoAndReturn(f func() names.StorageTag) *MockStorageAttachmentStorageInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -78,9 +126,33 @@ func (m *MockStorageAttachment) Unit() names.UnitTag { } // Unit indicates an expected call of Unit. -func (mr *MockStorageAttachmentMockRecorder) Unit() *gomock.Call { +func (mr *MockStorageAttachmentMockRecorder) Unit() *MockStorageAttachmentUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStorageAttachment)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStorageAttachment)(nil).Unit)) + return &MockStorageAttachmentUnitCall{Call: call} +} + +// MockStorageAttachmentUnitCall wrap *gomock.Call +type MockStorageAttachmentUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageAttachmentUnitCall) Return(arg0 names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageAttachmentUnitCall) Do(f func() names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageAttachmentUnitCall) DoAndReturn(f func() names.UnitTag) *MockStorageAttachmentUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageInstance is a mock of StorageInstance interface. @@ -115,9 +187,33 @@ func (m *MockStorageInstance) Kind() state.StorageKind { } // Kind indicates an expected call of Kind. -func (mr *MockStorageInstanceMockRecorder) Kind() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Kind() *MockStorageInstanceKindCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kind", reflect.TypeOf((*MockStorageInstance)(nil).Kind)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kind", reflect.TypeOf((*MockStorageInstance)(nil).Kind)) + return &MockStorageInstanceKindCall{Call: call} +} + +// MockStorageInstanceKindCall wrap *gomock.Call +type MockStorageInstanceKindCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceKindCall) Return(arg0 state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceKindCall) Do(f func() state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceKindCall) DoAndReturn(f func() state.StorageKind) *MockStorageInstanceKindCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -129,9 +225,33 @@ func (m *MockStorageInstance) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockStorageInstanceMockRecorder) Life() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Life() *MockStorageInstanceLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageInstance)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockStorageInstance)(nil).Life)) + return &MockStorageInstanceLifeCall{Call: call} +} + +// MockStorageInstanceLifeCall wrap *gomock.Call +type MockStorageInstanceLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceLifeCall) Return(arg0 state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceLifeCall) Do(f func() state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceLifeCall) DoAndReturn(f func() state.Life) *MockStorageInstanceLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -144,9 +264,33 @@ func (m *MockStorageInstance) Owner() (names.Tag, bool) { } // Owner indicates an expected call of Owner. -func (mr *MockStorageInstanceMockRecorder) Owner() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Owner() *MockStorageInstanceOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockStorageInstance)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockStorageInstance)(nil).Owner)) + return &MockStorageInstanceOwnerCall{Call: call} +} + +// MockStorageInstanceOwnerCall wrap *gomock.Call +type MockStorageInstanceOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceOwnerCall) Return(arg0 names.Tag, arg1 bool) *MockStorageInstanceOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceOwnerCall) Do(f func() (names.Tag, bool)) *MockStorageInstanceOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceOwnerCall) DoAndReturn(f func() (names.Tag, bool)) *MockStorageInstanceOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pool mocks base method. @@ -158,9 +302,33 @@ func (m *MockStorageInstance) Pool() string { } // Pool indicates an expected call of Pool. -func (mr *MockStorageInstanceMockRecorder) Pool() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Pool() *MockStorageInstancePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pool", reflect.TypeOf((*MockStorageInstance)(nil).Pool)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pool", reflect.TypeOf((*MockStorageInstance)(nil).Pool)) + return &MockStorageInstancePoolCall{Call: call} +} + +// MockStorageInstancePoolCall wrap *gomock.Call +type MockStorageInstancePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstancePoolCall) Return(arg0 string) *MockStorageInstancePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstancePoolCall) Do(f func() string) *MockStorageInstancePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstancePoolCall) DoAndReturn(f func() string) *MockStorageInstancePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageName mocks base method. @@ -172,9 +340,33 @@ func (m *MockStorageInstance) StorageName() string { } // StorageName indicates an expected call of StorageName. -func (mr *MockStorageInstanceMockRecorder) StorageName() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) StorageName() *MockStorageInstanceStorageNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageName", reflect.TypeOf((*MockStorageInstance)(nil).StorageName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageName", reflect.TypeOf((*MockStorageInstance)(nil).StorageName)) + return &MockStorageInstanceStorageNameCall{Call: call} +} + +// MockStorageInstanceStorageNameCall wrap *gomock.Call +type MockStorageInstanceStorageNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceStorageNameCall) Return(arg0 string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceStorageNameCall) Do(f func() string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceStorageNameCall) DoAndReturn(f func() string) *MockStorageInstanceStorageNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageTag mocks base method. @@ -186,9 +378,33 @@ func (m *MockStorageInstance) StorageTag() names.StorageTag { } // StorageTag indicates an expected call of StorageTag. -func (mr *MockStorageInstanceMockRecorder) StorageTag() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) StorageTag() *MockStorageInstanceStorageTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTag", reflect.TypeOf((*MockStorageInstance)(nil).StorageTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTag", reflect.TypeOf((*MockStorageInstance)(nil).StorageTag)) + return &MockStorageInstanceStorageTagCall{Call: call} +} + +// MockStorageInstanceStorageTagCall wrap *gomock.Call +type MockStorageInstanceStorageTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceStorageTagCall) Return(arg0 names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceStorageTagCall) Do(f func() names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceStorageTagCall) DoAndReturn(f func() names.StorageTag) *MockStorageInstanceStorageTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -200,9 +416,33 @@ func (m *MockStorageInstance) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockStorageInstanceMockRecorder) Tag() *gomock.Call { +func (mr *MockStorageInstanceMockRecorder) Tag() *MockStorageInstanceTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockStorageInstance)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockStorageInstance)(nil).Tag)) + return &MockStorageInstanceTagCall{Call: call} +} + +// MockStorageInstanceTagCall wrap *gomock.Call +type MockStorageInstanceTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageInstanceTagCall) Return(arg0 names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageInstanceTagCall) Do(f func() names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageInstanceTagCall) DoAndReturn(f func() names.Tag) *MockStorageInstanceTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBlock is a mock of Block interface. @@ -237,9 +477,33 @@ func (m *MockBlock) Id() string { } // Id indicates an expected call of Id. -func (mr *MockBlockMockRecorder) Id() *gomock.Call { +func (mr *MockBlockMockRecorder) Id() *MockBlockIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockBlock)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockBlock)(nil).Id)) + return &MockBlockIdCall{Call: call} +} + +// MockBlockIdCall wrap *gomock.Call +type MockBlockIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockIdCall) Return(arg0 string) *MockBlockIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockIdCall) Do(f func() string) *MockBlockIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockIdCall) DoAndReturn(f func() string) *MockBlockIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Message mocks base method. @@ -251,9 +515,33 @@ func (m *MockBlock) Message() string { } // Message indicates an expected call of Message. -func (mr *MockBlockMockRecorder) Message() *gomock.Call { +func (mr *MockBlockMockRecorder) Message() *MockBlockMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockBlock)(nil).Message)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockBlock)(nil).Message)) + return &MockBlockMessageCall{Call: call} +} + +// MockBlockMessageCall wrap *gomock.Call +type MockBlockMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockMessageCall) Return(arg0 string) *MockBlockMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockMessageCall) Do(f func() string) *MockBlockMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockMessageCall) DoAndReturn(f func() string) *MockBlockMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -265,9 +553,33 @@ func (m *MockBlock) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBlockMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBlockMockRecorder) ModelUUID() *MockBlockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBlock)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBlock)(nil).ModelUUID)) + return &MockBlockModelUUIDCall{Call: call} +} + +// MockBlockModelUUIDCall wrap *gomock.Call +type MockBlockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockModelUUIDCall) Return(arg0 string) *MockBlockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockModelUUIDCall) Do(f func() string) *MockBlockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockModelUUIDCall) DoAndReturn(f func() string) *MockBlockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -280,9 +592,33 @@ func (m *MockBlock) Tag() (names.Tag, error) { } // Tag indicates an expected call of Tag. -func (mr *MockBlockMockRecorder) Tag() *gomock.Call { +func (mr *MockBlockMockRecorder) Tag() *MockBlockTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockBlock)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockBlock)(nil).Tag)) + return &MockBlockTagCall{Call: call} +} + +// MockBlockTagCall wrap *gomock.Call +type MockBlockTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockTagCall) Return(arg0 names.Tag, arg1 error) *MockBlockTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockTagCall) Do(f func() (names.Tag, error)) *MockBlockTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockTagCall) DoAndReturn(f func() (names.Tag, error)) *MockBlockTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -294,9 +630,33 @@ func (m *MockBlock) Type() state.BlockType { } // Type indicates an expected call of Type. -func (mr *MockBlockMockRecorder) Type() *gomock.Call { +func (mr *MockBlockMockRecorder) Type() *MockBlockTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockBlock)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockBlock)(nil).Type)) + return &MockBlockTypeCall{Call: call} +} + +// MockBlockTypeCall wrap *gomock.Call +type MockBlockTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockTypeCall) Return(arg0 state.BlockType) *MockBlockTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockTypeCall) Do(f func() state.BlockType) *MockBlockTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockTypeCall) DoAndReturn(f func() state.BlockType) *MockBlockTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // updateMessageOp mocks base method. @@ -309,7 +669,31 @@ func (m *MockBlock) updateMessageOp(arg0 string) ([]txn.Op, error) { } // updateMessageOp indicates an expected call of updateMessageOp. -func (mr *MockBlockMockRecorder) updateMessageOp(arg0 any) *gomock.Call { +func (mr *MockBlockMockRecorder) updateMessageOp(arg0 any) *MockBlockupdateMessageOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "updateMessageOp", reflect.TypeOf((*MockBlock)(nil).updateMessageOp), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "updateMessageOp", reflect.TypeOf((*MockBlock)(nil).updateMessageOp), arg0) + return &MockBlockupdateMessageOpCall{Call: call} +} + +// MockBlockupdateMessageOpCall wrap *gomock.Call +type MockBlockupdateMessageOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockupdateMessageOpCall) Return(arg0 []txn.Op, arg1 error) *MockBlockupdateMessageOpCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockupdateMessageOpCall) Do(f func(string) ([]txn.Op, error)) *MockBlockupdateMessageOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockupdateMessageOpCall) DoAndReturn(f func(string) ([]txn.Op, error)) *MockBlockupdateMessageOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/machinemanager/state_storage_mock_test.go b/apiserver/facades/client/machinemanager/state_storage_mock_test.go index 4160050f63b..47f6ccbe2d0 100644 --- a/apiserver/facades/client/machinemanager/state_storage_mock_test.go +++ b/apiserver/facades/client/machinemanager/state_storage_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination state_storage_mock_test.go github.com/juju/juju/state/binarystorage StorageCloser +// mockgen -typed -package machinemanager_test -destination state_storage_mock_test.go github.com/juju/juju/state/binarystorage StorageCloser // // Package machinemanager_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockStorageCloser) Add(arg0 context.Context, arg1 io.Reader, arg2 binar } // Add indicates an expected call of Add. -func (mr *MockStorageCloserMockRecorder) Add(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Add(arg0, arg1, arg2 any) *MockStorageCloserAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStorageCloser)(nil).Add), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStorageCloser)(nil).Add), arg0, arg1, arg2) + return &MockStorageCloserAddCall{Call: call} +} + +// MockStorageCloserAddCall wrap *gomock.Call +type MockStorageCloserAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserAddCall) Return(arg0 error) *MockStorageCloserAddCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserAddCall) Do(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockStorageCloserAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserAddCall) DoAndReturn(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockStorageCloserAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMetadata mocks base method. @@ -65,9 +89,33 @@ func (m *MockStorageCloser) AllMetadata() ([]binarystorage.Metadata, error) { } // AllMetadata indicates an expected call of AllMetadata. -func (mr *MockStorageCloserMockRecorder) AllMetadata() *gomock.Call { +func (mr *MockStorageCloserMockRecorder) AllMetadata() *MockStorageCloserAllMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMetadata", reflect.TypeOf((*MockStorageCloser)(nil).AllMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMetadata", reflect.TypeOf((*MockStorageCloser)(nil).AllMetadata)) + return &MockStorageCloserAllMetadataCall{Call: call} +} + +// MockStorageCloserAllMetadataCall wrap *gomock.Call +type MockStorageCloserAllMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserAllMetadataCall) Return(arg0 []binarystorage.Metadata, arg1 error) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserAllMetadataCall) Do(f func() ([]binarystorage.Metadata, error)) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserAllMetadataCall) DoAndReturn(f func() ([]binarystorage.Metadata, error)) *MockStorageCloserAllMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -79,9 +127,33 @@ func (m *MockStorageCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockStorageCloserMockRecorder) Close() *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Close() *MockStorageCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorageCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorageCloser)(nil).Close)) + return &MockStorageCloserCloseCall{Call: call} +} + +// MockStorageCloserCloseCall wrap *gomock.Call +type MockStorageCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserCloseCall) Return(arg0 error) *MockStorageCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserCloseCall) Do(f func() error) *MockStorageCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserCloseCall) DoAndReturn(f func() error) *MockStorageCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Metadata mocks base method. @@ -94,9 +166,33 @@ func (m *MockStorageCloser) Metadata(arg0 string) (binarystorage.Metadata, error } // Metadata indicates an expected call of Metadata. -func (mr *MockStorageCloserMockRecorder) Metadata(arg0 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Metadata(arg0 any) *MockStorageCloserMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockStorageCloser)(nil).Metadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockStorageCloser)(nil).Metadata), arg0) + return &MockStorageCloserMetadataCall{Call: call} +} + +// MockStorageCloserMetadataCall wrap *gomock.Call +type MockStorageCloserMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserMetadataCall) Return(arg0 binarystorage.Metadata, arg1 error) *MockStorageCloserMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserMetadataCall) Do(f func(string) (binarystorage.Metadata, error)) *MockStorageCloserMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserMetadataCall) DoAndReturn(f func(string) (binarystorage.Metadata, error)) *MockStorageCloserMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -110,7 +206,31 @@ func (m *MockStorageCloser) Open(arg0 context.Context, arg1 string) (binarystora } // Open indicates an expected call of Open. -func (mr *MockStorageCloserMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageCloserMockRecorder) Open(arg0, arg1 any) *MockStorageCloserOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorageCloser)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorageCloser)(nil).Open), arg0, arg1) + return &MockStorageCloserOpenCall{Call: call} +} + +// MockStorageCloserOpenCall wrap *gomock.Call +type MockStorageCloserOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageCloserOpenCall) Return(arg0 binarystorage.Metadata, arg1 io.ReadCloser, arg2 error) *MockStorageCloserOpenCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageCloserOpenCall) Do(f func(context.Context, string) (binarystorage.Metadata, io.ReadCloser, error)) *MockStorageCloserOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageCloserOpenCall) DoAndReturn(f func(context.Context, string) (binarystorage.Metadata, io.ReadCloser, error)) *MockStorageCloserOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/machinemanager/volume_access_mock_test.go b/apiserver/facades/client/machinemanager/volume_access_mock_test.go index 274e6c85c20..b94cf3dde3b 100644 --- a/apiserver/facades/client/machinemanager/volume_access_mock_test.go +++ b/apiserver/facades/client/machinemanager/volume_access_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package machinemanager_test -destination volume_access_mock_test.go github.com/juju/juju/apiserver/common/storagecommon VolumeAccess +// mockgen -typed -package machinemanager_test -destination volume_access_mock_test.go github.com/juju/juju/apiserver/common/storagecommon VolumeAccess // // Package machinemanager_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockVolumeAccess) StorageInstanceVolume(arg0 names.StorageTag) (state.V } // StorageInstanceVolume indicates an expected call of StorageInstanceVolume. -func (mr *MockVolumeAccessMockRecorder) StorageInstanceVolume(arg0 any) *gomock.Call { +func (mr *MockVolumeAccessMockRecorder) StorageInstanceVolume(arg0 any) *MockVolumeAccessStorageInstanceVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstanceVolume", reflect.TypeOf((*MockVolumeAccess)(nil).StorageInstanceVolume), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageInstanceVolume", reflect.TypeOf((*MockVolumeAccess)(nil).StorageInstanceVolume), arg0) + return &MockVolumeAccessStorageInstanceVolumeCall{Call: call} +} + +// MockVolumeAccessStorageInstanceVolumeCall wrap *gomock.Call +type MockVolumeAccessStorageInstanceVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockVolumeAccessStorageInstanceVolumeCall) Return(arg0 state.Volume, arg1 error) *MockVolumeAccessStorageInstanceVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockVolumeAccessStorageInstanceVolumeCall) Do(f func(names.StorageTag) (state.Volume, error)) *MockVolumeAccessStorageInstanceVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockVolumeAccessStorageInstanceVolumeCall) DoAndReturn(f func(names.StorageTag) (state.Volume, error)) *MockVolumeAccessStorageInstanceVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VolumeAttachment mocks base method. @@ -65,9 +89,33 @@ func (m *MockVolumeAccess) VolumeAttachment(arg0 names.Tag, arg1 names.VolumeTag } // VolumeAttachment indicates an expected call of VolumeAttachment. -func (mr *MockVolumeAccessMockRecorder) VolumeAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockVolumeAccessMockRecorder) VolumeAttachment(arg0, arg1 any) *MockVolumeAccessVolumeAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachment", reflect.TypeOf((*MockVolumeAccess)(nil).VolumeAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachment", reflect.TypeOf((*MockVolumeAccess)(nil).VolumeAttachment), arg0, arg1) + return &MockVolumeAccessVolumeAttachmentCall{Call: call} +} + +// MockVolumeAccessVolumeAttachmentCall wrap *gomock.Call +type MockVolumeAccessVolumeAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockVolumeAccessVolumeAttachmentCall) Return(arg0 state.VolumeAttachment, arg1 error) *MockVolumeAccessVolumeAttachmentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockVolumeAccessVolumeAttachmentCall) Do(f func(names.Tag, names.VolumeTag) (state.VolumeAttachment, error)) *MockVolumeAccessVolumeAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockVolumeAccessVolumeAttachmentCall) DoAndReturn(f func(names.Tag, names.VolumeTag) (state.VolumeAttachment, error)) *MockVolumeAccessVolumeAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VolumeAttachmentPlan mocks base method. @@ -80,7 +128,31 @@ func (m *MockVolumeAccess) VolumeAttachmentPlan(arg0 names.Tag, arg1 names.Volum } // VolumeAttachmentPlan indicates an expected call of VolumeAttachmentPlan. -func (mr *MockVolumeAccessMockRecorder) VolumeAttachmentPlan(arg0, arg1 any) *gomock.Call { +func (mr *MockVolumeAccessMockRecorder) VolumeAttachmentPlan(arg0, arg1 any) *MockVolumeAccessVolumeAttachmentPlanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachmentPlan", reflect.TypeOf((*MockVolumeAccess)(nil).VolumeAttachmentPlan), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachmentPlan", reflect.TypeOf((*MockVolumeAccess)(nil).VolumeAttachmentPlan), arg0, arg1) + return &MockVolumeAccessVolumeAttachmentPlanCall{Call: call} +} + +// MockVolumeAccessVolumeAttachmentPlanCall wrap *gomock.Call +type MockVolumeAccessVolumeAttachmentPlanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockVolumeAccessVolumeAttachmentPlanCall) Return(arg0 state.VolumeAttachmentPlan, arg1 error) *MockVolumeAccessVolumeAttachmentPlanCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockVolumeAccessVolumeAttachmentPlanCall) Do(f func(names.Tag, names.VolumeTag) (state.VolumeAttachmentPlan, error)) *MockVolumeAccessVolumeAttachmentPlanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockVolumeAccessVolumeAttachmentPlanCall) DoAndReturn(f func(names.Tag, names.VolumeTag) (state.VolumeAttachmentPlan, error)) *MockVolumeAccessVolumeAttachmentPlanCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelconfig/mocks/service_mock.go b/apiserver/facades/client/modelconfig/mocks/service_mock.go index d12d8145237..ed5c3345788 100644 --- a/apiserver/facades/client/modelconfig/mocks/service_mock.go +++ b/apiserver/facades/client/modelconfig/mocks/service_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelconfig SecretBackendService,ModelConfigService +// mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelconfig SecretBackendService,ModelConfigService // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSecretBackendService) PingSecretBackend(arg0 context.Context, arg1 } // PingSecretBackend indicates an expected call of PingSecretBackend. -func (mr *MockSecretBackendServiceMockRecorder) PingSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) PingSecretBackend(arg0, arg1 any) *MockSecretBackendServicePingSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PingSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).PingSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PingSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).PingSecretBackend), arg0, arg1) + return &MockSecretBackendServicePingSecretBackendCall{Call: call} +} + +// MockSecretBackendServicePingSecretBackendCall wrap *gomock.Call +type MockSecretBackendServicePingSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServicePingSecretBackendCall) Return(arg0 error) *MockSecretBackendServicePingSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServicePingSecretBackendCall) Do(f func(context.Context, string) error) *MockSecretBackendServicePingSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServicePingSecretBackendCall) DoAndReturn(f func(context.Context, string) error) *MockSecretBackendServicePingSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelConfigService is a mock of ModelConfigService interface. @@ -87,9 +111,33 @@ func (m *MockModelConfigService) ModelConfigValues(arg0 context.Context) (config } // ModelConfigValues indicates an expected call of ModelConfigValues. -func (mr *MockModelConfigServiceMockRecorder) ModelConfigValues(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfigValues(arg0 any) *MockModelConfigServiceModelConfigValuesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfigValues", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfigValues), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfigValues", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfigValues), arg0) + return &MockModelConfigServiceModelConfigValuesCall{Call: call} +} + +// MockModelConfigServiceModelConfigValuesCall wrap *gomock.Call +type MockModelConfigServiceModelConfigValuesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigValuesCall) Return(arg0 config.ConfigValues, arg1 error) *MockModelConfigServiceModelConfigValuesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigValuesCall) Do(f func(context.Context) (config.ConfigValues, error)) *MockModelConfigServiceModelConfigValuesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigValuesCall) DoAndReturn(f func(context.Context) (config.ConfigValues, error)) *MockModelConfigServiceModelConfigValuesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateModelConfig mocks base method. @@ -105,8 +153,32 @@ func (m *MockModelConfigService) UpdateModelConfig(arg0 context.Context, arg1 ma } // UpdateModelConfig indicates an expected call of UpdateModelConfig. -func (mr *MockModelConfigServiceMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *MockModelConfigServiceUpdateModelConfigCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).UpdateModelConfig), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).UpdateModelConfig), varargs...) + return &MockModelConfigServiceUpdateModelConfigCall{Call: call} +} + +// MockModelConfigServiceUpdateModelConfigCall wrap *gomock.Call +type MockModelConfigServiceUpdateModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceUpdateModelConfigCall) Return(arg0 error) *MockModelConfigServiceUpdateModelConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceUpdateModelConfigCall) Do(f func(context.Context, map[string]any, []string, ...config.Validator) error) *MockModelConfigServiceUpdateModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceUpdateModelConfigCall) DoAndReturn(f func(context.Context, map[string]any, []string, ...config.Validator) error) *MockModelConfigServiceUpdateModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelconfig/package_test.go b/apiserver/facades/client/modelconfig/package_test.go index a38d093e1c0..09dbc041a48 100644 --- a/apiserver/facades/client/modelconfig/package_test.go +++ b/apiserver/facades/client/modelconfig/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelconfig SecretBackendService,ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelconfig SecretBackendService,ModelConfigService func Test(t *testing.T) { gc.TestingT(t) } diff --git a/apiserver/facades/client/modelgeneration/interface.go b/apiserver/facades/client/modelgeneration/interface.go index 76add6a4282..1d30a1ed708 100644 --- a/apiserver/facades/client/modelgeneration/interface.go +++ b/apiserver/facades/client/modelgeneration/interface.go @@ -10,7 +10,7 @@ import ( "github.com/juju/juju/core/settings" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/client/modelgeneration State,Model,Generation,Application +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/client/modelgeneration State,Model,Generation,Application // State represents the state of a model required by the model generation API. type State interface { diff --git a/apiserver/facades/client/modelgeneration/mocks/package_mock.go b/apiserver/facades/client/modelgeneration/mocks/package_mock.go index 5284f64fc9d..a4b977e0518 100644 --- a/apiserver/facades/client/modelgeneration/mocks/package_mock.go +++ b/apiserver/facades/client/modelgeneration/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/client/modelgeneration State,Model,Generation,Application +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/apiserver/facades/client/modelgeneration State,Model,Generation,Application // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockState) Application(arg0 string) (modelgeneration.Application, error } // Application indicates an expected call of Application. -func (mr *MockStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Application(arg0 any) *MockStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + return &MockStateApplicationCall{Call: call} +} + +// MockStateApplicationCall wrap *gomock.Call +type MockStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateApplicationCall) Return(arg0 modelgeneration.Application, arg1 error) *MockStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateApplicationCall) Do(f func(string) (modelgeneration.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateApplicationCall) DoAndReturn(f func(string) (modelgeneration.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -66,9 +90,33 @@ func (m *MockState) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockStateMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockStateMockRecorder) ControllerTag() *MockStateControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockState)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockState)(nil).ControllerTag)) + return &MockStateControllerTagCall{Call: call} +} + +// MockStateControllerTagCall wrap *gomock.Call +type MockStateControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateControllerTagCall) Return(arg0 names.ControllerTag) *MockStateControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateControllerTagCall) Do(f func() names.ControllerTag) *MockStateControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockStateControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -81,9 +129,33 @@ func (m *MockState) Model() (modelgeneration.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateMockRecorder) Model() *gomock.Call { +func (mr *MockStateMockRecorder) Model() *MockStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + return &MockStateModelCall{Call: call} +} + +// MockStateModelCall wrap *gomock.Call +type MockStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelCall) Return(arg0 modelgeneration.Model, arg1 error) *MockStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelCall) Do(f func() (modelgeneration.Model, error)) *MockStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelCall) DoAndReturn(f func() (modelgeneration.Model, error)) *MockStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -118,9 +190,33 @@ func (m *MockModel) AddBranch(arg0, arg1 string) error { } // AddBranch indicates an expected call of AddBranch. -func (mr *MockModelMockRecorder) AddBranch(arg0, arg1 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddBranch(arg0, arg1 any) *MockModelAddBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBranch", reflect.TypeOf((*MockModel)(nil).AddBranch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBranch", reflect.TypeOf((*MockModel)(nil).AddBranch), arg0, arg1) + return &MockModelAddBranchCall{Call: call} +} + +// MockModelAddBranchCall wrap *gomock.Call +type MockModelAddBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddBranchCall) Return(arg0 error) *MockModelAddBranchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddBranchCall) Do(f func(string, string) error) *MockModelAddBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddBranchCall) DoAndReturn(f func(string, string) error) *MockModelAddBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Branch mocks base method. @@ -133,9 +229,33 @@ func (m *MockModel) Branch(arg0 string) (modelgeneration.Generation, error) { } // Branch indicates an expected call of Branch. -func (mr *MockModelMockRecorder) Branch(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) Branch(arg0 any) *MockModelBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branch", reflect.TypeOf((*MockModel)(nil).Branch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branch", reflect.TypeOf((*MockModel)(nil).Branch), arg0) + return &MockModelBranchCall{Call: call} +} + +// MockModelBranchCall wrap *gomock.Call +type MockModelBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelBranchCall) Return(arg0 modelgeneration.Generation, arg1 error) *MockModelBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelBranchCall) Do(f func(string) (modelgeneration.Generation, error)) *MockModelBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelBranchCall) DoAndReturn(f func(string) (modelgeneration.Generation, error)) *MockModelBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Branches mocks base method. @@ -148,9 +268,33 @@ func (m *MockModel) Branches() ([]modelgeneration.Generation, error) { } // Branches indicates an expected call of Branches. -func (mr *MockModelMockRecorder) Branches() *gomock.Call { +func (mr *MockModelMockRecorder) Branches() *MockModelBranchesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branches", reflect.TypeOf((*MockModel)(nil).Branches)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Branches", reflect.TypeOf((*MockModel)(nil).Branches)) + return &MockModelBranchesCall{Call: call} +} + +// MockModelBranchesCall wrap *gomock.Call +type MockModelBranchesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelBranchesCall) Return(arg0 []modelgeneration.Generation, arg1 error) *MockModelBranchesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelBranchesCall) Do(f func() ([]modelgeneration.Generation, error)) *MockModelBranchesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelBranchesCall) DoAndReturn(f func() ([]modelgeneration.Generation, error)) *MockModelBranchesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Generation mocks base method. @@ -163,9 +307,33 @@ func (m *MockModel) Generation(arg0 int) (modelgeneration.Generation, error) { } // Generation indicates an expected call of Generation. -func (mr *MockModelMockRecorder) Generation(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) Generation(arg0 any) *MockModelGenerationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generation", reflect.TypeOf((*MockModel)(nil).Generation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generation", reflect.TypeOf((*MockModel)(nil).Generation), arg0) + return &MockModelGenerationCall{Call: call} +} + +// MockModelGenerationCall wrap *gomock.Call +type MockModelGenerationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelGenerationCall) Return(arg0 modelgeneration.Generation, arg1 error) *MockModelGenerationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelGenerationCall) Do(f func(int) (modelgeneration.Generation, error)) *MockModelGenerationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelGenerationCall) DoAndReturn(f func(int) (modelgeneration.Generation, error)) *MockModelGenerationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Generations mocks base method. @@ -178,9 +346,33 @@ func (m *MockModel) Generations() ([]modelgeneration.Generation, error) { } // Generations indicates an expected call of Generations. -func (mr *MockModelMockRecorder) Generations() *gomock.Call { +func (mr *MockModelMockRecorder) Generations() *MockModelGenerationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generations", reflect.TypeOf((*MockModel)(nil).Generations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generations", reflect.TypeOf((*MockModel)(nil).Generations)) + return &MockModelGenerationsCall{Call: call} +} + +// MockModelGenerationsCall wrap *gomock.Call +type MockModelGenerationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelGenerationsCall) Return(arg0 []modelgeneration.Generation, arg1 error) *MockModelGenerationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelGenerationsCall) Do(f func() ([]modelgeneration.Generation, error)) *MockModelGenerationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelGenerationsCall) DoAndReturn(f func() ([]modelgeneration.Generation, error)) *MockModelGenerationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -192,9 +384,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockGeneration is a mock of Generation interface. @@ -229,9 +445,33 @@ func (m *MockGeneration) Abort(arg0 string) error { } // Abort indicates an expected call of Abort. -func (mr *MockGenerationMockRecorder) Abort(arg0 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) Abort(arg0 any) *MockGenerationAbortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockGeneration)(nil).Abort), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockGeneration)(nil).Abort), arg0) + return &MockGenerationAbortCall{Call: call} +} + +// MockGenerationAbortCall wrap *gomock.Call +type MockGenerationAbortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAbortCall) Return(arg0 error) *MockGenerationAbortCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAbortCall) Do(f func(string) error) *MockGenerationAbortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAbortCall) DoAndReturn(f func(string) error) *MockGenerationAbortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignAllUnits mocks base method. @@ -243,9 +483,33 @@ func (m *MockGeneration) AssignAllUnits(arg0 string) error { } // AssignAllUnits indicates an expected call of AssignAllUnits. -func (mr *MockGenerationMockRecorder) AssignAllUnits(arg0 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) AssignAllUnits(arg0 any) *MockGenerationAssignAllUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignAllUnits", reflect.TypeOf((*MockGeneration)(nil).AssignAllUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignAllUnits", reflect.TypeOf((*MockGeneration)(nil).AssignAllUnits), arg0) + return &MockGenerationAssignAllUnitsCall{Call: call} +} + +// MockGenerationAssignAllUnitsCall wrap *gomock.Call +type MockGenerationAssignAllUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAssignAllUnitsCall) Return(arg0 error) *MockGenerationAssignAllUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAssignAllUnitsCall) Do(f func(string) error) *MockGenerationAssignAllUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAssignAllUnitsCall) DoAndReturn(f func(string) error) *MockGenerationAssignAllUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignUnit mocks base method. @@ -257,9 +521,33 @@ func (m *MockGeneration) AssignUnit(arg0 string) error { } // AssignUnit indicates an expected call of AssignUnit. -func (mr *MockGenerationMockRecorder) AssignUnit(arg0 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) AssignUnit(arg0 any) *MockGenerationAssignUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUnit", reflect.TypeOf((*MockGeneration)(nil).AssignUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUnit", reflect.TypeOf((*MockGeneration)(nil).AssignUnit), arg0) + return &MockGenerationAssignUnitCall{Call: call} +} + +// MockGenerationAssignUnitCall wrap *gomock.Call +type MockGenerationAssignUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAssignUnitCall) Return(arg0 error) *MockGenerationAssignUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAssignUnitCall) Do(f func(string) error) *MockGenerationAssignUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAssignUnitCall) DoAndReturn(f func(string) error) *MockGenerationAssignUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignUnits mocks base method. @@ -271,9 +559,33 @@ func (m *MockGeneration) AssignUnits(arg0 string, arg1 int) error { } // AssignUnits indicates an expected call of AssignUnits. -func (mr *MockGenerationMockRecorder) AssignUnits(arg0, arg1 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) AssignUnits(arg0, arg1 any) *MockGenerationAssignUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUnits", reflect.TypeOf((*MockGeneration)(nil).AssignUnits), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUnits", reflect.TypeOf((*MockGeneration)(nil).AssignUnits), arg0, arg1) + return &MockGenerationAssignUnitsCall{Call: call} +} + +// MockGenerationAssignUnitsCall wrap *gomock.Call +type MockGenerationAssignUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAssignUnitsCall) Return(arg0 error) *MockGenerationAssignUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAssignUnitsCall) Do(f func(string, int) error) *MockGenerationAssignUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAssignUnitsCall) DoAndReturn(f func(string, int) error) *MockGenerationAssignUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedUnits mocks base method. @@ -285,9 +597,33 @@ func (m *MockGeneration) AssignedUnits() map[string][]string { } // AssignedUnits indicates an expected call of AssignedUnits. -func (mr *MockGenerationMockRecorder) AssignedUnits() *gomock.Call { +func (mr *MockGenerationMockRecorder) AssignedUnits() *MockGenerationAssignedUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedUnits", reflect.TypeOf((*MockGeneration)(nil).AssignedUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedUnits", reflect.TypeOf((*MockGeneration)(nil).AssignedUnits)) + return &MockGenerationAssignedUnitsCall{Call: call} +} + +// MockGenerationAssignedUnitsCall wrap *gomock.Call +type MockGenerationAssignedUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationAssignedUnitsCall) Return(arg0 map[string][]string) *MockGenerationAssignedUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationAssignedUnitsCall) Do(f func() map[string][]string) *MockGenerationAssignedUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationAssignedUnitsCall) DoAndReturn(f func() map[string][]string) *MockGenerationAssignedUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BranchName mocks base method. @@ -299,9 +635,33 @@ func (m *MockGeneration) BranchName() string { } // BranchName indicates an expected call of BranchName. -func (mr *MockGenerationMockRecorder) BranchName() *gomock.Call { +func (mr *MockGenerationMockRecorder) BranchName() *MockGenerationBranchNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BranchName", reflect.TypeOf((*MockGeneration)(nil).BranchName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BranchName", reflect.TypeOf((*MockGeneration)(nil).BranchName)) + return &MockGenerationBranchNameCall{Call: call} +} + +// MockGenerationBranchNameCall wrap *gomock.Call +type MockGenerationBranchNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationBranchNameCall) Return(arg0 string) *MockGenerationBranchNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationBranchNameCall) Do(f func() string) *MockGenerationBranchNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationBranchNameCall) DoAndReturn(f func() string) *MockGenerationBranchNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Commit mocks base method. @@ -314,9 +674,33 @@ func (m *MockGeneration) Commit(arg0 string) (int, error) { } // Commit indicates an expected call of Commit. -func (mr *MockGenerationMockRecorder) Commit(arg0 any) *gomock.Call { +func (mr *MockGenerationMockRecorder) Commit(arg0 any) *MockGenerationCommitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockGeneration)(nil).Commit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockGeneration)(nil).Commit), arg0) + return &MockGenerationCommitCall{Call: call} +} + +// MockGenerationCommitCall wrap *gomock.Call +type MockGenerationCommitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationCommitCall) Return(arg0 int, arg1 error) *MockGenerationCommitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationCommitCall) Do(f func(string) (int, error)) *MockGenerationCommitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationCommitCall) DoAndReturn(f func(string) (int, error)) *MockGenerationCommitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Completed mocks base method. @@ -328,9 +712,33 @@ func (m *MockGeneration) Completed() int64 { } // Completed indicates an expected call of Completed. -func (mr *MockGenerationMockRecorder) Completed() *gomock.Call { +func (mr *MockGenerationMockRecorder) Completed() *MockGenerationCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Completed", reflect.TypeOf((*MockGeneration)(nil).Completed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Completed", reflect.TypeOf((*MockGeneration)(nil).Completed)) + return &MockGenerationCompletedCall{Call: call} +} + +// MockGenerationCompletedCall wrap *gomock.Call +type MockGenerationCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationCompletedCall) Return(arg0 int64) *MockGenerationCompletedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationCompletedCall) Do(f func() int64) *MockGenerationCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationCompletedCall) DoAndReturn(f func() int64) *MockGenerationCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CompletedBy mocks base method. @@ -342,9 +750,33 @@ func (m *MockGeneration) CompletedBy() string { } // CompletedBy indicates an expected call of CompletedBy. -func (mr *MockGenerationMockRecorder) CompletedBy() *gomock.Call { +func (mr *MockGenerationMockRecorder) CompletedBy() *MockGenerationCompletedByCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedBy", reflect.TypeOf((*MockGeneration)(nil).CompletedBy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompletedBy", reflect.TypeOf((*MockGeneration)(nil).CompletedBy)) + return &MockGenerationCompletedByCall{Call: call} +} + +// MockGenerationCompletedByCall wrap *gomock.Call +type MockGenerationCompletedByCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationCompletedByCall) Return(arg0 string) *MockGenerationCompletedByCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationCompletedByCall) Do(f func() string) *MockGenerationCompletedByCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationCompletedByCall) DoAndReturn(f func() string) *MockGenerationCompletedByCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -356,9 +788,33 @@ func (m *MockGeneration) Config() map[string]settings.ItemChanges { } // Config indicates an expected call of Config. -func (mr *MockGenerationMockRecorder) Config() *gomock.Call { +func (mr *MockGenerationMockRecorder) Config() *MockGenerationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockGeneration)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockGeneration)(nil).Config)) + return &MockGenerationConfigCall{Call: call} +} + +// MockGenerationConfigCall wrap *gomock.Call +type MockGenerationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationConfigCall) Return(arg0 map[string]settings.ItemChanges) *MockGenerationConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationConfigCall) Do(f func() map[string]settings.ItemChanges) *MockGenerationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationConfigCall) DoAndReturn(f func() map[string]settings.ItemChanges) *MockGenerationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Created mocks base method. @@ -370,9 +826,33 @@ func (m *MockGeneration) Created() int64 { } // Created indicates an expected call of Created. -func (mr *MockGenerationMockRecorder) Created() *gomock.Call { +func (mr *MockGenerationMockRecorder) Created() *MockGenerationCreatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Created", reflect.TypeOf((*MockGeneration)(nil).Created)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Created", reflect.TypeOf((*MockGeneration)(nil).Created)) + return &MockGenerationCreatedCall{Call: call} +} + +// MockGenerationCreatedCall wrap *gomock.Call +type MockGenerationCreatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationCreatedCall) Return(arg0 int64) *MockGenerationCreatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationCreatedCall) Do(f func() int64) *MockGenerationCreatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationCreatedCall) DoAndReturn(f func() int64) *MockGenerationCreatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatedBy mocks base method. @@ -384,9 +864,33 @@ func (m *MockGeneration) CreatedBy() string { } // CreatedBy indicates an expected call of CreatedBy. -func (mr *MockGenerationMockRecorder) CreatedBy() *gomock.Call { +func (mr *MockGenerationMockRecorder) CreatedBy() *MockGenerationCreatedByCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatedBy", reflect.TypeOf((*MockGeneration)(nil).CreatedBy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatedBy", reflect.TypeOf((*MockGeneration)(nil).CreatedBy)) + return &MockGenerationCreatedByCall{Call: call} +} + +// MockGenerationCreatedByCall wrap *gomock.Call +type MockGenerationCreatedByCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationCreatedByCall) Return(arg0 string) *MockGenerationCreatedByCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationCreatedByCall) Do(f func() string) *MockGenerationCreatedByCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationCreatedByCall) DoAndReturn(f func() string) *MockGenerationCreatedByCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GenerationId mocks base method. @@ -398,9 +902,33 @@ func (m *MockGeneration) GenerationId() int { } // GenerationId indicates an expected call of GenerationId. -func (mr *MockGenerationMockRecorder) GenerationId() *gomock.Call { +func (mr *MockGenerationMockRecorder) GenerationId() *MockGenerationGenerationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerationId", reflect.TypeOf((*MockGeneration)(nil).GenerationId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerationId", reflect.TypeOf((*MockGeneration)(nil).GenerationId)) + return &MockGenerationGenerationIdCall{Call: call} +} + +// MockGenerationGenerationIdCall wrap *gomock.Call +type MockGenerationGenerationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGenerationGenerationIdCall) Return(arg0 int) *MockGenerationGenerationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGenerationGenerationIdCall) Do(f func() int) *MockGenerationGenerationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGenerationGenerationIdCall) DoAndReturn(f func() int) *MockGenerationGenerationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -436,9 +964,33 @@ func (m *MockApplication) DefaultCharmConfig() (charm.Settings, error) { } // DefaultCharmConfig indicates an expected call of DefaultCharmConfig. -func (mr *MockApplicationMockRecorder) DefaultCharmConfig() *gomock.Call { +func (mr *MockApplicationMockRecorder) DefaultCharmConfig() *MockApplicationDefaultCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultCharmConfig", reflect.TypeOf((*MockApplication)(nil).DefaultCharmConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultCharmConfig", reflect.TypeOf((*MockApplication)(nil).DefaultCharmConfig)) + return &MockApplicationDefaultCharmConfigCall{Call: call} +} + +// MockApplicationDefaultCharmConfigCall wrap *gomock.Call +type MockApplicationDefaultCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDefaultCharmConfigCall) Return(arg0 charm.Settings, arg1 error) *MockApplicationDefaultCharmConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDefaultCharmConfigCall) Do(f func() (charm.Settings, error)) *MockApplicationDefaultCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDefaultCharmConfigCall) DoAndReturn(f func() (charm.Settings, error)) *MockApplicationDefaultCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitNames mocks base method. @@ -451,7 +1003,31 @@ func (m *MockApplication) UnitNames() ([]string, error) { } // UnitNames indicates an expected call of UnitNames. -func (mr *MockApplicationMockRecorder) UnitNames() *gomock.Call { +func (mr *MockApplicationMockRecorder) UnitNames() *MockApplicationUnitNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitNames", reflect.TypeOf((*MockApplication)(nil).UnitNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitNames", reflect.TypeOf((*MockApplication)(nil).UnitNames)) + return &MockApplicationUnitNamesCall{Call: call} +} + +// MockApplicationUnitNamesCall wrap *gomock.Call +type MockApplicationUnitNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnitNamesCall) Return(arg0 []string, arg1 error) *MockApplicationUnitNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnitNamesCall) Do(f func() ([]string, error)) *MockApplicationUnitNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnitNamesCall) DoAndReturn(f func() ([]string, error)) *MockApplicationUnitNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelmanager/mocks/common_mock.go b/apiserver/facades/client/modelmanager/mocks/common_mock.go index dcdab557401..a1cd63fd22c 100644 --- a/apiserver/facades/client/modelmanager/mocks/common_mock.go +++ b/apiserver/facades/client/modelmanager/mocks/common_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface +// mockgen -typed -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockBlockCheckerInterface) ChangeAllowed(arg0 context.Context) error { } // ChangeAllowed indicates an expected call of ChangeAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) ChangeAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerInterfaceChangeAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).ChangeAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).ChangeAllowed), arg0) + return &MockBlockCheckerInterfaceChangeAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceChangeAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceChangeAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceChangeAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyAllowed mocks base method. @@ -62,9 +86,33 @@ func (m *MockBlockCheckerInterface) DestroyAllowed(arg0 context.Context) error { } // DestroyAllowed indicates an expected call of DestroyAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) DestroyAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) DestroyAllowed(arg0 any) *MockBlockCheckerInterfaceDestroyAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).DestroyAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).DestroyAllowed), arg0) + return &MockBlockCheckerInterfaceDestroyAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceDestroyAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceDestroyAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllowed mocks base method. @@ -76,7 +124,31 @@ func (m *MockBlockCheckerInterface) RemoveAllowed(arg0 context.Context) error { } // RemoveAllowed indicates an expected call of RemoveAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) RemoveAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerInterfaceRemoveAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).RemoveAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).RemoveAllowed), arg0) + return &MockBlockCheckerInterfaceRemoveAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceRemoveAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceRemoveAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelmanager/mocks/domain_mock.go b/apiserver/facades/client/modelmanager/mocks/domain_mock.go index ea914f0cf39..82ce455c4d5 100644 --- a/apiserver/facades/client/modelmanager/mocks/domain_mock.go +++ b/apiserver/facades/client/modelmanager/mocks/domain_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/common ControllerConfigService +// mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/common ControllerConfigService // // Package mocks is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelmanager/mocks/migrator_mock.go b/apiserver/facades/client/modelmanager/mocks/migrator_mock.go index b6e5dc88016..8870b8597ef 100644 --- a/apiserver/facades/client/modelmanager/mocks/migrator_mock.go +++ b/apiserver/facades/client/modelmanager/mocks/migrator_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/migrator_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager ModelExporter +// mockgen -typed -package mocks -destination mocks/migrator_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager ModelExporter // // Package mocks is a generated GoMock package. @@ -52,7 +52,31 @@ func (m *MockModelExporter) ExportModelPartial(arg0 context.Context, arg1 state. } // ExportModelPartial indicates an expected call of ExportModelPartial. -func (mr *MockModelExporterMockRecorder) ExportModelPartial(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelExporterMockRecorder) ExportModelPartial(arg0, arg1, arg2 any) *MockModelExporterExportModelPartialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportModelPartial", reflect.TypeOf((*MockModelExporter)(nil).ExportModelPartial), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportModelPartial", reflect.TypeOf((*MockModelExporter)(nil).ExportModelPartial), arg0, arg1, arg2) + return &MockModelExporterExportModelPartialCall{Call: call} +} + +// MockModelExporterExportModelPartialCall wrap *gomock.Call +type MockModelExporterExportModelPartialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExporterExportModelPartialCall) Return(arg0 description.Model, arg1 error) *MockModelExporterExportModelPartialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExporterExportModelPartialCall) Do(f func(context.Context, state.ExportConfig, objectstore.ObjectStore) (description.Model, error)) *MockModelExporterExportModelPartialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExporterExportModelPartialCall) DoAndReturn(f func(context.Context, state.ExportConfig, objectstore.ObjectStore) (description.Model, error)) *MockModelExporterExportModelPartialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelmanager/mocks/service_mock.go b/apiserver/facades/client/modelmanager/mocks/service_mock.go index 0223ec5d178..865666eede7 100644 --- a/apiserver/facades/client/modelmanager/mocks/service_mock.go +++ b/apiserver/facades/client/modelmanager/mocks/service_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager AccessService,SecretBackendService,ModelService +// mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager AccessService,SecretBackendService,ModelService // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockAccessService) GetUserByName(arg0 context.Context, arg1 string) (us } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockAccessServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockAccessServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockAccessServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockAccessService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockAccessService)(nil).GetUserByName), arg0, arg1) + return &MockAccessServiceGetUserByNameCall{Call: call} +} + +// MockAccessServiceGetUserByNameCall wrap *gomock.Call +type MockAccessServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockAccessServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockAccessServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockAccessServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessLevelForTarget mocks base method. @@ -71,9 +95,33 @@ func (m *MockAccessService) ReadUserAccessLevelForTarget(arg0 context.Context, a } // ReadUserAccessLevelForTarget indicates an expected call of ReadUserAccessLevelForTarget. -func (mr *MockAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAccessServiceMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *MockAccessServiceReadUserAccessLevelForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockAccessService)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + return &MockAccessServiceReadUserAccessLevelForTargetCall{Call: call} +} + +// MockAccessServiceReadUserAccessLevelForTargetCall wrap *gomock.Call +type MockAccessServiceReadUserAccessLevelForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessServiceReadUserAccessLevelForTargetCall) Return(arg0 permission.Access, arg1 error) *MockAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessServiceReadUserAccessLevelForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessServiceReadUserAccessLevelForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockAccessServiceReadUserAccessLevelForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePermission mocks base method. @@ -85,9 +133,33 @@ func (m *MockAccessService) UpdatePermission(arg0 context.Context, arg1 access.U } // UpdatePermission indicates an expected call of UpdatePermission. -func (mr *MockAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAccessServiceMockRecorder) UpdatePermission(arg0, arg1 any) *MockAccessServiceUpdatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockAccessService)(nil).UpdatePermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePermission", reflect.TypeOf((*MockAccessService)(nil).UpdatePermission), arg0, arg1) + return &MockAccessServiceUpdatePermissionCall{Call: call} +} + +// MockAccessServiceUpdatePermissionCall wrap *gomock.Call +type MockAccessServiceUpdatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessServiceUpdatePermissionCall) Return(arg0 error) *MockAccessServiceUpdatePermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessServiceUpdatePermissionCall) Do(f func(context.Context, access.UpdatePermissionArgs) error) *MockAccessServiceUpdatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessServiceUpdatePermissionCall) DoAndReturn(f func(context.Context, access.UpdatePermissionArgs) error) *MockAccessServiceUpdatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -123,9 +195,33 @@ func (m *MockSecretBackendService) BackendSummaryInfoForModel(arg0 context.Conte } // BackendSummaryInfoForModel indicates an expected call of BackendSummaryInfoForModel. -func (mr *MockSecretBackendServiceMockRecorder) BackendSummaryInfoForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) BackendSummaryInfoForModel(arg0, arg1 any) *MockSecretBackendServiceBackendSummaryInfoForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendSummaryInfoForModel", reflect.TypeOf((*MockSecretBackendService)(nil).BackendSummaryInfoForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendSummaryInfoForModel", reflect.TypeOf((*MockSecretBackendService)(nil).BackendSummaryInfoForModel), arg0, arg1) + return &MockSecretBackendServiceBackendSummaryInfoForModelCall{Call: call} +} + +// MockSecretBackendServiceBackendSummaryInfoForModelCall wrap *gomock.Call +type MockSecretBackendServiceBackendSummaryInfoForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceBackendSummaryInfoForModelCall) Return(arg0 []*service.SecretBackendInfo, arg1 error) *MockSecretBackendServiceBackendSummaryInfoForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceBackendSummaryInfoForModelCall) Do(f func(context.Context, model.UUID) ([]*service.SecretBackendInfo, error)) *MockSecretBackendServiceBackendSummaryInfoForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceBackendSummaryInfoForModelCall) DoAndReturn(f func(context.Context, model.UUID) ([]*service.SecretBackendInfo, error)) *MockSecretBackendServiceBackendSummaryInfoForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelService is a mock of ModelService interface. @@ -161,9 +257,33 @@ func (m *MockModelService) CreateModel(arg0 context.Context, arg1 model0.ModelCr } // CreateModel indicates an expected call of CreateModel. -func (mr *MockModelServiceMockRecorder) CreateModel(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) CreateModel(arg0, arg1 any) *MockModelServiceCreateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockModelService)(nil).CreateModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockModelService)(nil).CreateModel), arg0, arg1) + return &MockModelServiceCreateModelCall{Call: call} +} + +// MockModelServiceCreateModelCall wrap *gomock.Call +type MockModelServiceCreateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceCreateModelCall) Return(arg0 func(context.Context) error, arg1 error) *MockModelServiceCreateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceCreateModelCall) Do(f func(context.Context, model0.ModelCreationArgs) (func(context.Context) error, error)) *MockModelServiceCreateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceCreateModelCall) DoAndReturn(f func(context.Context, model0.ModelCreationArgs) (func(context.Context) error, error)) *MockModelServiceCreateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DefaultModelCloudNameAndCredential mocks base method. @@ -177,9 +297,33 @@ func (m *MockModelService) DefaultModelCloudNameAndCredential(arg0 context.Conte } // DefaultModelCloudNameAndCredential indicates an expected call of DefaultModelCloudNameAndCredential. -func (mr *MockModelServiceMockRecorder) DefaultModelCloudNameAndCredential(arg0 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) DefaultModelCloudNameAndCredential(arg0 any) *MockModelServiceDefaultModelCloudNameAndCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultModelCloudNameAndCredential", reflect.TypeOf((*MockModelService)(nil).DefaultModelCloudNameAndCredential), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultModelCloudNameAndCredential", reflect.TypeOf((*MockModelService)(nil).DefaultModelCloudNameAndCredential), arg0) + return &MockModelServiceDefaultModelCloudNameAndCredentialCall{Call: call} +} + +// MockModelServiceDefaultModelCloudNameAndCredentialCall wrap *gomock.Call +type MockModelServiceDefaultModelCloudNameAndCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceDefaultModelCloudNameAndCredentialCall) Return(arg0 string, arg1 credential.Key, arg2 error) *MockModelServiceDefaultModelCloudNameAndCredentialCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceDefaultModelCloudNameAndCredentialCall) Do(f func(context.Context) (string, credential.Key, error)) *MockModelServiceDefaultModelCloudNameAndCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceDefaultModelCloudNameAndCredentialCall) DoAndReturn(f func(context.Context) (string, credential.Key, error)) *MockModelServiceDefaultModelCloudNameAndCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteModel mocks base method. @@ -191,9 +335,33 @@ func (m *MockModelService) DeleteModel(arg0 context.Context, arg1 model.UUID) er } // DeleteModel indicates an expected call of DeleteModel. -func (mr *MockModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *MockModelServiceDeleteModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockModelService)(nil).DeleteModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockModelService)(nil).DeleteModel), arg0, arg1) + return &MockModelServiceDeleteModelCall{Call: call} +} + +// MockModelServiceDeleteModelCall wrap *gomock.Call +type MockModelServiceDeleteModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceDeleteModelCall) Return(arg0 error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceDeleteModelCall) Do(f func(context.Context, model.UUID) error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceDeleteModelCall) DoAndReturn(f func(context.Context, model.UUID) error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListAllModels mocks base method. @@ -206,9 +374,33 @@ func (m *MockModelService) ListAllModels(arg0 context.Context) ([]model.Model, e } // ListAllModels indicates an expected call of ListAllModels. -func (mr *MockModelServiceMockRecorder) ListAllModels(arg0 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) ListAllModels(arg0 any) *MockModelServiceListAllModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAllModels", reflect.TypeOf((*MockModelService)(nil).ListAllModels), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAllModels", reflect.TypeOf((*MockModelService)(nil).ListAllModels), arg0) + return &MockModelServiceListAllModelsCall{Call: call} +} + +// MockModelServiceListAllModelsCall wrap *gomock.Call +type MockModelServiceListAllModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceListAllModelsCall) Return(arg0 []model.Model, arg1 error) *MockModelServiceListAllModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceListAllModelsCall) Do(f func(context.Context) ([]model.Model, error)) *MockModelServiceListAllModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceListAllModelsCall) DoAndReturn(f func(context.Context) ([]model.Model, error)) *MockModelServiceListAllModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListModelsForUser mocks base method. @@ -221,7 +413,31 @@ func (m *MockModelService) ListModelsForUser(arg0 context.Context, arg1 user.UUI } // ListModelsForUser indicates an expected call of ListModelsForUser. -func (mr *MockModelServiceMockRecorder) ListModelsForUser(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) ListModelsForUser(arg0, arg1 any) *MockModelServiceListModelsForUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListModelsForUser", reflect.TypeOf((*MockModelService)(nil).ListModelsForUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListModelsForUser", reflect.TypeOf((*MockModelService)(nil).ListModelsForUser), arg0, arg1) + return &MockModelServiceListModelsForUserCall{Call: call} +} + +// MockModelServiceListModelsForUserCall wrap *gomock.Call +type MockModelServiceListModelsForUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceListModelsForUserCall) Return(arg0 []model.Model, arg1 error) *MockModelServiceListModelsForUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceListModelsForUserCall) Do(f func(context.Context, user.UUID) ([]model.Model, error)) *MockModelServiceListModelsForUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceListModelsForUserCall) DoAndReturn(f func(context.Context, user.UUID) ([]model.Model, error)) *MockModelServiceListModelsForUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelmanager/package_test.go b/apiserver/facades/client/modelmanager/package_test.go index c306c96f4a7..57980e78355 100644 --- a/apiserver/facades/client/modelmanager/package_test.go +++ b/apiserver/facades/client/modelmanager/package_test.go @@ -9,10 +9,10 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/common ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/migrator_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager ModelExporter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager AccessService,SecretBackendService,ModelService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/domain_mock.go github.com/juju/juju/apiserver/common ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/migrator_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager ModelExporter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/client/modelmanager AccessService,SecretBackendService,ModelService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/client/modelupgrader/mocks/agents_mock.go b/apiserver/facades/client/modelupgrader/mocks/agents_mock.go index aa3b19b3c75..5749151ed9b 100644 --- a/apiserver/facades/client/modelupgrader/mocks/agents_mock.go +++ b/apiserver/facades/client/modelupgrader/mocks/agents_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/agents_mock.go github.com/juju/juju/apiserver/common ToolsFinder +// mockgen -typed -package mocks -destination mocks/agents_mock.go github.com/juju/juju/apiserver/common ToolsFinder // // Package mocks is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockToolsFinder) FindAgents(arg0 context.Context, arg1 common.FindAgent } // FindAgents indicates an expected call of FindAgents. -func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *gomock.Call { +func (mr *MockToolsFinderMockRecorder) FindAgents(arg0, arg1 any) *MockToolsFinderFindAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockToolsFinder)(nil).FindAgents), arg0, arg1) + return &MockToolsFinderFindAgentsCall{Call: call} +} + +// MockToolsFinderFindAgentsCall wrap *gomock.Call +type MockToolsFinderFindAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockToolsFinderFindAgentsCall) Return(arg0 tools.List, arg1 error) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockToolsFinderFindAgentsCall) Do(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockToolsFinderFindAgentsCall) DoAndReturn(f func(context.Context, common.FindAgentsParams) (tools.List, error)) *MockToolsFinderFindAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelupgrader/mocks/common_mock.go b/apiserver/facades/client/modelupgrader/mocks/common_mock.go index dcdab557401..a1cd63fd22c 100644 --- a/apiserver/facades/client/modelupgrader/mocks/common_mock.go +++ b/apiserver/facades/client/modelupgrader/mocks/common_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface +// mockgen -typed -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockBlockCheckerInterface) ChangeAllowed(arg0 context.Context) error { } // ChangeAllowed indicates an expected call of ChangeAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) ChangeAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerInterfaceChangeAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).ChangeAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).ChangeAllowed), arg0) + return &MockBlockCheckerInterfaceChangeAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceChangeAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceChangeAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceChangeAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceChangeAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyAllowed mocks base method. @@ -62,9 +86,33 @@ func (m *MockBlockCheckerInterface) DestroyAllowed(arg0 context.Context) error { } // DestroyAllowed indicates an expected call of DestroyAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) DestroyAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) DestroyAllowed(arg0 any) *MockBlockCheckerInterfaceDestroyAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).DestroyAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).DestroyAllowed), arg0) + return &MockBlockCheckerInterfaceDestroyAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceDestroyAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceDestroyAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceDestroyAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceDestroyAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllowed mocks base method. @@ -76,7 +124,31 @@ func (m *MockBlockCheckerInterface) RemoveAllowed(arg0 context.Context) error { } // RemoveAllowed indicates an expected call of RemoveAllowed. -func (mr *MockBlockCheckerInterfaceMockRecorder) RemoveAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerInterfaceMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerInterfaceRemoveAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).RemoveAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockCheckerInterface)(nil).RemoveAllowed), arg0) + return &MockBlockCheckerInterfaceRemoveAllowedCall{Call: call} +} + +// MockBlockCheckerInterfaceRemoveAllowedCall wrap *gomock.Call +type MockBlockCheckerInterfaceRemoveAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerInterfaceRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerInterfaceRemoveAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelupgrader/mocks/environs_mock.go b/apiserver/facades/client/modelupgrader/mocks/environs_mock.go index 834db728261..704763d2084 100644 --- a/apiserver/facades/client/modelupgrader/mocks/environs_mock.go +++ b/apiserver/facades/client/modelupgrader/mocks/environs_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs BootstrapEnviron +// mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs BootstrapEnviron // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockBootstrapEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 en } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockBootstrapEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockBootstrapEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockBootstrapEnvironBootstrapCall{Call: call} +} + +// MockBootstrapEnvironBootstrapCall wrap *gomock.Call +type MockBootstrapEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBootstrapEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -68,9 +92,33 @@ func (m *MockBootstrapEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockBootstrapEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Config() *MockBootstrapEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBootstrapEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBootstrapEnviron)(nil).Config)) + return &MockBootstrapEnvironConfigCall{Call: call} +} + +// MockBootstrapEnvironConfigCall wrap *gomock.Call +type MockBootstrapEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironConfigCall) Return(arg0 *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironConfigCall) Do(f func() *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockBootstrapEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -83,9 +131,33 @@ func (m *MockBootstrapEnviron) ConstraintsValidator(arg0 envcontext.ProviderCall } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockBootstrapEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockBootstrapEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBootstrapEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBootstrapEnviron)(nil).ConstraintsValidator), arg0) + return &MockBootstrapEnvironConstraintsValidatorCall{Call: call} +} + +// MockBootstrapEnvironConstraintsValidatorCall wrap *gomock.Call +type MockBootstrapEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBootstrapEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -97,9 +169,33 @@ func (m *MockBootstrapEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 } // Create indicates an expected call of Create. -func (mr *MockBootstrapEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Create(arg0, arg1 any) *MockBootstrapEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBootstrapEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBootstrapEnviron)(nil).Create), arg0, arg1) + return &MockBootstrapEnvironCreateCall{Call: call} +} + +// MockBootstrapEnvironCreateCall wrap *gomock.Call +type MockBootstrapEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironCreateCall) Return(arg0 error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBootstrapEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -111,9 +207,33 @@ func (m *MockBootstrapEnviron) Destroy(arg0 envcontext.ProviderCallContext) erro } // Destroy indicates an expected call of Destroy. -func (mr *MockBootstrapEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) Destroy(arg0 any) *MockBootstrapEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBootstrapEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBootstrapEnviron)(nil).Destroy), arg0) + return &MockBootstrapEnvironDestroyCall{Call: call} +} + +// MockBootstrapEnvironDestroyCall wrap *gomock.Call +type MockBootstrapEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironDestroyCall) Return(arg0 error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockBootstrapEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -125,9 +245,33 @@ func (m *MockBootstrapEnviron) DestroyController(arg0 envcontext.ProviderCallCon } // DestroyController indicates an expected call of DestroyController. -func (mr *MockBootstrapEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockBootstrapEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBootstrapEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBootstrapEnviron)(nil).DestroyController), arg0, arg1) + return &MockBootstrapEnvironDestroyControllerCall{Call: call} +} + +// MockBootstrapEnvironDestroyControllerCall wrap *gomock.Call +type MockBootstrapEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironDestroyControllerCall) Return(arg0 error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockBootstrapEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -139,9 +283,33 @@ func (m *MockBootstrapEnviron) PrepareForBootstrap(arg0 environs.BootstrapContex } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockBootstrapEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockBootstrapEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBootstrapEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockBootstrapEnvironPrepareForBootstrapCall{Call: call} +} + +// MockBootstrapEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockBootstrapEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironPrepareForBootstrapCall) Return(arg0 error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockBootstrapEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -153,9 +321,33 @@ func (m *MockBootstrapEnviron) SetConfig(arg0 context.Context, arg1 *config.Conf } // SetConfig indicates an expected call of SetConfig. -func (mr *MockBootstrapEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockBootstrapEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBootstrapEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBootstrapEnviron)(nil).SetConfig), arg0, arg1) + return &MockBootstrapEnvironSetConfigCall{Call: call} +} + +// MockBootstrapEnvironSetConfigCall wrap *gomock.Call +type MockBootstrapEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironSetConfigCall) Return(arg0 error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockBootstrapEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -168,9 +360,33 @@ func (m *MockBootstrapEnviron) StorageProvider(arg0 storage.ProviderType) (stora } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockBootstrapEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) StorageProvider(arg0 any) *MockBootstrapEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProvider), arg0) + return &MockBootstrapEnvironStorageProviderCall{Call: call} +} + +// MockBootstrapEnvironStorageProviderCall wrap *gomock.Call +type MockBootstrapEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockBootstrapEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -183,7 +399,31 @@ func (m *MockBootstrapEnviron) StorageProviderTypes() ([]storage.ProviderType, e } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockBootstrapEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockBootstrapEnvironMockRecorder) StorageProviderTypes() *MockBootstrapEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBootstrapEnviron)(nil).StorageProviderTypes)) + return &MockBootstrapEnvironStorageProviderTypesCall{Call: call} +} + +// MockBootstrapEnvironStorageProviderTypesCall wrap *gomock.Call +type MockBootstrapEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBootstrapEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBootstrapEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBootstrapEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockBootstrapEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelupgrader/mocks/state_mock.go b/apiserver/facades/client/modelupgrader/mocks/state_mock.go index d392f7b84f3..3e139d3f87d 100644 --- a/apiserver/facades/client/modelupgrader/mocks/state_mock.go +++ b/apiserver/facades/client/modelupgrader/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/modelupgrader StatePool,State,Model,UpgradeService,ControllerConfigService +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/modelupgrader StatePool,State,Model,UpgradeService,ControllerConfigService // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockStatePool) ControllerModel() (modelupgrader.Model, error) { } // ControllerModel indicates an expected call of ControllerModel. -func (mr *MockStatePoolMockRecorder) ControllerModel() *gomock.Call { +func (mr *MockStatePoolMockRecorder) ControllerModel() *MockStatePoolControllerModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModel", reflect.TypeOf((*MockStatePool)(nil).ControllerModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModel", reflect.TypeOf((*MockStatePool)(nil).ControllerModel)) + return &MockStatePoolControllerModelCall{Call: call} +} + +// MockStatePoolControllerModelCall wrap *gomock.Call +type MockStatePoolControllerModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePoolControllerModelCall) Return(arg0 modelupgrader.Model, arg1 error) *MockStatePoolControllerModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePoolControllerModelCall) Do(f func() (modelupgrader.Model, error)) *MockStatePoolControllerModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePoolControllerModelCall) DoAndReturn(f func() (modelupgrader.Model, error)) *MockStatePoolControllerModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -70,9 +94,33 @@ func (m *MockStatePool) Get(arg0 string) (modelupgrader.State, error) { } // Get indicates an expected call of Get. -func (mr *MockStatePoolMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockStatePoolMockRecorder) Get(arg0 any) *MockStatePoolGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStatePool)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStatePool)(nil).Get), arg0) + return &MockStatePoolGetCall{Call: call} +} + +// MockStatePoolGetCall wrap *gomock.Call +type MockStatePoolGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePoolGetCall) Return(arg0 modelupgrader.State, arg1 error) *MockStatePoolGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePoolGetCall) Do(f func(string) (modelupgrader.State, error)) *MockStatePoolGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePoolGetCall) DoAndReturn(f func(string) (modelupgrader.State, error)) *MockStatePoolGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoVersion mocks base method. @@ -85,9 +133,33 @@ func (m *MockStatePool) MongoVersion() (string, error) { } // MongoVersion indicates an expected call of MongoVersion. -func (mr *MockStatePoolMockRecorder) MongoVersion() *gomock.Call { +func (mr *MockStatePoolMockRecorder) MongoVersion() *MockStatePoolMongoVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockStatePool)(nil).MongoVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockStatePool)(nil).MongoVersion)) + return &MockStatePoolMongoVersionCall{Call: call} +} + +// MockStatePoolMongoVersionCall wrap *gomock.Call +type MockStatePoolMongoVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePoolMongoVersionCall) Return(arg0 string, arg1 error) *MockStatePoolMongoVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePoolMongoVersionCall) Do(f func() (string, error)) *MockStatePoolMongoVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePoolMongoVersionCall) DoAndReturn(f func() (string, error)) *MockStatePoolMongoVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockState is a mock of State interface. @@ -123,9 +195,33 @@ func (m *MockState) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockStateMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockStateMockRecorder) AllModelUUIDs() *MockStateAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockState)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockState)(nil).AllModelUUIDs)) + return &MockStateAllModelUUIDsCall{Call: call} +} + +// MockStateAllModelUUIDsCall wrap *gomock.Call +type MockStateAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockStateAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllModelUUIDsCall) Do(f func() ([]string, error)) *MockStateAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockStateAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasUpgradeSeriesLocks mocks base method. @@ -138,9 +234,33 @@ func (m *MockState) HasUpgradeSeriesLocks() (bool, error) { } // HasUpgradeSeriesLocks indicates an expected call of HasUpgradeSeriesLocks. -func (mr *MockStateMockRecorder) HasUpgradeSeriesLocks() *gomock.Call { +func (mr *MockStateMockRecorder) HasUpgradeSeriesLocks() *MockStateHasUpgradeSeriesLocksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockState)(nil).HasUpgradeSeriesLocks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockState)(nil).HasUpgradeSeriesLocks)) + return &MockStateHasUpgradeSeriesLocksCall{Call: call} +} + +// MockStateHasUpgradeSeriesLocksCall wrap *gomock.Call +type MockStateHasUpgradeSeriesLocksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateHasUpgradeSeriesLocksCall) Return(arg0 bool, arg1 error) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateHasUpgradeSeriesLocksCall) Do(f func() (bool, error)) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateHasUpgradeSeriesLocksCall) DoAndReturn(f func() (bool, error)) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineCountForBase mocks base method. @@ -157,9 +277,33 @@ func (m *MockState) MachineCountForBase(arg0 ...state.Base) (map[string]int, err } // MachineCountForBase indicates an expected call of MachineCountForBase. -func (mr *MockStateMockRecorder) MachineCountForBase(arg0 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) MachineCountForBase(arg0 ...any) *MockStateMachineCountForBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockState)(nil).MachineCountForBase), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockState)(nil).MachineCountForBase), arg0...) + return &MockStateMachineCountForBaseCall{Call: call} +} + +// MockStateMachineCountForBaseCall wrap *gomock.Call +type MockStateMachineCountForBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMachineCountForBaseCall) Return(arg0 map[string]int, arg1 error) *MockStateMachineCountForBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMachineCountForBaseCall) Do(f func(...state.Base) (map[string]int, error)) *MockStateMachineCountForBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMachineCountForBaseCall) DoAndReturn(f func(...state.Base) (map[string]int, error)) *MockStateMachineCountForBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -172,9 +316,33 @@ func (m *MockState) Model() (modelupgrader.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateMockRecorder) Model() *gomock.Call { +func (mr *MockStateMockRecorder) Model() *MockStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + return &MockStateModelCall{Call: call} +} + +// MockStateModelCall wrap *gomock.Call +type MockStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelCall) Return(arg0 modelupgrader.Model, arg1 error) *MockStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelCall) Do(f func() (modelupgrader.Model, error)) *MockStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelCall) DoAndReturn(f func() (modelupgrader.Model, error)) *MockStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoCurrentStatus mocks base method. @@ -187,9 +355,33 @@ func (m *MockState) MongoCurrentStatus() (*replicaset.Status, error) { } // MongoCurrentStatus indicates an expected call of MongoCurrentStatus. -func (mr *MockStateMockRecorder) MongoCurrentStatus() *gomock.Call { +func (mr *MockStateMockRecorder) MongoCurrentStatus() *MockStateMongoCurrentStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockState)(nil).MongoCurrentStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockState)(nil).MongoCurrentStatus)) + return &MockStateMongoCurrentStatusCall{Call: call} +} + +// MockStateMongoCurrentStatusCall wrap *gomock.Call +type MockStateMongoCurrentStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMongoCurrentStatusCall) Return(arg0 *replicaset.Status, arg1 error) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMongoCurrentStatusCall) Do(f func() (*replicaset.Status, error)) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMongoCurrentStatusCall) DoAndReturn(f func() (*replicaset.Status, error)) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Release mocks base method. @@ -201,9 +393,33 @@ func (m *MockState) Release() bool { } // Release indicates an expected call of Release. -func (mr *MockStateMockRecorder) Release() *gomock.Call { +func (mr *MockStateMockRecorder) Release() *MockStateReleaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockState)(nil).Release)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockState)(nil).Release)) + return &MockStateReleaseCall{Call: call} +} + +// MockStateReleaseCall wrap *gomock.Call +type MockStateReleaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReleaseCall) Return(arg0 bool) *MockStateReleaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReleaseCall) Do(f func() bool) *MockStateReleaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReleaseCall) DoAndReturn(f func() bool) *MockStateReleaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModelAgentVersion mocks base method. @@ -215,9 +431,33 @@ func (m *MockState) SetModelAgentVersion(arg0 version.Number, arg1 *string, arg2 } // SetModelAgentVersion indicates an expected call of SetModelAgentVersion. -func (mr *MockStateMockRecorder) SetModelAgentVersion(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetModelAgentVersion(arg0, arg1, arg2, arg3 any) *MockStateSetModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelAgentVersion", reflect.TypeOf((*MockState)(nil).SetModelAgentVersion), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelAgentVersion", reflect.TypeOf((*MockState)(nil).SetModelAgentVersion), arg0, arg1, arg2, arg3) + return &MockStateSetModelAgentVersionCall{Call: call} +} + +// MockStateSetModelAgentVersionCall wrap *gomock.Call +type MockStateSetModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetModelAgentVersionCall) Return(arg0 error) *MockStateSetModelAgentVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetModelAgentVersionCall) Do(f func(version.Number, *string, bool, state.Upgrader) error) *MockStateSetModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetModelAgentVersionCall) DoAndReturn(f func(version.Number, *string, bool, state.Upgrader) error) *MockStateSetModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -253,9 +493,33 @@ func (m *MockModel) AgentVersion() (version.Number, error) { } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockModelMockRecorder) AgentVersion() *gomock.Call { +func (mr *MockModelMockRecorder) AgentVersion() *MockModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + return &MockModelAgentVersionCall{Call: call} +} + +// MockModelAgentVersionCall wrap *gomock.Call +type MockModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAgentVersionCall) Do(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAgentVersionCall) DoAndReturn(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsControllerModel mocks base method. @@ -267,9 +531,33 @@ func (m *MockModel) IsControllerModel() bool { } // IsControllerModel indicates an expected call of IsControllerModel. -func (mr *MockModelMockRecorder) IsControllerModel() *gomock.Call { +func (mr *MockModelMockRecorder) IsControllerModel() *MockModelIsControllerModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsControllerModel", reflect.TypeOf((*MockModel)(nil).IsControllerModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsControllerModel", reflect.TypeOf((*MockModel)(nil).IsControllerModel)) + return &MockModelIsControllerModelCall{Call: call} +} + +// MockModelIsControllerModelCall wrap *gomock.Call +type MockModelIsControllerModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelIsControllerModelCall) Return(arg0 bool) *MockModelIsControllerModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelIsControllerModelCall) Do(f func() bool) *MockModelIsControllerModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelIsControllerModelCall) DoAndReturn(f func() bool) *MockModelIsControllerModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -281,9 +569,33 @@ func (m *MockModel) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockModelMockRecorder) Life() *gomock.Call { +func (mr *MockModelMockRecorder) Life() *MockModelLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockModel)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockModel)(nil).Life)) + return &MockModelLifeCall{Call: call} +} + +// MockModelLifeCall wrap *gomock.Call +type MockModelLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelLifeCall) Return(arg0 state.Life) *MockModelLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelLifeCall) Do(f func() state.Life) *MockModelLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelLifeCall) DoAndReturn(f func() state.Life) *MockModelLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrationMode mocks base method. @@ -295,9 +607,33 @@ func (m *MockModel) MigrationMode() state.MigrationMode { } // MigrationMode indicates an expected call of MigrationMode. -func (mr *MockModelMockRecorder) MigrationMode() *gomock.Call { +func (mr *MockModelMockRecorder) MigrationMode() *MockModelMigrationModeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrationMode", reflect.TypeOf((*MockModel)(nil).MigrationMode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrationMode", reflect.TypeOf((*MockModel)(nil).MigrationMode)) + return &MockModelMigrationModeCall{Call: call} +} + +// MockModelMigrationModeCall wrap *gomock.Call +type MockModelMigrationModeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationModeCall) Return(arg0 state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationModeCall) Do(f func() state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationModeCall) DoAndReturn(f func() state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -309,9 +645,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -323,9 +683,33 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -337,9 +721,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeService is a mock of UpgradeService interface. @@ -375,9 +783,33 @@ func (m *MockUpgradeService) IsUpgrading(arg0 context.Context) (bool, error) { } // IsUpgrading indicates an expected call of IsUpgrading. -func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *MockUpgradeServiceIsUpgradingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + return &MockUpgradeServiceIsUpgradingCall{Call: call} +} + +// MockUpgradeServiceIsUpgradingCall wrap *gomock.Call +type MockUpgradeServiceIsUpgradingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceIsUpgradingCall) Return(arg0 bool, arg1 error) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceIsUpgradingCall) Do(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceIsUpgradingCall) DoAndReturn(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -413,7 +845,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/modelupgrader/package_test.go b/apiserver/facades/client/modelupgrader/package_test.go index 7ae505ac8be..889791d1ee7 100644 --- a/apiserver/facades/client/modelupgrader/package_test.go +++ b/apiserver/facades/client/modelupgrader/package_test.go @@ -14,10 +14,10 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/modelupgrader StatePool,State,Model,UpgradeService,ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/agents_mock.go github.com/juju/juju/apiserver/common ToolsFinder -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs BootstrapEnviron -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/apiserver/facades/client/modelupgrader StatePool,State,Model,UpgradeService,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/agents_mock.go github.com/juju/juju/apiserver/common ToolsFinder +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs BootstrapEnviron +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/common_mock.go github.com/juju/juju/apiserver/common BlockCheckerInterface func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/client/resources/mocks/backend.go b/apiserver/facades/client/resources/mocks/backend.go index f332604ce18..28c35d6f003 100644 --- a/apiserver/facades/client/resources/mocks/backend.go +++ b/apiserver/facades/client/resources/mocks/backend.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/client/resources Backend,NewCharmRepository +// mockgen -typed -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/client/resources Backend,NewCharmRepository // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockBackend) AddPendingResource(arg0, arg1 string, arg2 resource.Resour } // AddPendingResource indicates an expected call of AddPendingResource. -func (mr *MockBackendMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *MockBackendAddPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockBackend)(nil).AddPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockBackend)(nil).AddPendingResource), arg0, arg1, arg2) + return &MockBackendAddPendingResourceCall{Call: call} +} + +// MockBackendAddPendingResourceCall wrap *gomock.Call +type MockBackendAddPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAddPendingResourceCall) Return(arg0 string, arg1 error) *MockBackendAddPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAddPendingResourceCall) Do(f func(string, string, resource.Resource) (string, error)) *MockBackendAddPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAddPendingResourceCall) DoAndReturn(f func(string, string, resource.Resource) (string, error)) *MockBackendAddPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -67,9 +91,33 @@ func (m *MockBackend) ListResources(arg0 string) (resources.ApplicationResources } // ListResources indicates an expected call of ListResources. -func (mr *MockBackendMockRecorder) ListResources(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ListResources(arg0 any) *MockBackendListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockBackend)(nil).ListResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockBackend)(nil).ListResources), arg0) + return &MockBackendListResourcesCall{Call: call} +} + +// MockBackendListResourcesCall wrap *gomock.Call +type MockBackendListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendListResourcesCall) Return(arg0 resources.ApplicationResources, arg1 error) *MockBackendListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendListResourcesCall) Do(f func(string) (resources.ApplicationResources, error)) *MockBackendListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendListResourcesCall) DoAndReturn(f func(string) (resources.ApplicationResources, error)) *MockBackendListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNewCharmRepository is a mock of NewCharmRepository interface. @@ -105,7 +153,31 @@ func (m *MockNewCharmRepository) ResolveResources(arg0 context.Context, arg1 []r } // ResolveResources indicates an expected call of ResolveResources. -func (mr *MockNewCharmRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNewCharmRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *MockNewCharmRepositoryResolveResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockNewCharmRepository)(nil).ResolveResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockNewCharmRepository)(nil).ResolveResources), arg0, arg1, arg2) + return &MockNewCharmRepositoryResolveResourcesCall{Call: call} +} + +// MockNewCharmRepositoryResolveResourcesCall wrap *gomock.Call +type MockNewCharmRepositoryResolveResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNewCharmRepositoryResolveResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockNewCharmRepositoryResolveResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNewCharmRepositoryResolveResourcesCall) Do(f func(context.Context, []resource.Resource, charm.CharmID) ([]resource.Resource, error)) *MockNewCharmRepositoryResolveResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNewCharmRepositoryResolveResourcesCall) DoAndReturn(f func(context.Context, []resource.Resource, charm.CharmID) ([]resource.Resource, error)) *MockNewCharmRepositoryResolveResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/resources/package_test.go b/apiserver/facades/client/resources/package_test.go index b8724b704d2..f56997e9232 100644 --- a/apiserver/facades/client/resources/package_test.go +++ b/apiserver/facades/client/resources/package_test.go @@ -13,4 +13,4 @@ func Test(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/client/resources Backend,NewCharmRepository +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/client/resources Backend,NewCharmRepository diff --git a/apiserver/facades/client/secretbackends/mock_service.go b/apiserver/facades/client/secretbackends/mock_service.go index 42a1cc4df76..dc91afde9c4 100644 --- a/apiserver/facades/client/secretbackends/mock_service.go +++ b/apiserver/facades/client/secretbackends/mock_service.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package secretbackends -destination mock_service.go github.com/juju/juju/apiserver/facades/client/secretbackends SecretBackendService +// mockgen -typed -package secretbackends -destination mock_service.go github.com/juju/juju/apiserver/facades/client/secretbackends SecretBackendService // // Package secretbackends is a generated GoMock package. @@ -55,10 +55,34 @@ func (m *MockSecretBackendService) BackendSummaryInfo(arg0 context.Context, arg1 } // BackendSummaryInfo indicates an expected call of BackendSummaryInfo. -func (mr *MockSecretBackendServiceMockRecorder) BackendSummaryInfo(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) BackendSummaryInfo(arg0, arg1 any, arg2 ...any) *MockSecretBackendServiceBackendSummaryInfoCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendSummaryInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendSummaryInfo), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendSummaryInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendSummaryInfo), varargs...) + return &MockSecretBackendServiceBackendSummaryInfoCall{Call: call} +} + +// MockSecretBackendServiceBackendSummaryInfoCall wrap *gomock.Call +type MockSecretBackendServiceBackendSummaryInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceBackendSummaryInfoCall) Return(arg0 []*service.SecretBackendInfo, arg1 error) *MockSecretBackendServiceBackendSummaryInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceBackendSummaryInfoCall) Do(f func(context.Context, bool, ...string) ([]*service.SecretBackendInfo, error)) *MockSecretBackendServiceBackendSummaryInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceBackendSummaryInfoCall) DoAndReturn(f func(context.Context, bool, ...string) ([]*service.SecretBackendInfo, error)) *MockSecretBackendServiceBackendSummaryInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecretBackend mocks base method. @@ -70,9 +94,33 @@ func (m *MockSecretBackendService) CreateSecretBackend(arg0 context.Context, arg } // CreateSecretBackend indicates an expected call of CreateSecretBackend. -func (mr *MockSecretBackendServiceMockRecorder) CreateSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) CreateSecretBackend(arg0, arg1 any) *MockSecretBackendServiceCreateSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).CreateSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).CreateSecretBackend), arg0, arg1) + return &MockSecretBackendServiceCreateSecretBackendCall{Call: call} +} + +// MockSecretBackendServiceCreateSecretBackendCall wrap *gomock.Call +type MockSecretBackendServiceCreateSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceCreateSecretBackendCall) Return(arg0 error) *MockSecretBackendServiceCreateSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceCreateSecretBackendCall) Do(f func(context.Context, secrets.SecretBackend) error) *MockSecretBackendServiceCreateSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceCreateSecretBackendCall) DoAndReturn(f func(context.Context, secrets.SecretBackend) error) *MockSecretBackendServiceCreateSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecretBackend mocks base method. @@ -84,9 +132,33 @@ func (m *MockSecretBackendService) DeleteSecretBackend(arg0 context.Context, arg } // DeleteSecretBackend indicates an expected call of DeleteSecretBackend. -func (mr *MockSecretBackendServiceMockRecorder) DeleteSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) DeleteSecretBackend(arg0, arg1 any) *MockSecretBackendServiceDeleteSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).DeleteSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).DeleteSecretBackend), arg0, arg1) + return &MockSecretBackendServiceDeleteSecretBackendCall{Call: call} +} + +// MockSecretBackendServiceDeleteSecretBackendCall wrap *gomock.Call +type MockSecretBackendServiceDeleteSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceDeleteSecretBackendCall) Return(arg0 error) *MockSecretBackendServiceDeleteSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceDeleteSecretBackendCall) Do(f func(context.Context, service.DeleteSecretBackendParams) error) *MockSecretBackendServiceDeleteSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceDeleteSecretBackendCall) DoAndReturn(f func(context.Context, service.DeleteSecretBackendParams) error) *MockSecretBackendServiceDeleteSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretBackendByName mocks base method. @@ -99,9 +171,33 @@ func (m *MockSecretBackendService) GetSecretBackendByName(arg0 context.Context, } // GetSecretBackendByName indicates an expected call of GetSecretBackendByName. -func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendByName(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendByName(arg0, arg1 any) *MockSecretBackendServiceGetSecretBackendByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendByName", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendByName", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendByName), arg0, arg1) + return &MockSecretBackendServiceGetSecretBackendByNameCall{Call: call} +} + +// MockSecretBackendServiceGetSecretBackendByNameCall wrap *gomock.Call +type MockSecretBackendServiceGetSecretBackendByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceGetSecretBackendByNameCall) Return(arg0 *secrets.SecretBackend, arg1 error) *MockSecretBackendServiceGetSecretBackendByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceGetSecretBackendByNameCall) Do(f func(context.Context, string) (*secrets.SecretBackend, error)) *MockSecretBackendServiceGetSecretBackendByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceGetSecretBackendByNameCall) DoAndReturn(f func(context.Context, string) (*secrets.SecretBackend, error)) *MockSecretBackendServiceGetSecretBackendByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecretBackend mocks base method. @@ -113,7 +209,31 @@ func (m *MockSecretBackendService) UpdateSecretBackend(arg0 context.Context, arg } // UpdateSecretBackend indicates an expected call of UpdateSecretBackend. -func (mr *MockSecretBackendServiceMockRecorder) UpdateSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) UpdateSecretBackend(arg0, arg1 any) *MockSecretBackendServiceUpdateSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).UpdateSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockSecretBackendService)(nil).UpdateSecretBackend), arg0, arg1) + return &MockSecretBackendServiceUpdateSecretBackendCall{Call: call} +} + +// MockSecretBackendServiceUpdateSecretBackendCall wrap *gomock.Call +type MockSecretBackendServiceUpdateSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceUpdateSecretBackendCall) Return(arg0 error) *MockSecretBackendServiceUpdateSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceUpdateSecretBackendCall) Do(f func(context.Context, service.UpdateSecretBackendParams) error) *MockSecretBackendServiceUpdateSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceUpdateSecretBackendCall) DoAndReturn(f func(context.Context, service.UpdateSecretBackendParams) error) *MockSecretBackendServiceUpdateSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/secretbackends/package_test.go b/apiserver/facades/client/secretbackends/package_test.go index d253db8a1b3..8b3aa6fa8f4 100644 --- a/apiserver/facades/client/secretbackends/package_test.go +++ b/apiserver/facades/client/secretbackends/package_test.go @@ -13,7 +13,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package secretbackends -destination mock_service.go github.com/juju/juju/apiserver/facades/client/secretbackends SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package secretbackends -destination mock_service.go github.com/juju/juju/apiserver/facades/client/secretbackends SecretBackendService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/secrets/mocks/secretservice.go b/apiserver/facades/client/secrets/mocks/secretservice.go index 6342ecbb1dd..4d7cff1f921 100644 --- a/apiserver/facades/client/secrets/mocks/secretservice.go +++ b/apiserver/facades/client/secrets/mocks/secretservice.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/client/secrets SecretService,SecretBackendService +// mockgen -typed -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/client/secrets SecretService,SecretBackendService // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockSecretService) CreateUserSecret(arg0 context.Context, arg1 *secrets } // CreateUserSecret indicates an expected call of CreateUserSecret. -func (mr *MockSecretServiceMockRecorder) CreateUserSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) CreateUserSecret(arg0, arg1, arg2 any) *MockSecretServiceCreateUserSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUserSecret", reflect.TypeOf((*MockSecretService)(nil).CreateUserSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUserSecret", reflect.TypeOf((*MockSecretService)(nil).CreateUserSecret), arg0, arg1, arg2) + return &MockSecretServiceCreateUserSecretCall{Call: call} +} + +// MockSecretServiceCreateUserSecretCall wrap *gomock.Call +type MockSecretServiceCreateUserSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceCreateUserSecretCall) Return(arg0 error) *MockSecretServiceCreateUserSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceCreateUserSecretCall) Do(f func(context.Context, *secrets.URI, service.CreateUserSecretParams) error) *MockSecretServiceCreateUserSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceCreateUserSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.CreateUserSecretParams) error) *MockSecretServiceCreateUserSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecret mocks base method. @@ -67,9 +91,33 @@ func (m *MockSecretService) DeleteSecret(arg0 context.Context, arg1 *secrets.URI } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *MockSecretServiceDeleteSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretService)(nil).DeleteSecret), arg0, arg1, arg2) + return &MockSecretServiceDeleteSecretCall{Call: call} +} + +// MockSecretServiceDeleteSecretCall wrap *gomock.Call +type MockSecretServiceDeleteSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceDeleteSecretCall) Return(arg0 error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceDeleteSecretCall) Do(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceDeleteSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.DeleteSecretParams) error) *MockSecretServiceDeleteSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretContentFromBackend mocks base method. @@ -82,9 +130,33 @@ func (m *MockSecretService) GetSecretContentFromBackend(arg0 context.Context, ar } // GetSecretContentFromBackend indicates an expected call of GetSecretContentFromBackend. -func (mr *MockSecretServiceMockRecorder) GetSecretContentFromBackend(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretContentFromBackend(arg0, arg1, arg2 any) *MockSecretServiceGetSecretContentFromBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretContentFromBackend", reflect.TypeOf((*MockSecretService)(nil).GetSecretContentFromBackend), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretContentFromBackend", reflect.TypeOf((*MockSecretService)(nil).GetSecretContentFromBackend), arg0, arg1, arg2) + return &MockSecretServiceGetSecretContentFromBackendCall{Call: call} +} + +// MockSecretServiceGetSecretContentFromBackendCall wrap *gomock.Call +type MockSecretServiceGetSecretContentFromBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretContentFromBackendCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretServiceGetSecretContentFromBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretContentFromBackendCall) Do(f func(context.Context, *secrets.URI, int) (secrets.SecretValue, error)) *MockSecretServiceGetSecretContentFromBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretContentFromBackendCall) DoAndReturn(f func(context.Context, *secrets.URI, int) (secrets.SecretValue, error)) *MockSecretServiceGetSecretContentFromBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretGrants mocks base method. @@ -97,9 +169,33 @@ func (m *MockSecretService) GetSecretGrants(arg0 context.Context, arg1 *secrets. } // GetSecretGrants indicates an expected call of GetSecretGrants. -func (mr *MockSecretServiceMockRecorder) GetSecretGrants(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretGrants(arg0, arg1, arg2 any) *MockSecretServiceGetSecretGrantsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockSecretService)(nil).GetSecretGrants), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockSecretService)(nil).GetSecretGrants), arg0, arg1, arg2) + return &MockSecretServiceGetSecretGrantsCall{Call: call} +} + +// MockSecretServiceGetSecretGrantsCall wrap *gomock.Call +type MockSecretServiceGetSecretGrantsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretGrantsCall) Return(arg0 []service.SecretAccess, arg1 error) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretGrantsCall) Do(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]service.SecretAccess, error)) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretGrantsCall) DoAndReturn(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]service.SecretAccess, error)) *MockSecretServiceGetSecretGrantsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserSecretURIByLabel mocks base method. @@ -112,9 +208,33 @@ func (m *MockSecretService) GetUserSecretURIByLabel(arg0 context.Context, arg1 s } // GetUserSecretURIByLabel indicates an expected call of GetUserSecretURIByLabel. -func (mr *MockSecretServiceMockRecorder) GetUserSecretURIByLabel(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetUserSecretURIByLabel(arg0, arg1 any) *MockSecretServiceGetUserSecretURIByLabelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserSecretURIByLabel", reflect.TypeOf((*MockSecretService)(nil).GetUserSecretURIByLabel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserSecretURIByLabel", reflect.TypeOf((*MockSecretService)(nil).GetUserSecretURIByLabel), arg0, arg1) + return &MockSecretServiceGetUserSecretURIByLabelCall{Call: call} +} + +// MockSecretServiceGetUserSecretURIByLabelCall wrap *gomock.Call +type MockSecretServiceGetUserSecretURIByLabelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetUserSecretURIByLabelCall) Return(arg0 *secrets.URI, arg1 error) *MockSecretServiceGetUserSecretURIByLabelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetUserSecretURIByLabelCall) Do(f func(context.Context, string) (*secrets.URI, error)) *MockSecretServiceGetUserSecretURIByLabelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetUserSecretURIByLabelCall) DoAndReturn(f func(context.Context, string) (*secrets.URI, error)) *MockSecretServiceGetUserSecretURIByLabelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecretAccess mocks base method. @@ -126,9 +246,33 @@ func (m *MockSecretService) GrantSecretAccess(arg0 context.Context, arg1 *secret } // GrantSecretAccess indicates an expected call of GrantSecretAccess. -func (mr *MockSecretServiceMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GrantSecretAccess(arg0, arg1, arg2 any) *MockSecretServiceGrantSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretService)(nil).GrantSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecretAccess", reflect.TypeOf((*MockSecretService)(nil).GrantSecretAccess), arg0, arg1, arg2) + return &MockSecretServiceGrantSecretAccessCall{Call: call} +} + +// MockSecretServiceGrantSecretAccessCall wrap *gomock.Call +type MockSecretServiceGrantSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGrantSecretAccessCall) Return(arg0 error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGrantSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGrantSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceGrantSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmSecrets mocks base method. @@ -146,10 +290,34 @@ func (m *MockSecretService) ListCharmSecrets(arg0 context.Context, arg1 ...servi } // ListCharmSecrets indicates an expected call of ListCharmSecrets. -func (mr *MockSecretServiceMockRecorder) ListCharmSecrets(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListCharmSecrets(arg0 any, arg1 ...any) *MockSecretServiceListCharmSecretsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecrets), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockSecretService)(nil).ListCharmSecrets), varargs...) + return &MockSecretServiceListCharmSecretsCall{Call: call} +} + +// MockSecretServiceListCharmSecretsCall wrap *gomock.Call +type MockSecretServiceListCharmSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListCharmSecretsCall) Return(arg0 []*secrets.SecretMetadata, arg1 [][]*secrets.SecretRevisionMetadata, arg2 error) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListCharmSecretsCall) Do(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListCharmSecretsCall) DoAndReturn(f func(context.Context, ...service.CharmSecretOwner) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListCharmSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecrets mocks base method. @@ -163,9 +331,33 @@ func (m *MockSecretService) ListSecrets(arg0 context.Context, arg1 *secrets.URI, } // ListSecrets indicates an expected call of ListSecrets. -func (mr *MockSecretServiceMockRecorder) ListSecrets(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListSecrets(arg0, arg1, arg2, arg3 any) *MockSecretServiceListSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockSecretService)(nil).ListSecrets), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockSecretService)(nil).ListSecrets), arg0, arg1, arg2, arg3) + return &MockSecretServiceListSecretsCall{Call: call} +} + +// MockSecretServiceListSecretsCall wrap *gomock.Call +type MockSecretServiceListSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListSecretsCall) Return(arg0 []*secrets.SecretMetadata, arg1 [][]*secrets.SecretRevisionMetadata, arg2 error) *MockSecretServiceListSecretsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListSecretsCall) Do(f func(context.Context, *secrets.URI, *int, secret.Labels) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListSecretsCall) DoAndReturn(f func(context.Context, *secrets.URI, *int, secret.Labels) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockSecretServiceListSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecretAccess mocks base method. @@ -177,9 +369,33 @@ func (m *MockSecretService) RevokeSecretAccess(arg0 context.Context, arg1 *secre } // RevokeSecretAccess indicates an expected call of RevokeSecretAccess. -func (mr *MockSecretServiceMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) RevokeSecretAccess(arg0, arg1, arg2 any) *MockSecretServiceRevokeSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretService)(nil).RevokeSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecretAccess", reflect.TypeOf((*MockSecretService)(nil).RevokeSecretAccess), arg0, arg1, arg2) + return &MockSecretServiceRevokeSecretAccessCall{Call: call} +} + +// MockSecretServiceRevokeSecretAccessCall wrap *gomock.Call +type MockSecretServiceRevokeSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceRevokeSecretAccessCall) Return(arg0 error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceRevokeSecretAccessCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceRevokeSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessParams) error) *MockSecretServiceRevokeSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUserSecret mocks base method. @@ -191,9 +407,33 @@ func (m *MockSecretService) UpdateUserSecret(arg0 context.Context, arg1 *secrets } // UpdateUserSecret indicates an expected call of UpdateUserSecret. -func (mr *MockSecretServiceMockRecorder) UpdateUserSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) UpdateUserSecret(arg0, arg1, arg2 any) *MockSecretServiceUpdateUserSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateUserSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserSecret", reflect.TypeOf((*MockSecretService)(nil).UpdateUserSecret), arg0, arg1, arg2) + return &MockSecretServiceUpdateUserSecretCall{Call: call} +} + +// MockSecretServiceUpdateUserSecretCall wrap *gomock.Call +type MockSecretServiceUpdateUserSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceUpdateUserSecretCall) Return(arg0 error) *MockSecretServiceUpdateUserSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceUpdateUserSecretCall) Do(f func(context.Context, *secrets.URI, service.UpdateUserSecretParams) error) *MockSecretServiceUpdateUserSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceUpdateUserSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, service.UpdateUserSecretParams) error) *MockSecretServiceUpdateUserSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -229,7 +469,31 @@ func (m *MockSecretBackendService) GetSecretBackendConfigForAdmin(arg0 context.C } // GetSecretBackendConfigForAdmin indicates an expected call of GetSecretBackendConfigForAdmin. -func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendConfigForAdmin(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendConfigForAdmin(arg0, arg1 any) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfigForAdmin", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendConfigForAdmin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfigForAdmin", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendConfigForAdmin), arg0, arg1) + return &MockSecretBackendServiceGetSecretBackendConfigForAdminCall{Call: call} +} + +// MockSecretBackendServiceGetSecretBackendConfigForAdminCall wrap *gomock.Call +type MockSecretBackendServiceGetSecretBackendConfigForAdminCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) Do(f func(context.Context, model.UUID) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) DoAndReturn(f func(context.Context, model.UUID) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/secrets/package_test.go b/apiserver/facades/client/secrets/package_test.go index ef0a68ce586..dd9923f38b4 100644 --- a/apiserver/facades/client/secrets/package_test.go +++ b/apiserver/facades/client/secrets/package_test.go @@ -14,7 +14,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/client/secrets SecretService,SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/client/secrets SecretService,SecretBackendService func TestPackage(t *testing.T) { gc.TestingT(t) } diff --git a/apiserver/facades/client/spaces/package_mock_test.go b/apiserver/facades/client/spaces/package_mock_test.go index 05a5645dd5e..3303d9561d8 100644 --- a/apiserver/facades/client/spaces/package_mock_test.go +++ b/apiserver/facades/client/spaces/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package spaces -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/spaces Backing,BlockChecker,Machine,Constraints,Address,Unit,Bindings,NetworkService,ControllerConfigService +// mockgen -typed -package spaces -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/spaces Backing,BlockChecker,Machine,Constraints,Address,Unit,Bindings,NetworkService,ControllerConfigService // // Package spaces is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockBacking) AllConstraints() ([]Constraints, error) { } // AllConstraints indicates an expected call of AllConstraints. -func (mr *MockBackingMockRecorder) AllConstraints() *gomock.Call { +func (mr *MockBackingMockRecorder) AllConstraints() *MockBackingAllConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllConstraints", reflect.TypeOf((*MockBacking)(nil).AllConstraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllConstraints", reflect.TypeOf((*MockBacking)(nil).AllConstraints)) + return &MockBackingAllConstraintsCall{Call: call} +} + +// MockBackingAllConstraintsCall wrap *gomock.Call +type MockBackingAllConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingAllConstraintsCall) Return(arg0 []Constraints, arg1 error) *MockBackingAllConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingAllConstraintsCall) Do(f func() ([]Constraints, error)) *MockBackingAllConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingAllConstraintsCall) DoAndReturn(f func() ([]Constraints, error)) *MockBackingAllConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllEndpointBindings mocks base method. @@ -73,9 +97,33 @@ func (m *MockBacking) AllEndpointBindings() (map[string]Bindings, error) { } // AllEndpointBindings indicates an expected call of AllEndpointBindings. -func (mr *MockBackingMockRecorder) AllEndpointBindings() *gomock.Call { +func (mr *MockBackingMockRecorder) AllEndpointBindings() *MockBackingAllEndpointBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllEndpointBindings", reflect.TypeOf((*MockBacking)(nil).AllEndpointBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllEndpointBindings", reflect.TypeOf((*MockBacking)(nil).AllEndpointBindings)) + return &MockBackingAllEndpointBindingsCall{Call: call} +} + +// MockBackingAllEndpointBindingsCall wrap *gomock.Call +type MockBackingAllEndpointBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingAllEndpointBindingsCall) Return(arg0 map[string]Bindings, arg1 error) *MockBackingAllEndpointBindingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingAllEndpointBindingsCall) Do(f func() (map[string]Bindings, error)) *MockBackingAllEndpointBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingAllEndpointBindingsCall) DoAndReturn(f func() (map[string]Bindings, error)) *MockBackingAllEndpointBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMachines mocks base method. @@ -88,9 +136,33 @@ func (m *MockBacking) AllMachines() ([]Machine, error) { } // AllMachines indicates an expected call of AllMachines. -func (mr *MockBackingMockRecorder) AllMachines() *gomock.Call { +func (mr *MockBackingMockRecorder) AllMachines() *MockBackingAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBacking)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockBacking)(nil).AllMachines)) + return &MockBackingAllMachinesCall{Call: call} +} + +// MockBackingAllMachinesCall wrap *gomock.Call +type MockBackingAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingAllMachinesCall) Return(arg0 []Machine, arg1 error) *MockBackingAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingAllMachinesCall) Do(f func() ([]Machine, error)) *MockBackingAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingAllMachinesCall) DoAndReturn(f func() ([]Machine, error)) *MockBackingAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyOperation mocks base method. @@ -102,9 +174,33 @@ func (m *MockBacking) ApplyOperation(arg0 state.ModelOperation) error { } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockBackingMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) ApplyOperation(arg0 any) *MockBackingApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBacking)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockBacking)(nil).ApplyOperation), arg0) + return &MockBackingApplyOperationCall{Call: call} +} + +// MockBackingApplyOperationCall wrap *gomock.Call +type MockBackingApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingApplyOperationCall) Return(arg0 error) *MockBackingApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingApplyOperationCall) Do(f func(state.ModelOperation) error) *MockBackingApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockBackingApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -117,9 +213,33 @@ func (m *MockBacking) CloudSpec(arg0 context.Context) (cloudspec.CloudSpec, erro } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockBackingMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) CloudSpec(arg0 any) *MockBackingCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBacking)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBacking)(nil).CloudSpec), arg0) + return &MockBackingCloudSpecCall{Call: call} +} + +// MockBackingCloudSpecCall wrap *gomock.Call +type MockBackingCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingCloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockBackingCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingCloudSpecCall) Do(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackingCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingCloudSpecCall) DoAndReturn(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackingCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsBySpaceName mocks base method. @@ -132,9 +252,33 @@ func (m *MockBacking) ConstraintsBySpaceName(arg0 string) ([]Constraints, error) } // ConstraintsBySpaceName indicates an expected call of ConstraintsBySpaceName. -func (mr *MockBackingMockRecorder) ConstraintsBySpaceName(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) ConstraintsBySpaceName(arg0 any) *MockBackingConstraintsBySpaceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsBySpaceName", reflect.TypeOf((*MockBacking)(nil).ConstraintsBySpaceName), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsBySpaceName", reflect.TypeOf((*MockBacking)(nil).ConstraintsBySpaceName), arg0) + return &MockBackingConstraintsBySpaceNameCall{Call: call} +} + +// MockBackingConstraintsBySpaceNameCall wrap *gomock.Call +type MockBackingConstraintsBySpaceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingConstraintsBySpaceNameCall) Return(arg0 []Constraints, arg1 error) *MockBackingConstraintsBySpaceNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingConstraintsBySpaceNameCall) Do(f func(string) ([]Constraints, error)) *MockBackingConstraintsBySpaceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingConstraintsBySpaceNameCall) DoAndReturn(f func(string) ([]Constraints, error)) *MockBackingConstraintsBySpaceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsController mocks base method. @@ -146,9 +290,33 @@ func (m *MockBacking) IsController() bool { } // IsController indicates an expected call of IsController. -func (mr *MockBackingMockRecorder) IsController() *gomock.Call { +func (mr *MockBackingMockRecorder) IsController() *MockBackingIsControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsController", reflect.TypeOf((*MockBacking)(nil).IsController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsController", reflect.TypeOf((*MockBacking)(nil).IsController)) + return &MockBackingIsControllerCall{Call: call} +} + +// MockBackingIsControllerCall wrap *gomock.Call +type MockBackingIsControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingIsControllerCall) Return(arg0 bool) *MockBackingIsControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingIsControllerCall) Do(f func() bool) *MockBackingIsControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingIsControllerCall) DoAndReturn(f func() bool) *MockBackingIsControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -161,9 +329,33 @@ func (m *MockBacking) ModelConfig(arg0 context.Context) (*config.Config, error) } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockBackingMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) ModelConfig(arg0 any) *MockBackingModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBacking)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBacking)(nil).ModelConfig), arg0) + return &MockBackingModelConfigCall{Call: call} +} + +// MockBackingModelConfigCall wrap *gomock.Call +type MockBackingModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockBackingModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockBackingModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockBackingModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -175,9 +367,33 @@ func (m *MockBacking) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackingMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackingMockRecorder) ModelTag() *MockBackingModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBacking)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBacking)(nil).ModelTag)) + return &MockBackingModelTagCall{Call: call} +} + +// MockBackingModelTagCall wrap *gomock.Call +type MockBackingModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingModelTagCall) Return(arg0 names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingModelTagCall) Do(f func() names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBlockChecker is a mock of BlockChecker interface. @@ -212,9 +428,33 @@ func (m *MockBlockChecker) ChangeAllowed(arg0 context.Context) error { } // ChangeAllowed indicates an expected call of ChangeAllowed. -func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) ChangeAllowed(arg0 any) *MockBlockCheckerChangeAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAllowed", reflect.TypeOf((*MockBlockChecker)(nil).ChangeAllowed), arg0) + return &MockBlockCheckerChangeAllowedCall{Call: call} +} + +// MockBlockCheckerChangeAllowedCall wrap *gomock.Call +type MockBlockCheckerChangeAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerChangeAllowedCall) Return(arg0 error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerChangeAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerChangeAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerChangeAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllowed mocks base method. @@ -226,9 +466,33 @@ func (m *MockBlockChecker) RemoveAllowed(arg0 context.Context) error { } // RemoveAllowed indicates an expected call of RemoveAllowed. -func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *gomock.Call { +func (mr *MockBlockCheckerMockRecorder) RemoveAllowed(arg0 any) *MockBlockCheckerRemoveAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllowed", reflect.TypeOf((*MockBlockChecker)(nil).RemoveAllowed), arg0) + return &MockBlockCheckerRemoveAllowedCall{Call: call} +} + +// MockBlockCheckerRemoveAllowedCall wrap *gomock.Call +type MockBlockCheckerRemoveAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBlockCheckerRemoveAllowedCall) Return(arg0 error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBlockCheckerRemoveAllowedCall) Do(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBlockCheckerRemoveAllowedCall) DoAndReturn(f func(context.Context) error) *MockBlockCheckerRemoveAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -264,9 +528,33 @@ func (m *MockMachine) AllAddresses() ([]Address, error) { } // AllAddresses indicates an expected call of AllAddresses. -func (mr *MockMachineMockRecorder) AllAddresses() *gomock.Call { +func (mr *MockMachineMockRecorder) AllAddresses() *MockMachineAllAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAddresses", reflect.TypeOf((*MockMachine)(nil).AllAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAddresses", reflect.TypeOf((*MockMachine)(nil).AllAddresses)) + return &MockMachineAllAddressesCall{Call: call} +} + +// MockMachineAllAddressesCall wrap *gomock.Call +type MockMachineAllAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAllAddressesCall) Return(arg0 []Address, arg1 error) *MockMachineAllAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAllAddressesCall) Do(f func() ([]Address, error)) *MockMachineAllAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAllAddressesCall) DoAndReturn(f func() ([]Address, error)) *MockMachineAllAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllSpaces mocks base method. @@ -279,9 +567,33 @@ func (m *MockMachine) AllSpaces(arg0 network.SubnetInfos) (set.Strings, error) { } // AllSpaces indicates an expected call of AllSpaces. -func (mr *MockMachineMockRecorder) AllSpaces(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AllSpaces(arg0 any) *MockMachineAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockMachine)(nil).AllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockMachine)(nil).AllSpaces), arg0) + return &MockMachineAllSpacesCall{Call: call} +} + +// MockMachineAllSpacesCall wrap *gomock.Call +type MockMachineAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAllSpacesCall) Return(arg0 set.Strings, arg1 error) *MockMachineAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAllSpacesCall) Do(f func(network.SubnetInfos) (set.Strings, error)) *MockMachineAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAllSpacesCall) DoAndReturn(f func(network.SubnetInfos) (set.Strings, error)) *MockMachineAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -294,9 +606,33 @@ func (m *MockMachine) Units() ([]Unit, error) { } // Units indicates an expected call of Units. -func (mr *MockMachineMockRecorder) Units() *gomock.Call { +func (mr *MockMachineMockRecorder) Units() *MockMachineUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockMachine)(nil).Units)) + return &MockMachineUnitsCall{Call: call} +} + +// MockMachineUnitsCall wrap *gomock.Call +type MockMachineUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineUnitsCall) Return(arg0 []Unit, arg1 error) *MockMachineUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineUnitsCall) Do(f func() ([]Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineUnitsCall) DoAndReturn(f func() ([]Unit, error)) *MockMachineUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConstraints is a mock of Constraints interface. @@ -331,9 +667,33 @@ func (m *MockConstraints) ChangeSpaceNameOps(arg0, arg1 string) []txn.Op { } // ChangeSpaceNameOps indicates an expected call of ChangeSpaceNameOps. -func (mr *MockConstraintsMockRecorder) ChangeSpaceNameOps(arg0, arg1 any) *gomock.Call { +func (mr *MockConstraintsMockRecorder) ChangeSpaceNameOps(arg0, arg1 any) *MockConstraintsChangeSpaceNameOpsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSpaceNameOps", reflect.TypeOf((*MockConstraints)(nil).ChangeSpaceNameOps), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSpaceNameOps", reflect.TypeOf((*MockConstraints)(nil).ChangeSpaceNameOps), arg0, arg1) + return &MockConstraintsChangeSpaceNameOpsCall{Call: call} +} + +// MockConstraintsChangeSpaceNameOpsCall wrap *gomock.Call +type MockConstraintsChangeSpaceNameOpsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConstraintsChangeSpaceNameOpsCall) Return(arg0 []txn.Op) *MockConstraintsChangeSpaceNameOpsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConstraintsChangeSpaceNameOpsCall) Do(f func(string, string) []txn.Op) *MockConstraintsChangeSpaceNameOpsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConstraintsChangeSpaceNameOpsCall) DoAndReturn(f func(string, string) []txn.Op) *MockConstraintsChangeSpaceNameOpsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ID mocks base method. @@ -345,9 +705,33 @@ func (m *MockConstraints) ID() string { } // ID indicates an expected call of ID. -func (mr *MockConstraintsMockRecorder) ID() *gomock.Call { +func (mr *MockConstraintsMockRecorder) ID() *MockConstraintsIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockConstraints)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockConstraints)(nil).ID)) + return &MockConstraintsIDCall{Call: call} +} + +// MockConstraintsIDCall wrap *gomock.Call +type MockConstraintsIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConstraintsIDCall) Return(arg0 string) *MockConstraintsIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConstraintsIDCall) Do(f func() string) *MockConstraintsIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConstraintsIDCall) DoAndReturn(f func() string) *MockConstraintsIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -359,9 +743,33 @@ func (m *MockConstraints) Value() constraints.Value { } // Value indicates an expected call of Value. -func (mr *MockConstraintsMockRecorder) Value() *gomock.Call { +func (mr *MockConstraintsMockRecorder) Value() *MockConstraintsValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConstraints)(nil).Value)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConstraints)(nil).Value)) + return &MockConstraintsValueCall{Call: call} +} + +// MockConstraintsValueCall wrap *gomock.Call +type MockConstraintsValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConstraintsValueCall) Return(arg0 constraints.Value) *MockConstraintsValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConstraintsValueCall) Do(f func() constraints.Value) *MockConstraintsValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConstraintsValueCall) DoAndReturn(f func() constraints.Value) *MockConstraintsValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAddress is a mock of Address interface. @@ -396,9 +804,33 @@ func (m *MockAddress) ConfigMethod() network.AddressConfigType { } // ConfigMethod indicates an expected call of ConfigMethod. -func (mr *MockAddressMockRecorder) ConfigMethod() *gomock.Call { +func (mr *MockAddressMockRecorder) ConfigMethod() *MockAddressConfigMethodCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigMethod", reflect.TypeOf((*MockAddress)(nil).ConfigMethod)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigMethod", reflect.TypeOf((*MockAddress)(nil).ConfigMethod)) + return &MockAddressConfigMethodCall{Call: call} +} + +// MockAddressConfigMethodCall wrap *gomock.Call +type MockAddressConfigMethodCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddressConfigMethodCall) Return(arg0 network.AddressConfigType) *MockAddressConfigMethodCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddressConfigMethodCall) Do(f func() network.AddressConfigType) *MockAddressConfigMethodCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddressConfigMethodCall) DoAndReturn(f func() network.AddressConfigType) *MockAddressConfigMethodCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubnetCIDR mocks base method. @@ -410,9 +842,33 @@ func (m *MockAddress) SubnetCIDR() string { } // SubnetCIDR indicates an expected call of SubnetCIDR. -func (mr *MockAddressMockRecorder) SubnetCIDR() *gomock.Call { +func (mr *MockAddressMockRecorder) SubnetCIDR() *MockAddressSubnetCIDRCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetCIDR", reflect.TypeOf((*MockAddress)(nil).SubnetCIDR)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetCIDR", reflect.TypeOf((*MockAddress)(nil).SubnetCIDR)) + return &MockAddressSubnetCIDRCall{Call: call} +} + +// MockAddressSubnetCIDRCall wrap *gomock.Call +type MockAddressSubnetCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddressSubnetCIDRCall) Return(arg0 string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddressSubnetCIDRCall) Do(f func() string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddressSubnetCIDRCall) DoAndReturn(f func() string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -424,9 +880,33 @@ func (m *MockAddress) Value() string { } // Value indicates an expected call of Value. -func (mr *MockAddressMockRecorder) Value() *gomock.Call { +func (mr *MockAddressMockRecorder) Value() *MockAddressValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockAddress)(nil).Value)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockAddress)(nil).Value)) + return &MockAddressValueCall{Call: call} +} + +// MockAddressValueCall wrap *gomock.Call +type MockAddressValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddressValueCall) Return(arg0 string) *MockAddressValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddressValueCall) Do(f func() string) *MockAddressValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddressValueCall) DoAndReturn(f func() string) *MockAddressValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -461,9 +941,33 @@ func (m *MockUnit) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockUnitMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockUnitMockRecorder) ApplicationName() *MockUnitApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + return &MockUnitApplicationNameCall{Call: call} +} + +// MockUnitApplicationNameCall wrap *gomock.Call +type MockUnitApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationNameCall) Return(arg0 string) *MockUnitApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationNameCall) Do(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationNameCall) DoAndReturn(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -475,9 +979,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBindings is a mock of Bindings interface. @@ -512,9 +1040,33 @@ func (m *MockBindings) Map() map[string]string { } // Map indicates an expected call of Map. -func (mr *MockBindingsMockRecorder) Map() *gomock.Call { +func (mr *MockBindingsMockRecorder) Map() *MockBindingsMapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockBindings)(nil).Map)) + return &MockBindingsMapCall{Call: call} +} + +// MockBindingsMapCall wrap *gomock.Call +type MockBindingsMapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBindingsMapCall) Return(arg0 map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBindingsMapCall) Do(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBindingsMapCall) DoAndReturn(f func() map[string]string) *MockBindingsMapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -550,9 +1102,33 @@ func (m *MockNetworkService) AddSpace(arg0 context.Context, arg1 network.SpaceIn } // AddSpace indicates an expected call of AddSpace. -func (mr *MockNetworkServiceMockRecorder) AddSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) AddSpace(arg0, arg1 any) *MockNetworkServiceAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockNetworkService)(nil).AddSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockNetworkService)(nil).AddSpace), arg0, arg1) + return &MockNetworkServiceAddSpaceCall{Call: call} +} + +// MockNetworkServiceAddSpaceCall wrap *gomock.Call +type MockNetworkServiceAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceAddSpaceCall) Return(arg0 network.Id, arg1 error) *MockNetworkServiceAddSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceAddSpaceCall) Do(f func(context.Context, network.SpaceInfo) (network.Id, error)) *MockNetworkServiceAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceAddSpaceCall) DoAndReturn(f func(context.Context, network.SpaceInfo) (network.Id, error)) *MockNetworkServiceAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSpaces mocks base method. @@ -565,9 +1141,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -580,9 +1180,33 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReloadSpaces mocks base method. @@ -594,9 +1218,33 @@ func (m *MockNetworkService) ReloadSpaces(arg0 context.Context) error { } // ReloadSpaces indicates an expected call of ReloadSpaces. -func (mr *MockNetworkServiceMockRecorder) ReloadSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) ReloadSpaces(arg0 any) *MockNetworkServiceReloadSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockNetworkService)(nil).ReloadSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockNetworkService)(nil).ReloadSpaces), arg0) + return &MockNetworkServiceReloadSpacesCall{Call: call} +} + +// MockNetworkServiceReloadSpacesCall wrap *gomock.Call +type MockNetworkServiceReloadSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceReloadSpacesCall) Return(arg0 error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceReloadSpacesCall) Do(f func(context.Context) error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceReloadSpacesCall) DoAndReturn(f func(context.Context) error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSpace mocks base method. @@ -608,9 +1256,33 @@ func (m *MockNetworkService) RemoveSpace(arg0 context.Context, arg1 string) erro } // RemoveSpace indicates an expected call of RemoveSpace. -func (mr *MockNetworkServiceMockRecorder) RemoveSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) RemoveSpace(arg0, arg1 any) *MockNetworkServiceRemoveSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockNetworkService)(nil).RemoveSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockNetworkService)(nil).RemoveSpace), arg0, arg1) + return &MockNetworkServiceRemoveSpaceCall{Call: call} +} + +// MockNetworkServiceRemoveSpaceCall wrap *gomock.Call +type MockNetworkServiceRemoveSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceRemoveSpaceCall) Return(arg0 error) *MockNetworkServiceRemoveSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceRemoveSpaceCall) Do(f func(context.Context, string) error) *MockNetworkServiceRemoveSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceRemoveSpaceCall) DoAndReturn(f func(context.Context, string) error) *MockNetworkServiceRemoveSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Space mocks base method. @@ -623,9 +1295,33 @@ func (m *MockNetworkService) Space(arg0 context.Context, arg1 string) (*network. } // Space indicates an expected call of Space. -func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *MockNetworkServiceSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + return &MockNetworkServiceSpaceCall{Call: call} +} + +// MockNetworkServiceSpaceCall wrap *gomock.Call +type MockNetworkServiceSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpaceByName mocks base method. @@ -638,9 +1334,33 @@ func (m *MockNetworkService) SpaceByName(arg0 context.Context, arg1 string) (*ne } // SpaceByName indicates an expected call of SpaceByName. -func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *MockNetworkServiceSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + return &MockNetworkServiceSpaceByNameCall{Call: call} +} + +// MockNetworkServiceSpaceByNameCall wrap *gomock.Call +type MockNetworkServiceSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnet mocks base method. @@ -653,9 +1373,33 @@ func (m *MockNetworkService) Subnet(arg0 context.Context, arg1 string) (*network } // Subnet indicates an expected call of Subnet. -func (mr *MockNetworkServiceMockRecorder) Subnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) Subnet(arg0, arg1 any) *MockNetworkServiceSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnet", reflect.TypeOf((*MockNetworkService)(nil).Subnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnet", reflect.TypeOf((*MockNetworkService)(nil).Subnet), arg0, arg1) + return &MockNetworkServiceSubnetCall{Call: call} +} + +// MockNetworkServiceSubnetCall wrap *gomock.Call +type MockNetworkServiceSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSubnetCall) Return(arg0 *network.SubnetInfo, arg1 error) *MockNetworkServiceSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSubnetCall) Do(f func(context.Context, string) (*network.SubnetInfo, error)) *MockNetworkServiceSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSubnetCall) DoAndReturn(f func(context.Context, string) (*network.SubnetInfo, error)) *MockNetworkServiceSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubnetsByCIDR mocks base method. @@ -672,10 +1416,34 @@ func (m *MockNetworkService) SubnetsByCIDR(arg0 context.Context, arg1 ...string) } // SubnetsByCIDR indicates an expected call of SubnetsByCIDR. -func (mr *MockNetworkServiceMockRecorder) SubnetsByCIDR(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SubnetsByCIDR(arg0 any, arg1 ...any) *MockNetworkServiceSubnetsByCIDRCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockNetworkService)(nil).SubnetsByCIDR), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockNetworkService)(nil).SubnetsByCIDR), varargs...) + return &MockNetworkServiceSubnetsByCIDRCall{Call: call} +} + +// MockNetworkServiceSubnetsByCIDRCall wrap *gomock.Call +type MockNetworkServiceSubnetsByCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSubnetsByCIDRCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSubnetsByCIDRCall) Do(f func(context.Context, ...string) ([]network.SubnetInfo, error)) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSubnetsByCIDRCall) DoAndReturn(f func(context.Context, ...string) ([]network.SubnetInfo, error)) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSpace mocks base method. @@ -687,9 +1455,33 @@ func (m *MockNetworkService) UpdateSpace(arg0 context.Context, arg1, arg2 string } // UpdateSpace indicates an expected call of UpdateSpace. -func (mr *MockNetworkServiceMockRecorder) UpdateSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) UpdateSpace(arg0, arg1, arg2 any) *MockNetworkServiceUpdateSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSpace", reflect.TypeOf((*MockNetworkService)(nil).UpdateSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSpace", reflect.TypeOf((*MockNetworkService)(nil).UpdateSpace), arg0, arg1, arg2) + return &MockNetworkServiceUpdateSpaceCall{Call: call} +} + +// MockNetworkServiceUpdateSpaceCall wrap *gomock.Call +type MockNetworkServiceUpdateSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceUpdateSpaceCall) Return(arg0 error) *MockNetworkServiceUpdateSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceUpdateSpaceCall) Do(f func(context.Context, string, string) error) *MockNetworkServiceUpdateSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceUpdateSpaceCall) DoAndReturn(f func(context.Context, string, string) error) *MockNetworkServiceUpdateSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSubnet mocks base method. @@ -701,9 +1493,33 @@ func (m *MockNetworkService) UpdateSubnet(arg0 context.Context, arg1, arg2 strin } // UpdateSubnet indicates an expected call of UpdateSubnet. -func (mr *MockNetworkServiceMockRecorder) UpdateSubnet(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) UpdateSubnet(arg0, arg1, arg2 any) *MockNetworkServiceUpdateSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSubnet", reflect.TypeOf((*MockNetworkService)(nil).UpdateSubnet), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSubnet", reflect.TypeOf((*MockNetworkService)(nil).UpdateSubnet), arg0, arg1, arg2) + return &MockNetworkServiceUpdateSubnetCall{Call: call} +} + +// MockNetworkServiceUpdateSubnetCall wrap *gomock.Call +type MockNetworkServiceUpdateSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceUpdateSubnetCall) Return(arg0 error) *MockNetworkServiceUpdateSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceUpdateSubnetCall) Do(f func(context.Context, string, string) error) *MockNetworkServiceUpdateSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceUpdateSubnetCall) DoAndReturn(f func(context.Context, string, string) error) *MockNetworkServiceUpdateSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -739,7 +1555,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/spaces/package_test.go b/apiserver/facades/client/spaces/package_test.go index 36005705264..54ef4eb454f 100644 --- a/apiserver/facades/client/spaces/package_test.go +++ b/apiserver/facades/client/spaces/package_test.go @@ -19,7 +19,7 @@ import ( environmocks "github.com/juju/juju/environs/mocks" ) -//go:generate go run go.uber.org/mock/mockgen -package spaces -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/spaces Backing,BlockChecker,Machine,Constraints,Address,Unit,Bindings,NetworkService,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package spaces -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/spaces Backing,BlockChecker,Machine,Constraints,Address,Unit,Bindings,NetworkService,ControllerConfigService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/sshclient/authorizer_mock_test.go b/apiserver/facades/client/sshclient/authorizer_mock_test.go index 8b7180bebe0..c2d73df021d 100644 --- a/apiserver/facades/client/sshclient/authorizer_mock_test.go +++ b/apiserver/facades/client/sshclient/authorizer_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sshclient_test -destination authorizer_mock_test.go github.com/juju/juju/apiserver/facade Authorizer +// mockgen -typed -package sshclient_test -destination authorizer_mock_test.go github.com/juju/juju/apiserver/facade Authorizer // // Package sshclient_test is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -77,9 +125,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -91,9 +163,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -105,9 +201,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -119,9 +239,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -147,9 +315,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -161,9 +353,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -175,9 +391,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -189,7 +429,31 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/sshclient/leadership_mock_test.go b/apiserver/facades/client/sshclient/leadership_mock_test.go index 3dfaffe91fa..916875fcea8 100644 --- a/apiserver/facades/client/sshclient/leadership_mock_test.go +++ b/apiserver/facades/client/sshclient/leadership_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sshclient_test -destination leadership_mock_test.go github.com/juju/juju/core/leadership Reader +// mockgen -typed -package sshclient_test -destination leadership_mock_test.go github.com/juju/juju/core/leadership Reader // // Package sshclient_test is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockReader) Leaders() (map[string]string, error) { } // Leaders indicates an expected call of Leaders. -func (mr *MockReaderMockRecorder) Leaders() *gomock.Call { +func (mr *MockReaderMockRecorder) Leaders() *MockReaderLeadersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leaders", reflect.TypeOf((*MockReader)(nil).Leaders)) + return &MockReaderLeadersCall{Call: call} +} + +// MockReaderLeadersCall wrap *gomock.Call +type MockReaderLeadersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReaderLeadersCall) Return(arg0 map[string]string, arg1 error) *MockReaderLeadersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReaderLeadersCall) Do(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReaderLeadersCall) DoAndReturn(f func() (map[string]string, error)) *MockReaderLeadersCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/sshclient/package_test.go b/apiserver/facades/client/sshclient/package_test.go index 9b25fb9d846..c0a1249e277 100644 --- a/apiserver/facades/client/sshclient/package_test.go +++ b/apiserver/facades/client/sshclient/package_test.go @@ -9,10 +9,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package sshclient_test -destination leadership_mock_test.go github.com/juju/juju/core/leadership Reader -//go:generate go run go.uber.org/mock/mockgen -package sshclient_test -destination state_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient Backend,Model,Broker,SSHMachine -//go:generate go run go.uber.org/mock/mockgen -package sshclient_test -destination authorizer_mock_test.go github.com/juju/juju/apiserver/facade Authorizer -//go:generate go run go.uber.org/mock/mockgen -package sshclient_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package sshclient_test -destination leadership_mock_test.go github.com/juju/juju/core/leadership Reader +//go:generate go run go.uber.org/mock/mockgen -typed -package sshclient_test -destination state_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient Backend,Model,Broker,SSHMachine +//go:generate go run go.uber.org/mock/mockgen -typed -package sshclient_test -destination authorizer_mock_test.go github.com/juju/juju/apiserver/facade Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package sshclient_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient ModelConfigService func Test(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/sshclient/service_mock_test.go b/apiserver/facades/client/sshclient/service_mock_test.go index 856f5f06f7b..9fdb96dd70e 100644 --- a/apiserver/facades/client/sshclient/service_mock_test.go +++ b/apiserver/facades/client/sshclient/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sshclient_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient ModelConfigService +// mockgen -typed -package sshclient_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient ModelConfigService // // Package sshclient_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/sshclient/state_mock_test.go b/apiserver/facades/client/sshclient/state_mock_test.go index 52bc9cf7ded..1dd67f598ad 100644 --- a/apiserver/facades/client/sshclient/state_mock_test.go +++ b/apiserver/facades/client/sshclient/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sshclient_test -destination state_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient Backend,Model,Broker,SSHMachine +// mockgen -typed -package sshclient_test -destination state_mock_test.go github.com/juju/juju/apiserver/facades/client/sshclient Backend,Model,Broker,SSHMachine // // Package sshclient_test is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockBackend) CloudSpec(arg0 context.Context) (cloudspec.CloudSpec, erro } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockBackendMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) CloudSpec(arg0 any) *MockBackendCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBackend)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBackend)(nil).CloudSpec), arg0) + return &MockBackendCloudSpecCall{Call: call} +} + +// MockBackendCloudSpecCall wrap *gomock.Call +type MockBackendCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendCloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockBackendCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendCloudSpecCall) Do(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackendCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendCloudSpecCall) DoAndReturn(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackendCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -69,9 +93,33 @@ func (m *MockBackend) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockBackendMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ControllerTag() *MockBackendControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockBackend)(nil).ControllerTag)) + return &MockBackendControllerTagCall{Call: call} +} + +// MockBackendControllerTagCall wrap *gomock.Call +type MockBackendControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendControllerTagCall) Return(arg0 names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendControllerTagCall) Do(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockBackendControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetMachineForEntity mocks base method. @@ -84,9 +132,33 @@ func (m *MockBackend) GetMachineForEntity(arg0 string) (sshclient.SSHMachine, er } // GetMachineForEntity indicates an expected call of GetMachineForEntity. -func (mr *MockBackendMockRecorder) GetMachineForEntity(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetMachineForEntity(arg0 any) *MockBackendGetMachineForEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMachineForEntity", reflect.TypeOf((*MockBackend)(nil).GetMachineForEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMachineForEntity", reflect.TypeOf((*MockBackend)(nil).GetMachineForEntity), arg0) + return &MockBackendGetMachineForEntityCall{Call: call} +} + +// MockBackendGetMachineForEntityCall wrap *gomock.Call +type MockBackendGetMachineForEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetMachineForEntityCall) Return(arg0 sshclient.SSHMachine, arg1 error) *MockBackendGetMachineForEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetMachineForEntityCall) Do(f func(string) (sshclient.SSHMachine, error)) *MockBackendGetMachineForEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetMachineForEntityCall) DoAndReturn(f func(string) (sshclient.SSHMachine, error)) *MockBackendGetMachineForEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSSHHostKeys mocks base method. @@ -99,9 +171,33 @@ func (m *MockBackend) GetSSHHostKeys(arg0 names.MachineTag) (state.SSHHostKeys, } // GetSSHHostKeys indicates an expected call of GetSSHHostKeys. -func (mr *MockBackendMockRecorder) GetSSHHostKeys(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) GetSSHHostKeys(arg0 any) *MockBackendGetSSHHostKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSSHHostKeys", reflect.TypeOf((*MockBackend)(nil).GetSSHHostKeys), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSSHHostKeys", reflect.TypeOf((*MockBackend)(nil).GetSSHHostKeys), arg0) + return &MockBackendGetSSHHostKeysCall{Call: call} +} + +// MockBackendGetSSHHostKeysCall wrap *gomock.Call +type MockBackendGetSSHHostKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendGetSSHHostKeysCall) Return(arg0 state.SSHHostKeys, arg1 error) *MockBackendGetSSHHostKeysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendGetSSHHostKeysCall) Do(f func(names.MachineTag) (state.SSHHostKeys, error)) *MockBackendGetSSHHostKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendGetSSHHostKeysCall) DoAndReturn(f func(names.MachineTag) (state.SSHHostKeys, error)) *MockBackendGetSSHHostKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -114,9 +210,33 @@ func (m *MockBackend) Model() (sshclient.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockBackendMockRecorder) Model() *gomock.Call { +func (mr *MockBackendMockRecorder) Model() *MockBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockBackend)(nil).Model)) + return &MockBackendModelCall{Call: call} +} + +// MockBackendModelCall wrap *gomock.Call +type MockBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelCall) Return(arg0 sshclient.Model, arg1 error) *MockBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelCall) Do(f func() (sshclient.Model, error)) *MockBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelCall) DoAndReturn(f func() (sshclient.Model, error)) *MockBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -128,9 +248,33 @@ func (m *MockBackend) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackendMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelTag() *MockBackendModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBackend)(nil).ModelTag)) + return &MockBackendModelTagCall{Call: call} +} + +// MockBackendModelTagCall wrap *gomock.Call +type MockBackendModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelTagCall) Return(arg0 names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelTagCall) Do(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackendModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -166,9 +310,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -180,9 +348,33 @@ func (m *MockModel) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockModelMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockModelMockRecorder) ControllerUUID() *MockModelControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockModel)(nil).ControllerUUID)) + return &MockModelControllerUUIDCall{Call: call} +} + +// MockModelControllerUUIDCall wrap *gomock.Call +type MockModelControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelControllerUUIDCall) Return(arg0 string) *MockModelControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelControllerUUIDCall) Do(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelControllerUUIDCall) DoAndReturn(f func() string) *MockModelControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -194,9 +386,33 @@ func (m *MockModel) Type() state.ModelType { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() state.ModelType) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBroker is a mock of Broker interface. @@ -232,9 +448,33 @@ func (m *MockBroker) GetSecretToken(arg0 context.Context, arg1 string) (string, } // GetSecretToken indicates an expected call of GetSecretToken. -func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *MockBrokerGetSecretTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + return &MockBrokerGetSecretTokenCall{Call: call} +} + +// MockBrokerGetSecretTokenCall wrap *gomock.Call +type MockBrokerGetSecretTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetSecretTokenCall) Return(arg0 string, arg1 error) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetSecretTokenCall) Do(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetSecretTokenCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSSHMachine is a mock of SSHMachine interface. @@ -269,9 +509,33 @@ func (m *MockSSHMachine) Addresses() network.SpaceAddresses { } // Addresses indicates an expected call of Addresses. -func (mr *MockSSHMachineMockRecorder) Addresses() *gomock.Call { +func (mr *MockSSHMachineMockRecorder) Addresses() *MockSSHMachineAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockSSHMachine)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockSSHMachine)(nil).Addresses)) + return &MockSSHMachineAddressesCall{Call: call} +} + +// MockSSHMachineAddressesCall wrap *gomock.Call +type MockSSHMachineAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHMachineAddressesCall) Return(arg0 network.SpaceAddresses) *MockSSHMachineAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHMachineAddressesCall) Do(f func() network.SpaceAddresses) *MockSSHMachineAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHMachineAddressesCall) DoAndReturn(f func() network.SpaceAddresses) *MockSSHMachineAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllDeviceSpaceAddresses mocks base method. @@ -284,9 +548,33 @@ func (m *MockSSHMachine) AllDeviceSpaceAddresses(arg0 context.Context) (network. } // AllDeviceSpaceAddresses indicates an expected call of AllDeviceSpaceAddresses. -func (mr *MockSSHMachineMockRecorder) AllDeviceSpaceAddresses(arg0 any) *gomock.Call { +func (mr *MockSSHMachineMockRecorder) AllDeviceSpaceAddresses(arg0 any) *MockSSHMachineAllDeviceSpaceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceSpaceAddresses", reflect.TypeOf((*MockSSHMachine)(nil).AllDeviceSpaceAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceSpaceAddresses", reflect.TypeOf((*MockSSHMachine)(nil).AllDeviceSpaceAddresses), arg0) + return &MockSSHMachineAllDeviceSpaceAddressesCall{Call: call} +} + +// MockSSHMachineAllDeviceSpaceAddressesCall wrap *gomock.Call +type MockSSHMachineAllDeviceSpaceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHMachineAllDeviceSpaceAddressesCall) Return(arg0 network.SpaceAddresses, arg1 error) *MockSSHMachineAllDeviceSpaceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHMachineAllDeviceSpaceAddressesCall) Do(f func(context.Context) (network.SpaceAddresses, error)) *MockSSHMachineAllDeviceSpaceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHMachineAllDeviceSpaceAddressesCall) DoAndReturn(f func(context.Context) (network.SpaceAddresses, error)) *MockSSHMachineAllDeviceSpaceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineTag mocks base method. @@ -298,9 +586,33 @@ func (m *MockSSHMachine) MachineTag() names.MachineTag { } // MachineTag indicates an expected call of MachineTag. -func (mr *MockSSHMachineMockRecorder) MachineTag() *gomock.Call { +func (mr *MockSSHMachineMockRecorder) MachineTag() *MockSSHMachineMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockSSHMachine)(nil).MachineTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockSSHMachine)(nil).MachineTag)) + return &MockSSHMachineMachineTagCall{Call: call} +} + +// MockSSHMachineMachineTagCall wrap *gomock.Call +type MockSSHMachineMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHMachineMachineTagCall) Return(arg0 names.MachineTag) *MockSSHMachineMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHMachineMachineTagCall) Do(f func() names.MachineTag) *MockSSHMachineMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHMachineMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockSSHMachineMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrivateAddress mocks base method. @@ -313,9 +625,33 @@ func (m *MockSSHMachine) PrivateAddress() (network.SpaceAddress, error) { } // PrivateAddress indicates an expected call of PrivateAddress. -func (mr *MockSSHMachineMockRecorder) PrivateAddress() *gomock.Call { +func (mr *MockSSHMachineMockRecorder) PrivateAddress() *MockSSHMachinePrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockSSHMachine)(nil).PrivateAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockSSHMachine)(nil).PrivateAddress)) + return &MockSSHMachinePrivateAddressCall{Call: call} +} + +// MockSSHMachinePrivateAddressCall wrap *gomock.Call +type MockSSHMachinePrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHMachinePrivateAddressCall) Return(arg0 network.SpaceAddress, arg1 error) *MockSSHMachinePrivateAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHMachinePrivateAddressCall) Do(f func() (network.SpaceAddress, error)) *MockSSHMachinePrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHMachinePrivateAddressCall) DoAndReturn(f func() (network.SpaceAddress, error)) *MockSSHMachinePrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -328,7 +664,31 @@ func (m *MockSSHMachine) PublicAddress() (network.SpaceAddress, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockSSHMachineMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockSSHMachineMockRecorder) PublicAddress() *MockSSHMachinePublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockSSHMachine)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockSSHMachine)(nil).PublicAddress)) + return &MockSSHMachinePublicAddressCall{Call: call} +} + +// MockSSHMachinePublicAddressCall wrap *gomock.Call +type MockSSHMachinePublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHMachinePublicAddressCall) Return(arg0 network.SpaceAddress, arg1 error) *MockSSHMachinePublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHMachinePublicAddressCall) Do(f func() (network.SpaceAddress, error)) *MockSSHMachinePublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHMachinePublicAddressCall) DoAndReturn(f func() (network.SpaceAddress, error)) *MockSSHMachinePublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/storage/domain_mock.go b/apiserver/facades/client/storage/domain_mock.go index c605b04ce84..0c093ec2558 100644 --- a/apiserver/facades/client/storage/domain_mock.go +++ b/apiserver/facades/client/storage/domain_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package storage -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/storage StorageService +// mockgen -typed -package storage -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/storage StorageService // // Package storage is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockStorageService) CreateStoragePool(arg0 context.Context, arg1 string } // CreateStoragePool indicates an expected call of CreateStoragePool. -func (mr *MockStorageServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *MockStorageServiceCreateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStorageService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStorageService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + return &MockStorageServiceCreateStoragePoolCall{Call: call} +} + +// MockStorageServiceCreateStoragePoolCall wrap *gomock.Call +type MockStorageServiceCreateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceCreateStoragePoolCall) Return(arg0 error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceCreateStoragePoolCall) Do(f func(context.Context, string, storage0.ProviderType, service.PoolAttrs) error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceCreateStoragePoolCall) DoAndReturn(f func(context.Context, string, storage0.ProviderType, service.PoolAttrs) error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePool mocks base method. @@ -65,9 +89,33 @@ func (m *MockStorageService) DeleteStoragePool(arg0 context.Context, arg1 string } // DeleteStoragePool indicates an expected call of DeleteStoragePool. -func (mr *MockStorageServiceMockRecorder) DeleteStoragePool(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) DeleteStoragePool(arg0, arg1 any) *MockStorageServiceDeleteStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockStorageService)(nil).DeleteStoragePool), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockStorageService)(nil).DeleteStoragePool), arg0, arg1) + return &MockStorageServiceDeleteStoragePoolCall{Call: call} +} + +// MockStorageServiceDeleteStoragePoolCall wrap *gomock.Call +type MockStorageServiceDeleteStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceDeleteStoragePoolCall) Return(arg0 error) *MockStorageServiceDeleteStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceDeleteStoragePoolCall) Do(f func(context.Context, string) error) *MockStorageServiceDeleteStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceDeleteStoragePoolCall) DoAndReturn(f func(context.Context, string) error) *MockStorageServiceDeleteStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolByName mocks base method. @@ -80,9 +128,33 @@ func (m *MockStorageService) GetStoragePoolByName(arg0 context.Context, arg1 str } // GetStoragePoolByName indicates an expected call of GetStoragePoolByName. -func (mr *MockStorageServiceMockRecorder) GetStoragePoolByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) GetStoragePoolByName(arg0, arg1 any) *MockStorageServiceGetStoragePoolByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStorageService)(nil).GetStoragePoolByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStorageService)(nil).GetStoragePoolByName), arg0, arg1) + return &MockStorageServiceGetStoragePoolByNameCall{Call: call} +} + +// MockStorageServiceGetStoragePoolByNameCall wrap *gomock.Call +type MockStorageServiceGetStoragePoolByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceGetStoragePoolByNameCall) Return(arg0 *storage0.Config, arg1 error) *MockStorageServiceGetStoragePoolByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceGetStoragePoolByNameCall) Do(f func(context.Context, string) (*storage0.Config, error)) *MockStorageServiceGetStoragePoolByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceGetStoragePoolByNameCall) DoAndReturn(f func(context.Context, string) (*storage0.Config, error)) *MockStorageServiceGetStoragePoolByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListStoragePools mocks base method. @@ -95,9 +167,33 @@ func (m *MockStorageService) ListStoragePools(arg0 context.Context, arg1 storage } // ListStoragePools indicates an expected call of ListStoragePools. -func (mr *MockStorageServiceMockRecorder) ListStoragePools(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) ListStoragePools(arg0, arg1, arg2 any) *MockStorageServiceListStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStoragePools", reflect.TypeOf((*MockStorageService)(nil).ListStoragePools), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStoragePools", reflect.TypeOf((*MockStorageService)(nil).ListStoragePools), arg0, arg1, arg2) + return &MockStorageServiceListStoragePoolsCall{Call: call} +} + +// MockStorageServiceListStoragePoolsCall wrap *gomock.Call +type MockStorageServiceListStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceListStoragePoolsCall) Return(arg0 []*storage0.Config, arg1 error) *MockStorageServiceListStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceListStoragePoolsCall) Do(f func(context.Context, storage.Names, storage.Providers) ([]*storage0.Config, error)) *MockStorageServiceListStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceListStoragePoolsCall) DoAndReturn(f func(context.Context, storage.Names, storage.Providers) ([]*storage0.Config, error)) *MockStorageServiceListStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplaceStoragePool mocks base method. @@ -109,7 +205,31 @@ func (m *MockStorageService) ReplaceStoragePool(arg0 context.Context, arg1 strin } // ReplaceStoragePool indicates an expected call of ReplaceStoragePool. -func (mr *MockStorageServiceMockRecorder) ReplaceStoragePool(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) ReplaceStoragePool(arg0, arg1, arg2, arg3 any) *MockStorageServiceReplaceStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceStoragePool", reflect.TypeOf((*MockStorageService)(nil).ReplaceStoragePool), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceStoragePool", reflect.TypeOf((*MockStorageService)(nil).ReplaceStoragePool), arg0, arg1, arg2, arg3) + return &MockStorageServiceReplaceStoragePoolCall{Call: call} +} + +// MockStorageServiceReplaceStoragePoolCall wrap *gomock.Call +type MockStorageServiceReplaceStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceReplaceStoragePoolCall) Return(arg0 error) *MockStorageServiceReplaceStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceReplaceStoragePoolCall) Do(f func(context.Context, string, storage0.ProviderType, service.PoolAttrs) error) *MockStorageServiceReplaceStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceReplaceStoragePoolCall) DoAndReturn(f func(context.Context, string, storage0.ProviderType, service.PoolAttrs) error) *MockStorageServiceReplaceStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/storage/package_test.go b/apiserver/facades/client/storage/package_test.go index fc019ada05d..19c84c314b7 100644 --- a/apiserver/facades/client/storage/package_test.go +++ b/apiserver/facades/client/storage/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package storage -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/storage StorageService +//go:generate go run go.uber.org/mock/mockgen -typed -package storage -destination domain_mock.go github.com/juju/juju/apiserver/facades/client/storage StorageService func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/subnets/package_mock_test.go b/apiserver/facades/client/subnets/package_mock_test.go index 6acdbbb842d..490153b7885 100644 --- a/apiserver/facades/client/subnets/package_mock_test.go +++ b/apiserver/facades/client/subnets/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package subnets -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/subnets Backing,NetworkService +// mockgen -typed -package subnets -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/subnets Backing,NetworkService // // Package subnets is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockBacking) AvailabilityZones() (network.AvailabilityZones, error) { } // AvailabilityZones indicates an expected call of AvailabilityZones. -func (mr *MockBackingMockRecorder) AvailabilityZones() *gomock.Call { +func (mr *MockBackingMockRecorder) AvailabilityZones() *MockBackingAvailabilityZonesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZones", reflect.TypeOf((*MockBacking)(nil).AvailabilityZones)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZones", reflect.TypeOf((*MockBacking)(nil).AvailabilityZones)) + return &MockBackingAvailabilityZonesCall{Call: call} +} + +// MockBackingAvailabilityZonesCall wrap *gomock.Call +type MockBackingAvailabilityZonesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingAvailabilityZonesCall) Return(arg0 network.AvailabilityZones, arg1 error) *MockBackingAvailabilityZonesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingAvailabilityZonesCall) Do(f func() (network.AvailabilityZones, error)) *MockBackingAvailabilityZonesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingAvailabilityZonesCall) DoAndReturn(f func() (network.AvailabilityZones, error)) *MockBackingAvailabilityZonesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -68,9 +92,33 @@ func (m *MockBacking) CloudSpec(arg0 context.Context) (cloudspec.CloudSpec, erro } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockBackingMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) CloudSpec(arg0 any) *MockBackingCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBacking)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockBacking)(nil).CloudSpec), arg0) + return &MockBackingCloudSpecCall{Call: call} +} + +// MockBackingCloudSpecCall wrap *gomock.Call +type MockBackingCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingCloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockBackingCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingCloudSpecCall) Do(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackingCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingCloudSpecCall) DoAndReturn(f func(context.Context) (cloudspec.CloudSpec, error)) *MockBackingCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -83,9 +131,33 @@ func (m *MockBacking) ModelConfig(arg0 context.Context) (*config.Config, error) } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockBackingMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) ModelConfig(arg0 any) *MockBackingModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBacking)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockBacking)(nil).ModelConfig), arg0) + return &MockBackingModelConfigCall{Call: call} +} + +// MockBackingModelConfigCall wrap *gomock.Call +type MockBackingModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockBackingModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockBackingModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockBackingModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -97,9 +169,33 @@ func (m *MockBacking) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockBackingMockRecorder) ModelTag() *gomock.Call { +func (mr *MockBackingMockRecorder) ModelTag() *MockBackingModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBacking)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockBacking)(nil).ModelTag)) + return &MockBackingModelTagCall{Call: call} +} + +// MockBackingModelTagCall wrap *gomock.Call +type MockBackingModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingModelTagCall) Return(arg0 names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingModelTagCall) Do(f func() names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingModelTagCall) DoAndReturn(f func() names.ModelTag) *MockBackingModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAvailabilityZones mocks base method. @@ -111,9 +207,33 @@ func (m *MockBacking) SetAvailabilityZones(arg0 network.AvailabilityZones) error } // SetAvailabilityZones indicates an expected call of SetAvailabilityZones. -func (mr *MockBackingMockRecorder) SetAvailabilityZones(arg0 any) *gomock.Call { +func (mr *MockBackingMockRecorder) SetAvailabilityZones(arg0 any) *MockBackingSetAvailabilityZonesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAvailabilityZones", reflect.TypeOf((*MockBacking)(nil).SetAvailabilityZones), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAvailabilityZones", reflect.TypeOf((*MockBacking)(nil).SetAvailabilityZones), arg0) + return &MockBackingSetAvailabilityZonesCall{Call: call} +} + +// MockBackingSetAvailabilityZonesCall wrap *gomock.Call +type MockBackingSetAvailabilityZonesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackingSetAvailabilityZonesCall) Return(arg0 error) *MockBackingSetAvailabilityZonesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackingSetAvailabilityZonesCall) Do(f func(network.AvailabilityZones) error) *MockBackingSetAvailabilityZonesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackingSetAvailabilityZonesCall) DoAndReturn(f func(network.AvailabilityZones) error) *MockBackingSetAvailabilityZonesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -149,9 +269,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -164,9 +308,33 @@ func (m *MockNetworkService) GetAllSubnets(arg0 context.Context) (network.Subnet } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSubnets(arg0 any) *MockNetworkServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockNetworkService)(nil).GetAllSubnets), arg0) + return &MockNetworkServiceGetAllSubnetsCall{Call: call} +} + +// MockNetworkServiceGetAllSubnetsCall wrap *gomock.Call +type MockNetworkServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockNetworkServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Space mocks base method. @@ -179,9 +347,33 @@ func (m *MockNetworkService) Space(arg0 context.Context, arg1 string) (*network. } // Space indicates an expected call of Space. -func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *MockNetworkServiceSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + return &MockNetworkServiceSpaceCall{Call: call} +} + +// MockNetworkServiceSpaceCall wrap *gomock.Call +type MockNetworkServiceSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpaceByName mocks base method. @@ -194,9 +386,33 @@ func (m *MockNetworkService) SpaceByName(arg0 context.Context, arg1 string) (*ne } // SpaceByName indicates an expected call of SpaceByName. -func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *MockNetworkServiceSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + return &MockNetworkServiceSpaceByNameCall{Call: call} +} + +// MockNetworkServiceSpaceByNameCall wrap *gomock.Call +type MockNetworkServiceSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubnetsByCIDR mocks base method. @@ -213,8 +429,32 @@ func (m *MockNetworkService) SubnetsByCIDR(arg0 context.Context, arg1 ...string) } // SubnetsByCIDR indicates an expected call of SubnetsByCIDR. -func (mr *MockNetworkServiceMockRecorder) SubnetsByCIDR(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SubnetsByCIDR(arg0 any, arg1 ...any) *MockNetworkServiceSubnetsByCIDRCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockNetworkService)(nil).SubnetsByCIDR), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockNetworkService)(nil).SubnetsByCIDR), varargs...) + return &MockNetworkServiceSubnetsByCIDRCall{Call: call} +} + +// MockNetworkServiceSubnetsByCIDRCall wrap *gomock.Call +type MockNetworkServiceSubnetsByCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSubnetsByCIDRCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSubnetsByCIDRCall) Do(f func(context.Context, ...string) ([]network.SubnetInfo, error)) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSubnetsByCIDRCall) DoAndReturn(f func(context.Context, ...string) ([]network.SubnetInfo, error)) *MockNetworkServiceSubnetsByCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/subnets/package_test.go b/apiserver/facades/client/subnets/package_test.go index 7ce867f7d66..7469e59be20 100644 --- a/apiserver/facades/client/subnets/package_test.go +++ b/apiserver/facades/client/subnets/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package subnets -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/subnets Backing,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package subnets -destination package_mock_test.go github.com/juju/juju/apiserver/facades/client/subnets Backing,NetworkService func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/facades/client/usermanager/domain_mock_test.go b/apiserver/facades/client/usermanager/domain_mock_test.go index a51819ecacc..e433898361a 100644 --- a/apiserver/facades/client/usermanager/domain_mock_test.go +++ b/apiserver/facades/client/usermanager/domain_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package usermanager_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/client/usermanager UserService +// mockgen -typed -package usermanager_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/client/usermanager UserService // // Package usermanager_test is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockUserService) AddUser(arg0 context.Context, arg1 service.AddUserArg) } // AddUser indicates an expected call of AddUser. -func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *MockUserServiceAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + return &MockUserServiceAddUserCall{Call: call} +} + +// MockUserServiceAddUserCall wrap *gomock.Call +type MockUserServiceAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceAddUserCall) Return(arg0 user.UUID, arg1 []byte, arg2 error) *MockUserServiceAddUserCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceAddUserCall) Do(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceAddUserCall) DoAndReturn(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DisableUserAuthentication mocks base method. @@ -67,9 +91,33 @@ func (m *MockUserService) DisableUserAuthentication(arg0 context.Context, arg1 s } // DisableUserAuthentication indicates an expected call of DisableUserAuthentication. -func (mr *MockUserServiceMockRecorder) DisableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) DisableUserAuthentication(arg0, arg1 any) *MockUserServiceDisableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockUserService)(nil).DisableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockUserService)(nil).DisableUserAuthentication), arg0, arg1) + return &MockUserServiceDisableUserAuthenticationCall{Call: call} +} + +// MockUserServiceDisableUserAuthenticationCall wrap *gomock.Call +type MockUserServiceDisableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceDisableUserAuthenticationCall) Return(arg0 error) *MockUserServiceDisableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceDisableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockUserServiceDisableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceDisableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceDisableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableUserAuthentication mocks base method. @@ -81,9 +129,33 @@ func (m *MockUserService) EnableUserAuthentication(arg0 context.Context, arg1 st } // EnableUserAuthentication indicates an expected call of EnableUserAuthentication. -func (mr *MockUserServiceMockRecorder) EnableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) EnableUserAuthentication(arg0, arg1 any) *MockUserServiceEnableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockUserService)(nil).EnableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockUserService)(nil).EnableUserAuthentication), arg0, arg1) + return &MockUserServiceEnableUserAuthenticationCall{Call: call} +} + +// MockUserServiceEnableUserAuthenticationCall wrap *gomock.Call +type MockUserServiceEnableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceEnableUserAuthenticationCall) Return(arg0 error) *MockUserServiceEnableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceEnableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockUserServiceEnableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceEnableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceEnableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllUsers mocks base method. @@ -96,9 +168,33 @@ func (m *MockUserService) GetAllUsers(arg0 context.Context) ([]user.User, error) } // GetAllUsers indicates an expected call of GetAllUsers. -func (mr *MockUserServiceMockRecorder) GetAllUsers(arg0 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetAllUsers(arg0 any) *MockUserServiceGetAllUsersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockUserService)(nil).GetAllUsers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockUserService)(nil).GetAllUsers), arg0) + return &MockUserServiceGetAllUsersCall{Call: call} +} + +// MockUserServiceGetAllUsersCall wrap *gomock.Call +type MockUserServiceGetAllUsersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetAllUsersCall) Return(arg0 []user.User, arg1 error) *MockUserServiceGetAllUsersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetAllUsersCall) Do(f func(context.Context) ([]user.User, error)) *MockUserServiceGetAllUsersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetAllUsersCall) DoAndReturn(f func(context.Context) ([]user.User, error)) *MockUserServiceGetAllUsersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -111,9 +207,33 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUser mocks base method. @@ -125,9 +245,33 @@ func (m *MockUserService) RemoveUser(arg0 context.Context, arg1 string) error { } // RemoveUser indicates an expected call of RemoveUser. -func (mr *MockUserServiceMockRecorder) RemoveUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) RemoveUser(arg0, arg1 any) *MockUserServiceRemoveUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserService)(nil).RemoveUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserService)(nil).RemoveUser), arg0, arg1) + return &MockUserServiceRemoveUserCall{Call: call} +} + +// MockUserServiceRemoveUserCall wrap *gomock.Call +type MockUserServiceRemoveUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceRemoveUserCall) Return(arg0 error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceRemoveUserCall) Do(f func(context.Context, string) error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceRemoveUserCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResetPassword mocks base method. @@ -140,9 +284,33 @@ func (m *MockUserService) ResetPassword(arg0 context.Context, arg1 string) ([]by } // ResetPassword indicates an expected call of ResetPassword. -func (mr *MockUserServiceMockRecorder) ResetPassword(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) ResetPassword(arg0, arg1 any) *MockUserServiceResetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetPassword", reflect.TypeOf((*MockUserService)(nil).ResetPassword), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetPassword", reflect.TypeOf((*MockUserService)(nil).ResetPassword), arg0, arg1) + return &MockUserServiceResetPasswordCall{Call: call} +} + +// MockUserServiceResetPasswordCall wrap *gomock.Call +type MockUserServiceResetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceResetPasswordCall) Return(arg0 []byte, arg1 error) *MockUserServiceResetPasswordCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceResetPasswordCall) Do(f func(context.Context, string) ([]byte, error)) *MockUserServiceResetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceResetPasswordCall) DoAndReturn(f func(context.Context, string) ([]byte, error)) *MockUserServiceResetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -154,7 +322,31 @@ func (m *MockUserService) SetPassword(arg0 context.Context, arg1 string, arg2 au } // SetPassword indicates an expected call of SetPassword. -func (mr *MockUserServiceMockRecorder) SetPassword(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) SetPassword(arg0, arg1, arg2 any) *MockUserServiceSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUserService)(nil).SetPassword), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUserService)(nil).SetPassword), arg0, arg1, arg2) + return &MockUserServiceSetPasswordCall{Call: call} +} + +// MockUserServiceSetPasswordCall wrap *gomock.Call +type MockUserServiceSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceSetPasswordCall) Return(arg0 error) *MockUserServiceSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceSetPasswordCall) Do(f func(context.Context, string, auth.Password) error) *MockUserServiceSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceSetPasswordCall) DoAndReturn(f func(context.Context, string, auth.Password) error) *MockUserServiceSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/client/usermanager/package_test.go b/apiserver/facades/client/usermanager/package_test.go index 361b1db492a..1b3374e3725 100644 --- a/apiserver/facades/client/usermanager/package_test.go +++ b/apiserver/facades/client/usermanager/package_test.go @@ -13,7 +13,7 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package usermanager_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/client/usermanager UserService +//go:generate go run go.uber.org/mock/mockgen -typed -package usermanager_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/client/usermanager UserService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/controller/caasmodelconfigmanager/mocks/auth_mock.go b/apiserver/facades/controller/caasmodelconfigmanager/mocks/auth_mock.go index 3d7ed6882f2..7724aff20fc 100644 --- a/apiserver/facades/controller/caasmodelconfigmanager/mocks/auth_mock.go +++ b/apiserver/facades/controller/caasmodelconfigmanager/mocks/auth_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/auth_mock.go github.com/juju/juju/apiserver/facade Authorizer +// mockgen -typed -package mocks -destination mocks/auth_mock.go github.com/juju/juju/apiserver/facade Authorizer // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthorizer) AuthApplicationAgent() bool { } // AuthApplicationAgent indicates an expected call of AuthApplicationAgent. -func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthApplicationAgent() *MockAuthorizerAuthApplicationAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthApplicationAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthApplicationAgent)) + return &MockAuthorizerAuthApplicationAgentCall{Call: call} +} + +// MockAuthorizerAuthApplicationAgentCall wrap *gomock.Call +type MockAuthorizerAuthApplicationAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthApplicationAgentCall) Return(arg0 bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthApplicationAgentCall) Do(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthApplicationAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthApplicationAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthClient mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthorizer) AuthClient() bool { } // AuthClient indicates an expected call of AuthClient. -func (mr *MockAuthorizerMockRecorder) AuthClient() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthClient() *MockAuthorizerAuthClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthClient", reflect.TypeOf((*MockAuthorizer)(nil).AuthClient)) + return &MockAuthorizerAuthClientCall{Call: call} +} + +// MockAuthorizerAuthClientCall wrap *gomock.Call +type MockAuthorizerAuthClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthClientCall) Return(arg0 bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthClientCall) Do(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthClientCall) DoAndReturn(f func() bool) *MockAuthorizerAuthClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthController mocks base method. @@ -77,9 +125,33 @@ func (m *MockAuthorizer) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthorizerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthController() *MockAuthorizerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthorizer)(nil).AuthController)) + return &MockAuthorizerAuthControllerCall{Call: call} +} + +// MockAuthorizerAuthControllerCall wrap *gomock.Call +type MockAuthorizerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthControllerCall) Return(arg0 bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthControllerCall) Do(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthorizerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthMachineAgent mocks base method. @@ -91,9 +163,33 @@ func (m *MockAuthorizer) AuthMachineAgent() bool { } // AuthMachineAgent indicates an expected call of AuthMachineAgent. -func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthMachineAgent() *MockAuthorizerAuthMachineAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthMachineAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthMachineAgent)) + return &MockAuthorizerAuthMachineAgentCall{Call: call} +} + +// MockAuthorizerAuthMachineAgentCall wrap *gomock.Call +type MockAuthorizerAuthMachineAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthMachineAgentCall) Return(arg0 bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthMachineAgentCall) Do(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthMachineAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthMachineAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthModelAgent mocks base method. @@ -105,9 +201,33 @@ func (m *MockAuthorizer) AuthModelAgent() bool { } // AuthModelAgent indicates an expected call of AuthModelAgent. -func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthModelAgent() *MockAuthorizerAuthModelAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthModelAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthModelAgent)) + return &MockAuthorizerAuthModelAgentCall{Call: call} +} + +// MockAuthorizerAuthModelAgentCall wrap *gomock.Call +type MockAuthorizerAuthModelAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthModelAgentCall) Return(arg0 bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthModelAgentCall) Do(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthModelAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthModelAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthOwner mocks base method. @@ -119,9 +239,33 @@ func (m *MockAuthorizer) AuthOwner(arg0 names.Tag) bool { } // AuthOwner indicates an expected call of AuthOwner. -func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthOwner(arg0 any) *MockAuthorizerAuthOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthOwner", reflect.TypeOf((*MockAuthorizer)(nil).AuthOwner), arg0) + return &MockAuthorizerAuthOwnerCall{Call: call} +} + +// MockAuthorizerAuthOwnerCall wrap *gomock.Call +type MockAuthorizerAuthOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthOwnerCall) Return(arg0 bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthOwnerCall) Do(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthOwnerCall) DoAndReturn(f func(names.Tag) bool) *MockAuthorizerAuthOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthUnitAgent mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthorizer) AuthUnitAgent() bool { } // AuthUnitAgent indicates an expected call of AuthUnitAgent. -func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) AuthUnitAgent() *MockAuthorizerAuthUnitAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthUnitAgent", reflect.TypeOf((*MockAuthorizer)(nil).AuthUnitAgent)) + return &MockAuthorizerAuthUnitAgentCall{Call: call} +} + +// MockAuthorizerAuthUnitAgentCall wrap *gomock.Call +type MockAuthorizerAuthUnitAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerAuthUnitAgentCall) Return(arg0 bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerAuthUnitAgentCall) Do(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerAuthUnitAgentCall) DoAndReturn(f func() bool) *MockAuthorizerAuthUnitAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectedModel mocks base method. @@ -147,9 +315,33 @@ func (m *MockAuthorizer) ConnectedModel() string { } // ConnectedModel indicates an expected call of ConnectedModel. -func (mr *MockAuthorizerMockRecorder) ConnectedModel() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) ConnectedModel() *MockAuthorizerConnectedModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedModel", reflect.TypeOf((*MockAuthorizer)(nil).ConnectedModel)) + return &MockAuthorizerConnectedModelCall{Call: call} +} + +// MockAuthorizerConnectedModelCall wrap *gomock.Call +type MockAuthorizerConnectedModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerConnectedModelCall) Return(arg0 string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerConnectedModelCall) Do(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerConnectedModelCall) DoAndReturn(f func() string) *MockAuthorizerConnectedModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EntityHasPermission mocks base method. @@ -161,9 +353,33 @@ func (m *MockAuthorizer) EntityHasPermission(arg0 names.Tag, arg1 permission.Acc } // EntityHasPermission indicates an expected call of EntityHasPermission. -func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) EntityHasPermission(arg0, arg1, arg2 any) *MockAuthorizerEntityHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EntityHasPermission", reflect.TypeOf((*MockAuthorizer)(nil).EntityHasPermission), arg0, arg1, arg2) + return &MockAuthorizerEntityHasPermissionCall{Call: call} +} + +// MockAuthorizerEntityHasPermissionCall wrap *gomock.Call +type MockAuthorizerEntityHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerEntityHasPermissionCall) Return(arg0 error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerEntityHasPermissionCall) Do(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerEntityHasPermissionCall) DoAndReturn(f func(names.Tag, permission.Access, names.Tag) error) *MockAuthorizerEntityHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAuthTag mocks base method. @@ -175,9 +391,33 @@ func (m *MockAuthorizer) GetAuthTag() names.Tag { } // GetAuthTag indicates an expected call of GetAuthTag. -func (mr *MockAuthorizerMockRecorder) GetAuthTag() *gomock.Call { +func (mr *MockAuthorizerMockRecorder) GetAuthTag() *MockAuthorizerGetAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthTag", reflect.TypeOf((*MockAuthorizer)(nil).GetAuthTag)) + return &MockAuthorizerGetAuthTagCall{Call: call} +} + +// MockAuthorizerGetAuthTagCall wrap *gomock.Call +type MockAuthorizerGetAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerGetAuthTagCall) Return(arg0 names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerGetAuthTagCall) Do(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerGetAuthTagCall) DoAndReturn(f func() names.Tag) *MockAuthorizerGetAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasPermission mocks base method. @@ -189,7 +429,31 @@ func (m *MockAuthorizer) HasPermission(arg0 permission.Access, arg1 names.Tag) e } // HasPermission indicates an expected call of HasPermission. -func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthorizerMockRecorder) HasPermission(arg0, arg1 any) *MockAuthorizerHasPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermission", reflect.TypeOf((*MockAuthorizer)(nil).HasPermission), arg0, arg1) + return &MockAuthorizerHasPermissionCall{Call: call} +} + +// MockAuthorizerHasPermissionCall wrap *gomock.Call +type MockAuthorizerHasPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthorizerHasPermissionCall) Return(arg0 error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthorizerHasPermissionCall) Do(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthorizerHasPermissionCall) DoAndReturn(f func(permission.Access, names.Tag) error) *MockAuthorizerHasPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/caasmodelconfigmanager/mocks/resources_mock.go b/apiserver/facades/controller/caasmodelconfigmanager/mocks/resources_mock.go index f9c8f041d2b..623bd5fd000 100644 --- a/apiserver/facades/controller/caasmodelconfigmanager/mocks/resources_mock.go +++ b/apiserver/facades/controller/caasmodelconfigmanager/mocks/resources_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/apiserver/facade Resources +// mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/apiserver/facade Resources // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockResources) Get(arg0 string) worker.Worker { } // Get indicates an expected call of Get. -func (mr *MockResourcesMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Get(arg0 any) *MockResourcesGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResources)(nil).Get), arg0) + return &MockResourcesGetCall{Call: call} +} + +// MockResourcesGetCall wrap *gomock.Call +type MockResourcesGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetCall) Return(arg0 worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetCall) Do(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetCall) DoAndReturn(f func(string) worker.Worker) *MockResourcesGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -62,9 +86,33 @@ func (m *MockResources) Register(arg0 worker.Worker) string { } // Register indicates an expected call of Register. -func (mr *MockResourcesMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Register(arg0 any) *MockResourcesRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResources)(nil).Register), arg0) + return &MockResourcesRegisterCall{Call: call} +} + +// MockResourcesRegisterCall wrap *gomock.Call +type MockResourcesRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRegisterCall) Return(arg0 string) *MockResourcesRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRegisterCall) Do(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRegisterCall) DoAndReturn(f func(worker.Worker) string) *MockResourcesRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -76,7 +124,31 @@ func (m *MockResources) Stop(arg0 string) error { } // Stop indicates an expected call of Stop. -func (mr *MockResourcesMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) Stop(arg0 any) *MockResourcesStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockResources)(nil).Stop), arg0) + return &MockResourcesStopCall{Call: call} +} + +// MockResourcesStopCall wrap *gomock.Call +type MockResourcesStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesStopCall) Return(arg0 error) *MockResourcesStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesStopCall) Do(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesStopCall) DoAndReturn(f func(string) error) *MockResourcesStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/caasmodelconfigmanager/package_test.go b/apiserver/facades/controller/caasmodelconfigmanager/package_test.go index 1190e765e7d..00da3cdd76d 100644 --- a/apiserver/facades/controller/caasmodelconfigmanager/package_test.go +++ b/apiserver/facades/controller/caasmodelconfigmanager/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/auth_mock.go github.com/juju/juju/apiserver/facade Authorizer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/apiserver/facade Resources +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/auth_mock.go github.com/juju/juju/apiserver/facade Authorizer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/apiserver/facade Resources func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/caasmodeloperator/package_mock_test.go b/apiserver/facades/controller/caasmodeloperator/package_mock_test.go index dfc3bbb16ad..fb828d59b3c 100644 --- a/apiserver/facades/controller/caasmodeloperator/package_mock_test.go +++ b/apiserver/facades/controller/caasmodeloperator/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package caasmodeloperator -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/caasmodeloperator ControllerConfigService +// mockgen -typed -package caasmodeloperator -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/caasmodeloperator ControllerConfigService // // Package caasmodeloperator is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockControllerConfigService) Watch() (watcher.Watcher[[]string], error) } // Watch indicates an expected call of Watch. -func (mr *MockControllerConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) Watch() *MockControllerConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + return &MockControllerConfigServiceWatchCall{Call: call} +} + +// MockControllerConfigServiceWatchCall wrap *gomock.Call +type MockControllerConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/caasmodeloperator/package_test.go b/apiserver/facades/controller/caasmodeloperator/package_test.go index c1c9346f88b..ed3325fb7be 100644 --- a/apiserver/facades/controller/caasmodeloperator/package_test.go +++ b/apiserver/facades/controller/caasmodeloperator/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package caasmodeloperator -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/caasmodeloperator ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package caasmodeloperator -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/caasmodeloperator ControllerConfigService func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/charmdownloader/mocks/mock_watcher.go b/apiserver/facades/controller/charmdownloader/mocks/mock_watcher.go index edb5e745438..d6c0dd049b4 100644 --- a/apiserver/facades/controller/charmdownloader/mocks/mock_watcher.go +++ b/apiserver/facades/controller/charmdownloader/mocks/mock_watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/state StringsWatcher +// mockgen -typed -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/state StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -61,9 +85,33 @@ func (m *MockStringsWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockStringsWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Err() *MockStringsWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockStringsWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockStringsWatcher)(nil).Err)) + return &MockStringsWatcherErrCall{Call: call} +} + +// MockStringsWatcherErrCall wrap *gomock.Call +type MockStringsWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherErrCall) Return(arg0 error) *MockStringsWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherErrCall) Do(f func() error) *MockStringsWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherErrCall) DoAndReturn(f func() error) *MockStringsWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -73,9 +121,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -87,9 +159,33 @@ func (m *MockStringsWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockStringsWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Stop() *MockStringsWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockStringsWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockStringsWatcher)(nil).Stop)) + return &MockStringsWatcherStopCall{Call: call} +} + +// MockStringsWatcherStopCall wrap *gomock.Call +type MockStringsWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherStopCall) Return(arg0 error) *MockStringsWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherStopCall) Do(f func() error) *MockStringsWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherStopCall) DoAndReturn(f func() error) *MockStringsWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -101,7 +197,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/charmdownloader/mocks/mocks.go b/apiserver/facades/controller/charmdownloader/mocks/mocks.go index 669de8f1786..a7838a43278 100644 --- a/apiserver/facades/controller/charmdownloader/mocks/mocks.go +++ b/apiserver/facades/controller/charmdownloader/mocks/mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmdownloader StateBackend,ModelBackend,Application,Charm,Downloader,AuthChecker,ResourcesBackend +// mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmdownloader StateBackend,ModelBackend,Application,Charm,Downloader,AuthChecker,ResourcesBackend // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockStateBackend) Application(arg0 string) (charmdownloader.Application } // Application indicates an expected call of Application. -func (mr *MockStateBackendMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) Application(arg0 any) *MockStateBackendApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockStateBackend)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockStateBackend)(nil).Application), arg0) + return &MockStateBackendApplicationCall{Call: call} +} + +// MockStateBackendApplicationCall wrap *gomock.Call +type MockStateBackendApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendApplicationCall) Return(arg0 charmdownloader.Application, arg1 error) *MockStateBackendApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendApplicationCall) Do(f func(string) (charmdownloader.Application, error)) *MockStateBackendApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendApplicationCall) DoAndReturn(f func(string) (charmdownloader.Application, error)) *MockStateBackendApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -71,9 +95,33 @@ func (m *MockStateBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockStateBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockStateBackendMockRecorder) ModelUUID() *MockStateBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockStateBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockStateBackend)(nil).ModelUUID)) + return &MockStateBackendModelUUIDCall{Call: call} +} + +// MockStateBackendModelUUIDCall wrap *gomock.Call +type MockStateBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendModelUUIDCall) Return(arg0 string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendModelUUIDCall) Do(f func() string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendModelUUIDCall) DoAndReturn(f func() string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -86,9 +134,33 @@ func (m *MockStateBackend) PrepareCharmUpload(arg0 string) (services.UploadedCha } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 any) *MockStateBackendPrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockStateBackend)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockStateBackend)(nil).PrepareCharmUpload), arg0) + return &MockStateBackendPrepareCharmUploadCall{Call: call} +} + +// MockStateBackendPrepareCharmUploadCall wrap *gomock.Call +type MockStateBackendPrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendPrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendPrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendPrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -101,9 +173,33 @@ func (m *MockStateBackend) UpdateUploadedCharm(arg0 state.CharmInfo) (services.U } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 any) *MockStateBackendUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockStateBackend)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockStateBackend)(nil).UpdateUploadedCharm), arg0) + return &MockStateBackendUpdateUploadedCharmCall{Call: call} +} + +// MockStateBackendUpdateUploadedCharmCall wrap *gomock.Call +type MockStateBackendUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplicationsWithPendingCharms mocks base method. @@ -115,9 +211,33 @@ func (m *MockStateBackend) WatchApplicationsWithPendingCharms() state.StringsWat } // WatchApplicationsWithPendingCharms indicates an expected call of WatchApplicationsWithPendingCharms. -func (mr *MockStateBackendMockRecorder) WatchApplicationsWithPendingCharms() *gomock.Call { +func (mr *MockStateBackendMockRecorder) WatchApplicationsWithPendingCharms() *MockStateBackendWatchApplicationsWithPendingCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationsWithPendingCharms", reflect.TypeOf((*MockStateBackend)(nil).WatchApplicationsWithPendingCharms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationsWithPendingCharms", reflect.TypeOf((*MockStateBackend)(nil).WatchApplicationsWithPendingCharms)) + return &MockStateBackendWatchApplicationsWithPendingCharmsCall{Call: call} +} + +// MockStateBackendWatchApplicationsWithPendingCharmsCall wrap *gomock.Call +type MockStateBackendWatchApplicationsWithPendingCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendWatchApplicationsWithPendingCharmsCall) Return(arg0 state.StringsWatcher) *MockStateBackendWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendWatchApplicationsWithPendingCharmsCall) Do(f func() state.StringsWatcher) *MockStateBackendWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendWatchApplicationsWithPendingCharmsCall) DoAndReturn(f func() state.StringsWatcher) *MockStateBackendWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelBackend is a mock of ModelBackend interface. @@ -153,9 +273,33 @@ func (m *MockModelBackend) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelBackendMockRecorder) Config() *gomock.Call { +func (mr *MockModelBackendMockRecorder) Config() *MockModelBackendConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelBackend)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelBackend)(nil).Config)) + return &MockModelBackendConfigCall{Call: call} +} + +// MockModelBackendConfigCall wrap *gomock.Call +type MockModelBackendConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelBackendConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelBackendConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelBackendConfigCall) Do(f func() (*config.Config, error)) *MockModelBackendConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelBackendConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelBackendConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -192,9 +336,33 @@ func (m *MockApplication) Charm() (charmdownloader.Charm, bool, error) { } // Charm indicates an expected call of Charm. -func (mr *MockApplicationMockRecorder) Charm() *gomock.Call { +func (mr *MockApplicationMockRecorder) Charm() *MockApplicationCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockApplication)(nil).Charm)) + return &MockApplicationCharmCall{Call: call} +} + +// MockApplicationCharmCall wrap *gomock.Call +type MockApplicationCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmCall) Return(arg0 charmdownloader.Charm, arg1 bool, arg2 error) *MockApplicationCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmCall) Do(f func() (charmdownloader.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmCall) DoAndReturn(f func() (charmdownloader.Charm, bool, error)) *MockApplicationCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -206,9 +374,33 @@ func (m *MockApplication) CharmOrigin() *charm0.Origin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 *charm0.Origin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() *charm0.Origin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() *charm0.Origin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmPendingToBeDownloaded mocks base method. @@ -220,9 +412,33 @@ func (m *MockApplication) CharmPendingToBeDownloaded() bool { } // CharmPendingToBeDownloaded indicates an expected call of CharmPendingToBeDownloaded. -func (mr *MockApplicationMockRecorder) CharmPendingToBeDownloaded() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmPendingToBeDownloaded() *MockApplicationCharmPendingToBeDownloadedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmPendingToBeDownloaded", reflect.TypeOf((*MockApplication)(nil).CharmPendingToBeDownloaded)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmPendingToBeDownloaded", reflect.TypeOf((*MockApplication)(nil).CharmPendingToBeDownloaded)) + return &MockApplicationCharmPendingToBeDownloadedCall{Call: call} +} + +// MockApplicationCharmPendingToBeDownloadedCall wrap *gomock.Call +type MockApplicationCharmPendingToBeDownloadedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmPendingToBeDownloadedCall) Return(arg0 bool) *MockApplicationCharmPendingToBeDownloadedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmPendingToBeDownloadedCall) Do(f func() bool) *MockApplicationCharmPendingToBeDownloadedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmPendingToBeDownloadedCall) DoAndReturn(f func() bool) *MockApplicationCharmPendingToBeDownloadedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDownloadedIDAndHash mocks base method. @@ -234,9 +450,33 @@ func (m *MockApplication) SetDownloadedIDAndHash(arg0, arg1 string) error { } // SetDownloadedIDAndHash indicates an expected call of SetDownloadedIDAndHash. -func (mr *MockApplicationMockRecorder) SetDownloadedIDAndHash(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetDownloadedIDAndHash(arg0, arg1 any) *MockApplicationSetDownloadedIDAndHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDownloadedIDAndHash", reflect.TypeOf((*MockApplication)(nil).SetDownloadedIDAndHash), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDownloadedIDAndHash", reflect.TypeOf((*MockApplication)(nil).SetDownloadedIDAndHash), arg0, arg1) + return &MockApplicationSetDownloadedIDAndHashCall{Call: call} +} + +// MockApplicationSetDownloadedIDAndHashCall wrap *gomock.Call +type MockApplicationSetDownloadedIDAndHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetDownloadedIDAndHashCall) Return(arg0 error) *MockApplicationSetDownloadedIDAndHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetDownloadedIDAndHashCall) Do(f func(string, string) error) *MockApplicationSetDownloadedIDAndHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetDownloadedIDAndHashCall) DoAndReturn(f func(string, string) error) *MockApplicationSetDownloadedIDAndHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -248,9 +488,33 @@ func (m *MockApplication) SetStatus(arg0 status.StatusInfo) error { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockApplicationMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetStatus(arg0 any) *MockApplicationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0) + return &MockApplicationSetStatusCall{Call: call} +} + +// MockApplicationSetStatusCall wrap *gomock.Call +type MockApplicationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetStatusCall) Return(arg0 error) *MockApplicationSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetStatusCall) Do(f func(status.StatusInfo) error) *MockApplicationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetStatusCall) DoAndReturn(f func(status.StatusInfo) error) *MockApplicationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -285,9 +549,33 @@ func (m *MockCharm) URL() string { } // URL indicates an expected call of URL. -func (mr *MockCharmMockRecorder) URL() *gomock.Call { +func (mr *MockCharmMockRecorder) URL() *MockCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + return &MockCharmURLCall{Call: call} +} + +// MockCharmURLCall wrap *gomock.Call +type MockCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmURLCall) Return(arg0 string) *MockCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmURLCall) Do(f func() string) *MockCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmURLCall) DoAndReturn(f func() string) *MockCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDownloader is a mock of Downloader interface. @@ -323,9 +611,33 @@ func (m *MockDownloader) DownloadAndStore(arg0 context.Context, arg1 *charm.URL, } // DownloadAndStore indicates an expected call of DownloadAndStore. -func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *MockDownloaderDownloadAndStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + return &MockDownloaderDownloadAndStoreCall{Call: call} +} + +// MockDownloaderDownloadAndStoreCall wrap *gomock.Call +type MockDownloaderDownloadAndStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDownloaderDownloadAndStoreCall) Return(arg0 charm0.Origin, arg1 error) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDownloaderDownloadAndStoreCall) Do(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDownloaderDownloadAndStoreCall) DoAndReturn(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAuthChecker is a mock of AuthChecker interface. @@ -360,9 +672,33 @@ func (m *MockAuthChecker) AuthController() bool { } // AuthController indicates an expected call of AuthController. -func (mr *MockAuthCheckerMockRecorder) AuthController() *gomock.Call { +func (mr *MockAuthCheckerMockRecorder) AuthController() *MockAuthCheckerAuthControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthChecker)(nil).AuthController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthController", reflect.TypeOf((*MockAuthChecker)(nil).AuthController)) + return &MockAuthCheckerAuthControllerCall{Call: call} +} + +// MockAuthCheckerAuthControllerCall wrap *gomock.Call +type MockAuthCheckerAuthControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthCheckerAuthControllerCall) Return(arg0 bool) *MockAuthCheckerAuthControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthCheckerAuthControllerCall) Do(f func() bool) *MockAuthCheckerAuthControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthCheckerAuthControllerCall) DoAndReturn(f func() bool) *MockAuthCheckerAuthControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockResourcesBackend is a mock of ResourcesBackend interface. @@ -397,7 +733,31 @@ func (m *MockResourcesBackend) Register(arg0 worker.Worker) string { } // Register indicates an expected call of Register. -func (mr *MockResourcesBackendMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockResourcesBackendMockRecorder) Register(arg0 any) *MockResourcesBackendRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResourcesBackend)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockResourcesBackend)(nil).Register), arg0) + return &MockResourcesBackendRegisterCall{Call: call} +} + +// MockResourcesBackendRegisterCall wrap *gomock.Call +type MockResourcesBackendRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesBackendRegisterCall) Return(arg0 string) *MockResourcesBackendRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesBackendRegisterCall) Do(f func(worker.Worker) string) *MockResourcesBackendRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesBackendRegisterCall) DoAndReturn(f func(worker.Worker) string) *MockResourcesBackendRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/charmdownloader/package_test.go b/apiserver/facades/controller/charmdownloader/package_test.go index 5bd91579120..cd8fefe0005 100644 --- a/apiserver/facades/controller/charmdownloader/package_test.go +++ b/apiserver/facades/controller/charmdownloader/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmdownloader StateBackend,ModelBackend,Application,Charm,Downloader,AuthChecker,ResourcesBackend -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/state StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmdownloader StateBackend,ModelBackend,Application,Charm,Downloader,AuthChecker,ResourcesBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/state StringsWatcher func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/charmrevisionupdater/mocks/mocks.go b/apiserver/facades/controller/charmrevisionupdater/mocks/mocks.go index b3b82e21d47..3a394ee45e4 100644 --- a/apiserver/facades/controller/charmrevisionupdater/mocks/mocks.go +++ b/apiserver/facades/controller/charmrevisionupdater/mocks/mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater Application,CharmhubRefreshClient,Model,State +// mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater Application,CharmhubRefreshClient,Model,State // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockApplication) ApplicationTag() names.ApplicationTag { } // ApplicationTag indicates an expected call of ApplicationTag. -func (mr *MockApplicationMockRecorder) ApplicationTag() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationTag() *MockApplicationApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockApplication)(nil).ApplicationTag)) + return &MockApplicationApplicationTagCall{Call: call} +} + +// MockApplicationApplicationTagCall wrap *gomock.Call +type MockApplicationApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -71,9 +95,33 @@ func (m *MockApplication) CharmOrigin() *state.CharmOrigin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() *state.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -86,9 +134,33 @@ func (m *MockApplication) CharmURL() (*string, bool) { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 *string, arg1 bool) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() (*string, bool)) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitCount mocks base method. @@ -100,9 +172,33 @@ func (m *MockApplication) UnitCount() int { } // UnitCount indicates an expected call of UnitCount. -func (mr *MockApplicationMockRecorder) UnitCount() *gomock.Call { +func (mr *MockApplicationMockRecorder) UnitCount() *MockApplicationUnitCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitCount", reflect.TypeOf((*MockApplication)(nil).UnitCount)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitCount", reflect.TypeOf((*MockApplication)(nil).UnitCount)) + return &MockApplicationUnitCountCall{Call: call} +} + +// MockApplicationUnitCountCall wrap *gomock.Call +type MockApplicationUnitCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnitCountCall) Return(arg0 int) *MockApplicationUnitCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnitCountCall) Do(f func() int) *MockApplicationUnitCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnitCountCall) DoAndReturn(f func() int) *MockApplicationUnitCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmhubRefreshClient is a mock of CharmhubRefreshClient interface. @@ -137,9 +233,33 @@ func (m *MockCharmhubRefreshClient) RefreshWithMetricsOnly(arg0 context.Context, } // RefreshWithMetricsOnly indicates an expected call of RefreshWithMetricsOnly. -func (mr *MockCharmhubRefreshClientMockRecorder) RefreshWithMetricsOnly(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmhubRefreshClientMockRecorder) RefreshWithMetricsOnly(arg0, arg1 any) *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshWithMetricsOnly", reflect.TypeOf((*MockCharmhubRefreshClient)(nil).RefreshWithMetricsOnly), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshWithMetricsOnly", reflect.TypeOf((*MockCharmhubRefreshClient)(nil).RefreshWithMetricsOnly), arg0, arg1) + return &MockCharmhubRefreshClientRefreshWithMetricsOnlyCall{Call: call} +} + +// MockCharmhubRefreshClientRefreshWithMetricsOnlyCall wrap *gomock.Call +type MockCharmhubRefreshClientRefreshWithMetricsOnlyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall) Return(arg0 error) *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall) Do(f func(context.Context, map[metrics.MetricKey]map[metrics.MetricKey]string) error) *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall) DoAndReturn(f func(context.Context, map[metrics.MetricKey]map[metrics.MetricKey]string) error) *MockCharmhubRefreshClientRefreshWithMetricsOnlyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RefreshWithRequestMetrics mocks base method. @@ -152,9 +272,33 @@ func (m *MockCharmhubRefreshClient) RefreshWithRequestMetrics(arg0 context.Conte } // RefreshWithRequestMetrics indicates an expected call of RefreshWithRequestMetrics. -func (mr *MockCharmhubRefreshClientMockRecorder) RefreshWithRequestMetrics(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmhubRefreshClientMockRecorder) RefreshWithRequestMetrics(arg0, arg1, arg2 any) *MockCharmhubRefreshClientRefreshWithRequestMetricsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshWithRequestMetrics", reflect.TypeOf((*MockCharmhubRefreshClient)(nil).RefreshWithRequestMetrics), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshWithRequestMetrics", reflect.TypeOf((*MockCharmhubRefreshClient)(nil).RefreshWithRequestMetrics), arg0, arg1, arg2) + return &MockCharmhubRefreshClientRefreshWithRequestMetricsCall{Call: call} +} + +// MockCharmhubRefreshClientRefreshWithRequestMetricsCall wrap *gomock.Call +type MockCharmhubRefreshClientRefreshWithRequestMetricsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmhubRefreshClientRefreshWithRequestMetricsCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmhubRefreshClientRefreshWithRequestMetricsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmhubRefreshClientRefreshWithRequestMetricsCall) Do(f func(context.Context, charmhub.RefreshConfig, map[metrics.MetricKey]map[metrics.MetricKey]string) ([]transport.RefreshResponse, error)) *MockCharmhubRefreshClientRefreshWithRequestMetricsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmhubRefreshClientRefreshWithRequestMetricsCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig, map[metrics.MetricKey]map[metrics.MetricKey]string) ([]transport.RefreshResponse, error)) *MockCharmhubRefreshClientRefreshWithRequestMetricsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -189,9 +333,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -203,9 +371,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -218,9 +410,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsControllerModel mocks base method. @@ -232,9 +448,33 @@ func (m *MockModel) IsControllerModel() bool { } // IsControllerModel indicates an expected call of IsControllerModel. -func (mr *MockModelMockRecorder) IsControllerModel() *gomock.Call { +func (mr *MockModelMockRecorder) IsControllerModel() *MockModelIsControllerModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsControllerModel", reflect.TypeOf((*MockModel)(nil).IsControllerModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsControllerModel", reflect.TypeOf((*MockModel)(nil).IsControllerModel)) + return &MockModelIsControllerModelCall{Call: call} +} + +// MockModelIsControllerModelCall wrap *gomock.Call +type MockModelIsControllerModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelIsControllerModelCall) Return(arg0 bool) *MockModelIsControllerModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelIsControllerModelCall) Do(f func() bool) *MockModelIsControllerModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelIsControllerModelCall) DoAndReturn(f func() bool) *MockModelIsControllerModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Metrics mocks base method. @@ -247,9 +487,33 @@ func (m *MockModel) Metrics() (state.ModelMetrics, error) { } // Metrics indicates an expected call of Metrics. -func (mr *MockModelMockRecorder) Metrics() *gomock.Call { +func (mr *MockModelMockRecorder) Metrics() *MockModelMetricsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metrics", reflect.TypeOf((*MockModel)(nil).Metrics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metrics", reflect.TypeOf((*MockModel)(nil).Metrics)) + return &MockModelMetricsCall{Call: call} +} + +// MockModelMetricsCall wrap *gomock.Call +type MockModelMetricsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMetricsCall) Return(arg0 state.ModelMetrics, arg1 error) *MockModelMetricsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMetricsCall) Do(f func() (state.ModelMetrics, error)) *MockModelMetricsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMetricsCall) DoAndReturn(f func() (state.ModelMetrics, error)) *MockModelMetricsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -261,9 +525,33 @@ func (m *MockModel) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockModelMockRecorder) ModelTag() *gomock.Call { +func (mr *MockModelMockRecorder) ModelTag() *MockModelModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockModel)(nil).ModelTag)) + return &MockModelModelTagCall{Call: call} +} + +// MockModelModelTagCall wrap *gomock.Call +type MockModelModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelModelTagCall) Return(arg0 names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelModelTagCall) Do(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UUID mocks base method. @@ -275,9 +563,33 @@ func (m *MockModel) UUID() string { } // UUID indicates an expected call of UUID. -func (mr *MockModelMockRecorder) UUID() *gomock.Call { +func (mr *MockModelMockRecorder) UUID() *MockModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UUID", reflect.TypeOf((*MockModel)(nil).UUID)) + return &MockModelUUIDCall{Call: call} +} + +// MockModelUUIDCall wrap *gomock.Call +type MockModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUUIDCall) Return(arg0 string) *MockModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUUIDCall) Do(f func() string) *MockModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUUIDCall) DoAndReturn(f func() string) *MockModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockState is a mock of State interface. @@ -312,9 +624,33 @@ func (m *MockState) AddCharmPlaceholder(arg0 *charm.URL) error { } // AddCharmPlaceholder indicates an expected call of AddCharmPlaceholder. -func (mr *MockStateMockRecorder) AddCharmPlaceholder(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddCharmPlaceholder(arg0 any) *MockStateAddCharmPlaceholderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmPlaceholder", reflect.TypeOf((*MockState)(nil).AddCharmPlaceholder), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharmPlaceholder", reflect.TypeOf((*MockState)(nil).AddCharmPlaceholder), arg0) + return &MockStateAddCharmPlaceholderCall{Call: call} +} + +// MockStateAddCharmPlaceholderCall wrap *gomock.Call +type MockStateAddCharmPlaceholderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddCharmPlaceholderCall) Return(arg0 error) *MockStateAddCharmPlaceholderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddCharmPlaceholderCall) Do(f func(*charm.URL) error) *MockStateAddCharmPlaceholderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddCharmPlaceholderCall) DoAndReturn(f func(*charm.URL) error) *MockStateAddCharmPlaceholderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AliveRelationKeys mocks base method. @@ -326,9 +662,33 @@ func (m *MockState) AliveRelationKeys() []string { } // AliveRelationKeys indicates an expected call of AliveRelationKeys. -func (mr *MockStateMockRecorder) AliveRelationKeys() *gomock.Call { +func (mr *MockStateMockRecorder) AliveRelationKeys() *MockStateAliveRelationKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveRelationKeys", reflect.TypeOf((*MockState)(nil).AliveRelationKeys)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveRelationKeys", reflect.TypeOf((*MockState)(nil).AliveRelationKeys)) + return &MockStateAliveRelationKeysCall{Call: call} +} + +// MockStateAliveRelationKeysCall wrap *gomock.Call +type MockStateAliveRelationKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAliveRelationKeysCall) Return(arg0 []string) *MockStateAliveRelationKeysCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAliveRelationKeysCall) Do(f func() []string) *MockStateAliveRelationKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAliveRelationKeysCall) DoAndReturn(f func() []string) *MockStateAliveRelationKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllApplications mocks base method. @@ -341,9 +701,33 @@ func (m *MockState) AllApplications() ([]charmrevisionupdater.Application, error } // AllApplications indicates an expected call of AllApplications. -func (mr *MockStateMockRecorder) AllApplications() *gomock.Call { +func (mr *MockStateMockRecorder) AllApplications() *MockStateAllApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockState)(nil).AllApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockState)(nil).AllApplications)) + return &MockStateAllApplicationsCall{Call: call} +} + +// MockStateAllApplicationsCall wrap *gomock.Call +type MockStateAllApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllApplicationsCall) Return(arg0 []charmrevisionupdater.Application, arg1 error) *MockStateAllApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllApplicationsCall) Do(f func() ([]charmrevisionupdater.Application, error)) *MockStateAllApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllApplicationsCall) DoAndReturn(f func() ([]charmrevisionupdater.Application, error)) *MockStateAllApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -356,9 +740,33 @@ func (m *MockState) Charm(arg0 string) (*state.Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Charm(arg0 any) *MockStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockState)(nil).Charm), arg0) + return &MockStateCharmCall{Call: call} +} + +// MockStateCharmCall wrap *gomock.Call +type MockStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCharmCall) Return(arg0 *state.Charm, arg1 error) *MockStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCharmCall) Do(f func(string) (*state.Charm, error)) *MockStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCharmCall) DoAndReturn(f func(string) (*state.Charm, error)) *MockStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerUUID mocks base method. @@ -370,9 +778,33 @@ func (m *MockState) ControllerUUID() string { } // ControllerUUID indicates an expected call of ControllerUUID. -func (mr *MockStateMockRecorder) ControllerUUID() *gomock.Call { +func (mr *MockStateMockRecorder) ControllerUUID() *MockStateControllerUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockState)(nil).ControllerUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerUUID", reflect.TypeOf((*MockState)(nil).ControllerUUID)) + return &MockStateControllerUUIDCall{Call: call} +} + +// MockStateControllerUUIDCall wrap *gomock.Call +type MockStateControllerUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateControllerUUIDCall) Return(arg0 string) *MockStateControllerUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateControllerUUIDCall) Do(f func() string) *MockStateControllerUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateControllerUUIDCall) DoAndReturn(f func() string) *MockStateControllerUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -385,9 +817,33 @@ func (m *MockState) Model() (charmrevisionupdater.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateMockRecorder) Model() *gomock.Call { +func (mr *MockStateMockRecorder) Model() *MockStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockState)(nil).Model)) + return &MockStateModelCall{Call: call} +} + +// MockStateModelCall wrap *gomock.Call +type MockStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelCall) Return(arg0 charmrevisionupdater.Model, arg1 error) *MockStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelCall) Do(f func() (charmrevisionupdater.Model, error)) *MockStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelCall) DoAndReturn(f func() (charmrevisionupdater.Model, error)) *MockStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Resources mocks base method. @@ -399,7 +855,31 @@ func (m *MockState) Resources(arg0 objectstore.ObjectStore) state.Resources { } // Resources indicates an expected call of Resources. -func (mr *MockStateMockRecorder) Resources(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Resources(arg0 any) *MockStateResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockState)(nil).Resources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockState)(nil).Resources), arg0) + return &MockStateResourcesCall{Call: call} +} + +// MockStateResourcesCall wrap *gomock.Call +type MockStateResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateResourcesCall) Return(arg0 state.Resources) *MockStateResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateResourcesCall) Do(f func(objectstore.ObjectStore) state.Resources) *MockStateResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateResourcesCall) DoAndReturn(f func(objectstore.ObjectStore) state.Resources) *MockStateResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/charmrevisionupdater/mocks/objectstore.go b/apiserver/facades/controller/charmrevisionupdater/mocks/objectstore.go index e3995451b8c..a3d8b45c225 100644 --- a/apiserver/facades/controller/charmrevisionupdater/mocks/objectstore.go +++ b/apiserver/facades/controller/charmrevisionupdater/mocks/objectstore.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/charmrevisionupdater/package_test.go b/apiserver/facades/controller/charmrevisionupdater/package_test.go index 4f091d00b0c..e49301d3f5c 100644 --- a/apiserver/facades/controller/charmrevisionupdater/package_test.go +++ b/apiserver/facades/controller/charmrevisionupdater/package_test.go @@ -9,8 +9,8 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater Application,CharmhubRefreshClient,Model,State -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater Application,CharmhubRefreshClient,Model,State +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/controller/crossmodelrelations/package_test.go b/apiserver/facades/controller/crossmodelrelations/package_test.go index d231f5b9a4e..b1162631093 100644 --- a/apiserver/facades/controller/crossmodelrelations/package_test.go +++ b/apiserver/facades/controller/crossmodelrelations/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package crossmodelrelations_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/crossmodelrelations ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package crossmodelrelations_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/crossmodelrelations ModelConfigService func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/crossmodelrelations/service_mock_test.go b/apiserver/facades/controller/crossmodelrelations/service_mock_test.go index e3c65a3bd20..ebbec73af9a 100644 --- a/apiserver/facades/controller/crossmodelrelations/service_mock_test.go +++ b/apiserver/facades/controller/crossmodelrelations/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package crossmodelrelations_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/crossmodelrelations ModelConfigService +// mockgen -typed -package crossmodelrelations_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/crossmodelrelations ModelConfigService // // Package crossmodelrelations_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/crossmodelsecrets/mocks/crossmodel.go b/apiserver/facades/controller/crossmodelsecrets/mocks/crossmodel.go index f8b2a244091..f806891ad2b 100644 --- a/apiserver/facades/controller/crossmodelsecrets/mocks/crossmodel.go +++ b/apiserver/facades/controller/crossmodelsecrets/mocks/crossmodel.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets CrossModelState +// mockgen -typed -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets CrossModelState // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockCrossModelState) GetRemoteApplicationTag(arg0 string) (names.Tag, e } // GetRemoteApplicationTag indicates an expected call of GetRemoteApplicationTag. -func (mr *MockCrossModelStateMockRecorder) GetRemoteApplicationTag(arg0 any) *gomock.Call { +func (mr *MockCrossModelStateMockRecorder) GetRemoteApplicationTag(arg0 any) *MockCrossModelStateGetRemoteApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteApplicationTag", reflect.TypeOf((*MockCrossModelState)(nil).GetRemoteApplicationTag), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteApplicationTag", reflect.TypeOf((*MockCrossModelState)(nil).GetRemoteApplicationTag), arg0) + return &MockCrossModelStateGetRemoteApplicationTagCall{Call: call} +} + +// MockCrossModelStateGetRemoteApplicationTagCall wrap *gomock.Call +type MockCrossModelStateGetRemoteApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelStateGetRemoteApplicationTagCall) Return(arg0 names.Tag, arg1 error) *MockCrossModelStateGetRemoteApplicationTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelStateGetRemoteApplicationTagCall) Do(f func(string) (names.Tag, error)) *MockCrossModelStateGetRemoteApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelStateGetRemoteApplicationTagCall) DoAndReturn(f func(string) (names.Tag, error)) *MockCrossModelStateGetRemoteApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetToken mocks base method. @@ -64,7 +88,31 @@ func (m *MockCrossModelState) GetToken(arg0 names.Tag) (string, error) { } // GetToken indicates an expected call of GetToken. -func (mr *MockCrossModelStateMockRecorder) GetToken(arg0 any) *gomock.Call { +func (mr *MockCrossModelStateMockRecorder) GetToken(arg0 any) *MockCrossModelStateGetTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockCrossModelState)(nil).GetToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockCrossModelState)(nil).GetToken), arg0) + return &MockCrossModelStateGetTokenCall{Call: call} +} + +// MockCrossModelStateGetTokenCall wrap *gomock.Call +type MockCrossModelStateGetTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelStateGetTokenCall) Return(arg0 string, arg1 error) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelStateGetTokenCall) Do(f func(names.Tag) (string, error)) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelStateGetTokenCall) DoAndReturn(f func(names.Tag) (string, error)) *MockCrossModelStateGetTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/crossmodelsecrets/mocks/secretservice.go b/apiserver/facades/controller/crossmodelsecrets/mocks/secretservice.go index 46f01b5ffb1..4509d4adfbf 100644 --- a/apiserver/facades/controller/crossmodelsecrets/mocks/secretservice.go +++ b/apiserver/facades/controller/crossmodelsecrets/mocks/secretservice.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets SecretService,SecretBackendService +// mockgen -typed -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets SecretService,SecretBackendService // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockSecretService) GetSecret(arg0 context.Context, arg1 *secrets.URI) ( } // GetSecret indicates an expected call of GetSecret. -func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *MockSecretServiceGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + return &MockSecretServiceGetSecretCall{Call: call} +} + +// MockSecretServiceGetSecretCall wrap *gomock.Call +type MockSecretServiceGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretCall) Return(arg0 *secrets.SecretMetadata, arg1 error) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretCall) Do(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretCall) DoAndReturn(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretAccessScope mocks base method. @@ -68,9 +92,33 @@ func (m *MockSecretService) GetSecretAccessScope(arg0 context.Context, arg1 *sec } // GetSecretAccessScope indicates an expected call of GetSecretAccessScope. -func (mr *MockSecretServiceMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *MockSecretServiceGetSecretAccessScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockSecretService)(nil).GetSecretAccessScope), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockSecretService)(nil).GetSecretAccessScope), arg0, arg1, arg2) + return &MockSecretServiceGetSecretAccessScopeCall{Call: call} +} + +// MockSecretServiceGetSecretAccessScopeCall wrap *gomock.Call +type MockSecretServiceGetSecretAccessScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretAccessScopeCall) Return(arg0 service.SecretAccessScope, arg1 error) *MockSecretServiceGetSecretAccessScopeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretAccessScopeCall) Do(f func(context.Context, *secrets.URI, service.SecretAccessor) (service.SecretAccessScope, error)) *MockSecretServiceGetSecretAccessScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretAccessScopeCall) DoAndReturn(f func(context.Context, *secrets.URI, service.SecretAccessor) (service.SecretAccessScope, error)) *MockSecretServiceGetSecretAccessScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretValue mocks base method. @@ -84,9 +132,33 @@ func (m *MockSecretService) GetSecretValue(arg0 context.Context, arg1 *secrets.U } // GetSecretValue indicates an expected call of GetSecretValue. -func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *MockSecretServiceGetSecretValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + return &MockSecretServiceGetSecretValueCall{Call: call} +} + +// MockSecretServiceGetSecretValueCall wrap *gomock.Call +type MockSecretServiceGetSecretValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretValueCall) Return(arg0 secrets.SecretValue, arg1 *secrets.ValueRef, arg2 error) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretValueCall) Do(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretValueCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListGrantedSecretsForBackend mocks base method. @@ -103,10 +175,34 @@ func (m *MockSecretService) ListGrantedSecretsForBackend(arg0 context.Context, a } // ListGrantedSecretsForBackend indicates an expected call of ListGrantedSecretsForBackend. -func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2 any, arg3 ...any) *MockSecretServiceListGrantedSecretsForBackendCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + return &MockSecretServiceListGrantedSecretsForBackendCall{Call: call} +} + +// MockSecretServiceListGrantedSecretsForBackendCall wrap *gomock.Call +type MockSecretServiceListGrantedSecretsForBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Return(arg0 []*secrets.SecretRevisionRef, arg1 error) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Do(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListGrantedSecretsForBackendCall) DoAndReturn(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateRemoteConsumedRevision mocks base method. @@ -119,9 +215,33 @@ func (m *MockSecretService) UpdateRemoteConsumedRevision(arg0 context.Context, a } // UpdateRemoteConsumedRevision indicates an expected call of UpdateRemoteConsumedRevision. -func (mr *MockSecretServiceMockRecorder) UpdateRemoteConsumedRevision(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) UpdateRemoteConsumedRevision(arg0, arg1, arg2, arg3 any) *MockSecretServiceUpdateRemoteConsumedRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteConsumedRevision", reflect.TypeOf((*MockSecretService)(nil).UpdateRemoteConsumedRevision), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteConsumedRevision", reflect.TypeOf((*MockSecretService)(nil).UpdateRemoteConsumedRevision), arg0, arg1, arg2, arg3) + return &MockSecretServiceUpdateRemoteConsumedRevisionCall{Call: call} +} + +// MockSecretServiceUpdateRemoteConsumedRevisionCall wrap *gomock.Call +type MockSecretServiceUpdateRemoteConsumedRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceUpdateRemoteConsumedRevisionCall) Return(arg0 int, arg1 error) *MockSecretServiceUpdateRemoteConsumedRevisionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceUpdateRemoteConsumedRevisionCall) Do(f func(context.Context, *secrets.URI, string, bool) (int, error)) *MockSecretServiceUpdateRemoteConsumedRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceUpdateRemoteConsumedRevisionCall) DoAndReturn(f func(context.Context, *secrets.URI, string, bool) (int, error)) *MockSecretServiceUpdateRemoteConsumedRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -157,7 +277,31 @@ func (m *MockSecretBackendService) BackendConfigInfo(arg0 context.Context, arg1 } // BackendConfigInfo indicates an expected call of BackendConfigInfo. -func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(arg0, arg1 any) *MockSecretBackendServiceBackendConfigInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), arg0, arg1) + return &MockSecretBackendServiceBackendConfigInfoCall{Call: call} +} + +// MockSecretBackendServiceBackendConfigInfoCall wrap *gomock.Call +type MockSecretBackendServiceBackendConfigInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceBackendConfigInfoCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceBackendConfigInfoCall) Do(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceBackendConfigInfoCall) DoAndReturn(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/crossmodelsecrets/mocks/statebackend.go b/apiserver/facades/controller/crossmodelsecrets/mocks/statebackend.go index d561f9345c4..443ee2bf969 100644 --- a/apiserver/facades/controller/crossmodelsecrets/mocks/statebackend.go +++ b/apiserver/facades/controller/crossmodelsecrets/mocks/statebackend.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/statebackend.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets StateBackend +// mockgen -typed -package mocks -destination mocks/statebackend.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets StateBackend // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockStateBackend) HasEndpoint(arg0, arg1 string) (bool, error) { } // HasEndpoint indicates an expected call of HasEndpoint. -func (mr *MockStateBackendMockRecorder) HasEndpoint(arg0, arg1 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) HasEndpoint(arg0, arg1 any) *MockStateBackendHasEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasEndpoint", reflect.TypeOf((*MockStateBackend)(nil).HasEndpoint), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasEndpoint", reflect.TypeOf((*MockStateBackend)(nil).HasEndpoint), arg0, arg1) + return &MockStateBackendHasEndpointCall{Call: call} +} + +// MockStateBackendHasEndpointCall wrap *gomock.Call +type MockStateBackendHasEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendHasEndpointCall) Return(arg0 bool, arg1 error) *MockStateBackendHasEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendHasEndpointCall) Do(f func(string, string) (bool, error)) *MockStateBackendHasEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendHasEndpointCall) DoAndReturn(f func(string, string) (bool, error)) *MockStateBackendHasEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/crossmodelsecrets/package_test.go b/apiserver/facades/controller/crossmodelsecrets/package_test.go index 0a81b725c75..c8e26a2ac39 100644 --- a/apiserver/facades/controller/crossmodelsecrets/package_test.go +++ b/apiserver/facades/controller/crossmodelsecrets/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets SecretService,SecretBackendService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/statebackend.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets StateBackend -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets CrossModelState +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretservice.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets SecretService,SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/statebackend.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets StateBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/crossmodel.go github.com/juju/juju/apiserver/facades/controller/crossmodelsecrets CrossModelState func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/externalcontrollerupdater/domain_mock_test.go b/apiserver/facades/controller/externalcontrollerupdater/domain_mock_test.go index 173216a1f80..3a770ed8927 100644 --- a/apiserver/facades/controller/externalcontrollerupdater/domain_mock_test.go +++ b/apiserver/facades/controller/externalcontrollerupdater/domain_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package externalcontrollerupdater_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/externalcontrollerupdater ECService +// mockgen -typed -package externalcontrollerupdater_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/externalcontrollerupdater ECService // // Package externalcontrollerupdater_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockECService) Controller(arg0 context.Context, arg1 string) (*crossmod } // Controller indicates an expected call of Controller. -func (mr *MockECServiceMockRecorder) Controller(arg0, arg1 any) *gomock.Call { +func (mr *MockECServiceMockRecorder) Controller(arg0, arg1 any) *MockECServiceControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockECService)(nil).Controller), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockECService)(nil).Controller), arg0, arg1) + return &MockECServiceControllerCall{Call: call} +} + +// MockECServiceControllerCall wrap *gomock.Call +type MockECServiceControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockECServiceControllerCall) Return(arg0 *crossmodel.ControllerInfo, arg1 error) *MockECServiceControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockECServiceControllerCall) Do(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockECServiceControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockECServiceControllerCall) DoAndReturn(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockECServiceControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateExternalController mocks base method. @@ -65,9 +89,33 @@ func (m *MockECService) UpdateExternalController(arg0 context.Context, arg1 cros } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockECServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockECServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *MockECServiceUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockECService)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockECService)(nil).UpdateExternalController), arg0, arg1) + return &MockECServiceUpdateExternalControllerCall{Call: call} +} + +// MockECServiceUpdateExternalControllerCall wrap *gomock.Call +type MockECServiceUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockECServiceUpdateExternalControllerCall) Return(arg0 error) *MockECServiceUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockECServiceUpdateExternalControllerCall) Do(f func(context.Context, crossmodel.ControllerInfo) error) *MockECServiceUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockECServiceUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel.ControllerInfo) error) *MockECServiceUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -80,7 +128,31 @@ func (m *MockECService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockECServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockECServiceMockRecorder) Watch() *MockECServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockECService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockECService)(nil).Watch)) + return &MockECServiceWatchCall{Call: call} +} + +// MockECServiceWatchCall wrap *gomock.Call +type MockECServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockECServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockECServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockECServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockECServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockECServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockECServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/externalcontrollerupdater/package_test.go b/apiserver/facades/controller/externalcontrollerupdater/package_test.go index 5b1c5a965dd..87fb9bb7f30 100644 --- a/apiserver/facades/controller/externalcontrollerupdater/package_test.go +++ b/apiserver/facades/controller/externalcontrollerupdater/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package externalcontrollerupdater_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/externalcontrollerupdater ECService -//go:generate go run go.uber.org/mock/mockgen -package externalcontrollerupdater_test -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package externalcontrollerupdater_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/externalcontrollerupdater ECService +//go:generate go run go.uber.org/mock/mockgen -typed -package externalcontrollerupdater_test -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/externalcontrollerupdater/watcher_mock_test.go b/apiserver/facades/controller/externalcontrollerupdater/watcher_mock_test.go index a0e7911df99..d685158ed22 100644 --- a/apiserver/facades/controller/externalcontrollerupdater/watcher_mock_test.go +++ b/apiserver/facades/controller/externalcontrollerupdater/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package externalcontrollerupdater_test -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package externalcontrollerupdater_test -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher // // Package externalcontrollerupdater_test is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/firewaller/package_mock_test.go b/apiserver/facades/controller/firewaller/package_mock_test.go index 98220c3fcb2..2a72e133754 100644 --- a/apiserver/facades/controller/firewaller/package_mock_test.go +++ b/apiserver/facades/controller/firewaller/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package firewaller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller State,ControllerConfigAPI +// mockgen -typed -package firewaller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller State,ControllerConfigAPI // // Package firewaller_test is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockState) AllEndpointBindings() (map[string]map[string]string, error) } // AllEndpointBindings indicates an expected call of AllEndpointBindings. -func (mr *MockStateMockRecorder) AllEndpointBindings() *gomock.Call { +func (mr *MockStateMockRecorder) AllEndpointBindings() *MockStateAllEndpointBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllEndpointBindings", reflect.TypeOf((*MockState)(nil).AllEndpointBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllEndpointBindings", reflect.TypeOf((*MockState)(nil).AllEndpointBindings)) + return &MockStateAllEndpointBindingsCall{Call: call} +} + +// MockStateAllEndpointBindingsCall wrap *gomock.Call +type MockStateAllEndpointBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllEndpointBindingsCall) Return(arg0 map[string]map[string]string, arg1 error) *MockStateAllEndpointBindingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllEndpointBindingsCall) Do(f func() (map[string]map[string]string, error)) *MockStateAllEndpointBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllEndpointBindingsCall) DoAndReturn(f func() (map[string]map[string]string, error)) *MockStateAllEndpointBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -70,9 +94,33 @@ func (m *MockState) Application(arg0 string) (firewall.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Application(arg0 any) *MockStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockState)(nil).Application), arg0) + return &MockStateApplicationCall{Call: call} +} + +// MockStateApplicationCall wrap *gomock.Call +type MockStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateApplicationCall) Return(arg0 firewall.Application, arg1 error) *MockStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateApplicationCall) Do(f func(string) (firewall.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateApplicationCall) DoAndReturn(f func(string) (firewall.Application, error)) *MockStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindEntity mocks base method. @@ -85,9 +133,33 @@ func (m *MockState) FindEntity(arg0 names.Tag) (state.Entity, error) { } // FindEntity indicates an expected call of FindEntity. -func (mr *MockStateMockRecorder) FindEntity(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) FindEntity(arg0 any) *MockStateFindEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockState)(nil).FindEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindEntity", reflect.TypeOf((*MockState)(nil).FindEntity), arg0) + return &MockStateFindEntityCall{Call: call} +} + +// MockStateFindEntityCall wrap *gomock.Call +type MockStateFindEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateFindEntityCall) Return(arg0 state.Entity, arg1 error) *MockStateFindEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateFindEntityCall) Do(f func(names.Tag) (state.Entity, error)) *MockStateFindEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateFindEntityCall) DoAndReturn(f func(names.Tag) (state.Entity, error)) *MockStateFindEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetMacaroon mocks base method. @@ -100,9 +172,33 @@ func (m *MockState) GetMacaroon(arg0 names.Tag) (*macaroon.Macaroon, error) { } // GetMacaroon indicates an expected call of GetMacaroon. -func (mr *MockStateMockRecorder) GetMacaroon(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetMacaroon(arg0 any) *MockStateGetMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMacaroon", reflect.TypeOf((*MockState)(nil).GetMacaroon), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMacaroon", reflect.TypeOf((*MockState)(nil).GetMacaroon), arg0) + return &MockStateGetMacaroonCall{Call: call} +} + +// MockStateGetMacaroonCall wrap *gomock.Call +type MockStateGetMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetMacaroonCall) Return(arg0 *macaroon.Macaroon, arg1 error) *MockStateGetMacaroonCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetMacaroonCall) Do(f func(names.Tag) (*macaroon.Macaroon, error)) *MockStateGetMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetMacaroonCall) DoAndReturn(f func(names.Tag) (*macaroon.Macaroon, error)) *MockStateGetMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsController mocks base method. @@ -114,9 +210,33 @@ func (m *MockState) IsController() bool { } // IsController indicates an expected call of IsController. -func (mr *MockStateMockRecorder) IsController() *gomock.Call { +func (mr *MockStateMockRecorder) IsController() *MockStateIsControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsController", reflect.TypeOf((*MockState)(nil).IsController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsController", reflect.TypeOf((*MockState)(nil).IsController)) + return &MockStateIsControllerCall{Call: call} +} + +// MockStateIsControllerCall wrap *gomock.Call +type MockStateIsControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateIsControllerCall) Return(arg0 bool) *MockStateIsControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateIsControllerCall) Do(f func() bool) *MockStateIsControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateIsControllerCall) DoAndReturn(f func() bool) *MockStateIsControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // KeyRelation mocks base method. @@ -129,9 +249,33 @@ func (m *MockState) KeyRelation(arg0 string) (firewall.Relation, error) { } // KeyRelation indicates an expected call of KeyRelation. -func (mr *MockStateMockRecorder) KeyRelation(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) KeyRelation(arg0 any) *MockStateKeyRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockState)(nil).KeyRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockState)(nil).KeyRelation), arg0) + return &MockStateKeyRelationCall{Call: call} +} + +// MockStateKeyRelationCall wrap *gomock.Call +type MockStateKeyRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateKeyRelationCall) Return(arg0 firewall.Relation, arg1 error) *MockStateKeyRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateKeyRelationCall) Do(f func(string) (firewall.Relation, error)) *MockStateKeyRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateKeyRelationCall) DoAndReturn(f func(string) (firewall.Relation, error)) *MockStateKeyRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -144,9 +288,33 @@ func (m *MockState) Machine(arg0 string) (firewall.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Machine(arg0 any) *MockStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockState)(nil).Machine), arg0) + return &MockStateMachineCall{Call: call} +} + +// MockStateMachineCall wrap *gomock.Call +type MockStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMachineCall) Return(arg0 firewall.Machine, arg1 error) *MockStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMachineCall) Do(f func(string) (firewall.Machine, error)) *MockStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMachineCall) DoAndReturn(f func(string) (firewall.Machine, error)) *MockStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -158,9 +326,33 @@ func (m *MockState) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockStateMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockStateMockRecorder) ModelUUID() *MockStateModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockState)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockState)(nil).ModelUUID)) + return &MockStateModelUUIDCall{Call: call} +} + +// MockStateModelUUIDCall wrap *gomock.Call +type MockStateModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelUUIDCall) Return(arg0 string) *MockStateModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelUUIDCall) Do(f func() string) *MockStateModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelUUIDCall) DoAndReturn(f func() string) *MockStateModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -173,9 +365,33 @@ func (m *MockState) Unit(arg0 string) (firewall.Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockStateMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Unit(arg0 any) *MockStateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockState)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockState)(nil).Unit), arg0) + return &MockStateUnitCall{Call: call} +} + +// MockStateUnitCall wrap *gomock.Call +type MockStateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUnitCall) Return(arg0 firewall.Unit, arg1 error) *MockStateUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUnitCall) Do(f func(string) (firewall.Unit, error)) *MockStateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUnitCall) DoAndReturn(f func(string) (firewall.Unit, error)) *MockStateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachineStartTimes mocks base method. @@ -187,9 +403,33 @@ func (m *MockState) WatchModelMachineStartTimes(arg0 time.Duration) state.String } // WatchModelMachineStartTimes indicates an expected call of WatchModelMachineStartTimes. -func (mr *MockStateMockRecorder) WatchModelMachineStartTimes(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) WatchModelMachineStartTimes(arg0 any) *MockStateWatchModelMachineStartTimesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachineStartTimes", reflect.TypeOf((*MockState)(nil).WatchModelMachineStartTimes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachineStartTimes", reflect.TypeOf((*MockState)(nil).WatchModelMachineStartTimes), arg0) + return &MockStateWatchModelMachineStartTimesCall{Call: call} +} + +// MockStateWatchModelMachineStartTimesCall wrap *gomock.Call +type MockStateWatchModelMachineStartTimesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchModelMachineStartTimesCall) Return(arg0 state.StringsWatcher) *MockStateWatchModelMachineStartTimesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchModelMachineStartTimesCall) Do(f func(time.Duration) state.StringsWatcher) *MockStateWatchModelMachineStartTimesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchModelMachineStartTimesCall) DoAndReturn(f func(time.Duration) state.StringsWatcher) *MockStateWatchModelMachineStartTimesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachines mocks base method. @@ -201,9 +441,33 @@ func (m *MockState) WatchModelMachines() state.StringsWatcher { } // WatchModelMachines indicates an expected call of WatchModelMachines. -func (mr *MockStateMockRecorder) WatchModelMachines() *gomock.Call { +func (mr *MockStateMockRecorder) WatchModelMachines() *MockStateWatchModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockState)(nil).WatchModelMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockState)(nil).WatchModelMachines)) + return &MockStateWatchModelMachinesCall{Call: call} +} + +// MockStateWatchModelMachinesCall wrap *gomock.Call +type MockStateWatchModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchModelMachinesCall) Return(arg0 state.StringsWatcher) *MockStateWatchModelMachinesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchModelMachinesCall) Do(f func() state.StringsWatcher) *MockStateWatchModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchModelMachinesCall) DoAndReturn(f func() state.StringsWatcher) *MockStateWatchModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOpenedPorts mocks base method. @@ -215,9 +479,33 @@ func (m *MockState) WatchOpenedPorts() state.StringsWatcher { } // WatchOpenedPorts indicates an expected call of WatchOpenedPorts. -func (mr *MockStateMockRecorder) WatchOpenedPorts() *gomock.Call { +func (mr *MockStateMockRecorder) WatchOpenedPorts() *MockStateWatchOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockState)(nil).WatchOpenedPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockState)(nil).WatchOpenedPorts)) + return &MockStateWatchOpenedPortsCall{Call: call} +} + +// MockStateWatchOpenedPortsCall wrap *gomock.Call +type MockStateWatchOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchOpenedPortsCall) Return(arg0 state.StringsWatcher) *MockStateWatchOpenedPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchOpenedPortsCall) Do(f func() state.StringsWatcher) *MockStateWatchOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchOpenedPortsCall) DoAndReturn(f func() state.StringsWatcher) *MockStateWatchOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigAPI is a mock of ControllerConfigAPI interface. @@ -253,9 +541,33 @@ func (m *MockControllerConfigAPI) ControllerAPIInfoForModels(arg0 context.Contex } // ControllerAPIInfoForModels indicates an expected call of ControllerAPIInfoForModels. -func (mr *MockControllerConfigAPIMockRecorder) ControllerAPIInfoForModels(arg0, arg1 any) *gomock.Call { +func (mr *MockControllerConfigAPIMockRecorder) ControllerAPIInfoForModels(arg0, arg1 any) *MockControllerConfigAPIControllerAPIInfoForModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModels", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerAPIInfoForModels), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModels", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerAPIInfoForModels), arg0, arg1) + return &MockControllerConfigAPIControllerAPIInfoForModelsCall{Call: call} +} + +// MockControllerConfigAPIControllerAPIInfoForModelsCall wrap *gomock.Call +type MockControllerConfigAPIControllerAPIInfoForModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) Return(arg0 params.ControllerAPIInfoResults, arg1 error) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) Do(f func(context.Context, params.Entities) (params.ControllerAPIInfoResults, error)) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) DoAndReturn(f func(context.Context, params.Entities) (params.ControllerAPIInfoResults, error)) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -268,7 +580,31 @@ func (m *MockControllerConfigAPI) ControllerConfig(arg0 context.Context) (params } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigAPIMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigAPIMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigAPIControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerConfig), arg0) + return &MockControllerConfigAPIControllerConfigCall{Call: call} +} + +// MockControllerConfigAPIControllerConfigCall wrap *gomock.Call +type MockControllerConfigAPIControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigAPIControllerConfigCall) Return(arg0 params.ControllerConfigResult, arg1 error) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigAPIControllerConfigCall) Do(f func(context.Context) (params.ControllerConfigResult, error)) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigAPIControllerConfigCall) DoAndReturn(f func(context.Context) (params.ControllerConfigResult, error)) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/firewaller/package_test.go b/apiserver/facades/controller/firewaller/package_test.go index a0f2af1b039..58b487a7765 100644 --- a/apiserver/facades/controller/firewaller/package_test.go +++ b/apiserver/facades/controller/firewaller/package_test.go @@ -9,9 +9,9 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package firewaller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller State,ControllerConfigAPI -//go:generate go run go.uber.org/mock/mockgen -package firewaller_test -destination watcher_mock_test.go github.com/juju/juju/state NotifyWatcher -//go:generate go run go.uber.org/mock/mockgen -package firewaller_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller ControllerConfigService,ModelConfigService,NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package firewaller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller State,ControllerConfigAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package firewaller_test -destination watcher_mock_test.go github.com/juju/juju/state NotifyWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package firewaller_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller ControllerConfigService,ModelConfigService,NetworkService func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/controller/firewaller/service_mock_test.go b/apiserver/facades/controller/firewaller/service_mock_test.go index ee44b0b7655..2fda7f81c9b 100644 --- a/apiserver/facades/controller/firewaller/service_mock_test.go +++ b/apiserver/facades/controller/firewaller/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package firewaller_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller ControllerConfigService,ModelConfigService,NetworkService +// mockgen -typed -package firewaller_test -destination service_mock_test.go github.com/juju/juju/apiserver/facades/controller/firewaller ControllerConfigService,ModelConfigService,NetworkService // // Package firewaller_test is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelConfigService is a mock of ModelConfigService interface. @@ -92,9 +116,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -107,9 +155,33 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -145,9 +217,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSubnets mocks base method. @@ -160,7 +256,31 @@ func (m *MockNetworkService) WatchSubnets(arg0 context.Context, arg1 set.Strings } // WatchSubnets indicates an expected call of WatchSubnets. -func (mr *MockNetworkServiceMockRecorder) WatchSubnets(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) WatchSubnets(arg0, arg1 any) *MockNetworkServiceWatchSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSubnets", reflect.TypeOf((*MockNetworkService)(nil).WatchSubnets), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSubnets", reflect.TypeOf((*MockNetworkService)(nil).WatchSubnets), arg0, arg1) + return &MockNetworkServiceWatchSubnetsCall{Call: call} +} + +// MockNetworkServiceWatchSubnetsCall wrap *gomock.Call +type MockNetworkServiceWatchSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceWatchSubnetsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockNetworkServiceWatchSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceWatchSubnetsCall) Do(f func(context.Context, set.Strings) (watcher.Watcher[[]string], error)) *MockNetworkServiceWatchSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceWatchSubnetsCall) DoAndReturn(f func(context.Context, set.Strings) (watcher.Watcher[[]string], error)) *MockNetworkServiceWatchSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/firewaller/watcher_mock_test.go b/apiserver/facades/controller/firewaller/watcher_mock_test.go index 612fd41ce7c..06ecd344a6e 100644 --- a/apiserver/facades/controller/firewaller/watcher_mock_test.go +++ b/apiserver/facades/controller/firewaller/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package firewaller_test -destination watcher_mock_test.go github.com/juju/juju/state NotifyWatcher +// mockgen -typed -package firewaller_test -destination watcher_mock_test.go github.com/juju/juju/state NotifyWatcher // // Package firewaller_test is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockNotifyWatcher) Changes() <-chan struct{} { } // Changes indicates an expected call of Changes. -func (mr *MockNotifyWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Changes() *MockNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + return &MockNotifyWatcherChangesCall{Call: call} +} + +// MockNotifyWatcherChangesCall wrap *gomock.Call +type MockNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherChangesCall) Return(arg0 <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherChangesCall) Do(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherChangesCall) DoAndReturn(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -61,9 +85,33 @@ func (m *MockNotifyWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockNotifyWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Err() *MockNotifyWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + return &MockNotifyWatcherErrCall{Call: call} +} + +// MockNotifyWatcherErrCall wrap *gomock.Call +type MockNotifyWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherErrCall) Return(arg0 error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherErrCall) Do(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherErrCall) DoAndReturn(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -73,9 +121,33 @@ func (m *MockNotifyWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockNotifyWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Kill() *MockNotifyWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + return &MockNotifyWatcherKillCall{Call: call} +} + +// MockNotifyWatcherKillCall wrap *gomock.Call +type MockNotifyWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherKillCall) Return() *MockNotifyWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherKillCall) Do(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherKillCall) DoAndReturn(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -87,9 +159,33 @@ func (m *MockNotifyWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockNotifyWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Stop() *MockNotifyWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + return &MockNotifyWatcherStopCall{Call: call} +} + +// MockNotifyWatcherStopCall wrap *gomock.Call +type MockNotifyWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherStopCall) Return(arg0 error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherStopCall) Do(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherStopCall) DoAndReturn(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -101,7 +197,31 @@ func (m *MockNotifyWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockNotifyWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Wait() *MockNotifyWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + return &MockNotifyWatcherWaitCall{Call: call} +} + +// MockNotifyWatcherWaitCall wrap *gomock.Call +type MockNotifyWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherWaitCall) Return(arg0 error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherWaitCall) Do(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherWaitCall) DoAndReturn(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/instancepoller/package_mock_test.go b/apiserver/facades/controller/instancepoller/package_mock_test.go index 09700f8da41..ed3e8156180 100644 --- a/apiserver/facades/controller/instancepoller/package_mock_test.go +++ b/apiserver/facades/controller/instancepoller/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package instancepoller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/instancepoller NetworkService +// mockgen -typed -package instancepoller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/instancepoller NetworkService // // Package instancepoller_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/instancepoller/package_test.go b/apiserver/facades/controller/instancepoller/package_test.go index 35bf9464516..bd1ff238729 100644 --- a/apiserver/facades/controller/instancepoller/package_test.go +++ b/apiserver/facades/controller/instancepoller/package_test.go @@ -11,7 +11,7 @@ import ( "github.com/juju/juju/state" ) -//go:generate go run go.uber.org/mock/mockgen -package instancepoller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/instancepoller NetworkService +//go:generate go run go.uber.org/mock/mockgen -typed -package instancepoller_test -destination package_mock_test.go github.com/juju/juju/apiserver/facades/controller/instancepoller NetworkService func TestPackage(t *testing.T) { gc.TestingT(t) } diff --git a/apiserver/facades/controller/migrationmaster/mocks/backend.go b/apiserver/facades/controller/migrationmaster/mocks/backend.go index 09831c0a9b7..b29f499ae1f 100644 --- a/apiserver/facades/controller/migrationmaster/mocks/backend.go +++ b/apiserver/facades/controller/migrationmaster/mocks/backend.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/controller/migrationmaster Backend,ControllerState,ModelExporter,UpgradeService,ControllerConfigService +// mockgen -typed -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/controller/migrationmaster Backend,ControllerState,ModelExporter,UpgradeService,ControllerConfigService // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockBackend) AgentVersion(arg0 context.Context) (version.Number, error) } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockBackendMockRecorder) AgentVersion(arg0 any) *gomock.Call { +func (mr *MockBackendMockRecorder) AgentVersion(arg0 any) *MockBackendAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockBackend)(nil).AgentVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockBackend)(nil).AgentVersion), arg0) + return &MockBackendAgentVersionCall{Call: call} +} + +// MockBackendAgentVersionCall wrap *gomock.Call +type MockBackendAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockBackendAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAgentVersionCall) Do(f func(context.Context) (version.Number, error)) *MockBackendAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAgentVersionCall) DoAndReturn(f func(context.Context) (version.Number, error)) *MockBackendAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllLocalRelatedModels mocks base method. @@ -71,9 +95,33 @@ func (m *MockBackend) AllLocalRelatedModels() ([]string, error) { } // AllLocalRelatedModels indicates an expected call of AllLocalRelatedModels. -func (mr *MockBackendMockRecorder) AllLocalRelatedModels() *gomock.Call { +func (mr *MockBackendMockRecorder) AllLocalRelatedModels() *MockBackendAllLocalRelatedModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLocalRelatedModels", reflect.TypeOf((*MockBackend)(nil).AllLocalRelatedModels)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLocalRelatedModels", reflect.TypeOf((*MockBackend)(nil).AllLocalRelatedModels)) + return &MockBackendAllLocalRelatedModelsCall{Call: call} +} + +// MockBackendAllLocalRelatedModelsCall wrap *gomock.Call +type MockBackendAllLocalRelatedModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendAllLocalRelatedModelsCall) Return(arg0 []string, arg1 error) *MockBackendAllLocalRelatedModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendAllLocalRelatedModelsCall) Do(f func() ([]string, error)) *MockBackendAllLocalRelatedModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendAllLocalRelatedModelsCall) DoAndReturn(f func() ([]string, error)) *MockBackendAllLocalRelatedModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Export mocks base method. @@ -86,9 +134,33 @@ func (m *MockBackend) Export(arg0 map[string]string, arg1 objectstore.ObjectStor } // Export indicates an expected call of Export. -func (mr *MockBackendMockRecorder) Export(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) Export(arg0, arg1 any) *MockBackendExportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Export", reflect.TypeOf((*MockBackend)(nil).Export), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Export", reflect.TypeOf((*MockBackend)(nil).Export), arg0, arg1) + return &MockBackendExportCall{Call: call} +} + +// MockBackendExportCall wrap *gomock.Call +type MockBackendExportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendExportCall) Return(arg0 description.Model, arg1 error) *MockBackendExportCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendExportCall) Do(f func(map[string]string, objectstore.ObjectStore) (description.Model, error)) *MockBackendExportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendExportCall) DoAndReturn(f func(map[string]string, objectstore.ObjectStore) (description.Model, error)) *MockBackendExportCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExportPartial mocks base method. @@ -101,9 +173,33 @@ func (m *MockBackend) ExportPartial(arg0 state.ExportConfig, arg1 objectstore.Ob } // ExportPartial indicates an expected call of ExportPartial. -func (mr *MockBackendMockRecorder) ExportPartial(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendMockRecorder) ExportPartial(arg0, arg1 any) *MockBackendExportPartialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportPartial", reflect.TypeOf((*MockBackend)(nil).ExportPartial), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportPartial", reflect.TypeOf((*MockBackend)(nil).ExportPartial), arg0, arg1) + return &MockBackendExportPartialCall{Call: call} +} + +// MockBackendExportPartialCall wrap *gomock.Call +type MockBackendExportPartialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendExportPartialCall) Return(arg0 description.Model, arg1 error) *MockBackendExportPartialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendExportPartialCall) Do(f func(state.ExportConfig, objectstore.ObjectStore) (description.Model, error)) *MockBackendExportPartialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendExportPartialCall) DoAndReturn(f func(state.ExportConfig, objectstore.ObjectStore) (description.Model, error)) *MockBackendExportPartialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LatestMigration mocks base method. @@ -116,9 +212,33 @@ func (m *MockBackend) LatestMigration() (state.ModelMigration, error) { } // LatestMigration indicates an expected call of LatestMigration. -func (mr *MockBackendMockRecorder) LatestMigration() *gomock.Call { +func (mr *MockBackendMockRecorder) LatestMigration() *MockBackendLatestMigrationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestMigration", reflect.TypeOf((*MockBackend)(nil).LatestMigration)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestMigration", reflect.TypeOf((*MockBackend)(nil).LatestMigration)) + return &MockBackendLatestMigrationCall{Call: call} +} + +// MockBackendLatestMigrationCall wrap *gomock.Call +type MockBackendLatestMigrationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendLatestMigrationCall) Return(arg0 state.ModelMigration, arg1 error) *MockBackendLatestMigrationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendLatestMigrationCall) Do(f func() (state.ModelMigration, error)) *MockBackendLatestMigrationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendLatestMigrationCall) DoAndReturn(f func() (state.ModelMigration, error)) *MockBackendLatestMigrationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelName mocks base method. @@ -131,9 +251,33 @@ func (m *MockBackend) ModelName() (string, error) { } // ModelName indicates an expected call of ModelName. -func (mr *MockBackendMockRecorder) ModelName() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelName() *MockBackendModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelName", reflect.TypeOf((*MockBackend)(nil).ModelName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelName", reflect.TypeOf((*MockBackend)(nil).ModelName)) + return &MockBackendModelNameCall{Call: call} +} + +// MockBackendModelNameCall wrap *gomock.Call +type MockBackendModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelNameCall) Return(arg0 string, arg1 error) *MockBackendModelNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelNameCall) Do(f func() (string, error)) *MockBackendModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelNameCall) DoAndReturn(f func() (string, error)) *MockBackendModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelOwner mocks base method. @@ -146,9 +290,33 @@ func (m *MockBackend) ModelOwner() (names.UserTag, error) { } // ModelOwner indicates an expected call of ModelOwner. -func (mr *MockBackendMockRecorder) ModelOwner() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelOwner() *MockBackendModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOwner", reflect.TypeOf((*MockBackend)(nil).ModelOwner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOwner", reflect.TypeOf((*MockBackend)(nil).ModelOwner)) + return &MockBackendModelOwnerCall{Call: call} +} + +// MockBackendModelOwnerCall wrap *gomock.Call +type MockBackendModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelOwnerCall) Return(arg0 names.UserTag, arg1 error) *MockBackendModelOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelOwnerCall) Do(f func() (names.UserTag, error)) *MockBackendModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelOwnerCall) DoAndReturn(f func() (names.UserTag, error)) *MockBackendModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -160,9 +328,33 @@ func (m *MockBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockBackendMockRecorder) ModelUUID() *MockBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockBackend)(nil).ModelUUID)) + return &MockBackendModelUUIDCall{Call: call} +} + +// MockBackendModelUUIDCall wrap *gomock.Call +type MockBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendModelUUIDCall) Return(arg0 string) *MockBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendModelUUIDCall) Do(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendModelUUIDCall) DoAndReturn(f func() string) *MockBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveExportingModelDocs mocks base method. @@ -174,9 +366,33 @@ func (m *MockBackend) RemoveExportingModelDocs() error { } // RemoveExportingModelDocs indicates an expected call of RemoveExportingModelDocs. -func (mr *MockBackendMockRecorder) RemoveExportingModelDocs() *gomock.Call { +func (mr *MockBackendMockRecorder) RemoveExportingModelDocs() *MockBackendRemoveExportingModelDocsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveExportingModelDocs", reflect.TypeOf((*MockBackend)(nil).RemoveExportingModelDocs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveExportingModelDocs", reflect.TypeOf((*MockBackend)(nil).RemoveExportingModelDocs)) + return &MockBackendRemoveExportingModelDocsCall{Call: call} +} + +// MockBackendRemoveExportingModelDocsCall wrap *gomock.Call +type MockBackendRemoveExportingModelDocsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendRemoveExportingModelDocsCall) Return(arg0 error) *MockBackendRemoveExportingModelDocsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendRemoveExportingModelDocsCall) Do(f func() error) *MockBackendRemoveExportingModelDocsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendRemoveExportingModelDocsCall) DoAndReturn(f func() error) *MockBackendRemoveExportingModelDocsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForMigration mocks base method. @@ -188,9 +404,33 @@ func (m *MockBackend) WatchForMigration() state.NotifyWatcher { } // WatchForMigration indicates an expected call of WatchForMigration. -func (mr *MockBackendMockRecorder) WatchForMigration() *gomock.Call { +func (mr *MockBackendMockRecorder) WatchForMigration() *MockBackendWatchForMigrationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForMigration", reflect.TypeOf((*MockBackend)(nil).WatchForMigration)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForMigration", reflect.TypeOf((*MockBackend)(nil).WatchForMigration)) + return &MockBackendWatchForMigrationCall{Call: call} +} + +// MockBackendWatchForMigrationCall wrap *gomock.Call +type MockBackendWatchForMigrationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendWatchForMigrationCall) Return(arg0 state.NotifyWatcher) *MockBackendWatchForMigrationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendWatchForMigrationCall) Do(f func() state.NotifyWatcher) *MockBackendWatchForMigrationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendWatchForMigrationCall) DoAndReturn(f func() state.NotifyWatcher) *MockBackendWatchForMigrationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerState is a mock of ControllerState interface. @@ -226,9 +466,33 @@ func (m *MockControllerState) APIHostPortsForClients(arg0 controller.Config) ([] } // APIHostPortsForClients indicates an expected call of APIHostPortsForClients. -func (mr *MockControllerStateMockRecorder) APIHostPortsForClients(arg0 any) *gomock.Call { +func (mr *MockControllerStateMockRecorder) APIHostPortsForClients(arg0 any) *MockControllerStateAPIHostPortsForClientsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForClients", reflect.TypeOf((*MockControllerState)(nil).APIHostPortsForClients), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPortsForClients", reflect.TypeOf((*MockControllerState)(nil).APIHostPortsForClients), arg0) + return &MockControllerStateAPIHostPortsForClientsCall{Call: call} +} + +// MockControllerStateAPIHostPortsForClientsCall wrap *gomock.Call +type MockControllerStateAPIHostPortsForClientsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerStateAPIHostPortsForClientsCall) Return(arg0 []network.SpaceHostPorts, arg1 error) *MockControllerStateAPIHostPortsForClientsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerStateAPIHostPortsForClientsCall) Do(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerStateAPIHostPortsForClientsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerStateAPIHostPortsForClientsCall) DoAndReturn(f func(controller.Config) ([]network.SpaceHostPorts, error)) *MockControllerStateAPIHostPortsForClientsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelExporter is a mock of ModelExporter interface. @@ -264,9 +528,33 @@ func (m *MockModelExporter) ExportModel(arg0 context.Context, arg1 map[string]st } // ExportModel indicates an expected call of ExportModel. -func (mr *MockModelExporterMockRecorder) ExportModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelExporterMockRecorder) ExportModel(arg0, arg1, arg2 any) *MockModelExporterExportModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportModel", reflect.TypeOf((*MockModelExporter)(nil).ExportModel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportModel", reflect.TypeOf((*MockModelExporter)(nil).ExportModel), arg0, arg1, arg2) + return &MockModelExporterExportModelCall{Call: call} +} + +// MockModelExporterExportModelCall wrap *gomock.Call +type MockModelExporterExportModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExporterExportModelCall) Return(arg0 description.Model, arg1 error) *MockModelExporterExportModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExporterExportModelCall) Do(f func(context.Context, map[string]string, objectstore.ObjectStore) (description.Model, error)) *MockModelExporterExportModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExporterExportModelCall) DoAndReturn(f func(context.Context, map[string]string, objectstore.ObjectStore) (description.Model, error)) *MockModelExporterExportModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeService is a mock of UpgradeService interface. @@ -302,9 +590,33 @@ func (m *MockUpgradeService) IsUpgrading(arg0 context.Context) (bool, error) { } // IsUpgrading indicates an expected call of IsUpgrading. -func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *MockUpgradeServiceIsUpgradingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + return &MockUpgradeServiceIsUpgradingCall{Call: call} +} + +// MockUpgradeServiceIsUpgradingCall wrap *gomock.Call +type MockUpgradeServiceIsUpgradingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceIsUpgradingCall) Return(arg0 bool, arg1 error) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceIsUpgradingCall) Do(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceIsUpgradingCall) DoAndReturn(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -340,7 +652,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationmaster/mocks/objectstore.go b/apiserver/facades/controller/migrationmaster/mocks/objectstore.go index e3995451b8c..a3d8b45c225 100644 --- a/apiserver/facades/controller/migrationmaster/mocks/objectstore.go +++ b/apiserver/facades/controller/migrationmaster/mocks/objectstore.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationmaster/mocks/precheckbackend.go b/apiserver/facades/controller/migrationmaster/mocks/precheckbackend.go index 30a7d779691..ed9d5f6ffd5 100644 --- a/apiserver/facades/controller/migrationmaster/mocks/precheckbackend.go +++ b/apiserver/facades/controller/migrationmaster/mocks/precheckbackend.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/precheckbackend.go github.com/juju/juju/internal/migration PrecheckBackend +// mockgen -typed -package mocks -destination mocks/precheckbackend.go github.com/juju/juju/internal/migration PrecheckBackend // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockPrecheckBackend) AgentVersion() (version.Number, error) { } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockPrecheckBackendMockRecorder) AgentVersion() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) AgentVersion() *MockPrecheckBackendAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockPrecheckBackend)(nil).AgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockPrecheckBackend)(nil).AgentVersion)) + return &MockPrecheckBackendAgentVersionCall{Call: call} +} + +// MockPrecheckBackendAgentVersionCall wrap *gomock.Call +type MockPrecheckBackendAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockPrecheckBackendAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendAgentVersionCall) Do(f func() (version.Number, error)) *MockPrecheckBackendAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendAgentVersionCall) DoAndReturn(f func() (version.Number, error)) *MockPrecheckBackendAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllApplications mocks base method. @@ -67,9 +91,33 @@ func (m *MockPrecheckBackend) AllApplications() ([]migration.PrecheckApplication } // AllApplications indicates an expected call of AllApplications. -func (mr *MockPrecheckBackendMockRecorder) AllApplications() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) AllApplications() *MockPrecheckBackendAllApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockPrecheckBackend)(nil).AllApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllApplications", reflect.TypeOf((*MockPrecheckBackend)(nil).AllApplications)) + return &MockPrecheckBackendAllApplicationsCall{Call: call} +} + +// MockPrecheckBackendAllApplicationsCall wrap *gomock.Call +type MockPrecheckBackendAllApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendAllApplicationsCall) Return(arg0 []migration.PrecheckApplication, arg1 error) *MockPrecheckBackendAllApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendAllApplicationsCall) Do(f func() ([]migration.PrecheckApplication, error)) *MockPrecheckBackendAllApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendAllApplicationsCall) DoAndReturn(f func() ([]migration.PrecheckApplication, error)) *MockPrecheckBackendAllApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllMachines mocks base method. @@ -82,9 +130,33 @@ func (m *MockPrecheckBackend) AllMachines() ([]migration.PrecheckMachine, error) } // AllMachines indicates an expected call of AllMachines. -func (mr *MockPrecheckBackendMockRecorder) AllMachines() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) AllMachines() *MockPrecheckBackendAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockPrecheckBackend)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockPrecheckBackend)(nil).AllMachines)) + return &MockPrecheckBackendAllMachinesCall{Call: call} +} + +// MockPrecheckBackendAllMachinesCall wrap *gomock.Call +type MockPrecheckBackendAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendAllMachinesCall) Return(arg0 []migration.PrecheckMachine, arg1 error) *MockPrecheckBackendAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendAllMachinesCall) Do(f func() ([]migration.PrecheckMachine, error)) *MockPrecheckBackendAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendAllMachinesCall) DoAndReturn(f func() ([]migration.PrecheckMachine, error)) *MockPrecheckBackendAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelUUIDs mocks base method. @@ -97,9 +169,33 @@ func (m *MockPrecheckBackend) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockPrecheckBackendMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) AllModelUUIDs() *MockPrecheckBackendAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockPrecheckBackend)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockPrecheckBackend)(nil).AllModelUUIDs)) + return &MockPrecheckBackendAllModelUUIDsCall{Call: call} +} + +// MockPrecheckBackendAllModelUUIDsCall wrap *gomock.Call +type MockPrecheckBackendAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockPrecheckBackendAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendAllModelUUIDsCall) Do(f func() ([]string, error)) *MockPrecheckBackendAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockPrecheckBackendAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRelations mocks base method. @@ -112,9 +208,33 @@ func (m *MockPrecheckBackend) AllRelations() ([]migration.PrecheckRelation, erro } // AllRelations indicates an expected call of AllRelations. -func (mr *MockPrecheckBackendMockRecorder) AllRelations() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) AllRelations() *MockPrecheckBackendAllRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelations", reflect.TypeOf((*MockPrecheckBackend)(nil).AllRelations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelations", reflect.TypeOf((*MockPrecheckBackend)(nil).AllRelations)) + return &MockPrecheckBackendAllRelationsCall{Call: call} +} + +// MockPrecheckBackendAllRelationsCall wrap *gomock.Call +type MockPrecheckBackendAllRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendAllRelationsCall) Return(arg0 []migration.PrecheckRelation, arg1 error) *MockPrecheckBackendAllRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendAllRelationsCall) Do(f func() ([]migration.PrecheckRelation, error)) *MockPrecheckBackendAllRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendAllRelationsCall) DoAndReturn(f func() ([]migration.PrecheckRelation, error)) *MockPrecheckBackendAllRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerBackend mocks base method. @@ -127,9 +247,33 @@ func (m *MockPrecheckBackend) ControllerBackend() (migration.PrecheckBackend, er } // ControllerBackend indicates an expected call of ControllerBackend. -func (mr *MockPrecheckBackendMockRecorder) ControllerBackend() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) ControllerBackend() *MockPrecheckBackendControllerBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerBackend", reflect.TypeOf((*MockPrecheckBackend)(nil).ControllerBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerBackend", reflect.TypeOf((*MockPrecheckBackend)(nil).ControllerBackend)) + return &MockPrecheckBackendControllerBackendCall{Call: call} +} + +// MockPrecheckBackendControllerBackendCall wrap *gomock.Call +type MockPrecheckBackendControllerBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendControllerBackendCall) Return(arg0 migration.PrecheckBackend, arg1 error) *MockPrecheckBackendControllerBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendControllerBackendCall) Do(f func() (migration.PrecheckBackend, error)) *MockPrecheckBackendControllerBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendControllerBackendCall) DoAndReturn(f func() (migration.PrecheckBackend, error)) *MockPrecheckBackendControllerBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasUpgradeSeriesLocks mocks base method. @@ -142,9 +286,33 @@ func (m *MockPrecheckBackend) HasUpgradeSeriesLocks() (bool, error) { } // HasUpgradeSeriesLocks indicates an expected call of HasUpgradeSeriesLocks. -func (mr *MockPrecheckBackendMockRecorder) HasUpgradeSeriesLocks() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) HasUpgradeSeriesLocks() *MockPrecheckBackendHasUpgradeSeriesLocksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockPrecheckBackend)(nil).HasUpgradeSeriesLocks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockPrecheckBackend)(nil).HasUpgradeSeriesLocks)) + return &MockPrecheckBackendHasUpgradeSeriesLocksCall{Call: call} +} + +// MockPrecheckBackendHasUpgradeSeriesLocksCall wrap *gomock.Call +type MockPrecheckBackendHasUpgradeSeriesLocksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendHasUpgradeSeriesLocksCall) Return(arg0 bool, arg1 error) *MockPrecheckBackendHasUpgradeSeriesLocksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendHasUpgradeSeriesLocksCall) Do(f func() (bool, error)) *MockPrecheckBackendHasUpgradeSeriesLocksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendHasUpgradeSeriesLocksCall) DoAndReturn(f func() (bool, error)) *MockPrecheckBackendHasUpgradeSeriesLocksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsMigrationActive mocks base method. @@ -157,9 +325,33 @@ func (m *MockPrecheckBackend) IsMigrationActive(arg0 string) (bool, error) { } // IsMigrationActive indicates an expected call of IsMigrationActive. -func (mr *MockPrecheckBackendMockRecorder) IsMigrationActive(arg0 any) *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) IsMigrationActive(arg0 any) *MockPrecheckBackendIsMigrationActiveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsMigrationActive", reflect.TypeOf((*MockPrecheckBackend)(nil).IsMigrationActive), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsMigrationActive", reflect.TypeOf((*MockPrecheckBackend)(nil).IsMigrationActive), arg0) + return &MockPrecheckBackendIsMigrationActiveCall{Call: call} +} + +// MockPrecheckBackendIsMigrationActiveCall wrap *gomock.Call +type MockPrecheckBackendIsMigrationActiveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendIsMigrationActiveCall) Return(arg0 bool, arg1 error) *MockPrecheckBackendIsMigrationActiveCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendIsMigrationActiveCall) Do(f func(string) (bool, error)) *MockPrecheckBackendIsMigrationActiveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendIsMigrationActiveCall) DoAndReturn(f func(string) (bool, error)) *MockPrecheckBackendIsMigrationActiveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineCountForBase mocks base method. @@ -176,9 +368,33 @@ func (m *MockPrecheckBackend) MachineCountForBase(arg0 ...state.Base) (map[strin } // MachineCountForBase indicates an expected call of MachineCountForBase. -func (mr *MockPrecheckBackendMockRecorder) MachineCountForBase(arg0 ...any) *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) MachineCountForBase(arg0 ...any) *MockPrecheckBackendMachineCountForBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockPrecheckBackend)(nil).MachineCountForBase), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockPrecheckBackend)(nil).MachineCountForBase), arg0...) + return &MockPrecheckBackendMachineCountForBaseCall{Call: call} +} + +// MockPrecheckBackendMachineCountForBaseCall wrap *gomock.Call +type MockPrecheckBackendMachineCountForBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendMachineCountForBaseCall) Return(arg0 map[string]int, arg1 error) *MockPrecheckBackendMachineCountForBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendMachineCountForBaseCall) Do(f func(...state.Base) (map[string]int, error)) *MockPrecheckBackendMachineCountForBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendMachineCountForBaseCall) DoAndReturn(f func(...state.Base) (map[string]int, error)) *MockPrecheckBackendMachineCountForBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -191,9 +407,33 @@ func (m *MockPrecheckBackend) Model() (migration.PrecheckModel, error) { } // Model indicates an expected call of Model. -func (mr *MockPrecheckBackendMockRecorder) Model() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) Model() *MockPrecheckBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockPrecheckBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockPrecheckBackend)(nil).Model)) + return &MockPrecheckBackendModelCall{Call: call} +} + +// MockPrecheckBackendModelCall wrap *gomock.Call +type MockPrecheckBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendModelCall) Return(arg0 migration.PrecheckModel, arg1 error) *MockPrecheckBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendModelCall) Do(f func() (migration.PrecheckModel, error)) *MockPrecheckBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendModelCall) DoAndReturn(f func() (migration.PrecheckModel, error)) *MockPrecheckBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoCurrentStatus mocks base method. @@ -206,9 +446,33 @@ func (m *MockPrecheckBackend) MongoCurrentStatus() (*replicaset.Status, error) { } // MongoCurrentStatus indicates an expected call of MongoCurrentStatus. -func (mr *MockPrecheckBackendMockRecorder) MongoCurrentStatus() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) MongoCurrentStatus() *MockPrecheckBackendMongoCurrentStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockPrecheckBackend)(nil).MongoCurrentStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockPrecheckBackend)(nil).MongoCurrentStatus)) + return &MockPrecheckBackendMongoCurrentStatusCall{Call: call} +} + +// MockPrecheckBackendMongoCurrentStatusCall wrap *gomock.Call +type MockPrecheckBackendMongoCurrentStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendMongoCurrentStatusCall) Return(arg0 *replicaset.Status, arg1 error) *MockPrecheckBackendMongoCurrentStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendMongoCurrentStatusCall) Do(f func() (*replicaset.Status, error)) *MockPrecheckBackendMongoCurrentStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendMongoCurrentStatusCall) DoAndReturn(f func() (*replicaset.Status, error)) *MockPrecheckBackendMongoCurrentStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NeedsCleanup mocks base method. @@ -221,7 +485,31 @@ func (m *MockPrecheckBackend) NeedsCleanup() (bool, error) { } // NeedsCleanup indicates an expected call of NeedsCleanup. -func (mr *MockPrecheckBackendMockRecorder) NeedsCleanup() *gomock.Call { +func (mr *MockPrecheckBackendMockRecorder) NeedsCleanup() *MockPrecheckBackendNeedsCleanupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedsCleanup", reflect.TypeOf((*MockPrecheckBackend)(nil).NeedsCleanup)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedsCleanup", reflect.TypeOf((*MockPrecheckBackend)(nil).NeedsCleanup)) + return &MockPrecheckBackendNeedsCleanupCall{Call: call} +} + +// MockPrecheckBackendNeedsCleanupCall wrap *gomock.Call +type MockPrecheckBackendNeedsCleanupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckBackendNeedsCleanupCall) Return(arg0 bool, arg1 error) *MockPrecheckBackendNeedsCleanupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckBackendNeedsCleanupCall) Do(f func() (bool, error)) *MockPrecheckBackendNeedsCleanupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckBackendNeedsCleanupCall) DoAndReturn(f func() (bool, error)) *MockPrecheckBackendNeedsCleanupCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationmaster/mocks/state.go b/apiserver/facades/controller/migrationmaster/mocks/state.go index 2cc6fbd7a7e..bb832e30622 100644 --- a/apiserver/facades/controller/migrationmaster/mocks/state.go +++ b/apiserver/facades/controller/migrationmaster/mocks/state.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state.go github.com/juju/juju/state ModelMigration,NotifyWatcher +// mockgen -typed -package mocks -destination mocks/state.go github.com/juju/juju/state ModelMigration,NotifyWatcher // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockModelMigration) Attempt() int { } // Attempt indicates an expected call of Attempt. -func (mr *MockModelMigrationMockRecorder) Attempt() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) Attempt() *MockModelMigrationAttemptCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Attempt", reflect.TypeOf((*MockModelMigration)(nil).Attempt)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Attempt", reflect.TypeOf((*MockModelMigration)(nil).Attempt)) + return &MockModelMigrationAttemptCall{Call: call} +} + +// MockModelMigrationAttemptCall wrap *gomock.Call +type MockModelMigrationAttemptCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationAttemptCall) Return(arg0 int) *MockModelMigrationAttemptCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationAttemptCall) Do(f func() int) *MockModelMigrationAttemptCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationAttemptCall) DoAndReturn(f func() int) *MockModelMigrationAttemptCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndTime mocks base method. @@ -66,9 +90,33 @@ func (m *MockModelMigration) EndTime() time.Time { } // EndTime indicates an expected call of EndTime. -func (mr *MockModelMigrationMockRecorder) EndTime() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) EndTime() *MockModelMigrationEndTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndTime", reflect.TypeOf((*MockModelMigration)(nil).EndTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndTime", reflect.TypeOf((*MockModelMigration)(nil).EndTime)) + return &MockModelMigrationEndTimeCall{Call: call} +} + +// MockModelMigrationEndTimeCall wrap *gomock.Call +type MockModelMigrationEndTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationEndTimeCall) Return(arg0 time.Time) *MockModelMigrationEndTimeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationEndTimeCall) Do(f func() time.Time) *MockModelMigrationEndTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationEndTimeCall) DoAndReturn(f func() time.Time) *MockModelMigrationEndTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -80,9 +128,33 @@ func (m *MockModelMigration) Id() string { } // Id indicates an expected call of Id. -func (mr *MockModelMigrationMockRecorder) Id() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) Id() *MockModelMigrationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockModelMigration)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockModelMigration)(nil).Id)) + return &MockModelMigrationIdCall{Call: call} +} + +// MockModelMigrationIdCall wrap *gomock.Call +type MockModelMigrationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationIdCall) Return(arg0 string) *MockModelMigrationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationIdCall) Do(f func() string) *MockModelMigrationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationIdCall) DoAndReturn(f func() string) *MockModelMigrationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitiatedBy mocks base method. @@ -94,9 +166,33 @@ func (m *MockModelMigration) InitiatedBy() string { } // InitiatedBy indicates an expected call of InitiatedBy. -func (mr *MockModelMigrationMockRecorder) InitiatedBy() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) InitiatedBy() *MockModelMigrationInitiatedByCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitiatedBy", reflect.TypeOf((*MockModelMigration)(nil).InitiatedBy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitiatedBy", reflect.TypeOf((*MockModelMigration)(nil).InitiatedBy)) + return &MockModelMigrationInitiatedByCall{Call: call} +} + +// MockModelMigrationInitiatedByCall wrap *gomock.Call +type MockModelMigrationInitiatedByCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationInitiatedByCall) Return(arg0 string) *MockModelMigrationInitiatedByCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationInitiatedByCall) Do(f func() string) *MockModelMigrationInitiatedByCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationInitiatedByCall) DoAndReturn(f func() string) *MockModelMigrationInitiatedByCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MinionReports mocks base method. @@ -109,9 +205,33 @@ func (m *MockModelMigration) MinionReports() (*state.MinionReports, error) { } // MinionReports indicates an expected call of MinionReports. -func (mr *MockModelMigrationMockRecorder) MinionReports() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) MinionReports() *MockModelMigrationMinionReportsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinionReports", reflect.TypeOf((*MockModelMigration)(nil).MinionReports)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinionReports", reflect.TypeOf((*MockModelMigration)(nil).MinionReports)) + return &MockModelMigrationMinionReportsCall{Call: call} +} + +// MockModelMigrationMinionReportsCall wrap *gomock.Call +type MockModelMigrationMinionReportsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationMinionReportsCall) Return(arg0 *state.MinionReports, arg1 error) *MockModelMigrationMinionReportsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationMinionReportsCall) Do(f func() (*state.MinionReports, error)) *MockModelMigrationMinionReportsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationMinionReportsCall) DoAndReturn(f func() (*state.MinionReports, error)) *MockModelMigrationMinionReportsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -123,9 +243,33 @@ func (m *MockModelMigration) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockModelMigrationMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) ModelUUID() *MockModelMigrationModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockModelMigration)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockModelMigration)(nil).ModelUUID)) + return &MockModelMigrationModelUUIDCall{Call: call} +} + +// MockModelMigrationModelUUIDCall wrap *gomock.Call +type MockModelMigrationModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationModelUUIDCall) Return(arg0 string) *MockModelMigrationModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationModelUUIDCall) Do(f func() string) *MockModelMigrationModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationModelUUIDCall) DoAndReturn(f func() string) *MockModelMigrationModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUserAccess mocks base method. @@ -137,9 +281,33 @@ func (m *MockModelMigration) ModelUserAccess(arg0 names.Tag) permission.Access { } // ModelUserAccess indicates an expected call of ModelUserAccess. -func (mr *MockModelMigrationMockRecorder) ModelUserAccess(arg0 any) *gomock.Call { +func (mr *MockModelMigrationMockRecorder) ModelUserAccess(arg0 any) *MockModelMigrationModelUserAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUserAccess", reflect.TypeOf((*MockModelMigration)(nil).ModelUserAccess), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUserAccess", reflect.TypeOf((*MockModelMigration)(nil).ModelUserAccess), arg0) + return &MockModelMigrationModelUserAccessCall{Call: call} +} + +// MockModelMigrationModelUserAccessCall wrap *gomock.Call +type MockModelMigrationModelUserAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationModelUserAccessCall) Return(arg0 permission.Access) *MockModelMigrationModelUserAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationModelUserAccessCall) Do(f func(names.Tag) permission.Access) *MockModelMigrationModelUserAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationModelUserAccessCall) DoAndReturn(f func(names.Tag) permission.Access) *MockModelMigrationModelUserAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Phase mocks base method. @@ -152,9 +320,33 @@ func (m *MockModelMigration) Phase() (migration.Phase, error) { } // Phase indicates an expected call of Phase. -func (mr *MockModelMigrationMockRecorder) Phase() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) Phase() *MockModelMigrationPhaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Phase", reflect.TypeOf((*MockModelMigration)(nil).Phase)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Phase", reflect.TypeOf((*MockModelMigration)(nil).Phase)) + return &MockModelMigrationPhaseCall{Call: call} +} + +// MockModelMigrationPhaseCall wrap *gomock.Call +type MockModelMigrationPhaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationPhaseCall) Return(arg0 migration.Phase, arg1 error) *MockModelMigrationPhaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationPhaseCall) Do(f func() (migration.Phase, error)) *MockModelMigrationPhaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationPhaseCall) DoAndReturn(f func() (migration.Phase, error)) *MockModelMigrationPhaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PhaseChangedTime mocks base method. @@ -166,9 +358,33 @@ func (m *MockModelMigration) PhaseChangedTime() time.Time { } // PhaseChangedTime indicates an expected call of PhaseChangedTime. -func (mr *MockModelMigrationMockRecorder) PhaseChangedTime() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) PhaseChangedTime() *MockModelMigrationPhaseChangedTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PhaseChangedTime", reflect.TypeOf((*MockModelMigration)(nil).PhaseChangedTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PhaseChangedTime", reflect.TypeOf((*MockModelMigration)(nil).PhaseChangedTime)) + return &MockModelMigrationPhaseChangedTimeCall{Call: call} +} + +// MockModelMigrationPhaseChangedTimeCall wrap *gomock.Call +type MockModelMigrationPhaseChangedTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationPhaseChangedTimeCall) Return(arg0 time.Time) *MockModelMigrationPhaseChangedTimeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationPhaseChangedTimeCall) Do(f func() time.Time) *MockModelMigrationPhaseChangedTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationPhaseChangedTimeCall) DoAndReturn(f func() time.Time) *MockModelMigrationPhaseChangedTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -180,9 +396,33 @@ func (m *MockModelMigration) Refresh() error { } // Refresh indicates an expected call of Refresh. -func (mr *MockModelMigrationMockRecorder) Refresh() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) Refresh() *MockModelMigrationRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockModelMigration)(nil).Refresh)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockModelMigration)(nil).Refresh)) + return &MockModelMigrationRefreshCall{Call: call} +} + +// MockModelMigrationRefreshCall wrap *gomock.Call +type MockModelMigrationRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationRefreshCall) Return(arg0 error) *MockModelMigrationRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationRefreshCall) Do(f func() error) *MockModelMigrationRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationRefreshCall) DoAndReturn(f func() error) *MockModelMigrationRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPhase mocks base method. @@ -194,9 +434,33 @@ func (m *MockModelMigration) SetPhase(arg0 migration.Phase) error { } // SetPhase indicates an expected call of SetPhase. -func (mr *MockModelMigrationMockRecorder) SetPhase(arg0 any) *gomock.Call { +func (mr *MockModelMigrationMockRecorder) SetPhase(arg0 any) *MockModelMigrationSetPhaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPhase", reflect.TypeOf((*MockModelMigration)(nil).SetPhase), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPhase", reflect.TypeOf((*MockModelMigration)(nil).SetPhase), arg0) + return &MockModelMigrationSetPhaseCall{Call: call} +} + +// MockModelMigrationSetPhaseCall wrap *gomock.Call +type MockModelMigrationSetPhaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationSetPhaseCall) Return(arg0 error) *MockModelMigrationSetPhaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationSetPhaseCall) Do(f func(migration.Phase) error) *MockModelMigrationSetPhaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationSetPhaseCall) DoAndReturn(f func(migration.Phase) error) *MockModelMigrationSetPhaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatusMessage mocks base method. @@ -208,9 +472,33 @@ func (m *MockModelMigration) SetStatusMessage(arg0 string) error { } // SetStatusMessage indicates an expected call of SetStatusMessage. -func (mr *MockModelMigrationMockRecorder) SetStatusMessage(arg0 any) *gomock.Call { +func (mr *MockModelMigrationMockRecorder) SetStatusMessage(arg0 any) *MockModelMigrationSetStatusMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusMessage", reflect.TypeOf((*MockModelMigration)(nil).SetStatusMessage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusMessage", reflect.TypeOf((*MockModelMigration)(nil).SetStatusMessage), arg0) + return &MockModelMigrationSetStatusMessageCall{Call: call} +} + +// MockModelMigrationSetStatusMessageCall wrap *gomock.Call +type MockModelMigrationSetStatusMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationSetStatusMessageCall) Return(arg0 error) *MockModelMigrationSetStatusMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationSetStatusMessageCall) Do(f func(string) error) *MockModelMigrationSetStatusMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationSetStatusMessageCall) DoAndReturn(f func(string) error) *MockModelMigrationSetStatusMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartTime mocks base method. @@ -222,9 +510,33 @@ func (m *MockModelMigration) StartTime() time.Time { } // StartTime indicates an expected call of StartTime. -func (mr *MockModelMigrationMockRecorder) StartTime() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) StartTime() *MockModelMigrationStartTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartTime", reflect.TypeOf((*MockModelMigration)(nil).StartTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartTime", reflect.TypeOf((*MockModelMigration)(nil).StartTime)) + return &MockModelMigrationStartTimeCall{Call: call} +} + +// MockModelMigrationStartTimeCall wrap *gomock.Call +type MockModelMigrationStartTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationStartTimeCall) Return(arg0 time.Time) *MockModelMigrationStartTimeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationStartTimeCall) Do(f func() time.Time) *MockModelMigrationStartTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationStartTimeCall) DoAndReturn(f func() time.Time) *MockModelMigrationStartTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusMessage mocks base method. @@ -236,9 +548,33 @@ func (m *MockModelMigration) StatusMessage() string { } // StatusMessage indicates an expected call of StatusMessage. -func (mr *MockModelMigrationMockRecorder) StatusMessage() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) StatusMessage() *MockModelMigrationStatusMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusMessage", reflect.TypeOf((*MockModelMigration)(nil).StatusMessage)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusMessage", reflect.TypeOf((*MockModelMigration)(nil).StatusMessage)) + return &MockModelMigrationStatusMessageCall{Call: call} +} + +// MockModelMigrationStatusMessageCall wrap *gomock.Call +type MockModelMigrationStatusMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationStatusMessageCall) Return(arg0 string) *MockModelMigrationStatusMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationStatusMessageCall) Do(f func() string) *MockModelMigrationStatusMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationStatusMessageCall) DoAndReturn(f func() string) *MockModelMigrationStatusMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubmitMinionReport mocks base method. @@ -250,9 +586,33 @@ func (m *MockModelMigration) SubmitMinionReport(arg0 names.Tag, arg1 migration.P } // SubmitMinionReport indicates an expected call of SubmitMinionReport. -func (mr *MockModelMigrationMockRecorder) SubmitMinionReport(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelMigrationMockRecorder) SubmitMinionReport(arg0, arg1, arg2 any) *MockModelMigrationSubmitMinionReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitMinionReport", reflect.TypeOf((*MockModelMigration)(nil).SubmitMinionReport), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitMinionReport", reflect.TypeOf((*MockModelMigration)(nil).SubmitMinionReport), arg0, arg1, arg2) + return &MockModelMigrationSubmitMinionReportCall{Call: call} +} + +// MockModelMigrationSubmitMinionReportCall wrap *gomock.Call +type MockModelMigrationSubmitMinionReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationSubmitMinionReportCall) Return(arg0 error) *MockModelMigrationSubmitMinionReportCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationSubmitMinionReportCall) Do(f func(names.Tag, migration.Phase, bool) error) *MockModelMigrationSubmitMinionReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationSubmitMinionReportCall) DoAndReturn(f func(names.Tag, migration.Phase, bool) error) *MockModelMigrationSubmitMinionReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SuccessTime mocks base method. @@ -264,9 +624,33 @@ func (m *MockModelMigration) SuccessTime() time.Time { } // SuccessTime indicates an expected call of SuccessTime. -func (mr *MockModelMigrationMockRecorder) SuccessTime() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) SuccessTime() *MockModelMigrationSuccessTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuccessTime", reflect.TypeOf((*MockModelMigration)(nil).SuccessTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuccessTime", reflect.TypeOf((*MockModelMigration)(nil).SuccessTime)) + return &MockModelMigrationSuccessTimeCall{Call: call} +} + +// MockModelMigrationSuccessTimeCall wrap *gomock.Call +type MockModelMigrationSuccessTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationSuccessTimeCall) Return(arg0 time.Time) *MockModelMigrationSuccessTimeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationSuccessTimeCall) Do(f func() time.Time) *MockModelMigrationSuccessTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationSuccessTimeCall) DoAndReturn(f func() time.Time) *MockModelMigrationSuccessTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TargetInfo mocks base method. @@ -279,9 +663,33 @@ func (m *MockModelMigration) TargetInfo() (*migration.TargetInfo, error) { } // TargetInfo indicates an expected call of TargetInfo. -func (mr *MockModelMigrationMockRecorder) TargetInfo() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) TargetInfo() *MockModelMigrationTargetInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TargetInfo", reflect.TypeOf((*MockModelMigration)(nil).TargetInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TargetInfo", reflect.TypeOf((*MockModelMigration)(nil).TargetInfo)) + return &MockModelMigrationTargetInfoCall{Call: call} +} + +// MockModelMigrationTargetInfoCall wrap *gomock.Call +type MockModelMigrationTargetInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationTargetInfoCall) Return(arg0 *migration.TargetInfo, arg1 error) *MockModelMigrationTargetInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationTargetInfoCall) Do(f func() (*migration.TargetInfo, error)) *MockModelMigrationTargetInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationTargetInfoCall) DoAndReturn(f func() (*migration.TargetInfo, error)) *MockModelMigrationTargetInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchMinionReports mocks base method. @@ -294,9 +702,33 @@ func (m *MockModelMigration) WatchMinionReports() (state.NotifyWatcher, error) { } // WatchMinionReports indicates an expected call of WatchMinionReports. -func (mr *MockModelMigrationMockRecorder) WatchMinionReports() *gomock.Call { +func (mr *MockModelMigrationMockRecorder) WatchMinionReports() *MockModelMigrationWatchMinionReportsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMinionReports", reflect.TypeOf((*MockModelMigration)(nil).WatchMinionReports)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMinionReports", reflect.TypeOf((*MockModelMigration)(nil).WatchMinionReports)) + return &MockModelMigrationWatchMinionReportsCall{Call: call} +} + +// MockModelMigrationWatchMinionReportsCall wrap *gomock.Call +type MockModelMigrationWatchMinionReportsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationWatchMinionReportsCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockModelMigrationWatchMinionReportsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationWatchMinionReportsCall) Do(f func() (state.NotifyWatcher, error)) *MockModelMigrationWatchMinionReportsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationWatchMinionReportsCall) DoAndReturn(f func() (state.NotifyWatcher, error)) *MockModelMigrationWatchMinionReportsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNotifyWatcher is a mock of NotifyWatcher interface. @@ -331,9 +763,33 @@ func (m *MockNotifyWatcher) Changes() <-chan struct{} { } // Changes indicates an expected call of Changes. -func (mr *MockNotifyWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Changes() *MockNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + return &MockNotifyWatcherChangesCall{Call: call} +} + +// MockNotifyWatcherChangesCall wrap *gomock.Call +type MockNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherChangesCall) Return(arg0 <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherChangesCall) Do(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherChangesCall) DoAndReturn(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -345,9 +801,33 @@ func (m *MockNotifyWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockNotifyWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Err() *MockNotifyWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockNotifyWatcher)(nil).Err)) + return &MockNotifyWatcherErrCall{Call: call} +} + +// MockNotifyWatcherErrCall wrap *gomock.Call +type MockNotifyWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherErrCall) Return(arg0 error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherErrCall) Do(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherErrCall) DoAndReturn(f func() error) *MockNotifyWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -357,9 +837,33 @@ func (m *MockNotifyWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockNotifyWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Kill() *MockNotifyWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + return &MockNotifyWatcherKillCall{Call: call} +} + +// MockNotifyWatcherKillCall wrap *gomock.Call +type MockNotifyWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherKillCall) Return() *MockNotifyWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherKillCall) Do(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherKillCall) DoAndReturn(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -371,9 +875,33 @@ func (m *MockNotifyWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockNotifyWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Stop() *MockNotifyWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop)) + return &MockNotifyWatcherStopCall{Call: call} +} + +// MockNotifyWatcherStopCall wrap *gomock.Call +type MockNotifyWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherStopCall) Return(arg0 error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherStopCall) Do(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherStopCall) DoAndReturn(f func() error) *MockNotifyWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -385,7 +913,31 @@ func (m *MockNotifyWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockNotifyWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Wait() *MockNotifyWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + return &MockNotifyWatcherWaitCall{Call: call} +} + +// MockNotifyWatcherWaitCall wrap *gomock.Call +type MockNotifyWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherWaitCall) Return(arg0 error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherWaitCall) Do(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherWaitCall) DoAndReturn(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationmaster/package_test.go b/apiserver/facades/controller/migrationmaster/package_test.go index 5905ee4e5a4..ee12816fa31 100644 --- a/apiserver/facades/controller/migrationmaster/package_test.go +++ b/apiserver/facades/controller/migrationmaster/package_test.go @@ -9,10 +9,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/controller/migrationmaster Backend,ControllerState,ModelExporter,UpgradeService,ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/precheckbackend.go github.com/juju/juju/internal/migration PrecheckBackend -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state.go github.com/juju/juju/state ModelMigration,NotifyWatcher -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/backend.go github.com/juju/juju/apiserver/facades/controller/migrationmaster Backend,ControllerState,ModelExporter,UpgradeService,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/precheckbackend.go github.com/juju/juju/internal/migration PrecheckBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state.go github.com/juju/juju/state ModelMigration,NotifyWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/objectstore.go github.com/juju/juju/core/objectstore ObjectStore func Test(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/migrationtarget/credential_mock_test.go b/apiserver/facades/controller/migrationtarget/credential_mock_test.go index 1e6dcf37f26..ccde72f5249 100644 --- a/apiserver/facades/controller/migrationtarget/credential_mock_test.go +++ b/apiserver/facades/controller/migrationtarget/credential_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrationtarget_test -destination credential_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator +// mockgen -typed -package migrationtarget_test -destination credential_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator // // Package migrationtarget_test is a generated GoMock package. @@ -52,7 +52,31 @@ func (m *MockCredentialValidator) Validate(arg0 context.Context, arg1 service.Cr } // Validate indicates an expected call of Validate. -func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *MockCredentialValidatorValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + return &MockCredentialValidatorValidateCall{Call: call} +} + +// MockCredentialValidatorValidateCall wrap *gomock.Call +type MockCredentialValidatorValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialValidatorValidateCall) Return(arg0 []error, arg1 error) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialValidatorValidateCall) Do(f func(context.Context, service.CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialValidatorValidateCall) DoAndReturn(f func(context.Context, service.CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationtarget/domain_mock_test.go b/apiserver/facades/controller/migrationtarget/domain_mock_test.go index 1cc809ae980..5a32f94c1e6 100644 --- a/apiserver/facades/controller/migrationtarget/domain_mock_test.go +++ b/apiserver/facades/controller/migrationtarget/domain_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrationtarget_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/migrationtarget ControllerConfigService,ExternalControllerService,UpgradeService,ModelImporter +// mockgen -typed -package migrationtarget_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/migrationtarget ControllerConfigService,ExternalControllerService,UpgradeService,ModelImporter // // Package migrationtarget_test is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExternalControllerService is a mock of ExternalControllerService interface. @@ -90,9 +114,33 @@ func (m *MockExternalControllerService) ControllerForModel(arg0 context.Context, } // ControllerForModel indicates an expected call of ControllerForModel. -func (mr *MockExternalControllerServiceMockRecorder) ControllerForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) ControllerForModel(arg0, arg1 any) *MockExternalControllerServiceControllerForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExternalControllerService)(nil).ControllerForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExternalControllerService)(nil).ControllerForModel), arg0, arg1) + return &MockExternalControllerServiceControllerForModelCall{Call: call} +} + +// MockExternalControllerServiceControllerForModelCall wrap *gomock.Call +type MockExternalControllerServiceControllerForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceControllerForModelCall) Return(arg0 *crossmodel.ControllerInfo, arg1 error) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceControllerForModelCall) Do(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceControllerForModelCall) DoAndReturn(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExternalControllerServiceControllerForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateExternalController mocks base method. @@ -104,9 +152,33 @@ func (m *MockExternalControllerService) UpdateExternalController(arg0 context.Co } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *MockExternalControllerServiceUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + return &MockExternalControllerServiceUpdateExternalControllerCall{Call: call} +} + +// MockExternalControllerServiceUpdateExternalControllerCall wrap *gomock.Call +type MockExternalControllerServiceUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Return(arg0 error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Do(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeService is a mock of UpgradeService interface. @@ -142,9 +214,33 @@ func (m *MockUpgradeService) IsUpgrading(arg0 context.Context) (bool, error) { } // IsUpgrading indicates an expected call of IsUpgrading. -func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *MockUpgradeServiceIsUpgradingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + return &MockUpgradeServiceIsUpgradingCall{Call: call} +} + +// MockUpgradeServiceIsUpgradingCall wrap *gomock.Call +type MockUpgradeServiceIsUpgradingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceIsUpgradingCall) Return(arg0 bool, arg1 error) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceIsUpgradingCall) Do(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceIsUpgradingCall) DoAndReturn(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelImporter is a mock of ModelImporter interface. @@ -181,7 +277,31 @@ func (m *MockModelImporter) ImportModel(arg0 context.Context, arg1 []byte) (*sta } // ImportModel indicates an expected call of ImportModel. -func (mr *MockModelImporterMockRecorder) ImportModel(arg0, arg1 any) *gomock.Call { +func (mr *MockModelImporterMockRecorder) ImportModel(arg0, arg1 any) *MockModelImporterImportModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportModel", reflect.TypeOf((*MockModelImporter)(nil).ImportModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportModel", reflect.TypeOf((*MockModelImporter)(nil).ImportModel), arg0, arg1) + return &MockModelImporterImportModelCall{Call: call} +} + +// MockModelImporterImportModelCall wrap *gomock.Call +type MockModelImporterImportModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelImporterImportModelCall) Return(arg0 *state.Model, arg1 *state.State, arg2 error) *MockModelImporterImportModelCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelImporterImportModelCall) Do(f func(context.Context, []byte) (*state.Model, *state.State, error)) *MockModelImporterImportModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelImporterImportModelCall) DoAndReturn(f func(context.Context, []byte) (*state.Model, *state.State, error)) *MockModelImporterImportModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/migrationtarget/package_test.go b/apiserver/facades/controller/migrationtarget/package_test.go index a10d0fa6c11..e50a4dd1be3 100644 --- a/apiserver/facades/controller/migrationtarget/package_test.go +++ b/apiserver/facades/controller/migrationtarget/package_test.go @@ -9,9 +9,9 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package migrationtarget_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/migrationtarget ControllerConfigService,ExternalControllerService,UpgradeService,ModelImporter -//go:generate go run go.uber.org/mock/mockgen -package migrationtarget_test -destination credential_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator -//go:generate go run go.uber.org/mock/mockgen -package migrationtarget_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package migrationtarget_test -destination domain_mock_test.go github.com/juju/juju/apiserver/facades/controller/migrationtarget ControllerConfigService,ExternalControllerService,UpgradeService,ModelImporter +//go:generate go run go.uber.org/mock/mockgen -typed -package migrationtarget_test -destination credential_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator +//go:generate go run go.uber.org/mock/mockgen -typed -package migrationtarget_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/apiserver/facades/controller/migrationtarget/servicefactory_mock_test.go b/apiserver/facades/controller/migrationtarget/servicefactory_mock_test.go index c3b9d4027ea..530f050177d 100644 --- a/apiserver/facades/controller/migrationtarget/servicefactory_mock_test.go +++ b/apiserver/facades/controller/migrationtarget/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrationtarget_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory +// mockgen -typed -package migrationtarget_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory // // Package migrationtarget_test is a generated GoMock package. @@ -71,9 +71,33 @@ func (m *MockServiceFactoryGetter) FactoryForModel(arg0 string) servicefactory.S } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryGetterFactoryForModelCall) Return(arg0 servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryGetterFactoryForModelCall) Do(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceFactory is a mock of ServiceFactory interface. @@ -108,9 +132,33 @@ func (m *MockServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Access() *MockServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + return &MockServiceFactoryAccessCall{Call: call} +} + +// MockServiceFactoryAccessCall wrap *gomock.Call +type MockServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAccessCall) Return(arg0 *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAccessCall) Do(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -122,9 +170,33 @@ func (m *MockServiceFactory) AgentObjectStore() *service15.WatchableService { } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *MockServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + return &MockServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAgentObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAgentObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotation mocks base method. @@ -136,9 +208,33 @@ func (m *MockServiceFactory) Annotation() *service0.Service { } // Annotation indicates an expected call of Annotation. -func (mr *MockServiceFactoryMockRecorder) Annotation() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Annotation() *MockServiceFactoryAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + return &MockServiceFactoryAnnotationCall{Call: call} +} + +// MockServiceFactoryAnnotationCall wrap *gomock.Call +type MockServiceFactoryAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAnnotationCall) Return(arg0 *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAnnotationCall) Do(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAnnotationCall) DoAndReturn(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -150,9 +246,33 @@ func (m *MockServiceFactory) Application(arg0 storage.ProviderRegistry) *service } // Application indicates an expected call of Application. -func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *MockServiceFactoryApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + return &MockServiceFactoryApplicationCall{Call: call} +} + +// MockServiceFactoryApplicationCall wrap *gomock.Call +type MockServiceFactoryApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryApplicationCall) Return(arg0 *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryApplicationCall) Do(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryApplicationCall) DoAndReturn(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -164,9 +284,33 @@ func (m *MockServiceFactory) AutocertCache() *service2.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AutocertCache() *MockServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + return &MockServiceFactoryAutocertCacheCall{Call: call} +} + +// MockServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAutocertCacheCall) Return(arg0 *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAutocertCacheCall) Do(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BlockDevice mocks base method. @@ -178,9 +322,33 @@ func (m *MockServiceFactory) BlockDevice() *service3.WatchableService { } // BlockDevice indicates an expected call of BlockDevice. -func (mr *MockServiceFactoryMockRecorder) BlockDevice() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) BlockDevice() *MockServiceFactoryBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + return &MockServiceFactoryBlockDeviceCall{Call: call} +} + +// MockServiceFactoryBlockDeviceCall wrap *gomock.Call +type MockServiceFactoryBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryBlockDeviceCall) Return(arg0 *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryBlockDeviceCall) Do(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryBlockDeviceCall) DoAndReturn(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -192,9 +360,33 @@ func (m *MockServiceFactory) Cloud() *service4.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Cloud() *MockServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + return &MockServiceFactoryCloudCall{Call: call} +} + +// MockServiceFactoryCloudCall wrap *gomock.Call +type MockServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCloudCall) Return(arg0 *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCloudCall) Do(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCloudCall) DoAndReturn(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -206,9 +398,33 @@ func (m *MockServiceFactory) Config() *service12.WatchableService { } // Config indicates an expected call of Config. -func (mr *MockServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Config() *MockServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + return &MockServiceFactoryConfigCall{Call: call} +} + +// MockServiceFactoryConfigCall wrap *gomock.Call +type MockServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryConfigCall) Return(arg0 *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryConfigCall) Do(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryConfigCall) DoAndReturn(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -220,9 +436,33 @@ func (m *MockServiceFactory) ControllerConfig() *service5.WatchableService { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *MockServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + return &MockServiceFactoryControllerConfigCall{Call: call} +} + +// MockServiceFactoryControllerConfigCall wrap *gomock.Call +type MockServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerConfigCall) Return(arg0 *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerConfigCall) Do(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerConfigCall) DoAndReturn(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -234,9 +474,33 @@ func (m *MockServiceFactory) ControllerNode() *service6.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerNode() *MockServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + return &MockServiceFactoryControllerNodeCall{Call: call} +} + +// MockServiceFactoryControllerNodeCall wrap *gomock.Call +type MockServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerNodeCall) Return(arg0 *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerNodeCall) Do(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerNodeCall) DoAndReturn(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -248,9 +512,33 @@ func (m *MockServiceFactory) Credential() *service7.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Credential() *MockServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + return &MockServiceFactoryCredentialCall{Call: call} +} + +// MockServiceFactoryCredentialCall wrap *gomock.Call +type MockServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCredentialCall) Return(arg0 *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCredentialCall) Do(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCredentialCall) DoAndReturn(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -262,9 +550,33 @@ func (m *MockServiceFactory) ExternalController() *service8.WatchableService { } // ExternalController indicates an expected call of ExternalController. -func (mr *MockServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ExternalController() *MockServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + return &MockServiceFactoryExternalControllerCall{Call: call} +} + +// MockServiceFactoryExternalControllerCall wrap *gomock.Call +type MockServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryExternalControllerCall) Return(arg0 *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryExternalControllerCall) Do(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryExternalControllerCall) DoAndReturn(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -276,9 +588,33 @@ func (m *MockServiceFactory) Flag() *service9.Service { } // Flag indicates an expected call of Flag. -func (mr *MockServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Flag() *MockServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + return &MockServiceFactoryFlagCall{Call: call} +} + +// MockServiceFactoryFlagCall wrap *gomock.Call +type MockServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryFlagCall) Return(arg0 *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryFlagCall) Do(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryFlagCall) DoAndReturn(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -290,9 +626,33 @@ func (m *MockServiceFactory) Machine() *service10.Service { } // Machine indicates an expected call of Machine. -func (mr *MockServiceFactoryMockRecorder) Machine() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Machine() *MockServiceFactoryMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + return &MockServiceFactoryMachineCall{Call: call} +} + +// MockServiceFactoryMachineCall wrap *gomock.Call +type MockServiceFactoryMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryMachineCall) Return(arg0 *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryMachineCall) Do(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryMachineCall) DoAndReturn(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -304,9 +664,33 @@ func (m *MockServiceFactory) Model() *service11.Service { } // Model indicates an expected call of Model. -func (mr *MockServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Model() *MockServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + return &MockServiceFactoryModelCall{Call: call} +} + +// MockServiceFactoryModelCall wrap *gomock.Call +type MockServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelCall) Return(arg0 *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelCall) Do(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelCall) DoAndReturn(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -318,9 +702,33 @@ func (m *MockServiceFactory) ModelDefaults() *service13.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *MockServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + return &MockServiceFactoryModelDefaultsCall{Call: call} +} + +// MockServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelDefaultsCall) Return(arg0 *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelDefaultsCall) Do(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelInfo mocks base method. @@ -332,9 +740,33 @@ func (m *MockServiceFactory) ModelInfo() *service11.ModelService { } // ModelInfo indicates an expected call of ModelInfo. -func (mr *MockServiceFactoryMockRecorder) ModelInfo() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelInfo() *MockServiceFactoryModelInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + return &MockServiceFactoryModelInfoCall{Call: call} +} + +// MockServiceFactoryModelInfoCall wrap *gomock.Call +type MockServiceFactoryModelInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelInfoCall) Return(arg0 *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelInfoCall) Do(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelInfoCall) DoAndReturn(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Network mocks base method. @@ -346,9 +778,33 @@ func (m *MockServiceFactory) Network() *service14.WatchableService { } // Network indicates an expected call of Network. -func (mr *MockServiceFactoryMockRecorder) Network() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Network() *MockServiceFactoryNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + return &MockServiceFactoryNetworkCall{Call: call} +} + +// MockServiceFactoryNetworkCall wrap *gomock.Call +type MockServiceFactoryNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryNetworkCall) Return(arg0 *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryNetworkCall) Do(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryNetworkCall) DoAndReturn(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStore mocks base method. @@ -360,9 +816,33 @@ func (m *MockServiceFactory) ObjectStore() *service15.WatchableService { } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockServiceFactoryMockRecorder) ObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ObjectStore() *MockServiceFactoryObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + return &MockServiceFactoryObjectStoreCall{Call: call} +} + +// MockServiceFactoryObjectStoreCall wrap *gomock.Call +type MockServiceFactoryObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secret mocks base method. @@ -374,9 +854,33 @@ func (m *MockServiceFactory) Secret(arg0 service16.BackendAdminConfigGetter) *se } // Secret indicates an expected call of Secret. -func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *MockServiceFactorySecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + return &MockServiceFactorySecretCall{Call: call} +} + +// MockServiceFactorySecretCall wrap *gomock.Call +type MockServiceFactorySecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretCall) Return(arg0 *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretCall) Do(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretCall) DoAndReturn(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -388,9 +892,33 @@ func (m *MockServiceFactory) SecretBackend() *service17.WatchableService { } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) SecretBackend() *MockServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + return &MockServiceFactorySecretBackendCall{Call: call} +} + +// MockServiceFactorySecretBackendCall wrap *gomock.Call +type MockServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretBackendCall) Return(arg0 *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretBackendCall) Do(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretBackendCall) DoAndReturn(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -402,9 +930,33 @@ func (m *MockServiceFactory) Storage(arg0 storage.ProviderRegistry) *service18.S } // Storage indicates an expected call of Storage. -func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *MockServiceFactoryStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + return &MockServiceFactoryStorageCall{Call: call} +} + +// MockServiceFactoryStorageCall wrap *gomock.Call +type MockServiceFactoryStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryStorageCall) Return(arg0 *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryStorageCall) Do(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryStorageCall) DoAndReturn(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -416,9 +968,33 @@ func (m *MockServiceFactory) Unit() *service19.Service { } // Unit indicates an expected call of Unit. -func (mr *MockServiceFactoryMockRecorder) Unit() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Unit() *MockServiceFactoryUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + return &MockServiceFactoryUnitCall{Call: call} +} + +// MockServiceFactoryUnitCall wrap *gomock.Call +type MockServiceFactoryUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUnitCall) Return(arg0 *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUnitCall) Do(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUnitCall) DoAndReturn(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -430,7 +1006,31 @@ func (m *MockServiceFactory) Upgrade() *service20.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Upgrade() *MockServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + return &MockServiceFactoryUpgradeCall{Call: call} +} + +// MockServiceFactoryUpgradeCall wrap *gomock.Call +type MockServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUpgradeCall) Return(arg0 *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUpgradeCall) Do(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUpgradeCall) DoAndReturn(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/remoterelations/mocks/remoterelations_mocks.go b/apiserver/facades/controller/remoterelations/mocks/remoterelations_mocks.go index c1f72dce8e7..6f3543e2ea0 100644 --- a/apiserver/facades/controller/remoterelations/mocks/remoterelations_mocks.go +++ b/apiserver/facades/controller/remoterelations/mocks/remoterelations_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/remoterelations_mocks.go github.com/juju/juju/apiserver/facades/controller/remoterelations RemoteRelationsState,ControllerConfigAPI,ExternalControllerService,SecretService +// mockgen -typed -package mocks -destination mocks/remoterelations_mocks.go github.com/juju/juju/apiserver/facades/controller/remoterelations RemoteRelationsState,ControllerConfigAPI,ExternalControllerService,SecretService // // Package mocks is a generated GoMock package. @@ -62,9 +62,33 @@ func (m *MockRemoteRelationsState) AddRelation(arg0 ...state.Endpoint) (crossmod } // AddRelation indicates an expected call of AddRelation. -func (mr *MockRemoteRelationsStateMockRecorder) AddRelation(arg0 ...any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) AddRelation(arg0 ...any) *MockRemoteRelationsStateAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).AddRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).AddRelation), arg0...) + return &MockRemoteRelationsStateAddRelationCall{Call: call} +} + +// MockRemoteRelationsStateAddRelationCall wrap *gomock.Call +type MockRemoteRelationsStateAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateAddRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockRemoteRelationsStateAddRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateAddRelationCall) Do(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockRemoteRelationsStateAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateAddRelationCall) DoAndReturn(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockRemoteRelationsStateAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteApplication mocks base method. @@ -77,9 +101,33 @@ func (m *MockRemoteRelationsState) AddRemoteApplication(arg0 state.AddRemoteAppl } // AddRemoteApplication indicates an expected call of AddRemoteApplication. -func (mr *MockRemoteRelationsStateMockRecorder) AddRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) AddRemoteApplication(arg0 any) *MockRemoteRelationsStateAddRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockRemoteRelationsState)(nil).AddRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockRemoteRelationsState)(nil).AddRemoteApplication), arg0) + return &MockRemoteRelationsStateAddRemoteApplicationCall{Call: call} +} + +// MockRemoteRelationsStateAddRemoteApplicationCall wrap *gomock.Call +type MockRemoteRelationsStateAddRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateAddRemoteApplicationCall) Return(arg0 crossmodel.RemoteApplication, arg1 error) *MockRemoteRelationsStateAddRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateAddRemoteApplicationCall) Do(f func(state.AddRemoteApplicationParams) (crossmodel.RemoteApplication, error)) *MockRemoteRelationsStateAddRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateAddRemoteApplicationCall) DoAndReturn(f func(state.AddRemoteApplicationParams) (crossmodel.RemoteApplication, error)) *MockRemoteRelationsStateAddRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelUUIDs mocks base method. @@ -92,9 +140,33 @@ func (m *MockRemoteRelationsState) AllModelUUIDs() ([]string, error) { } // AllModelUUIDs indicates an expected call of AllModelUUIDs. -func (mr *MockRemoteRelationsStateMockRecorder) AllModelUUIDs() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) AllModelUUIDs() *MockRemoteRelationsStateAllModelUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockRemoteRelationsState)(nil).AllModelUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelUUIDs", reflect.TypeOf((*MockRemoteRelationsState)(nil).AllModelUUIDs)) + return &MockRemoteRelationsStateAllModelUUIDsCall{Call: call} +} + +// MockRemoteRelationsStateAllModelUUIDsCall wrap *gomock.Call +type MockRemoteRelationsStateAllModelUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateAllModelUUIDsCall) Return(arg0 []string, arg1 error) *MockRemoteRelationsStateAllModelUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateAllModelUUIDsCall) Do(f func() ([]string, error)) *MockRemoteRelationsStateAllModelUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateAllModelUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockRemoteRelationsStateAllModelUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -107,9 +179,33 @@ func (m *MockRemoteRelationsState) Application(arg0 string) (crossmodel.Applicat } // Application indicates an expected call of Application. -func (mr *MockRemoteRelationsStateMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) Application(arg0 any) *MockRemoteRelationsStateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockRemoteRelationsState)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockRemoteRelationsState)(nil).Application), arg0) + return &MockRemoteRelationsStateApplicationCall{Call: call} +} + +// MockRemoteRelationsStateApplicationCall wrap *gomock.Call +type MockRemoteRelationsStateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateApplicationCall) Return(arg0 crossmodel.Application, arg1 error) *MockRemoteRelationsStateApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateApplicationCall) Do(f func(string) (crossmodel.Application, error)) *MockRemoteRelationsStateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateApplicationCall) DoAndReturn(f func(string) (crossmodel.Application, error)) *MockRemoteRelationsStateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationOfferForUUID mocks base method. @@ -122,9 +218,33 @@ func (m *MockRemoteRelationsState) ApplicationOfferForUUID(arg0 string) (*crossm } // ApplicationOfferForUUID indicates an expected call of ApplicationOfferForUUID. -func (mr *MockRemoteRelationsStateMockRecorder) ApplicationOfferForUUID(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ApplicationOfferForUUID(arg0 any) *MockRemoteRelationsStateApplicationOfferForUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockRemoteRelationsState)(nil).ApplicationOfferForUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOfferForUUID", reflect.TypeOf((*MockRemoteRelationsState)(nil).ApplicationOfferForUUID), arg0) + return &MockRemoteRelationsStateApplicationOfferForUUIDCall{Call: call} +} + +// MockRemoteRelationsStateApplicationOfferForUUIDCall wrap *gomock.Call +type MockRemoteRelationsStateApplicationOfferForUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateApplicationOfferForUUIDCall) Return(arg0 *crossmodel0.ApplicationOffer, arg1 error) *MockRemoteRelationsStateApplicationOfferForUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateApplicationOfferForUUIDCall) Do(f func(string) (*crossmodel0.ApplicationOffer, error)) *MockRemoteRelationsStateApplicationOfferForUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateApplicationOfferForUUIDCall) DoAndReturn(f func(string) (*crossmodel0.ApplicationOffer, error)) *MockRemoteRelationsStateApplicationOfferForUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyOperation mocks base method. @@ -136,9 +256,33 @@ func (m *MockRemoteRelationsState) ApplyOperation(arg0 state.ModelOperation) err } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockRemoteRelationsStateMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ApplyOperation(arg0 any) *MockRemoteRelationsStateApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockRemoteRelationsState)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockRemoteRelationsState)(nil).ApplyOperation), arg0) + return &MockRemoteRelationsStateApplyOperationCall{Call: call} +} + +// MockRemoteRelationsStateApplyOperationCall wrap *gomock.Call +type MockRemoteRelationsStateApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateApplyOperationCall) Return(arg0 error) *MockRemoteRelationsStateApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateApplyOperationCall) Do(f func(state.ModelOperation) error) *MockRemoteRelationsStateApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateApplyOperationCall) DoAndReturn(f func(state.ModelOperation) error) *MockRemoteRelationsStateApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -150,9 +294,33 @@ func (m *MockRemoteRelationsState) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockRemoteRelationsStateMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ControllerTag() *MockRemoteRelationsStateControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockRemoteRelationsState)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockRemoteRelationsState)(nil).ControllerTag)) + return &MockRemoteRelationsStateControllerTagCall{Call: call} +} + +// MockRemoteRelationsStateControllerTagCall wrap *gomock.Call +type MockRemoteRelationsStateControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateControllerTagCall) Return(arg0 names.ControllerTag) *MockRemoteRelationsStateControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateControllerTagCall) Do(f func() names.ControllerTag) *MockRemoteRelationsStateControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockRemoteRelationsStateControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointsRelation mocks base method. @@ -169,9 +337,33 @@ func (m *MockRemoteRelationsState) EndpointsRelation(arg0 ...state.Endpoint) (cr } // EndpointsRelation indicates an expected call of EndpointsRelation. -func (mr *MockRemoteRelationsStateMockRecorder) EndpointsRelation(arg0 ...any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) EndpointsRelation(arg0 ...any) *MockRemoteRelationsStateEndpointsRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).EndpointsRelation), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).EndpointsRelation), arg0...) + return &MockRemoteRelationsStateEndpointsRelationCall{Call: call} +} + +// MockRemoteRelationsStateEndpointsRelationCall wrap *gomock.Call +type MockRemoteRelationsStateEndpointsRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateEndpointsRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockRemoteRelationsStateEndpointsRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateEndpointsRelationCall) Do(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockRemoteRelationsStateEndpointsRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateEndpointsRelationCall) DoAndReturn(f func(...state.Endpoint) (crossmodel.Relation, error)) *MockRemoteRelationsStateEndpointsRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExportLocalEntity mocks base method. @@ -184,9 +376,33 @@ func (m *MockRemoteRelationsState) ExportLocalEntity(arg0 names.Tag) (string, er } // ExportLocalEntity indicates an expected call of ExportLocalEntity. -func (mr *MockRemoteRelationsStateMockRecorder) ExportLocalEntity(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ExportLocalEntity(arg0 any) *MockRemoteRelationsStateExportLocalEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportLocalEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).ExportLocalEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportLocalEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).ExportLocalEntity), arg0) + return &MockRemoteRelationsStateExportLocalEntityCall{Call: call} +} + +// MockRemoteRelationsStateExportLocalEntityCall wrap *gomock.Call +type MockRemoteRelationsStateExportLocalEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateExportLocalEntityCall) Return(arg0 string, arg1 error) *MockRemoteRelationsStateExportLocalEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateExportLocalEntityCall) Do(f func(names.Tag) (string, error)) *MockRemoteRelationsStateExportLocalEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateExportLocalEntityCall) DoAndReturn(f func(names.Tag) (string, error)) *MockRemoteRelationsStateExportLocalEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOfferAccess mocks base method. @@ -199,9 +415,33 @@ func (m *MockRemoteRelationsState) GetOfferAccess(arg0 string, arg1 names.UserTa } // GetOfferAccess indicates an expected call of GetOfferAccess. -func (mr *MockRemoteRelationsStateMockRecorder) GetOfferAccess(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) GetOfferAccess(arg0, arg1 any) *MockRemoteRelationsStateGetOfferAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOfferAccess", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetOfferAccess), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOfferAccess", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetOfferAccess), arg0, arg1) + return &MockRemoteRelationsStateGetOfferAccessCall{Call: call} +} + +// MockRemoteRelationsStateGetOfferAccessCall wrap *gomock.Call +type MockRemoteRelationsStateGetOfferAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateGetOfferAccessCall) Return(arg0 permission.Access, arg1 error) *MockRemoteRelationsStateGetOfferAccessCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateGetOfferAccessCall) Do(f func(string, names.UserTag) (permission.Access, error)) *MockRemoteRelationsStateGetOfferAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateGetOfferAccessCall) DoAndReturn(f func(string, names.UserTag) (permission.Access, error)) *MockRemoteRelationsStateGetOfferAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRemoteEntity mocks base method. @@ -214,9 +454,33 @@ func (m *MockRemoteRelationsState) GetRemoteEntity(arg0 string) (names.Tag, erro } // GetRemoteEntity indicates an expected call of GetRemoteEntity. -func (mr *MockRemoteRelationsStateMockRecorder) GetRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) GetRemoteEntity(arg0 any) *MockRemoteRelationsStateGetRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetRemoteEntity), arg0) + return &MockRemoteRelationsStateGetRemoteEntityCall{Call: call} +} + +// MockRemoteRelationsStateGetRemoteEntityCall wrap *gomock.Call +type MockRemoteRelationsStateGetRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateGetRemoteEntityCall) Return(arg0 names.Tag, arg1 error) *MockRemoteRelationsStateGetRemoteEntityCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateGetRemoteEntityCall) Do(f func(string) (names.Tag, error)) *MockRemoteRelationsStateGetRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateGetRemoteEntityCall) DoAndReturn(f func(string) (names.Tag, error)) *MockRemoteRelationsStateGetRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetToken mocks base method. @@ -229,9 +493,33 @@ func (m *MockRemoteRelationsState) GetToken(arg0 names.Tag) (string, error) { } // GetToken indicates an expected call of GetToken. -func (mr *MockRemoteRelationsStateMockRecorder) GetToken(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) GetToken(arg0 any) *MockRemoteRelationsStateGetTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockRemoteRelationsState)(nil).GetToken), arg0) + return &MockRemoteRelationsStateGetTokenCall{Call: call} +} + +// MockRemoteRelationsStateGetTokenCall wrap *gomock.Call +type MockRemoteRelationsStateGetTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateGetTokenCall) Return(arg0 string, arg1 error) *MockRemoteRelationsStateGetTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateGetTokenCall) Do(f func(names.Tag) (string, error)) *MockRemoteRelationsStateGetTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateGetTokenCall) DoAndReturn(f func(names.Tag) (string, error)) *MockRemoteRelationsStateGetTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ImportRemoteEntity mocks base method. @@ -243,9 +531,33 @@ func (m *MockRemoteRelationsState) ImportRemoteEntity(arg0 names.Tag, arg1 strin } // ImportRemoteEntity indicates an expected call of ImportRemoteEntity. -func (mr *MockRemoteRelationsStateMockRecorder) ImportRemoteEntity(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ImportRemoteEntity(arg0, arg1 any) *MockRemoteRelationsStateImportRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).ImportRemoteEntity), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).ImportRemoteEntity), arg0, arg1) + return &MockRemoteRelationsStateImportRemoteEntityCall{Call: call} +} + +// MockRemoteRelationsStateImportRemoteEntityCall wrap *gomock.Call +type MockRemoteRelationsStateImportRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateImportRemoteEntityCall) Return(arg0 error) *MockRemoteRelationsStateImportRemoteEntityCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateImportRemoteEntityCall) Do(f func(names.Tag, string) error) *MockRemoteRelationsStateImportRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateImportRemoteEntityCall) DoAndReturn(f func(names.Tag, string) error) *MockRemoteRelationsStateImportRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IngressNetworks mocks base method. @@ -258,9 +570,33 @@ func (m *MockRemoteRelationsState) IngressNetworks(arg0 string) (state.RelationN } // IngressNetworks indicates an expected call of IngressNetworks. -func (mr *MockRemoteRelationsStateMockRecorder) IngressNetworks(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) IngressNetworks(arg0 any) *MockRemoteRelationsStateIngressNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressNetworks", reflect.TypeOf((*MockRemoteRelationsState)(nil).IngressNetworks), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressNetworks", reflect.TypeOf((*MockRemoteRelationsState)(nil).IngressNetworks), arg0) + return &MockRemoteRelationsStateIngressNetworksCall{Call: call} +} + +// MockRemoteRelationsStateIngressNetworksCall wrap *gomock.Call +type MockRemoteRelationsStateIngressNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateIngressNetworksCall) Return(arg0 state.RelationNetworks, arg1 error) *MockRemoteRelationsStateIngressNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateIngressNetworksCall) Do(f func(string) (state.RelationNetworks, error)) *MockRemoteRelationsStateIngressNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateIngressNetworksCall) DoAndReturn(f func(string) (state.RelationNetworks, error)) *MockRemoteRelationsStateIngressNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // KeyRelation mocks base method. @@ -273,9 +609,33 @@ func (m *MockRemoteRelationsState) KeyRelation(arg0 string) (crossmodel.Relation } // KeyRelation indicates an expected call of KeyRelation. -func (mr *MockRemoteRelationsStateMockRecorder) KeyRelation(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) KeyRelation(arg0 any) *MockRemoteRelationsStateKeyRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).KeyRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).KeyRelation), arg0) + return &MockRemoteRelationsStateKeyRelationCall{Call: call} +} + +// MockRemoteRelationsStateKeyRelationCall wrap *gomock.Call +type MockRemoteRelationsStateKeyRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateKeyRelationCall) Return(arg0 crossmodel.Relation, arg1 error) *MockRemoteRelationsStateKeyRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateKeyRelationCall) Do(f func(string) (crossmodel.Relation, error)) *MockRemoteRelationsStateKeyRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateKeyRelationCall) DoAndReturn(f func(string) (crossmodel.Relation, error)) *MockRemoteRelationsStateKeyRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -288,9 +648,33 @@ func (m *MockRemoteRelationsState) ModelConfig(arg0 context.Context) (*config.Co } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockRemoteRelationsStateMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ModelConfig(arg0 any) *MockRemoteRelationsStateModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelConfig), arg0) + return &MockRemoteRelationsStateModelConfigCall{Call: call} +} + +// MockRemoteRelationsStateModelConfigCall wrap *gomock.Call +type MockRemoteRelationsStateModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockRemoteRelationsStateModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockRemoteRelationsStateModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockRemoteRelationsStateModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -302,9 +686,33 @@ func (m *MockRemoteRelationsState) ModelTag() names.ModelTag { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockRemoteRelationsStateMockRecorder) ModelTag() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ModelTag() *MockRemoteRelationsStateModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelTag)) + return &MockRemoteRelationsStateModelTagCall{Call: call} +} + +// MockRemoteRelationsStateModelTagCall wrap *gomock.Call +type MockRemoteRelationsStateModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateModelTagCall) Return(arg0 names.ModelTag) *MockRemoteRelationsStateModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateModelTagCall) Do(f func() names.ModelTag) *MockRemoteRelationsStateModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateModelTagCall) DoAndReturn(f func() names.ModelTag) *MockRemoteRelationsStateModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -316,9 +724,33 @@ func (m *MockRemoteRelationsState) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockRemoteRelationsStateMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) ModelUUID() *MockRemoteRelationsStateModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRemoteRelationsState)(nil).ModelUUID)) + return &MockRemoteRelationsStateModelUUIDCall{Call: call} +} + +// MockRemoteRelationsStateModelUUIDCall wrap *gomock.Call +type MockRemoteRelationsStateModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateModelUUIDCall) Return(arg0 string) *MockRemoteRelationsStateModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateModelUUIDCall) Do(f func() string) *MockRemoteRelationsStateModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateModelUUIDCall) DoAndReturn(f func() string) *MockRemoteRelationsStateModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferConnectionForRelation mocks base method. @@ -331,9 +763,33 @@ func (m *MockRemoteRelationsState) OfferConnectionForRelation(arg0 string) (cros } // OfferConnectionForRelation indicates an expected call of OfferConnectionForRelation. -func (mr *MockRemoteRelationsStateMockRecorder) OfferConnectionForRelation(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) OfferConnectionForRelation(arg0 any) *MockRemoteRelationsStateOfferConnectionForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).OfferConnectionForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnectionForRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).OfferConnectionForRelation), arg0) + return &MockRemoteRelationsStateOfferConnectionForRelationCall{Call: call} +} + +// MockRemoteRelationsStateOfferConnectionForRelationCall wrap *gomock.Call +type MockRemoteRelationsStateOfferConnectionForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateOfferConnectionForRelationCall) Return(arg0 crossmodel.OfferConnection, arg1 error) *MockRemoteRelationsStateOfferConnectionForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateOfferConnectionForRelationCall) Do(f func(string) (crossmodel.OfferConnection, error)) *MockRemoteRelationsStateOfferConnectionForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateOfferConnectionForRelationCall) DoAndReturn(f func(string) (crossmodel.OfferConnection, error)) *MockRemoteRelationsStateOfferConnectionForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUIDForRelation mocks base method. @@ -346,9 +802,33 @@ func (m *MockRemoteRelationsState) OfferUUIDForRelation(arg0 string) (string, er } // OfferUUIDForRelation indicates an expected call of OfferUUIDForRelation. -func (mr *MockRemoteRelationsStateMockRecorder) OfferUUIDForRelation(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) OfferUUIDForRelation(arg0 any) *MockRemoteRelationsStateOfferUUIDForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).OfferUUIDForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForRelation", reflect.TypeOf((*MockRemoteRelationsState)(nil).OfferUUIDForRelation), arg0) + return &MockRemoteRelationsStateOfferUUIDForRelationCall{Call: call} +} + +// MockRemoteRelationsStateOfferUUIDForRelationCall wrap *gomock.Call +type MockRemoteRelationsStateOfferUUIDForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateOfferUUIDForRelationCall) Return(arg0 string, arg1 error) *MockRemoteRelationsStateOfferUUIDForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateOfferUUIDForRelationCall) Do(f func(string) (string, error)) *MockRemoteRelationsStateOfferUUIDForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateOfferUUIDForRelationCall) DoAndReturn(f func(string) (string, error)) *MockRemoteRelationsStateOfferUUIDForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplication mocks base method. @@ -361,9 +841,33 @@ func (m *MockRemoteRelationsState) RemoteApplication(arg0 string) (crossmodel.Re } // RemoteApplication indicates an expected call of RemoteApplication. -func (mr *MockRemoteRelationsStateMockRecorder) RemoteApplication(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) RemoteApplication(arg0 any) *MockRemoteRelationsStateRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockRemoteRelationsState)(nil).RemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockRemoteRelationsState)(nil).RemoteApplication), arg0) + return &MockRemoteRelationsStateRemoteApplicationCall{Call: call} +} + +// MockRemoteRelationsStateRemoteApplicationCall wrap *gomock.Call +type MockRemoteRelationsStateRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateRemoteApplicationCall) Return(arg0 crossmodel.RemoteApplication, arg1 error) *MockRemoteRelationsStateRemoteApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateRemoteApplicationCall) Do(f func(string) (crossmodel.RemoteApplication, error)) *MockRemoteRelationsStateRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateRemoteApplicationCall) DoAndReturn(f func(string) (crossmodel.RemoteApplication, error)) *MockRemoteRelationsStateRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveRemoteEntity mocks base method. @@ -375,9 +879,33 @@ func (m *MockRemoteRelationsState) RemoveRemoteEntity(arg0 names.Tag) error { } // RemoveRemoteEntity indicates an expected call of RemoveRemoteEntity. -func (mr *MockRemoteRelationsStateMockRecorder) RemoveRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) RemoveRemoteEntity(arg0 any) *MockRemoteRelationsStateRemoveRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).RemoveRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRemoteEntity", reflect.TypeOf((*MockRemoteRelationsState)(nil).RemoveRemoteEntity), arg0) + return &MockRemoteRelationsStateRemoveRemoteEntityCall{Call: call} +} + +// MockRemoteRelationsStateRemoveRemoteEntityCall wrap *gomock.Call +type MockRemoteRelationsStateRemoveRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateRemoveRemoteEntityCall) Return(arg0 error) *MockRemoteRelationsStateRemoveRemoteEntityCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateRemoveRemoteEntityCall) Do(f func(names.Tag) error) *MockRemoteRelationsStateRemoveRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateRemoveRemoteEntityCall) DoAndReturn(f func(names.Tag) error) *MockRemoteRelationsStateRemoveRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveIngressNetworks mocks base method. @@ -390,9 +918,33 @@ func (m *MockRemoteRelationsState) SaveIngressNetworks(arg0 string, arg1 []strin } // SaveIngressNetworks indicates an expected call of SaveIngressNetworks. -func (mr *MockRemoteRelationsStateMockRecorder) SaveIngressNetworks(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) SaveIngressNetworks(arg0, arg1 any) *MockRemoteRelationsStateSaveIngressNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveIngressNetworks", reflect.TypeOf((*MockRemoteRelationsState)(nil).SaveIngressNetworks), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveIngressNetworks", reflect.TypeOf((*MockRemoteRelationsState)(nil).SaveIngressNetworks), arg0, arg1) + return &MockRemoteRelationsStateSaveIngressNetworksCall{Call: call} +} + +// MockRemoteRelationsStateSaveIngressNetworksCall wrap *gomock.Call +type MockRemoteRelationsStateSaveIngressNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateSaveIngressNetworksCall) Return(arg0 state.RelationNetworks, arg1 error) *MockRemoteRelationsStateSaveIngressNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateSaveIngressNetworksCall) Do(f func(string, []string) (state.RelationNetworks, error)) *MockRemoteRelationsStateSaveIngressNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateSaveIngressNetworksCall) DoAndReturn(f func(string, []string) (state.RelationNetworks, error)) *MockRemoteRelationsStateSaveIngressNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveMacaroon mocks base method. @@ -404,9 +956,33 @@ func (m *MockRemoteRelationsState) SaveMacaroon(arg0 names.Tag, arg1 *macaroon.M } // SaveMacaroon indicates an expected call of SaveMacaroon. -func (mr *MockRemoteRelationsStateMockRecorder) SaveMacaroon(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) SaveMacaroon(arg0, arg1 any) *MockRemoteRelationsStateSaveMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveMacaroon", reflect.TypeOf((*MockRemoteRelationsState)(nil).SaveMacaroon), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveMacaroon", reflect.TypeOf((*MockRemoteRelationsState)(nil).SaveMacaroon), arg0, arg1) + return &MockRemoteRelationsStateSaveMacaroonCall{Call: call} +} + +// MockRemoteRelationsStateSaveMacaroonCall wrap *gomock.Call +type MockRemoteRelationsStateSaveMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateSaveMacaroonCall) Return(arg0 error) *MockRemoteRelationsStateSaveMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateSaveMacaroonCall) Do(f func(names.Tag, *macaroon.Macaroon) error) *MockRemoteRelationsStateSaveMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateSaveMacaroonCall) DoAndReturn(f func(names.Tag, *macaroon.Macaroon) error) *MockRemoteRelationsStateSaveMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserPermission mocks base method. @@ -419,9 +995,33 @@ func (m *MockRemoteRelationsState) UserPermission(arg0 names.UserTag, arg1 names } // UserPermission indicates an expected call of UserPermission. -func (mr *MockRemoteRelationsStateMockRecorder) UserPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) UserPermission(arg0, arg1 any) *MockRemoteRelationsStateUserPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserPermission", reflect.TypeOf((*MockRemoteRelationsState)(nil).UserPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserPermission", reflect.TypeOf((*MockRemoteRelationsState)(nil).UserPermission), arg0, arg1) + return &MockRemoteRelationsStateUserPermissionCall{Call: call} +} + +// MockRemoteRelationsStateUserPermissionCall wrap *gomock.Call +type MockRemoteRelationsStateUserPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateUserPermissionCall) Return(arg0 permission.Access, arg1 error) *MockRemoteRelationsStateUserPermissionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateUserPermissionCall) Do(f func(names.UserTag, names.Tag) (permission.Access, error)) *MockRemoteRelationsStateUserPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateUserPermissionCall) DoAndReturn(f func(names.UserTag, names.Tag) (permission.Access, error)) *MockRemoteRelationsStateUserPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOffer mocks base method. @@ -433,9 +1033,33 @@ func (m *MockRemoteRelationsState) WatchOffer(arg0 string) state.NotifyWatcher { } // WatchOffer indicates an expected call of WatchOffer. -func (mr *MockRemoteRelationsStateMockRecorder) WatchOffer(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) WatchOffer(arg0 any) *MockRemoteRelationsStateWatchOfferCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOffer", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchOffer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOffer", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchOffer), arg0) + return &MockRemoteRelationsStateWatchOfferCall{Call: call} +} + +// MockRemoteRelationsStateWatchOfferCall wrap *gomock.Call +type MockRemoteRelationsStateWatchOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateWatchOfferCall) Return(arg0 state.NotifyWatcher) *MockRemoteRelationsStateWatchOfferCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateWatchOfferCall) Do(f func(string) state.NotifyWatcher) *MockRemoteRelationsStateWatchOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateWatchOfferCall) DoAndReturn(f func(string) state.NotifyWatcher) *MockRemoteRelationsStateWatchOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOfferStatus mocks base method. @@ -448,9 +1072,33 @@ func (m *MockRemoteRelationsState) WatchOfferStatus(arg0 string) (state.NotifyWa } // WatchOfferStatus indicates an expected call of WatchOfferStatus. -func (mr *MockRemoteRelationsStateMockRecorder) WatchOfferStatus(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) WatchOfferStatus(arg0 any) *MockRemoteRelationsStateWatchOfferStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOfferStatus", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchOfferStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOfferStatus", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchOfferStatus), arg0) + return &MockRemoteRelationsStateWatchOfferStatusCall{Call: call} +} + +// MockRemoteRelationsStateWatchOfferStatusCall wrap *gomock.Call +type MockRemoteRelationsStateWatchOfferStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateWatchOfferStatusCall) Return(arg0 state.NotifyWatcher, arg1 error) *MockRemoteRelationsStateWatchOfferStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateWatchOfferStatusCall) Do(f func(string) (state.NotifyWatcher, error)) *MockRemoteRelationsStateWatchOfferStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateWatchOfferStatusCall) DoAndReturn(f func(string) (state.NotifyWatcher, error)) *MockRemoteRelationsStateWatchOfferStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRemoteApplicationRelations mocks base method. @@ -463,9 +1111,33 @@ func (m *MockRemoteRelationsState) WatchRemoteApplicationRelations(arg0 string) } // WatchRemoteApplicationRelations indicates an expected call of WatchRemoteApplicationRelations. -func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteApplicationRelations(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteApplicationRelations(arg0 any) *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteApplicationRelations", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteApplicationRelations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteApplicationRelations", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteApplicationRelations), arg0) + return &MockRemoteRelationsStateWatchRemoteApplicationRelationsCall{Call: call} +} + +// MockRemoteRelationsStateWatchRemoteApplicationRelationsCall wrap *gomock.Call +type MockRemoteRelationsStateWatchRemoteApplicationRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall) Return(arg0 state.StringsWatcher, arg1 error) *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall) Do(f func(string) (state.StringsWatcher, error)) *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall) DoAndReturn(f func(string) (state.StringsWatcher, error)) *MockRemoteRelationsStateWatchRemoteApplicationRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRemoteApplications mocks base method. @@ -477,9 +1149,33 @@ func (m *MockRemoteRelationsState) WatchRemoteApplications() state.StringsWatche } // WatchRemoteApplications indicates an expected call of WatchRemoteApplications. -func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteApplications() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteApplications() *MockRemoteRelationsStateWatchRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteApplications", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteApplications", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteApplications)) + return &MockRemoteRelationsStateWatchRemoteApplicationsCall{Call: call} +} + +// MockRemoteRelationsStateWatchRemoteApplicationsCall wrap *gomock.Call +type MockRemoteRelationsStateWatchRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateWatchRemoteApplicationsCall) Return(arg0 state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteApplicationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateWatchRemoteApplicationsCall) Do(f func() state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateWatchRemoteApplicationsCall) DoAndReturn(f func() state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRemoteRelations mocks base method. @@ -491,9 +1187,33 @@ func (m *MockRemoteRelationsState) WatchRemoteRelations() state.StringsWatcher { } // WatchRemoteRelations indicates an expected call of WatchRemoteRelations. -func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteRelations() *gomock.Call { +func (mr *MockRemoteRelationsStateMockRecorder) WatchRemoteRelations() *MockRemoteRelationsStateWatchRemoteRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteRelations", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteRelations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteRelations", reflect.TypeOf((*MockRemoteRelationsState)(nil).WatchRemoteRelations)) + return &MockRemoteRelationsStateWatchRemoteRelationsCall{Call: call} +} + +// MockRemoteRelationsStateWatchRemoteRelationsCall wrap *gomock.Call +type MockRemoteRelationsStateWatchRemoteRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsStateWatchRemoteRelationsCall) Return(arg0 state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteRelationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsStateWatchRemoteRelationsCall) Do(f func() state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsStateWatchRemoteRelationsCall) DoAndReturn(f func() state.StringsWatcher) *MockRemoteRelationsStateWatchRemoteRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigAPI is a mock of ControllerConfigAPI interface. @@ -529,9 +1249,33 @@ func (m *MockControllerConfigAPI) ControllerAPIInfoForModels(arg0 context.Contex } // ControllerAPIInfoForModels indicates an expected call of ControllerAPIInfoForModels. -func (mr *MockControllerConfigAPIMockRecorder) ControllerAPIInfoForModels(arg0, arg1 any) *gomock.Call { +func (mr *MockControllerConfigAPIMockRecorder) ControllerAPIInfoForModels(arg0, arg1 any) *MockControllerConfigAPIControllerAPIInfoForModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModels", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerAPIInfoForModels), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModels", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerAPIInfoForModels), arg0, arg1) + return &MockControllerConfigAPIControllerAPIInfoForModelsCall{Call: call} +} + +// MockControllerConfigAPIControllerAPIInfoForModelsCall wrap *gomock.Call +type MockControllerConfigAPIControllerAPIInfoForModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) Return(arg0 params.ControllerAPIInfoResults, arg1 error) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) Do(f func(context.Context, params.Entities) (params.ControllerAPIInfoResults, error)) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigAPIControllerAPIInfoForModelsCall) DoAndReturn(f func(context.Context, params.Entities) (params.ControllerAPIInfoResults, error)) *MockControllerConfigAPIControllerAPIInfoForModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -544,9 +1288,33 @@ func (m *MockControllerConfigAPI) ControllerConfig(arg0 context.Context) (params } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigAPIMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigAPIMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigAPIControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigAPI)(nil).ControllerConfig), arg0) + return &MockControllerConfigAPIControllerConfigCall{Call: call} +} + +// MockControllerConfigAPIControllerConfigCall wrap *gomock.Call +type MockControllerConfigAPIControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigAPIControllerConfigCall) Return(arg0 params.ControllerConfigResult, arg1 error) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigAPIControllerConfigCall) Do(f func(context.Context) (params.ControllerConfigResult, error)) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigAPIControllerConfigCall) DoAndReturn(f func(context.Context) (params.ControllerConfigResult, error)) *MockControllerConfigAPIControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExternalControllerService is a mock of ExternalControllerService interface. @@ -581,9 +1349,33 @@ func (m *MockExternalControllerService) UpdateExternalController(arg0 context.Co } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockExternalControllerServiceMockRecorder) UpdateExternalController(arg0, arg1 any) *MockExternalControllerServiceUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockExternalControllerService)(nil).UpdateExternalController), arg0, arg1) + return &MockExternalControllerServiceUpdateExternalControllerCall{Call: call} +} + +// MockExternalControllerServiceUpdateExternalControllerCall wrap *gomock.Call +type MockExternalControllerServiceUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Return(arg0 error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExternalControllerServiceUpdateExternalControllerCall) Do(f func(context.Context, crossmodel0.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExternalControllerServiceUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel0.ControllerInfo) error) *MockExternalControllerServiceUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretService is a mock of SecretService interface. @@ -618,7 +1410,31 @@ func (m *MockSecretService) UpdateRemoteSecretRevision(arg0 context.Context, arg } // UpdateRemoteSecretRevision indicates an expected call of UpdateRemoteSecretRevision. -func (mr *MockSecretServiceMockRecorder) UpdateRemoteSecretRevision(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) UpdateRemoteSecretRevision(arg0, arg1, arg2 any) *MockSecretServiceUpdateRemoteSecretRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteSecretRevision", reflect.TypeOf((*MockSecretService)(nil).UpdateRemoteSecretRevision), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteSecretRevision", reflect.TypeOf((*MockSecretService)(nil).UpdateRemoteSecretRevision), arg0, arg1, arg2) + return &MockSecretServiceUpdateRemoteSecretRevisionCall{Call: call} +} + +// MockSecretServiceUpdateRemoteSecretRevisionCall wrap *gomock.Call +type MockSecretServiceUpdateRemoteSecretRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceUpdateRemoteSecretRevisionCall) Return(arg0 error) *MockSecretServiceUpdateRemoteSecretRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceUpdateRemoteSecretRevisionCall) Do(f func(context.Context, *secrets.URI, int) error) *MockSecretServiceUpdateRemoteSecretRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceUpdateRemoteSecretRevisionCall) DoAndReturn(f func(context.Context, *secrets.URI, int) error) *MockSecretServiceUpdateRemoteSecretRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/remoterelations/package_test.go b/apiserver/facades/controller/remoterelations/package_test.go index a24b2ad9ccb..c76e03d470a 100644 --- a/apiserver/facades/controller/remoterelations/package_test.go +++ b/apiserver/facades/controller/remoterelations/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/remoterelations_mocks.go github.com/juju/juju/apiserver/facades/controller/remoterelations RemoteRelationsState,ControllerConfigAPI,ExternalControllerService,SecretService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/remoterelations_mocks.go github.com/juju/juju/apiserver/facades/controller/remoterelations RemoteRelationsState,ControllerConfigAPI,ExternalControllerService,SecretService func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/secretbackendmanager/mock_service.go b/apiserver/facades/controller/secretbackendmanager/mock_service.go index b451b1d2065..f4b31ed0dbd 100644 --- a/apiserver/facades/controller/secretbackendmanager/mock_service.go +++ b/apiserver/facades/controller/secretbackendmanager/mock_service.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package secretbackendmanager -destination mock_service.go -source service.go BackendService +// mockgen -typed -package secretbackendmanager -destination mock_service.go -source service.go BackendService // // Package secretbackendmanager is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockBackendService) RotateBackendToken(ctx context.Context, backendID s } // RotateBackendToken indicates an expected call of RotateBackendToken. -func (mr *MockBackendServiceMockRecorder) RotateBackendToken(ctx, backendID any) *gomock.Call { +func (mr *MockBackendServiceMockRecorder) RotateBackendToken(ctx, backendID any) *MockBackendServiceRotateBackendTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RotateBackendToken", reflect.TypeOf((*MockBackendService)(nil).RotateBackendToken), ctx, backendID) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RotateBackendToken", reflect.TypeOf((*MockBackendService)(nil).RotateBackendToken), ctx, backendID) + return &MockBackendServiceRotateBackendTokenCall{Call: call} +} + +// MockBackendServiceRotateBackendTokenCall wrap *gomock.Call +type MockBackendServiceRotateBackendTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendServiceRotateBackendTokenCall) Return(arg0 error) *MockBackendServiceRotateBackendTokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendServiceRotateBackendTokenCall) Do(f func(context.Context, string) error) *MockBackendServiceRotateBackendTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendServiceRotateBackendTokenCall) DoAndReturn(f func(context.Context, string) error) *MockBackendServiceRotateBackendTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSecretBackendRotationChanges mocks base method. @@ -64,7 +88,31 @@ func (m *MockBackendService) WatchSecretBackendRotationChanges() (watcher.Secret } // WatchSecretBackendRotationChanges indicates an expected call of WatchSecretBackendRotationChanges. -func (mr *MockBackendServiceMockRecorder) WatchSecretBackendRotationChanges() *gomock.Call { +func (mr *MockBackendServiceMockRecorder) WatchSecretBackendRotationChanges() *MockBackendServiceWatchSecretBackendRotationChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendRotationChanges", reflect.TypeOf((*MockBackendService)(nil).WatchSecretBackendRotationChanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendRotationChanges", reflect.TypeOf((*MockBackendService)(nil).WatchSecretBackendRotationChanges)) + return &MockBackendServiceWatchSecretBackendRotationChangesCall{Call: call} +} + +// MockBackendServiceWatchSecretBackendRotationChangesCall wrap *gomock.Call +type MockBackendServiceWatchSecretBackendRotationChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendServiceWatchSecretBackendRotationChangesCall) Return(arg0 watcher.SecretBackendRotateWatcher, arg1 error) *MockBackendServiceWatchSecretBackendRotationChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendServiceWatchSecretBackendRotationChangesCall) Do(f func() (watcher.SecretBackendRotateWatcher, error)) *MockBackendServiceWatchSecretBackendRotationChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendServiceWatchSecretBackendRotationChangesCall) DoAndReturn(f func() (watcher.SecretBackendRotateWatcher, error)) *MockBackendServiceWatchSecretBackendRotationChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/secretbackendmanager/mock_watcher.go b/apiserver/facades/controller/secretbackendmanager/mock_watcher.go index 884fb6531b8..4d56c8be5d9 100644 --- a/apiserver/facades/controller/secretbackendmanager/mock_watcher.go +++ b/apiserver/facades/controller/secretbackendmanager/mock_watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package secretbackendmanager -destination mock_watcher.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher +// mockgen -typed -package secretbackendmanager -destination mock_watcher.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher // // Package secretbackendmanager is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockSecretBackendRotateWatcher) Changes() <-chan []watcher.SecretBacken } // Changes indicates an expected call of Changes. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Changes() *MockSecretBackendRotateWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Changes)) + return &MockSecretBackendRotateWatcherChangesCall{Call: call} +} + +// MockSecretBackendRotateWatcherChangesCall wrap *gomock.Call +type MockSecretBackendRotateWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherChangesCall) Return(arg0 <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherChangesCall) Do(f func() <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherChangesCall) DoAndReturn(f func() <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -60,9 +84,33 @@ func (m *MockSecretBackendRotateWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Kill() *MockSecretBackendRotateWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Kill)) + return &MockSecretBackendRotateWatcherKillCall{Call: call} +} + +// MockSecretBackendRotateWatcherKillCall wrap *gomock.Call +type MockSecretBackendRotateWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherKillCall) Return() *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherKillCall) Do(f func()) *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherKillCall) DoAndReturn(f func()) *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -74,7 +122,31 @@ func (m *MockSecretBackendRotateWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Wait() *MockSecretBackendRotateWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Wait)) + return &MockSecretBackendRotateWatcherWaitCall{Call: call} +} + +// MockSecretBackendRotateWatcherWaitCall wrap *gomock.Call +type MockSecretBackendRotateWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherWaitCall) Return(arg0 error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherWaitCall) Do(f func() error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherWaitCall) DoAndReturn(f func() error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/secretbackendmanager/package_test.go b/apiserver/facades/controller/secretbackendmanager/package_test.go index 859a9a567ce..de0e1172bdf 100644 --- a/apiserver/facades/controller/secretbackendmanager/package_test.go +++ b/apiserver/facades/controller/secretbackendmanager/package_test.go @@ -17,8 +17,8 @@ func TestPackage(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package secretbackendmanager -destination mock_service.go -source service.go BackendService -//go:generate go run go.uber.org/mock/mockgen -package secretbackendmanager -destination mock_watcher.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package secretbackendmanager -destination mock_service.go -source service.go BackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package secretbackendmanager -destination mock_watcher.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher func NewTestAPI( authorizer facade.Authorizer, diff --git a/apiserver/facades/controller/undertaker/mock_service.go b/apiserver/facades/controller/undertaker/mock_service.go index a9f035aed1b..dd0a2cab8ab 100644 --- a/apiserver/facades/controller/undertaker/mock_service.go +++ b/apiserver/facades/controller/undertaker/mock_service.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package undertaker -destination mock_service.go github.com/juju/juju/apiserver/facades/controller/undertaker SecretBackendService +// mockgen -typed -package undertaker -destination mock_service.go github.com/juju/juju/apiserver/facades/controller/undertaker SecretBackendService // // Package undertaker is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockSecretBackendService) GetSecretBackendConfigForAdmin(arg0 context.C } // GetSecretBackendConfigForAdmin indicates an expected call of GetSecretBackendConfigForAdmin. -func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendConfigForAdmin(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) GetSecretBackendConfigForAdmin(arg0, arg1 any) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfigForAdmin", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendConfigForAdmin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfigForAdmin", reflect.TypeOf((*MockSecretBackendService)(nil).GetSecretBackendConfigForAdmin), arg0, arg1) + return &MockSecretBackendServiceGetSecretBackendConfigForAdminCall{Call: call} +} + +// MockSecretBackendServiceGetSecretBackendConfigForAdminCall wrap *gomock.Call +type MockSecretBackendServiceGetSecretBackendConfigForAdminCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) Do(f func(context.Context, model.UUID) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceGetSecretBackendConfigForAdminCall) DoAndReturn(f func(context.Context, model.UUID) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceGetSecretBackendConfigForAdminCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/undertaker/package_test.go b/apiserver/facades/controller/undertaker/package_test.go index 4bd58178a97..9692f683278 100644 --- a/apiserver/facades/controller/undertaker/package_test.go +++ b/apiserver/facades/controller/undertaker/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package undertaker -destination mock_service.go github.com/juju/juju/apiserver/facades/controller/undertaker SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package undertaker -destination mock_service.go github.com/juju/juju/apiserver/facades/controller/undertaker SecretBackendService func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/usersecrets/mocks/service.go b/apiserver/facades/controller/usersecrets/mocks/service.go index ca4dc8035a2..eced9fd9da4 100644 --- a/apiserver/facades/controller/usersecrets/mocks/service.go +++ b/apiserver/facades/controller/usersecrets/mocks/service.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service.go github.com/juju/juju/apiserver/facades/controller/usersecrets SecretService +// mockgen -typed -package mocks -destination mocks/service.go github.com/juju/juju/apiserver/facades/controller/usersecrets SecretService // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockSecretService) DeleteObsoleteUserSecrets(arg0 context.Context) erro } // DeleteObsoleteUserSecrets indicates an expected call of DeleteObsoleteUserSecrets. -func (mr *MockSecretServiceMockRecorder) DeleteObsoleteUserSecrets(arg0 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) DeleteObsoleteUserSecrets(arg0 any) *MockSecretServiceDeleteObsoleteUserSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObsoleteUserSecrets", reflect.TypeOf((*MockSecretService)(nil).DeleteObsoleteUserSecrets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObsoleteUserSecrets", reflect.TypeOf((*MockSecretService)(nil).DeleteObsoleteUserSecrets), arg0) + return &MockSecretServiceDeleteObsoleteUserSecretsCall{Call: call} +} + +// MockSecretServiceDeleteObsoleteUserSecretsCall wrap *gomock.Call +type MockSecretServiceDeleteObsoleteUserSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceDeleteObsoleteUserSecretsCall) Return(arg0 error) *MockSecretServiceDeleteObsoleteUserSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceDeleteObsoleteUserSecretsCall) Do(f func(context.Context) error) *MockSecretServiceDeleteObsoleteUserSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceDeleteObsoleteUserSecretsCall) DoAndReturn(f func(context.Context) error) *MockSecretServiceDeleteObsoleteUserSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecret mocks base method. @@ -65,9 +89,33 @@ func (m *MockSecretService) GetSecret(arg0 context.Context, arg1 *secrets.URI) ( } // GetSecret indicates an expected call of GetSecret. -func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *MockSecretServiceGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + return &MockSecretServiceGetSecretCall{Call: call} +} + +// MockSecretServiceGetSecretCall wrap *gomock.Call +type MockSecretServiceGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretCall) Return(arg0 *secrets.SecretMetadata, arg1 error) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretCall) Do(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretCall) DoAndReturn(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchObsoleteUserSecrets mocks base method. @@ -80,7 +128,31 @@ func (m *MockSecretService) WatchObsoleteUserSecrets(arg0 context.Context) (watc } // WatchObsoleteUserSecrets indicates an expected call of WatchObsoleteUserSecrets. -func (mr *MockSecretServiceMockRecorder) WatchObsoleteUserSecrets(arg0 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) WatchObsoleteUserSecrets(arg0 any) *MockSecretServiceWatchObsoleteUserSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsoleteUserSecrets", reflect.TypeOf((*MockSecretService)(nil).WatchObsoleteUserSecrets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsoleteUserSecrets", reflect.TypeOf((*MockSecretService)(nil).WatchObsoleteUserSecrets), arg0) + return &MockSecretServiceWatchObsoleteUserSecretsCall{Call: call} +} + +// MockSecretServiceWatchObsoleteUserSecretsCall wrap *gomock.Call +type MockSecretServiceWatchObsoleteUserSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceWatchObsoleteUserSecretsCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockSecretServiceWatchObsoleteUserSecretsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceWatchObsoleteUserSecretsCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockSecretServiceWatchObsoleteUserSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceWatchObsoleteUserSecretsCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockSecretServiceWatchObsoleteUserSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/usersecrets/mocks/watcher.go b/apiserver/facades/controller/usersecrets/mocks/watcher.go index 389eb8d34a9..2487d36ecc0 100644 --- a/apiserver/facades/controller/usersecrets/mocks/watcher.go +++ b/apiserver/facades/controller/usersecrets/mocks/watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher NotifyWatcher +// mockgen -typed -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher NotifyWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockNotifyWatcher) Changes() <-chan struct{} { } // Changes indicates an expected call of Changes. -func (mr *MockNotifyWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Changes() *MockNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockNotifyWatcher)(nil).Changes)) + return &MockNotifyWatcherChangesCall{Call: call} +} + +// MockNotifyWatcherChangesCall wrap *gomock.Call +type MockNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherChangesCall) Return(arg0 <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherChangesCall) Do(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherChangesCall) DoAndReturn(f func() <-chan struct{}) *MockNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockNotifyWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockNotifyWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Kill() *MockNotifyWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockNotifyWatcher)(nil).Kill)) + return &MockNotifyWatcherKillCall{Call: call} +} + +// MockNotifyWatcherKillCall wrap *gomock.Call +type MockNotifyWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherKillCall) Return() *MockNotifyWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherKillCall) Do(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherKillCall) DoAndReturn(f func()) *MockNotifyWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockNotifyWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockNotifyWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockNotifyWatcherMockRecorder) Wait() *MockNotifyWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockNotifyWatcher)(nil).Wait)) + return &MockNotifyWatcherWaitCall{Call: call} +} + +// MockNotifyWatcherWaitCall wrap *gomock.Call +type MockNotifyWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNotifyWatcherWaitCall) Return(arg0 error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNotifyWatcherWaitCall) Do(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNotifyWatcherWaitCall) DoAndReturn(f func() error) *MockNotifyWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/usersecrets/package_test.go b/apiserver/facades/controller/usersecrets/package_test.go index cf89a3558b6..3d492775673 100644 --- a/apiserver/facades/controller/usersecrets/package_test.go +++ b/apiserver/facades/controller/usersecrets/package_test.go @@ -12,8 +12,8 @@ import ( "github.com/juju/juju/apiserver/facade" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service.go github.com/juju/juju/apiserver/facades/controller/usersecrets SecretService -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher NotifyWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service.go github.com/juju/juju/apiserver/facades/controller/usersecrets SecretService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher NotifyWatcher func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/facades/controller/usersecretsdrain/mocks/service_mock.go b/apiserver/facades/controller/usersecretsdrain/mocks/service_mock.go index eed410727b3..e90e7ca1c60 100644 --- a/apiserver/facades/controller/usersecretsdrain/mocks/service_mock.go +++ b/apiserver/facades/controller/usersecretsdrain/mocks/service_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/controller/usersecretsdrain SecretService,SecretBackendService +// mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/controller/usersecretsdrain SecretService,SecretBackendService // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockSecretService) GetSecret(arg0 context.Context, arg1 *secrets.URI) ( } // GetSecret indicates an expected call of GetSecret. -func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecret(arg0, arg1 any) *MockSecretServiceGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretService)(nil).GetSecret), arg0, arg1) + return &MockSecretServiceGetSecretCall{Call: call} +} + +// MockSecretServiceGetSecretCall wrap *gomock.Call +type MockSecretServiceGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretCall) Return(arg0 *secrets.SecretMetadata, arg1 error) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretCall) Do(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretCall) DoAndReturn(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockSecretServiceGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretValue mocks base method. @@ -69,9 +93,33 @@ func (m *MockSecretService) GetSecretValue(arg0 context.Context, arg1 *secrets.U } // GetSecretValue indicates an expected call of GetSecretValue. -func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) GetSecretValue(arg0, arg1, arg2, arg3 any) *MockSecretServiceGetSecretValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockSecretService)(nil).GetSecretValue), arg0, arg1, arg2, arg3) + return &MockSecretServiceGetSecretValueCall{Call: call} +} + +// MockSecretServiceGetSecretValueCall wrap *gomock.Call +type MockSecretServiceGetSecretValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceGetSecretValueCall) Return(arg0 secrets.SecretValue, arg1 *secrets.ValueRef, arg2 error) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceGetSecretValueCall) Do(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceGetSecretValueCall) DoAndReturn(f func(context.Context, *secrets.URI, int, service.SecretAccessor) (secrets.SecretValue, *secrets.ValueRef, error)) *MockSecretServiceGetSecretValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListGrantedSecretsForBackend mocks base method. @@ -88,10 +136,34 @@ func (m *MockSecretService) ListGrantedSecretsForBackend(arg0 context.Context, a } // ListGrantedSecretsForBackend indicates an expected call of ListGrantedSecretsForBackend. -func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockSecretServiceMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2 any, arg3 ...any) *MockSecretServiceListGrantedSecretsForBackendCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockSecretService)(nil).ListGrantedSecretsForBackend), varargs...) + return &MockSecretServiceListGrantedSecretsForBackendCall{Call: call} +} + +// MockSecretServiceListGrantedSecretsForBackendCall wrap *gomock.Call +type MockSecretServiceListGrantedSecretsForBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Return(arg0 []*secrets.SecretRevisionRef, arg1 error) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretServiceListGrantedSecretsForBackendCall) Do(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretServiceListGrantedSecretsForBackendCall) DoAndReturn(f func(context.Context, string, secrets.SecretRole, ...service.SecretAccessor) ([]*secrets.SecretRevisionRef, error)) *MockSecretServiceListGrantedSecretsForBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendService is a mock of SecretBackendService interface. @@ -127,9 +199,33 @@ func (m *MockSecretBackendService) BackendConfigInfo(arg0 context.Context, arg1 } // BackendConfigInfo indicates an expected call of BackendConfigInfo. -func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) BackendConfigInfo(arg0, arg1 any) *MockSecretBackendServiceBackendConfigInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).BackendConfigInfo), arg0, arg1) + return &MockSecretBackendServiceBackendConfigInfoCall{Call: call} +} + +// MockSecretBackendServiceBackendConfigInfoCall wrap *gomock.Call +type MockSecretBackendServiceBackendConfigInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceBackendConfigInfoCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceBackendConfigInfoCall) Do(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceBackendConfigInfoCall) DoAndReturn(f func(context.Context, service0.BackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceBackendConfigInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DrainBackendConfigInfo mocks base method. @@ -142,7 +238,31 @@ func (m *MockSecretBackendService) DrainBackendConfigInfo(arg0 context.Context, } // DrainBackendConfigInfo indicates an expected call of DrainBackendConfigInfo. -func (mr *MockSecretBackendServiceMockRecorder) DrainBackendConfigInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretBackendServiceMockRecorder) DrainBackendConfigInfo(arg0, arg1 any) *MockSecretBackendServiceDrainBackendConfigInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainBackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).DrainBackendConfigInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainBackendConfigInfo", reflect.TypeOf((*MockSecretBackendService)(nil).DrainBackendConfigInfo), arg0, arg1) + return &MockSecretBackendServiceDrainBackendConfigInfoCall{Call: call} +} + +// MockSecretBackendServiceDrainBackendConfigInfoCall wrap *gomock.Call +type MockSecretBackendServiceDrainBackendConfigInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) Do(f func(context.Context, service0.DrainBackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendServiceDrainBackendConfigInfoCall) DoAndReturn(f func(context.Context, service0.DrainBackendConfigParams) (*provider.ModelBackendConfigInfo, error)) *MockSecretBackendServiceDrainBackendConfigInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/facades/controller/usersecretsdrain/package_test.go b/apiserver/facades/controller/usersecretsdrain/package_test.go index 26ee0e2fe55..ad59d5e6d07 100644 --- a/apiserver/facades/controller/usersecretsdrain/package_test.go +++ b/apiserver/facades/controller/usersecretsdrain/package_test.go @@ -13,7 +13,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/controller/usersecretsdrain SecretService,SecretBackendService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/apiserver/facades/controller/usersecretsdrain SecretService,SecretBackendService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/internal/package_test.go b/apiserver/internal/package_test.go index 5634bf7dd35..cc008d8ec8f 100644 --- a/apiserver/internal/package_test.go +++ b/apiserver/internal/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package internal_test -destination watcher_mock_test.go -source=./watcher.go +//go:generate go run go.uber.org/mock/mockgen -typed -package internal_test -destination watcher_mock_test.go -source=./watcher.go func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/apiserver/internal/watcher_mock_test.go b/apiserver/internal/watcher_mock_test.go index 7318d60a011..496ac42eb38 100644 --- a/apiserver/internal/watcher_mock_test.go +++ b/apiserver/internal/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package internal_test -destination watcher_mock_test.go -source=./watcher.go +// mockgen -typed -package internal_test -destination watcher_mock_test.go -source=./watcher.go // // Package internal_test is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockWatcher[T]) Changes() <-chan T { } // Changes indicates an expected call of Changes. -func (mr *MockWatcherMockRecorder[T]) Changes() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Changes() *MockWatcherChangesCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockWatcher[T])(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockWatcher[T])(nil).Changes)) + return &MockWatcherChangesCall[T]{Call: call} +} + +// MockWatcherChangesCall wrap *gomock.Call +type MockWatcherChangesCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherChangesCall[T]) Return(arg0 <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherChangesCall[T]) Do(f func() <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherChangesCall[T]) DoAndReturn(f func() <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -60,9 +84,33 @@ func (m *MockWatcher[T]) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWatcherMockRecorder[T]) Kill() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Kill() *MockWatcherKillCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcher[T])(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcher[T])(nil).Kill)) + return &MockWatcherKillCall[T]{Call: call} +} + +// MockWatcherKillCall wrap *gomock.Call +type MockWatcherKillCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherKillCall[T]) Return() *MockWatcherKillCall[T] { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherKillCall[T]) Do(f func()) *MockWatcherKillCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherKillCall[T]) DoAndReturn(f func()) *MockWatcherKillCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -74,9 +122,33 @@ func (m *MockWatcher[T]) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWatcherMockRecorder[T]) Wait() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Wait() *MockWatcherWaitCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcher[T])(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcher[T])(nil).Wait)) + return &MockWatcherWaitCall[T]{Call: call} +} + +// MockWatcherWaitCall wrap *gomock.Call +type MockWatcherWaitCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherWaitCall[T]) Return(arg0 error) *MockWatcherWaitCall[T] { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherWaitCall[T]) Do(f func() error) *MockWatcherWaitCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherWaitCall[T]) DoAndReturn(f func() error) *MockWatcherWaitCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherRegistry is a mock of WatcherRegistry interface. @@ -112,7 +184,31 @@ func (m *MockWatcherRegistry) Register(arg0 worker.Worker) (string, error) { } // Register indicates an expected call of Register. -func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockWatcherRegistryMockRecorder) Register(arg0 any) *MockWatcherRegistryRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockWatcherRegistry)(nil).Register), arg0) + return &MockWatcherRegistryRegisterCall{Call: call} +} + +// MockWatcherRegistryRegisterCall wrap *gomock.Call +type MockWatcherRegistryRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherRegistryRegisterCall) Return(arg0 string, arg1 error) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherRegistryRegisterCall) Do(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherRegistryRegisterCall) DoAndReturn(f func(worker.Worker) (string, error)) *MockWatcherRegistryRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/logsink/logsink.go b/apiserver/logsink/logsink.go index 8c98f3ca4a3..a0f6f22eba7 100644 --- a/apiserver/logsink/logsink.go +++ b/apiserver/logsink/logsink.go @@ -81,8 +81,8 @@ type GaugeVec interface { // MetricsCollector represents a way to change the metrics for the logsink // api handler. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/logsink MetricsCollector -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Counter,Gauge +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/logsink MetricsCollector +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Counter,Gauge type MetricsCollector interface { // TotalConnections returns a prometheus metric that can be incremented diff --git a/apiserver/logsink/mocks/metrics_collector_mock.go b/apiserver/logsink/mocks/metrics_collector_mock.go index d3d4967464b..03721a9dd33 100644 --- a/apiserver/logsink/mocks/metrics_collector_mock.go +++ b/apiserver/logsink/mocks/metrics_collector_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/logsink MetricsCollector +// mockgen -typed -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/logsink MetricsCollector // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockMetricsCollector) Connections() prometheus.Gauge { } // Connections indicates an expected call of Connections. -func (mr *MockMetricsCollectorMockRecorder) Connections() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) Connections() *MockMetricsCollectorConnectionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connections", reflect.TypeOf((*MockMetricsCollector)(nil).Connections)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connections", reflect.TypeOf((*MockMetricsCollector)(nil).Connections)) + return &MockMetricsCollectorConnectionsCall{Call: call} +} + +// MockMetricsCollectorConnectionsCall wrap *gomock.Call +type MockMetricsCollectorConnectionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorConnectionsCall) Return(arg0 prometheus.Gauge) *MockMetricsCollectorConnectionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorConnectionsCall) Do(f func() prometheus.Gauge) *MockMetricsCollectorConnectionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorConnectionsCall) DoAndReturn(f func() prometheus.Gauge) *MockMetricsCollectorConnectionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogReadCount mocks base method. @@ -62,9 +86,33 @@ func (m *MockMetricsCollector) LogReadCount(arg0, arg1 string) prometheus.Counte } // LogReadCount indicates an expected call of LogReadCount. -func (mr *MockMetricsCollectorMockRecorder) LogReadCount(arg0, arg1 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) LogReadCount(arg0, arg1 any) *MockMetricsCollectorLogReadCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogReadCount", reflect.TypeOf((*MockMetricsCollector)(nil).LogReadCount), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogReadCount", reflect.TypeOf((*MockMetricsCollector)(nil).LogReadCount), arg0, arg1) + return &MockMetricsCollectorLogReadCountCall{Call: call} +} + +// MockMetricsCollectorLogReadCountCall wrap *gomock.Call +type MockMetricsCollectorLogReadCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorLogReadCountCall) Return(arg0 prometheus.Counter) *MockMetricsCollectorLogReadCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorLogReadCountCall) Do(f func(string, string) prometheus.Counter) *MockMetricsCollectorLogReadCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorLogReadCountCall) DoAndReturn(f func(string, string) prometheus.Counter) *MockMetricsCollectorLogReadCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogWriteCount mocks base method. @@ -76,9 +124,33 @@ func (m *MockMetricsCollector) LogWriteCount(arg0, arg1 string) prometheus.Count } // LogWriteCount indicates an expected call of LogWriteCount. -func (mr *MockMetricsCollectorMockRecorder) LogWriteCount(arg0, arg1 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) LogWriteCount(arg0, arg1 any) *MockMetricsCollectorLogWriteCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogWriteCount", reflect.TypeOf((*MockMetricsCollector)(nil).LogWriteCount), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogWriteCount", reflect.TypeOf((*MockMetricsCollector)(nil).LogWriteCount), arg0, arg1) + return &MockMetricsCollectorLogWriteCountCall{Call: call} +} + +// MockMetricsCollectorLogWriteCountCall wrap *gomock.Call +type MockMetricsCollectorLogWriteCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorLogWriteCountCall) Return(arg0 prometheus.Counter) *MockMetricsCollectorLogWriteCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorLogWriteCountCall) Do(f func(string, string) prometheus.Counter) *MockMetricsCollectorLogWriteCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorLogWriteCountCall) DoAndReturn(f func(string, string) prometheus.Counter) *MockMetricsCollectorLogWriteCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PingFailureCount mocks base method. @@ -90,9 +162,33 @@ func (m *MockMetricsCollector) PingFailureCount(arg0 string) prometheus.Counter } // PingFailureCount indicates an expected call of PingFailureCount. -func (mr *MockMetricsCollectorMockRecorder) PingFailureCount(arg0 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) PingFailureCount(arg0 any) *MockMetricsCollectorPingFailureCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PingFailureCount", reflect.TypeOf((*MockMetricsCollector)(nil).PingFailureCount), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PingFailureCount", reflect.TypeOf((*MockMetricsCollector)(nil).PingFailureCount), arg0) + return &MockMetricsCollectorPingFailureCountCall{Call: call} +} + +// MockMetricsCollectorPingFailureCountCall wrap *gomock.Call +type MockMetricsCollectorPingFailureCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorPingFailureCountCall) Return(arg0 prometheus.Counter) *MockMetricsCollectorPingFailureCountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorPingFailureCountCall) Do(f func(string) prometheus.Counter) *MockMetricsCollectorPingFailureCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorPingFailureCountCall) DoAndReturn(f func(string) prometheus.Counter) *MockMetricsCollectorPingFailureCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TotalConnections mocks base method. @@ -104,7 +200,31 @@ func (m *MockMetricsCollector) TotalConnections() prometheus.Counter { } // TotalConnections indicates an expected call of TotalConnections. -func (mr *MockMetricsCollectorMockRecorder) TotalConnections() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) TotalConnections() *MockMetricsCollectorTotalConnectionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalConnections", reflect.TypeOf((*MockMetricsCollector)(nil).TotalConnections)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalConnections", reflect.TypeOf((*MockMetricsCollector)(nil).TotalConnections)) + return &MockMetricsCollectorTotalConnectionsCall{Call: call} +} + +// MockMetricsCollectorTotalConnectionsCall wrap *gomock.Call +type MockMetricsCollectorTotalConnectionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorTotalConnectionsCall) Return(arg0 prometheus.Counter) *MockMetricsCollectorTotalConnectionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorTotalConnectionsCall) Do(f func() prometheus.Counter) *MockMetricsCollectorTotalConnectionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorTotalConnectionsCall) DoAndReturn(f func() prometheus.Counter) *MockMetricsCollectorTotalConnectionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/logsink/mocks/metrics_mock.go b/apiserver/logsink/mocks/metrics_mock.go index 21099c58275..db5bd71709a 100644 --- a/apiserver/logsink/mocks/metrics_mock.go +++ b/apiserver/logsink/mocks/metrics_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Counter,Gauge +// mockgen -typed -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Counter,Gauge // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockCounter) Add(arg0 float64) { } // Add indicates an expected call of Add. -func (mr *MockCounterMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCounterMockRecorder) Add(arg0 any) *MockCounterAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCounter)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCounter)(nil).Add), arg0) + return &MockCounterAddCall{Call: call} +} + +// MockCounterAddCall wrap *gomock.Call +type MockCounterAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterAddCall) Return() *MockCounterAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterAddCall) Do(f func(float64)) *MockCounterAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterAddCall) DoAndReturn(f func(float64)) *MockCounterAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Collect mocks base method. @@ -59,9 +83,33 @@ func (m *MockCounter) Collect(arg0 chan<- prometheus.Metric) { } // Collect indicates an expected call of Collect. -func (mr *MockCounterMockRecorder) Collect(arg0 any) *gomock.Call { +func (mr *MockCounterMockRecorder) Collect(arg0 any) *MockCounterCollectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockCounter)(nil).Collect), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockCounter)(nil).Collect), arg0) + return &MockCounterCollectCall{Call: call} +} + +// MockCounterCollectCall wrap *gomock.Call +type MockCounterCollectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterCollectCall) Return() *MockCounterCollectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterCollectCall) Do(f func(chan<- prometheus.Metric)) *MockCounterCollectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterCollectCall) DoAndReturn(f func(chan<- prometheus.Metric)) *MockCounterCollectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Desc mocks base method. @@ -73,9 +121,33 @@ func (m *MockCounter) Desc() *prometheus.Desc { } // Desc indicates an expected call of Desc. -func (mr *MockCounterMockRecorder) Desc() *gomock.Call { +func (mr *MockCounterMockRecorder) Desc() *MockCounterDescCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockCounter)(nil).Desc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockCounter)(nil).Desc)) + return &MockCounterDescCall{Call: call} +} + +// MockCounterDescCall wrap *gomock.Call +type MockCounterDescCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterDescCall) Return(arg0 *prometheus.Desc) *MockCounterDescCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterDescCall) Do(f func() *prometheus.Desc) *MockCounterDescCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterDescCall) DoAndReturn(f func() *prometheus.Desc) *MockCounterDescCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Describe mocks base method. @@ -85,9 +157,33 @@ func (m *MockCounter) Describe(arg0 chan<- *prometheus.Desc) { } // Describe indicates an expected call of Describe. -func (mr *MockCounterMockRecorder) Describe(arg0 any) *gomock.Call { +func (mr *MockCounterMockRecorder) Describe(arg0 any) *MockCounterDescribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockCounter)(nil).Describe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockCounter)(nil).Describe), arg0) + return &MockCounterDescribeCall{Call: call} +} + +// MockCounterDescribeCall wrap *gomock.Call +type MockCounterDescribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterDescribeCall) Return() *MockCounterDescribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterDescribeCall) Do(f func(chan<- *prometheus.Desc)) *MockCounterDescribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterDescribeCall) DoAndReturn(f func(chan<- *prometheus.Desc)) *MockCounterDescribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Inc mocks base method. @@ -97,9 +193,33 @@ func (m *MockCounter) Inc() { } // Inc indicates an expected call of Inc. -func (mr *MockCounterMockRecorder) Inc() *gomock.Call { +func (mr *MockCounterMockRecorder) Inc() *MockCounterIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockCounter)(nil).Inc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockCounter)(nil).Inc)) + return &MockCounterIncCall{Call: call} +} + +// MockCounterIncCall wrap *gomock.Call +type MockCounterIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterIncCall) Return() *MockCounterIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterIncCall) Do(f func()) *MockCounterIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterIncCall) DoAndReturn(f func()) *MockCounterIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Write mocks base method. @@ -111,9 +231,33 @@ func (m *MockCounter) Write(arg0 *io_prometheus_client.Metric) error { } // Write indicates an expected call of Write. -func (mr *MockCounterMockRecorder) Write(arg0 any) *gomock.Call { +func (mr *MockCounterMockRecorder) Write(arg0 any) *MockCounterWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCounter)(nil).Write), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCounter)(nil).Write), arg0) + return &MockCounterWriteCall{Call: call} +} + +// MockCounterWriteCall wrap *gomock.Call +type MockCounterWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCounterWriteCall) Return(arg0 error) *MockCounterWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCounterWriteCall) Do(f func(*io_prometheus_client.Metric) error) *MockCounterWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCounterWriteCall) DoAndReturn(f func(*io_prometheus_client.Metric) error) *MockCounterWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockGauge is a mock of Gauge interface. @@ -146,9 +290,33 @@ func (m *MockGauge) Add(arg0 float64) { } // Add indicates an expected call of Add. -func (mr *MockGaugeMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Add(arg0 any) *MockGaugeAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockGauge)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockGauge)(nil).Add), arg0) + return &MockGaugeAddCall{Call: call} +} + +// MockGaugeAddCall wrap *gomock.Call +type MockGaugeAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeAddCall) Return() *MockGaugeAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeAddCall) Do(f func(float64)) *MockGaugeAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeAddCall) DoAndReturn(f func(float64)) *MockGaugeAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Collect mocks base method. @@ -158,9 +326,33 @@ func (m *MockGauge) Collect(arg0 chan<- prometheus.Metric) { } // Collect indicates an expected call of Collect. -func (mr *MockGaugeMockRecorder) Collect(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Collect(arg0 any) *MockGaugeCollectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGauge)(nil).Collect), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGauge)(nil).Collect), arg0) + return &MockGaugeCollectCall{Call: call} +} + +// MockGaugeCollectCall wrap *gomock.Call +type MockGaugeCollectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeCollectCall) Return() *MockGaugeCollectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeCollectCall) Do(f func(chan<- prometheus.Metric)) *MockGaugeCollectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeCollectCall) DoAndReturn(f func(chan<- prometheus.Metric)) *MockGaugeCollectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dec mocks base method. @@ -170,9 +362,33 @@ func (m *MockGauge) Dec() { } // Dec indicates an expected call of Dec. -func (mr *MockGaugeMockRecorder) Dec() *gomock.Call { +func (mr *MockGaugeMockRecorder) Dec() *MockGaugeDecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dec", reflect.TypeOf((*MockGauge)(nil).Dec)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dec", reflect.TypeOf((*MockGauge)(nil).Dec)) + return &MockGaugeDecCall{Call: call} +} + +// MockGaugeDecCall wrap *gomock.Call +type MockGaugeDecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDecCall) Return() *MockGaugeDecCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDecCall) Do(f func()) *MockGaugeDecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDecCall) DoAndReturn(f func()) *MockGaugeDecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Desc mocks base method. @@ -184,9 +400,33 @@ func (m *MockGauge) Desc() *prometheus.Desc { } // Desc indicates an expected call of Desc. -func (mr *MockGaugeMockRecorder) Desc() *gomock.Call { +func (mr *MockGaugeMockRecorder) Desc() *MockGaugeDescCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockGauge)(nil).Desc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockGauge)(nil).Desc)) + return &MockGaugeDescCall{Call: call} +} + +// MockGaugeDescCall wrap *gomock.Call +type MockGaugeDescCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDescCall) Return(arg0 *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDescCall) Do(f func() *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDescCall) DoAndReturn(f func() *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Describe mocks base method. @@ -196,9 +436,33 @@ func (m *MockGauge) Describe(arg0 chan<- *prometheus.Desc) { } // Describe indicates an expected call of Describe. -func (mr *MockGaugeMockRecorder) Describe(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Describe(arg0 any) *MockGaugeDescribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGauge)(nil).Describe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGauge)(nil).Describe), arg0) + return &MockGaugeDescribeCall{Call: call} +} + +// MockGaugeDescribeCall wrap *gomock.Call +type MockGaugeDescribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDescribeCall) Return() *MockGaugeDescribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDescribeCall) Do(f func(chan<- *prometheus.Desc)) *MockGaugeDescribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDescribeCall) DoAndReturn(f func(chan<- *prometheus.Desc)) *MockGaugeDescribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Inc mocks base method. @@ -208,9 +472,33 @@ func (m *MockGauge) Inc() { } // Inc indicates an expected call of Inc. -func (mr *MockGaugeMockRecorder) Inc() *gomock.Call { +func (mr *MockGaugeMockRecorder) Inc() *MockGaugeIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockGauge)(nil).Inc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockGauge)(nil).Inc)) + return &MockGaugeIncCall{Call: call} +} + +// MockGaugeIncCall wrap *gomock.Call +type MockGaugeIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeIncCall) Return() *MockGaugeIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeIncCall) Do(f func()) *MockGaugeIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeIncCall) DoAndReturn(f func()) *MockGaugeIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Set mocks base method. @@ -220,9 +508,33 @@ func (m *MockGauge) Set(arg0 float64) { } // Set indicates an expected call of Set. -func (mr *MockGaugeMockRecorder) Set(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Set(arg0 any) *MockGaugeSetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockGauge)(nil).Set), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockGauge)(nil).Set), arg0) + return &MockGaugeSetCall{Call: call} +} + +// MockGaugeSetCall wrap *gomock.Call +type MockGaugeSetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSetCall) Return() *MockGaugeSetCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSetCall) Do(f func(float64)) *MockGaugeSetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSetCall) DoAndReturn(f func(float64)) *MockGaugeSetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetToCurrentTime mocks base method. @@ -232,9 +544,33 @@ func (m *MockGauge) SetToCurrentTime() { } // SetToCurrentTime indicates an expected call of SetToCurrentTime. -func (mr *MockGaugeMockRecorder) SetToCurrentTime() *gomock.Call { +func (mr *MockGaugeMockRecorder) SetToCurrentTime() *MockGaugeSetToCurrentTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToCurrentTime", reflect.TypeOf((*MockGauge)(nil).SetToCurrentTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToCurrentTime", reflect.TypeOf((*MockGauge)(nil).SetToCurrentTime)) + return &MockGaugeSetToCurrentTimeCall{Call: call} +} + +// MockGaugeSetToCurrentTimeCall wrap *gomock.Call +type MockGaugeSetToCurrentTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSetToCurrentTimeCall) Return() *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSetToCurrentTimeCall) Do(f func()) *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSetToCurrentTimeCall) DoAndReturn(f func()) *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sub mocks base method. @@ -244,9 +580,33 @@ func (m *MockGauge) Sub(arg0 float64) { } // Sub indicates an expected call of Sub. -func (mr *MockGaugeMockRecorder) Sub(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Sub(arg0 any) *MockGaugeSubCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sub", reflect.TypeOf((*MockGauge)(nil).Sub), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sub", reflect.TypeOf((*MockGauge)(nil).Sub), arg0) + return &MockGaugeSubCall{Call: call} +} + +// MockGaugeSubCall wrap *gomock.Call +type MockGaugeSubCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSubCall) Return() *MockGaugeSubCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSubCall) Do(f func(float64)) *MockGaugeSubCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSubCall) DoAndReturn(f func(float64)) *MockGaugeSubCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Write mocks base method. @@ -258,7 +618,31 @@ func (m *MockGauge) Write(arg0 *io_prometheus_client.Metric) error { } // Write indicates an expected call of Write. -func (mr *MockGaugeMockRecorder) Write(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Write(arg0 any) *MockGaugeWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockGauge)(nil).Write), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockGauge)(nil).Write), arg0) + return &MockGaugeWriteCall{Call: call} +} + +// MockGaugeWriteCall wrap *gomock.Call +type MockGaugeWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeWriteCall) Return(arg0 error) *MockGaugeWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeWriteCall) Do(f func(*io_prometheus_client.Metric) error) *MockGaugeWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeWriteCall) DoAndReturn(f func(*io_prometheus_client.Metric) error) *MockGaugeWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/mocks/deltatranslater_mock.go b/apiserver/mocks/deltatranslater_mock.go index c84fc7c6083..c74233df0be 100644 --- a/apiserver/mocks/deltatranslater_mock.go +++ b/apiserver/mocks/deltatranslater_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/deltatranslater_mock.go github.com/juju/juju/apiserver DeltaTranslater +// mockgen -typed -package mocks -destination mocks/deltatranslater_mock.go github.com/juju/juju/apiserver DeltaTranslater // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockDeltaTranslater) TranslateAction(arg0 multiwatcher.EntityInfo) para } // TranslateAction indicates an expected call of TranslateAction. -func (mr *MockDeltaTranslaterMockRecorder) TranslateAction(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateAction(arg0 any) *MockDeltaTranslaterTranslateActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateAction", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateAction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateAction", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateAction), arg0) + return &MockDeltaTranslaterTranslateActionCall{Call: call} +} + +// MockDeltaTranslaterTranslateActionCall wrap *gomock.Call +type MockDeltaTranslaterTranslateActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateActionCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateActionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateActionCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateActionCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateAnnotation mocks base method. @@ -63,9 +87,33 @@ func (m *MockDeltaTranslater) TranslateAnnotation(arg0 multiwatcher.EntityInfo) } // TranslateAnnotation indicates an expected call of TranslateAnnotation. -func (mr *MockDeltaTranslaterMockRecorder) TranslateAnnotation(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateAnnotation(arg0 any) *MockDeltaTranslaterTranslateAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateAnnotation", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateAnnotation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateAnnotation", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateAnnotation), arg0) + return &MockDeltaTranslaterTranslateAnnotationCall{Call: call} +} + +// MockDeltaTranslaterTranslateAnnotationCall wrap *gomock.Call +type MockDeltaTranslaterTranslateAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateAnnotationCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateAnnotationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateAnnotationCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateAnnotationCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateApplication mocks base method. @@ -77,9 +125,33 @@ func (m *MockDeltaTranslater) TranslateApplication(arg0 multiwatcher.EntityInfo) } // TranslateApplication indicates an expected call of TranslateApplication. -func (mr *MockDeltaTranslaterMockRecorder) TranslateApplication(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateApplication(arg0 any) *MockDeltaTranslaterTranslateApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateApplication", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateApplication", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateApplication), arg0) + return &MockDeltaTranslaterTranslateApplicationCall{Call: call} +} + +// MockDeltaTranslaterTranslateApplicationCall wrap *gomock.Call +type MockDeltaTranslaterTranslateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateApplicationCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateApplicationCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateApplicationCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateApplicationOffer mocks base method. @@ -91,9 +163,33 @@ func (m *MockDeltaTranslater) TranslateApplicationOffer(arg0 multiwatcher.Entity } // TranslateApplicationOffer indicates an expected call of TranslateApplicationOffer. -func (mr *MockDeltaTranslaterMockRecorder) TranslateApplicationOffer(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateApplicationOffer(arg0 any) *MockDeltaTranslaterTranslateApplicationOfferCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateApplicationOffer", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateApplicationOffer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateApplicationOffer", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateApplicationOffer), arg0) + return &MockDeltaTranslaterTranslateApplicationOfferCall{Call: call} +} + +// MockDeltaTranslaterTranslateApplicationOfferCall wrap *gomock.Call +type MockDeltaTranslaterTranslateApplicationOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateApplicationOfferCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateApplicationOfferCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateApplicationOfferCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateApplicationOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateApplicationOfferCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateApplicationOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateBlock mocks base method. @@ -105,9 +201,33 @@ func (m *MockDeltaTranslater) TranslateBlock(arg0 multiwatcher.EntityInfo) param } // TranslateBlock indicates an expected call of TranslateBlock. -func (mr *MockDeltaTranslaterMockRecorder) TranslateBlock(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateBlock(arg0 any) *MockDeltaTranslaterTranslateBlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateBlock", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateBlock), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateBlock", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateBlock), arg0) + return &MockDeltaTranslaterTranslateBlockCall{Call: call} +} + +// MockDeltaTranslaterTranslateBlockCall wrap *gomock.Call +type MockDeltaTranslaterTranslateBlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateBlockCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateBlockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateBlockCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateBlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateBlockCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateBlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateBranch mocks base method. @@ -119,9 +239,33 @@ func (m *MockDeltaTranslater) TranslateBranch(arg0 multiwatcher.EntityInfo) para } // TranslateBranch indicates an expected call of TranslateBranch. -func (mr *MockDeltaTranslaterMockRecorder) TranslateBranch(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateBranch(arg0 any) *MockDeltaTranslaterTranslateBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateBranch", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateBranch", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateBranch), arg0) + return &MockDeltaTranslaterTranslateBranchCall{Call: call} +} + +// MockDeltaTranslaterTranslateBranchCall wrap *gomock.Call +type MockDeltaTranslaterTranslateBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateBranchCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateBranchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateBranchCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateBranchCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateCharm mocks base method. @@ -133,9 +277,33 @@ func (m *MockDeltaTranslater) TranslateCharm(arg0 multiwatcher.EntityInfo) param } // TranslateCharm indicates an expected call of TranslateCharm. -func (mr *MockDeltaTranslaterMockRecorder) TranslateCharm(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateCharm(arg0 any) *MockDeltaTranslaterTranslateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateCharm", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateCharm", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateCharm), arg0) + return &MockDeltaTranslaterTranslateCharmCall{Call: call} +} + +// MockDeltaTranslaterTranslateCharmCall wrap *gomock.Call +type MockDeltaTranslaterTranslateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateCharmCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateCharmCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateCharmCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateMachine mocks base method. @@ -147,9 +315,33 @@ func (m *MockDeltaTranslater) TranslateMachine(arg0 multiwatcher.EntityInfo) par } // TranslateMachine indicates an expected call of TranslateMachine. -func (mr *MockDeltaTranslaterMockRecorder) TranslateMachine(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateMachine(arg0 any) *MockDeltaTranslaterTranslateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateMachine", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateMachine", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateMachine), arg0) + return &MockDeltaTranslaterTranslateMachineCall{Call: call} +} + +// MockDeltaTranslaterTranslateMachineCall wrap *gomock.Call +type MockDeltaTranslaterTranslateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateMachineCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateMachineCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateMachineCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateModel mocks base method. @@ -161,9 +353,33 @@ func (m *MockDeltaTranslater) TranslateModel(arg0 multiwatcher.EntityInfo) param } // TranslateModel indicates an expected call of TranslateModel. -func (mr *MockDeltaTranslaterMockRecorder) TranslateModel(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateModel(arg0 any) *MockDeltaTranslaterTranslateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateModel", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateModel", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateModel), arg0) + return &MockDeltaTranslaterTranslateModelCall{Call: call} +} + +// MockDeltaTranslaterTranslateModelCall wrap *gomock.Call +type MockDeltaTranslaterTranslateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateModelCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateModelCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateModelCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateRelation mocks base method. @@ -175,9 +391,33 @@ func (m *MockDeltaTranslater) TranslateRelation(arg0 multiwatcher.EntityInfo) pa } // TranslateRelation indicates an expected call of TranslateRelation. -func (mr *MockDeltaTranslaterMockRecorder) TranslateRelation(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateRelation(arg0 any) *MockDeltaTranslaterTranslateRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateRelation", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateRelation", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateRelation), arg0) + return &MockDeltaTranslaterTranslateRelationCall{Call: call} +} + +// MockDeltaTranslaterTranslateRelationCall wrap *gomock.Call +type MockDeltaTranslaterTranslateRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateRelationCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateRelationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateRelationCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateRelationCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateRemoteApplication mocks base method. @@ -189,9 +429,33 @@ func (m *MockDeltaTranslater) TranslateRemoteApplication(arg0 multiwatcher.Entit } // TranslateRemoteApplication indicates an expected call of TranslateRemoteApplication. -func (mr *MockDeltaTranslaterMockRecorder) TranslateRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateRemoteApplication(arg0 any) *MockDeltaTranslaterTranslateRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateRemoteApplication", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateRemoteApplication", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateRemoteApplication), arg0) + return &MockDeltaTranslaterTranslateRemoteApplicationCall{Call: call} +} + +// MockDeltaTranslaterTranslateRemoteApplicationCall wrap *gomock.Call +type MockDeltaTranslaterTranslateRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateRemoteApplicationCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateRemoteApplicationCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateRemoteApplicationCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TranslateUnit mocks base method. @@ -203,7 +467,31 @@ func (m *MockDeltaTranslater) TranslateUnit(arg0 multiwatcher.EntityInfo) params } // TranslateUnit indicates an expected call of TranslateUnit. -func (mr *MockDeltaTranslaterMockRecorder) TranslateUnit(arg0 any) *gomock.Call { +func (mr *MockDeltaTranslaterMockRecorder) TranslateUnit(arg0 any) *MockDeltaTranslaterTranslateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateUnit", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslateUnit", reflect.TypeOf((*MockDeltaTranslater)(nil).TranslateUnit), arg0) + return &MockDeltaTranslaterTranslateUnitCall{Call: call} +} + +// MockDeltaTranslaterTranslateUnitCall wrap *gomock.Call +type MockDeltaTranslaterTranslateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeltaTranslaterTranslateUnitCall) Return(arg0 params.EntityInfo) *MockDeltaTranslaterTranslateUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeltaTranslaterTranslateUnitCall) Do(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeltaTranslaterTranslateUnitCall) DoAndReturn(f func(multiwatcher.EntityInfo) params.EntityInfo) *MockDeltaTranslaterTranslateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/mocks/resources_mock.go b/apiserver/mocks/resources_mock.go index ae5a6a26fcb..edb8796676c 100644 --- a/apiserver/mocks/resources_mock.go +++ b/apiserver/mocks/resources_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources +// mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockResources) AddPendingResource(arg0, arg1 string, arg2 resource.Reso } // AddPendingResource indicates an expected call of AddPendingResource. -func (mr *MockResourcesMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *MockResourcesAddPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockResources)(nil).AddPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockResources)(nil).AddPendingResource), arg0, arg1, arg2) + return &MockResourcesAddPendingResourceCall{Call: call} +} + +// MockResourcesAddPendingResourceCall wrap *gomock.Call +type MockResourcesAddPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesAddPendingResourceCall) Return(arg0 string, arg1 error) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesAddPendingResourceCall) Do(f func(string, string, resource.Resource) (string, error)) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesAddPendingResourceCall) DoAndReturn(f func(string, string, resource.Resource) (string, error)) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPendingResource mocks base method. @@ -68,9 +92,33 @@ func (m *MockResources) GetPendingResource(arg0, arg1, arg2 string) (resources.R } // GetPendingResource indicates an expected call of GetPendingResource. -func (mr *MockResourcesMockRecorder) GetPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) GetPendingResource(arg0, arg1, arg2 any) *MockResourcesGetPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingResource", reflect.TypeOf((*MockResources)(nil).GetPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingResource", reflect.TypeOf((*MockResources)(nil).GetPendingResource), arg0, arg1, arg2) + return &MockResourcesGetPendingResourceCall{Call: call} +} + +// MockResourcesGetPendingResourceCall wrap *gomock.Call +type MockResourcesGetPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetPendingResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetPendingResourceCall) Do(f func(string, string, string) (resources.Resource, error)) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetPendingResourceCall) DoAndReturn(f func(string, string, string) (resources.Resource, error)) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetResource mocks base method. @@ -83,9 +131,33 @@ func (m *MockResources) GetResource(arg0, arg1 string) (resources.Resource, erro } // GetResource indicates an expected call of GetResource. -func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *MockResourcesGetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + return &MockResourcesGetResourceCall{Call: call} +} + +// MockResourcesGetResourceCall wrap *gomock.Call +type MockResourcesGetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesGetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetResourceCall) Do(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetResourceCall) DoAndReturn(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListPendingResources mocks base method. @@ -98,9 +170,33 @@ func (m *MockResources) ListPendingResources(arg0 string) (resources.Application } // ListPendingResources indicates an expected call of ListPendingResources. -func (mr *MockResourcesMockRecorder) ListPendingResources(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) ListPendingResources(arg0 any) *MockResourcesListPendingResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPendingResources", reflect.TypeOf((*MockResources)(nil).ListPendingResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPendingResources", reflect.TypeOf((*MockResources)(nil).ListPendingResources), arg0) + return &MockResourcesListPendingResourcesCall{Call: call} +} + +// MockResourcesListPendingResourcesCall wrap *gomock.Call +type MockResourcesListPendingResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesListPendingResourcesCall) Return(arg0 resources.ApplicationResources, arg1 error) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesListPendingResourcesCall) Do(f func(string) (resources.ApplicationResources, error)) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesListPendingResourcesCall) DoAndReturn(f func(string) (resources.ApplicationResources, error)) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -113,9 +209,33 @@ func (m *MockResources) ListResources(arg0 string) (resources.ApplicationResourc } // ListResources indicates an expected call of ListResources. -func (mr *MockResourcesMockRecorder) ListResources(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) ListResources(arg0 any) *MockResourcesListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResources)(nil).ListResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResources)(nil).ListResources), arg0) + return &MockResourcesListResourcesCall{Call: call} +} + +// MockResourcesListResourcesCall wrap *gomock.Call +type MockResourcesListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesListResourcesCall) Return(arg0 resources.ApplicationResources, arg1 error) *MockResourcesListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesListResourcesCall) Do(f func(string) (resources.ApplicationResources, error)) *MockResourcesListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesListResourcesCall) DoAndReturn(f func(string) (resources.ApplicationResources, error)) *MockResourcesListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResource mocks base method. @@ -129,9 +249,33 @@ func (m *MockResources) OpenResource(arg0, arg1 string) (resources.Resource, io. } // OpenResource indicates an expected call of OpenResource. -func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *MockResourcesOpenResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + return &MockResourcesOpenResourceCall{Call: call} +} + +// MockResourcesOpenResourceCall wrap *gomock.Call +type MockResourcesOpenResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResourceForUniter mocks base method. @@ -145,9 +289,33 @@ func (m *MockResources) OpenResourceForUniter(arg0, arg1 string) (resources.Reso } // OpenResourceForUniter indicates an expected call of OpenResourceForUniter. -func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *MockResourcesOpenResourceForUniterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + return &MockResourcesOpenResourceForUniterCall{Call: call} +} + +// MockResourcesOpenResourceForUniterCall wrap *gomock.Call +type MockResourcesOpenResourceForUniterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceForUniterCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceForUniterCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceForUniterCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemovePendingAppResources mocks base method. @@ -159,9 +327,33 @@ func (m *MockResources) RemovePendingAppResources(arg0 string, arg1 map[string]s } // RemovePendingAppResources indicates an expected call of RemovePendingAppResources. -func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *MockResourcesRemovePendingAppResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + return &MockResourcesRemovePendingAppResourcesCall{Call: call} +} + +// MockResourcesRemovePendingAppResourcesCall wrap *gomock.Call +type MockResourcesRemovePendingAppResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRemovePendingAppResourcesCall) Return(arg0 error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRemovePendingAppResourcesCall) Do(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRemovePendingAppResourcesCall) DoAndReturn(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmStoreResources mocks base method. @@ -173,9 +365,33 @@ func (m *MockResources) SetCharmStoreResources(arg0 string, arg1 []resource.Reso } // SetCharmStoreResources indicates an expected call of SetCharmStoreResources. -func (mr *MockResourcesMockRecorder) SetCharmStoreResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetCharmStoreResources(arg0, arg1, arg2 any) *MockResourcesSetCharmStoreResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStoreResources", reflect.TypeOf((*MockResources)(nil).SetCharmStoreResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStoreResources", reflect.TypeOf((*MockResources)(nil).SetCharmStoreResources), arg0, arg1, arg2) + return &MockResourcesSetCharmStoreResourcesCall{Call: call} +} + +// MockResourcesSetCharmStoreResourcesCall wrap *gomock.Call +type MockResourcesSetCharmStoreResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetCharmStoreResourcesCall) Return(arg0 error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetCharmStoreResourcesCall) Do(f func(string, []resource.Resource, time.Time) error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetCharmStoreResourcesCall) DoAndReturn(f func(string, []resource.Resource, time.Time) error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetResource mocks base method. @@ -188,9 +404,33 @@ func (m *MockResources) SetResource(arg0, arg1 string, arg2 resource.Resource, a } // SetResource indicates an expected call of SetResource. -func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *MockResourcesSetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + return &MockResourcesSetResourceCall{Call: call} +} + +// MockResourcesSetResourceCall wrap *gomock.Call +type MockResourcesSetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesSetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetResourceCall) Do(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetResourceCall) DoAndReturn(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitResource mocks base method. @@ -203,9 +443,33 @@ func (m *MockResources) SetUnitResource(arg0, arg1 string, arg2 resource.Resourc } // SetUnitResource indicates an expected call of SetUnitResource. -func (mr *MockResourcesMockRecorder) SetUnitResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetUnitResource(arg0, arg1, arg2 any) *MockResourcesSetUnitResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitResource", reflect.TypeOf((*MockResources)(nil).SetUnitResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitResource", reflect.TypeOf((*MockResources)(nil).SetUnitResource), arg0, arg1, arg2) + return &MockResourcesSetUnitResourceCall{Call: call} +} + +// MockResourcesSetUnitResourceCall wrap *gomock.Call +type MockResourcesSetUnitResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetUnitResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetUnitResourceCall) Do(f func(string, string, resource.Resource) (resources.Resource, error)) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetUnitResourceCall) DoAndReturn(f func(string, string, resource.Resource) (resources.Resource, error)) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePendingResource mocks base method. @@ -218,7 +482,31 @@ func (m *MockResources) UpdatePendingResource(arg0, arg1, arg2 string, arg3 reso } // UpdatePendingResource indicates an expected call of UpdatePendingResource. -func (mr *MockResourcesMockRecorder) UpdatePendingResource(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) UpdatePendingResource(arg0, arg1, arg2, arg3, arg4 any) *MockResourcesUpdatePendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePendingResource", reflect.TypeOf((*MockResources)(nil).UpdatePendingResource), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePendingResource", reflect.TypeOf((*MockResources)(nil).UpdatePendingResource), arg0, arg1, arg2, arg3, arg4) + return &MockResourcesUpdatePendingResourceCall{Call: call} +} + +// MockResourcesUpdatePendingResourceCall wrap *gomock.Call +type MockResourcesUpdatePendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesUpdatePendingResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesUpdatePendingResourceCall) Do(f func(string, string, string, resource.Resource, io.Reader) (resources.Resource, error)) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesUpdatePendingResourceCall) DoAndReturn(f func(string, string, string, resource.Resource, io.Reader) (resources.Resource, error)) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/observer/metricobserver/metricobserver.go b/apiserver/observer/metricobserver/metricobserver.go index 1fd62cffa45..98a0b5da807 100644 --- a/apiserver/observer/metricobserver/metricobserver.go +++ b/apiserver/observer/metricobserver/metricobserver.go @@ -44,8 +44,8 @@ type SummaryVec interface { // MetricsCollector represents a bundle of metrics that is used by the observer // factory. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/observer/metricobserver MetricsCollector,SummaryVec -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Summary +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/observer/metricobserver MetricsCollector,SummaryVec +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Summary type MetricsCollector interface { // APIRequestDuration returns a SummaryVec for updating the duration of // api request duration. diff --git a/apiserver/observer/metricobserver/mocks/metrics_collector_mock.go b/apiserver/observer/metricobserver/mocks/metrics_collector_mock.go index a0b7502bdd5..a961bf71d98 100644 --- a/apiserver/observer/metricobserver/mocks/metrics_collector_mock.go +++ b/apiserver/observer/metricobserver/mocks/metrics_collector_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/observer/metricobserver MetricsCollector,SummaryVec +// mockgen -typed -package mocks -destination mocks/metrics_collector_mock.go github.com/juju/juju/apiserver/observer/metricobserver MetricsCollector,SummaryVec // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockMetricsCollector) APIRequestDuration() metricobserver.SummaryVec { } // APIRequestDuration indicates an expected call of APIRequestDuration. -func (mr *MockMetricsCollectorMockRecorder) APIRequestDuration() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) APIRequestDuration() *MockMetricsCollectorAPIRequestDurationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIRequestDuration", reflect.TypeOf((*MockMetricsCollector)(nil).APIRequestDuration)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIRequestDuration", reflect.TypeOf((*MockMetricsCollector)(nil).APIRequestDuration)) + return &MockMetricsCollectorAPIRequestDurationCall{Call: call} +} + +// MockMetricsCollectorAPIRequestDurationCall wrap *gomock.Call +type MockMetricsCollectorAPIRequestDurationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorAPIRequestDurationCall) Return(arg0 metricobserver.SummaryVec) *MockMetricsCollectorAPIRequestDurationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorAPIRequestDurationCall) Do(f func() metricobserver.SummaryVec) *MockMetricsCollectorAPIRequestDurationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorAPIRequestDurationCall) DoAndReturn(f func() metricobserver.SummaryVec) *MockMetricsCollectorAPIRequestDurationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSummaryVec is a mock of SummaryVec interface. @@ -86,7 +110,31 @@ func (m *MockSummaryVec) With(arg0 prometheus.Labels) prometheus.Observer { } // With indicates an expected call of With. -func (mr *MockSummaryVecMockRecorder) With(arg0 any) *gomock.Call { +func (mr *MockSummaryVecMockRecorder) With(arg0 any) *MockSummaryVecWithCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockSummaryVec)(nil).With), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockSummaryVec)(nil).With), arg0) + return &MockSummaryVecWithCall{Call: call} +} + +// MockSummaryVecWithCall wrap *gomock.Call +type MockSummaryVecWithCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryVecWithCall) Return(arg0 prometheus.Observer) *MockSummaryVecWithCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryVecWithCall) Do(f func(prometheus.Labels) prometheus.Observer) *MockSummaryVecWithCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryVecWithCall) DoAndReturn(f func(prometheus.Labels) prometheus.Observer) *MockSummaryVecWithCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/observer/metricobserver/mocks/metrics_mock.go b/apiserver/observer/metricobserver/mocks/metrics_mock.go index 1e4441e46cb..de397f18630 100644 --- a/apiserver/observer/metricobserver/mocks/metrics_mock.go +++ b/apiserver/observer/metricobserver/mocks/metrics_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Summary +// mockgen -typed -package mocks -destination mocks/metrics_mock.go github.com/prometheus/client_golang/prometheus Summary // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockSummary) Collect(arg0 chan<- prometheus.Metric) { } // Collect indicates an expected call of Collect. -func (mr *MockSummaryMockRecorder) Collect(arg0 any) *gomock.Call { +func (mr *MockSummaryMockRecorder) Collect(arg0 any) *MockSummaryCollectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockSummary)(nil).Collect), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockSummary)(nil).Collect), arg0) + return &MockSummaryCollectCall{Call: call} +} + +// MockSummaryCollectCall wrap *gomock.Call +type MockSummaryCollectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryCollectCall) Return() *MockSummaryCollectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryCollectCall) Do(f func(chan<- prometheus.Metric)) *MockSummaryCollectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryCollectCall) DoAndReturn(f func(chan<- prometheus.Metric)) *MockSummaryCollectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Desc mocks base method. @@ -61,9 +85,33 @@ func (m *MockSummary) Desc() *prometheus.Desc { } // Desc indicates an expected call of Desc. -func (mr *MockSummaryMockRecorder) Desc() *gomock.Call { +func (mr *MockSummaryMockRecorder) Desc() *MockSummaryDescCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockSummary)(nil).Desc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockSummary)(nil).Desc)) + return &MockSummaryDescCall{Call: call} +} + +// MockSummaryDescCall wrap *gomock.Call +type MockSummaryDescCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryDescCall) Return(arg0 *prometheus.Desc) *MockSummaryDescCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryDescCall) Do(f func() *prometheus.Desc) *MockSummaryDescCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryDescCall) DoAndReturn(f func() *prometheus.Desc) *MockSummaryDescCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Describe mocks base method. @@ -73,9 +121,33 @@ func (m *MockSummary) Describe(arg0 chan<- *prometheus.Desc) { } // Describe indicates an expected call of Describe. -func (mr *MockSummaryMockRecorder) Describe(arg0 any) *gomock.Call { +func (mr *MockSummaryMockRecorder) Describe(arg0 any) *MockSummaryDescribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockSummary)(nil).Describe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockSummary)(nil).Describe), arg0) + return &MockSummaryDescribeCall{Call: call} +} + +// MockSummaryDescribeCall wrap *gomock.Call +type MockSummaryDescribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryDescribeCall) Return() *MockSummaryDescribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryDescribeCall) Do(f func(chan<- *prometheus.Desc)) *MockSummaryDescribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryDescribeCall) DoAndReturn(f func(chan<- *prometheus.Desc)) *MockSummaryDescribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Observe mocks base method. @@ -85,9 +157,33 @@ func (m *MockSummary) Observe(arg0 float64) { } // Observe indicates an expected call of Observe. -func (mr *MockSummaryMockRecorder) Observe(arg0 any) *gomock.Call { +func (mr *MockSummaryMockRecorder) Observe(arg0 any) *MockSummaryObserveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Observe", reflect.TypeOf((*MockSummary)(nil).Observe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Observe", reflect.TypeOf((*MockSummary)(nil).Observe), arg0) + return &MockSummaryObserveCall{Call: call} +} + +// MockSummaryObserveCall wrap *gomock.Call +type MockSummaryObserveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryObserveCall) Return() *MockSummaryObserveCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryObserveCall) Do(f func(float64)) *MockSummaryObserveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryObserveCall) DoAndReturn(f func(float64)) *MockSummaryObserveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Write mocks base method. @@ -99,7 +195,31 @@ func (m *MockSummary) Write(arg0 *io_prometheus_client.Metric) error { } // Write indicates an expected call of Write. -func (mr *MockSummaryMockRecorder) Write(arg0 any) *gomock.Call { +func (mr *MockSummaryMockRecorder) Write(arg0 any) *MockSummaryWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSummary)(nil).Write), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSummary)(nil).Write), arg0) + return &MockSummaryWriteCall{Call: call} +} + +// MockSummaryWriteCall wrap *gomock.Call +type MockSummaryWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSummaryWriteCall) Return(arg0 error) *MockSummaryWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSummaryWriteCall) Do(f func(*io_prometheus_client.Metric) error) *MockSummaryWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSummaryWriteCall) DoAndReturn(f func(*io_prometheus_client.Metric) error) *MockSummaryWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/package_test.go b/apiserver/package_test.go index 8e547394049..19d4482fe4b 100644 --- a/apiserver/package_test.go +++ b/apiserver/package_test.go @@ -12,10 +12,10 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/deltatranslater_mock.go github.com/juju/juju/apiserver DeltaTranslater -//go:generate go run go.uber.org/mock/mockgen -package apiserver_test -destination registration_environs_mock_test.go github.com/juju/juju/environs ConnectorInfo -//go:generate go run go.uber.org/mock/mockgen -package apiserver_test -destination registration_proxy_mock_test.go github.com/juju/juju/internal/proxy Proxier -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/deltatranslater_mock.go github.com/juju/juju/apiserver DeltaTranslater +//go:generate go run go.uber.org/mock/mockgen -typed -package apiserver_test -destination registration_environs_mock_test.go github.com/juju/juju/environs ConnectorInfo +//go:generate go run go.uber.org/mock/mockgen -typed -package apiserver_test -destination registration_proxy_mock_test.go github.com/juju/juju/internal/proxy Proxier +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources func TestPackage(t *testing.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/registration_environs_mock_test.go b/apiserver/registration_environs_mock_test.go index 1b2aeb57f87..8ebe7c8103c 100644 --- a/apiserver/registration_environs_mock_test.go +++ b/apiserver/registration_environs_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package apiserver_test -destination registration_environs_mock_test.go github.com/juju/juju/environs ConnectorInfo +// mockgen -typed -package apiserver_test -destination registration_environs_mock_test.go github.com/juju/juju/environs ConnectorInfo // // Package apiserver_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockConnectorInfo) ConnectionProxyInfo(arg0 context.Context) (proxy.Pro } // ConnectionProxyInfo indicates an expected call of ConnectionProxyInfo. -func (mr *MockConnectorInfoMockRecorder) ConnectionProxyInfo(arg0 any) *gomock.Call { +func (mr *MockConnectorInfoMockRecorder) ConnectionProxyInfo(arg0 any) *MockConnectorInfoConnectionProxyInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionProxyInfo", reflect.TypeOf((*MockConnectorInfo)(nil).ConnectionProxyInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionProxyInfo", reflect.TypeOf((*MockConnectorInfo)(nil).ConnectionProxyInfo), arg0) + return &MockConnectorInfoConnectionProxyInfoCall{Call: call} +} + +// MockConnectorInfoConnectionProxyInfoCall wrap *gomock.Call +type MockConnectorInfoConnectionProxyInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectorInfoConnectionProxyInfoCall) Return(arg0 proxy.Proxier, arg1 error) *MockConnectorInfoConnectionProxyInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectorInfoConnectionProxyInfoCall) Do(f func(context.Context) (proxy.Proxier, error)) *MockConnectorInfoConnectionProxyInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectorInfoConnectionProxyInfoCall) DoAndReturn(f func(context.Context) (proxy.Proxier, error)) *MockConnectorInfoConnectionProxyInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/registration_proxy_mock_test.go b/apiserver/registration_proxy_mock_test.go index 0d46c134eba..584a260031a 100644 --- a/apiserver/registration_proxy_mock_test.go +++ b/apiserver/registration_proxy_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package apiserver_test -destination registration_proxy_mock_test.go github.com/juju/juju/internal/proxy Proxier +// mockgen -typed -package apiserver_test -destination registration_proxy_mock_test.go github.com/juju/juju/internal/proxy Proxier // // Package apiserver_test is a generated GoMock package. @@ -46,9 +46,33 @@ func (m *MockProxier) Insecure() { } // Insecure indicates an expected call of Insecure. -func (mr *MockProxierMockRecorder) Insecure() *gomock.Call { +func (mr *MockProxierMockRecorder) Insecure() *MockProxierInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insecure", reflect.TypeOf((*MockProxier)(nil).Insecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insecure", reflect.TypeOf((*MockProxier)(nil).Insecure)) + return &MockProxierInsecureCall{Call: call} +} + +// MockProxierInsecureCall wrap *gomock.Call +type MockProxierInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierInsecureCall) Return() *MockProxierInsecureCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierInsecureCall) Do(f func()) *MockProxierInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierInsecureCall) DoAndReturn(f func()) *MockProxierInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MarshalYAML mocks base method. @@ -61,9 +85,33 @@ func (m *MockProxier) MarshalYAML() (any, error) { } // MarshalYAML indicates an expected call of MarshalYAML. -func (mr *MockProxierMockRecorder) MarshalYAML() *gomock.Call { +func (mr *MockProxierMockRecorder) MarshalYAML() *MockProxierMarshalYAMLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarshalYAML", reflect.TypeOf((*MockProxier)(nil).MarshalYAML)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarshalYAML", reflect.TypeOf((*MockProxier)(nil).MarshalYAML)) + return &MockProxierMarshalYAMLCall{Call: call} +} + +// MockProxierMarshalYAMLCall wrap *gomock.Call +type MockProxierMarshalYAMLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierMarshalYAMLCall) Return(arg0 any, arg1 error) *MockProxierMarshalYAMLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierMarshalYAMLCall) Do(f func() (any, error)) *MockProxierMarshalYAMLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierMarshalYAMLCall) DoAndReturn(f func() (any, error)) *MockProxierMarshalYAMLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawConfig mocks base method. @@ -76,9 +124,33 @@ func (m *MockProxier) RawConfig() (map[string]any, error) { } // RawConfig indicates an expected call of RawConfig. -func (mr *MockProxierMockRecorder) RawConfig() *gomock.Call { +func (mr *MockProxierMockRecorder) RawConfig() *MockProxierRawConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawConfig", reflect.TypeOf((*MockProxier)(nil).RawConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawConfig", reflect.TypeOf((*MockProxier)(nil).RawConfig)) + return &MockProxierRawConfigCall{Call: call} +} + +// MockProxierRawConfigCall wrap *gomock.Call +type MockProxierRawConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierRawConfigCall) Return(arg0 map[string]any, arg1 error) *MockProxierRawConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierRawConfigCall) Do(f func() (map[string]any, error)) *MockProxierRawConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierRawConfigCall) DoAndReturn(f func() (map[string]any, error)) *MockProxierRawConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Start mocks base method. @@ -90,9 +162,33 @@ func (m *MockProxier) Start(arg0 context.Context) error { } // Start indicates an expected call of Start. -func (mr *MockProxierMockRecorder) Start(arg0 any) *gomock.Call { +func (mr *MockProxierMockRecorder) Start(arg0 any) *MockProxierStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockProxier)(nil).Start), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockProxier)(nil).Start), arg0) + return &MockProxierStartCall{Call: call} +} + +// MockProxierStartCall wrap *gomock.Call +type MockProxierStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierStartCall) Return(arg0 error) *MockProxierStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierStartCall) Do(f func(context.Context) error) *MockProxierStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierStartCall) DoAndReturn(f func(context.Context) error) *MockProxierStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -102,9 +198,33 @@ func (m *MockProxier) Stop() { } // Stop indicates an expected call of Stop. -func (mr *MockProxierMockRecorder) Stop() *gomock.Call { +func (mr *MockProxierMockRecorder) Stop() *MockProxierStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockProxier)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockProxier)(nil).Stop)) + return &MockProxierStopCall{Call: call} +} + +// MockProxierStopCall wrap *gomock.Call +type MockProxierStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierStopCall) Return() *MockProxierStopCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierStopCall) Do(f func()) *MockProxierStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierStopCall) DoAndReturn(f func()) *MockProxierStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -116,7 +236,31 @@ func (m *MockProxier) Type() string { } // Type indicates an expected call of Type. -func (mr *MockProxierMockRecorder) Type() *gomock.Call { +func (mr *MockProxierMockRecorder) Type() *MockProxierTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockProxier)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockProxier)(nil).Type)) + return &MockProxierTypeCall{Call: call} +} + +// MockProxierTypeCall wrap *gomock.Call +type MockProxierTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxierTypeCall) Return(arg0 string) *MockProxierTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxierTypeCall) Do(f func() string) *MockProxierTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxierTypeCall) DoAndReturn(f func() string) *MockProxierTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/stateauthenticator/authentication_mock_test.go b/apiserver/stateauthenticator/authentication_mock_test.go index 531bfbc7f2c..d973ccdf8a8 100644 --- a/apiserver/stateauthenticator/authentication_mock_test.go +++ b/apiserver/stateauthenticator/authentication_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stateauthenticator -destination authentication_mock_test.go github.com/juju/juju/apiserver/authentication EntityAuthenticator +// mockgen -typed -package stateauthenticator -destination authentication_mock_test.go github.com/juju/juju/apiserver/authentication EntityAuthenticator // // Package stateauthenticator is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockEntityAuthenticator) Authenticate(arg0 context.Context, arg1 authen } // Authenticate indicates an expected call of Authenticate. -func (mr *MockEntityAuthenticatorMockRecorder) Authenticate(arg0, arg1 any) *gomock.Call { +func (mr *MockEntityAuthenticatorMockRecorder) Authenticate(arg0, arg1 any) *MockEntityAuthenticatorAuthenticateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockEntityAuthenticator)(nil).Authenticate), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockEntityAuthenticator)(nil).Authenticate), arg0, arg1) + return &MockEntityAuthenticatorAuthenticateCall{Call: call} +} + +// MockEntityAuthenticatorAuthenticateCall wrap *gomock.Call +type MockEntityAuthenticatorAuthenticateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEntityAuthenticatorAuthenticateCall) Return(arg0 state.Entity, arg1 error) *MockEntityAuthenticatorAuthenticateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEntityAuthenticatorAuthenticateCall) Do(f func(context.Context, authentication.AuthParams) (state.Entity, error)) *MockEntityAuthenticatorAuthenticateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEntityAuthenticatorAuthenticateCall) DoAndReturn(f func(context.Context, authentication.AuthParams) (state.Entity, error)) *MockEntityAuthenticatorAuthenticateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/apiserver/stateauthenticator/package_test.go b/apiserver/stateauthenticator/package_test.go index 827a17a3d7a..197af5b26cc 100644 --- a/apiserver/stateauthenticator/package_test.go +++ b/apiserver/stateauthenticator/package_test.go @@ -9,8 +9,8 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package stateauthenticator -destination services_mock_test.go github.com/juju/juju/apiserver/stateauthenticator ControllerConfigService,UserService,AgentAuthenticatorFactory -//go:generate go run go.uber.org/mock/mockgen -package stateauthenticator -destination authentication_mock_test.go github.com/juju/juju/apiserver/authentication EntityAuthenticator +//go:generate go run go.uber.org/mock/mockgen -typed -package stateauthenticator -destination services_mock_test.go github.com/juju/juju/apiserver/stateauthenticator ControllerConfigService,UserService,AgentAuthenticatorFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package stateauthenticator -destination authentication_mock_test.go github.com/juju/juju/apiserver/authentication EntityAuthenticator func TestPackage(t *testing.T) { coretesting.MgoTestPackage(t) diff --git a/apiserver/stateauthenticator/services_mock_test.go b/apiserver/stateauthenticator/services_mock_test.go index 5af5ca0723e..d602b7ecf95 100644 --- a/apiserver/stateauthenticator/services_mock_test.go +++ b/apiserver/stateauthenticator/services_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stateauthenticator -destination services_mock_test.go github.com/juju/juju/apiserver/stateauthenticator ControllerConfigService,UserService,AgentAuthenticatorFactory +// mockgen -typed -package stateauthenticator -destination services_mock_test.go github.com/juju/juju/apiserver/stateauthenticator ControllerConfigService,UserService,AgentAuthenticatorFactory // // Package stateauthenticator is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUserService is a mock of UserService interface. @@ -92,9 +116,33 @@ func (m *MockUserService) GetUserByAuth(arg0 context.Context, arg1 string, arg2 } // GetUserByAuth indicates an expected call of GetUserByAuth. -func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *MockUserServiceGetUserByAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + return &MockUserServiceGetUserByAuthCall{Call: call} +} + +// MockUserServiceGetUserByAuthCall wrap *gomock.Call +type MockUserServiceGetUserByAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByAuthCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByAuthCall) Do(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByAuthCall) DoAndReturn(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -107,9 +155,33 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateLastLogin mocks base method. @@ -121,9 +193,33 @@ func (m *MockUserService) UpdateLastLogin(arg0 context.Context, arg1 string) err } // UpdateLastLogin indicates an expected call of UpdateLastLogin. -func (mr *MockUserServiceMockRecorder) UpdateLastLogin(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) UpdateLastLogin(arg0, arg1 any) *MockUserServiceUpdateLastLoginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserService)(nil).UpdateLastLogin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserService)(nil).UpdateLastLogin), arg0, arg1) + return &MockUserServiceUpdateLastLoginCall{Call: call} +} + +// MockUserServiceUpdateLastLoginCall wrap *gomock.Call +type MockUserServiceUpdateLastLoginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceUpdateLastLoginCall) Return(arg0 error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceUpdateLastLoginCall) Do(f func(context.Context, string) error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceUpdateLastLoginCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAgentAuthenticatorFactory is a mock of AgentAuthenticatorFactory interface. @@ -158,9 +254,33 @@ func (m *MockAgentAuthenticatorFactory) Authenticator() authentication.EntityAut } // Authenticator indicates an expected call of Authenticator. -func (mr *MockAgentAuthenticatorFactoryMockRecorder) Authenticator() *gomock.Call { +func (mr *MockAgentAuthenticatorFactoryMockRecorder) Authenticator() *MockAgentAuthenticatorFactoryAuthenticatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticator", reflect.TypeOf((*MockAgentAuthenticatorFactory)(nil).Authenticator)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticator", reflect.TypeOf((*MockAgentAuthenticatorFactory)(nil).Authenticator)) + return &MockAgentAuthenticatorFactoryAuthenticatorCall{Call: call} +} + +// MockAgentAuthenticatorFactoryAuthenticatorCall wrap *gomock.Call +type MockAgentAuthenticatorFactoryAuthenticatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentAuthenticatorFactoryAuthenticatorCall) Return(arg0 authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentAuthenticatorFactoryAuthenticatorCall) Do(f func() authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentAuthenticatorFactoryAuthenticatorCall) DoAndReturn(f func() authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthenticatorForState mocks base method. @@ -172,7 +292,31 @@ func (m *MockAgentAuthenticatorFactory) AuthenticatorForState(arg0 *state.State) } // AuthenticatorForState indicates an expected call of AuthenticatorForState. -func (mr *MockAgentAuthenticatorFactoryMockRecorder) AuthenticatorForState(arg0 any) *gomock.Call { +func (mr *MockAgentAuthenticatorFactoryMockRecorder) AuthenticatorForState(arg0 any) *MockAgentAuthenticatorFactoryAuthenticatorForStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticatorForState", reflect.TypeOf((*MockAgentAuthenticatorFactory)(nil).AuthenticatorForState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticatorForState", reflect.TypeOf((*MockAgentAuthenticatorFactory)(nil).AuthenticatorForState), arg0) + return &MockAgentAuthenticatorFactoryAuthenticatorForStateCall{Call: call} +} + +// MockAgentAuthenticatorFactoryAuthenticatorForStateCall wrap *gomock.Call +type MockAgentAuthenticatorFactoryAuthenticatorForStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentAuthenticatorFactoryAuthenticatorForStateCall) Return(arg0 authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorForStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentAuthenticatorFactoryAuthenticatorForStateCall) Do(f func(*state.State) authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorForStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentAuthenticatorFactoryAuthenticatorForStateCall) DoAndReturn(f func(*state.State) authentication.EntityAuthenticator) *MockAgentAuthenticatorFactoryAuthenticatorForStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/clientconfig/plugins.go b/caas/kubernetes/clientconfig/plugins.go index a1168ccadf8..f72ce93b861 100644 --- a/caas/kubernetes/clientconfig/plugins.go +++ b/caas/kubernetes/clientconfig/plugins.go @@ -43,8 +43,8 @@ func getRBACResourceName(uid string) string { type cleanUpFuncs []func() // To regenerate the mocks for the kubernetes Client used by this package, -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ../provider/mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ../provider/mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ../provider/mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ../provider/mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface func newK8sClientSet(config *clientcmdapi.Config, contextName string) (*kubernetes.Clientset, error) { clientCfg, err := clientcmd.NewNonInteractiveClientConfig( diff --git a/caas/kubernetes/provider/exec/exec.go b/caas/kubernetes/provider/exec/exec.go index 42de57e360c..5d0755a22ec 100644 --- a/caas/kubernetes/provider/exec/exec.go +++ b/caas/kubernetes/provider/exec/exec.go @@ -42,7 +42,7 @@ const ( var randomString = utils.RandomString -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/remotecommand_mock.go k8s.io/client-go/tools/remotecommand Executor +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/remotecommand_mock.go k8s.io/client-go/tools/remotecommand Executor type client struct { namespace string clientset kubernetes.Interface diff --git a/caas/kubernetes/provider/exec/mocks/remotecommand_mock.go b/caas/kubernetes/provider/exec/mocks/remotecommand_mock.go index 8e3d011043c..5e3ee23dcdc 100644 --- a/caas/kubernetes/provider/exec/mocks/remotecommand_mock.go +++ b/caas/kubernetes/provider/exec/mocks/remotecommand_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/remotecommand_mock.go k8s.io/client-go/tools/remotecommand Executor +// mockgen -typed -package mocks -destination mocks/remotecommand_mock.go k8s.io/client-go/tools/remotecommand Executor // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockExecutor) Stream(arg0 remotecommand.StreamOptions) error { } // Stream indicates an expected call of Stream. -func (mr *MockExecutorMockRecorder) Stream(arg0 any) *gomock.Call { +func (mr *MockExecutorMockRecorder) Stream(arg0 any) *MockExecutorStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stream", reflect.TypeOf((*MockExecutor)(nil).Stream), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stream", reflect.TypeOf((*MockExecutor)(nil).Stream), arg0) + return &MockExecutorStreamCall{Call: call} +} + +// MockExecutorStreamCall wrap *gomock.Call +type MockExecutorStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorStreamCall) Return(arg0 error) *MockExecutorStreamCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorStreamCall) Do(f func(remotecommand.StreamOptions) error) *MockExecutorStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorStreamCall) DoAndReturn(f func(remotecommand.StreamOptions) error) *MockExecutorStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StreamWithContext mocks base method. @@ -63,7 +87,31 @@ func (m *MockExecutor) StreamWithContext(arg0 context.Context, arg1 remotecomman } // StreamWithContext indicates an expected call of StreamWithContext. -func (mr *MockExecutorMockRecorder) StreamWithContext(arg0, arg1 any) *gomock.Call { +func (mr *MockExecutorMockRecorder) StreamWithContext(arg0, arg1 any) *MockExecutorStreamWithContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamWithContext", reflect.TypeOf((*MockExecutor)(nil).StreamWithContext), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamWithContext", reflect.TypeOf((*MockExecutor)(nil).StreamWithContext), arg0, arg1) + return &MockExecutorStreamWithContextCall{Call: call} +} + +// MockExecutorStreamWithContextCall wrap *gomock.Call +type MockExecutorStreamWithContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorStreamWithContextCall) Return(arg0 error) *MockExecutorStreamWithContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorStreamWithContextCall) Do(f func(context.Context, remotecommand.StreamOptions) error) *MockExecutorStreamWithContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorStreamWithContextCall) DoAndReturn(f func(context.Context, remotecommand.StreamOptions) error) *MockExecutorStreamWithContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/exec/mocks/sizequeue_mock.go b/caas/kubernetes/provider/exec/mocks/sizequeue_mock.go index eaa505430ae..51a8d0a2e95 100644 --- a/caas/kubernetes/provider/exec/mocks/sizequeue_mock.go +++ b/caas/kubernetes/provider/exec/mocks/sizequeue_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/sizequeue_mock.go github.com/juju/juju/caas/kubernetes/provider/exec SizeGetter +// mockgen -typed -package mocks -destination mocks/sizequeue_mock.go github.com/juju/juju/caas/kubernetes/provider/exec SizeGetter // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockSizeGetter) Get(arg0 int) *remotecommand.TerminalSize { } // Get indicates an expected call of Get. -func (mr *MockSizeGetterMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockSizeGetterMockRecorder) Get(arg0 any) *MockSizeGetterGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSizeGetter)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSizeGetter)(nil).Get), arg0) + return &MockSizeGetterGetCall{Call: call} +} + +// MockSizeGetterGetCall wrap *gomock.Call +type MockSizeGetterGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSizeGetterGetCall) Return(arg0 *remotecommand.TerminalSize) *MockSizeGetterGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSizeGetterGetCall) Do(f func(int) *remotecommand.TerminalSize) *MockSizeGetterGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSizeGetterGetCall) DoAndReturn(f func(int) *remotecommand.TerminalSize) *MockSizeGetterGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/exec/termsize_unix.go b/caas/kubernetes/provider/exec/termsize_unix.go index a0f7fa6b125..5b624199bed 100644 --- a/caas/kubernetes/provider/exec/termsize_unix.go +++ b/caas/kubernetes/provider/exec/termsize_unix.go @@ -23,7 +23,7 @@ func getTermSize(fd int) (*remotecommand.TerminalSize, error) { return &remotecommand.TerminalSize{Width: uint16(w), Height: uint16(h)}, nil } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/sizequeue_mock.go github.com/juju/juju/caas/kubernetes/provider/exec SizeGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/sizequeue_mock.go github.com/juju/juju/caas/kubernetes/provider/exec SizeGetter type sizeQueue struct { getSize SizeGetter diff --git a/caas/kubernetes/provider/k8s.go b/caas/kubernetes/provider/k8s.go index 72e78102199..a41ec32ca15 100644 --- a/caas/kubernetes/provider/k8s.go +++ b/caas/kubernetes/provider/k8s.go @@ -107,26 +107,26 @@ type kubernetesClient struct { // To regenerate the mocks for the kubernetes Client used by this broker, // run "go generate" from the package directory. -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/k8sclient_mock.go k8s.io/client-go/kubernetes Interface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/context_mock.go context Context -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/appv1_mock.go k8s.io/client-go/kubernetes/typed/apps/v1 AppsV1Interface,DeploymentInterface,StatefulSetInterface,DaemonSetInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/corev1_mock.go k8s.io/client-go/kubernetes/typed/core/v1 EventInterface,CoreV1Interface,NamespaceInterface,PodInterface,ServiceInterface,ConfigMapInterface,PersistentVolumeInterface,PersistentVolumeClaimInterface,SecretInterface,NodeInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/networkingv1beta1_mock.go -mock_names=IngressInterface=MockIngressV1Beta1Interface k8s.io/client-go/kubernetes/typed/networking/v1beta1 NetworkingV1beta1Interface,IngressInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/networkingv1_mock.go -mock_names=IngressInterface=MockIngressV1Interface k8s.io/client-go/kubernetes/typed/networking/v1 NetworkingV1Interface,IngressInterface,IngressClassInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/storagev1_mock.go k8s.io/client-go/kubernetes/typed/storage/v1 StorageV1Interface,StorageClassInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/rbacv1_mock.go k8s.io/client-go/kubernetes/typed/rbac/v1 RbacV1Interface,ClusterRoleBindingInterface,ClusterRoleInterface,RoleInterface,RoleBindingInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/apiextensionsv1beta1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Beta1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 ApiextensionsV1beta1Interface,CustomResourceDefinitionInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/apiextensionsv1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 ApiextensionsV1Interface,CustomResourceDefinitionInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/apiextensionsclientset_mock.go -mock_names=Interface=MockApiExtensionsClientInterface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset Interface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/discovery_mock.go k8s.io/client-go/discovery DiscoveryInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/dynamic_mock.go -mock_names=Interface=MockDynamicInterface k8s.io/client-go/dynamic Interface,ResourceInterface,NamespaceableResourceInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/admissionregistrationv1beta1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Beta1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Beta1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1 AdmissionregistrationV1beta1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/admissionregistrationv1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1 AdmissionregistrationV1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/serviceaccountinformer_mock.go k8s.io/client-go/informers/core/v1 ServiceAccountInformer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/serviceaccountlister_mock.go k8s.io/client-go/listers/core/v1 ServiceAccountLister,ServiceAccountNamespaceLister -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/sharedindexinformer_mock.go k8s.io/client-go/tools/cache SharedIndexInformer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/k8sclient_mock.go k8s.io/client-go/kubernetes Interface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/context_mock.go context Context +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/appv1_mock.go k8s.io/client-go/kubernetes/typed/apps/v1 AppsV1Interface,DeploymentInterface,StatefulSetInterface,DaemonSetInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/corev1_mock.go k8s.io/client-go/kubernetes/typed/core/v1 EventInterface,CoreV1Interface,NamespaceInterface,PodInterface,ServiceInterface,ConfigMapInterface,PersistentVolumeInterface,PersistentVolumeClaimInterface,SecretInterface,NodeInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/networkingv1beta1_mock.go -mock_names=IngressInterface=MockIngressV1Beta1Interface k8s.io/client-go/kubernetes/typed/networking/v1beta1 NetworkingV1beta1Interface,IngressInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/networkingv1_mock.go -mock_names=IngressInterface=MockIngressV1Interface k8s.io/client-go/kubernetes/typed/networking/v1 NetworkingV1Interface,IngressInterface,IngressClassInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/storagev1_mock.go k8s.io/client-go/kubernetes/typed/storage/v1 StorageV1Interface,StorageClassInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/rbacv1_mock.go k8s.io/client-go/kubernetes/typed/rbac/v1 RbacV1Interface,ClusterRoleBindingInterface,ClusterRoleInterface,RoleInterface,RoleBindingInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/apiextensionsv1beta1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Beta1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 ApiextensionsV1beta1Interface,CustomResourceDefinitionInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/apiextensionsv1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 ApiextensionsV1Interface,CustomResourceDefinitionInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/apiextensionsclientset_mock.go -mock_names=Interface=MockApiExtensionsClientInterface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset Interface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/discovery_mock.go k8s.io/client-go/discovery DiscoveryInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/dynamic_mock.go -mock_names=Interface=MockDynamicInterface k8s.io/client-go/dynamic Interface,ResourceInterface,NamespaceableResourceInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/admissionregistrationv1beta1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Beta1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Beta1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1 AdmissionregistrationV1beta1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/admissionregistrationv1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1 AdmissionregistrationV1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/serviceaccountinformer_mock.go k8s.io/client-go/informers/core/v1 ServiceAccountInformer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/serviceaccountlister_mock.go k8s.io/client-go/listers/core/v1 ServiceAccountLister,ServiceAccountNamespaceLister +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/sharedindexinformer_mock.go k8s.io/client-go/tools/cache SharedIndexInformer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface // NewK8sClientFunc defines a function which returns a k8s client based on the supplied config. type NewK8sClientFunc func(c *rest.Config) (kubernetes.Interface, apiextensionsclientset.Interface, dynamic.Interface, error) diff --git a/caas/kubernetes/provider/k8s_test.go b/caas/kubernetes/provider/k8s_test.go index a9f349f4a2f..8780a6ab672 100644 --- a/caas/kubernetes/provider/k8s_test.go +++ b/caas/kubernetes/provider/k8s_test.go @@ -551,7 +551,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockClusterRoleBindings.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -561,7 +561,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockClusterRoles.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -575,12 +575,12 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f Version: "v1alpha2", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list all custom resources for crd "v1". s.mockNamespaceableResourceClient.EXPECT().List(gomock.Any(), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(&unstructured.UnstructuredList{}, nil), + ).Return(&unstructured.UnstructuredList{}, nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -588,7 +588,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f Version: "v1", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list cluster wide all custom resource definitions for listing custom resources. s.mockCustomResourceDefinitionV1.EXPECT().List(gomock.Any(), v1.ListOptions{}).AnyTimes(). @@ -598,7 +598,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockNamespaceableResourceClient.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -606,13 +606,13 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f Version: "v1alpha2", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // delete all custom resources for crd "v1". s.mockNamespaceableResourceClient.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -620,7 +620,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f Version: "v1", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list cluster wide all custom resource definitions for deleting custom resources. s.mockCustomResourceDefinitionV1.EXPECT().List(gomock.Any(), v1.ListOptions{}).AnyTimes(). @@ -636,7 +636,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockCustomResourceDefinitionV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -646,7 +646,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockMutatingWebhookConfigurationV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -656,7 +656,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockValidatingWebhookConfigurationV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -666,7 +666,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f s.mockStorageClass.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ) s.mockNamespaces.EXPECT().Get(gomock.Any(), "test", v1.GetOptions{}). @@ -675,7 +675,7 @@ func (s *K8sBrokerSuite) assertDestroy(c *gc.C, isController bool, destroyFunc f Return(nil) // still terminating. s.mockNamespaces.EXPECT().Get(gomock.Any(), "test", v1.GetOptions{}). - DoAndReturn(func(_, _, _ interface{}) (*core.Namespace, error) { + DoAndReturn(func(_ context.Context, _ string, _ v1.GetOptions) (*core.Namespace, error) { namespaceFirer() return ns, nil }) diff --git a/caas/kubernetes/provider/mocks/admissionregistrationv1_mock.go b/caas/kubernetes/provider/mocks/admissionregistrationv1_mock.go index 707d3346f5c..99e1428de13 100644 --- a/caas/kubernetes/provider/mocks/admissionregistrationv1_mock.go +++ b/caas/kubernetes/provider/mocks/admissionregistrationv1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/admissionregistrationv1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1 AdmissionregistrationV1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface +// mockgen -typed -package mocks -destination mocks/admissionregistrationv1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1 AdmissionregistrationV1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockAdmissionregistrationV1Interface) MutatingWebhookConfigurations() v } // MutatingWebhookConfigurations indicates an expected call of MutatingWebhookConfigurations. -func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) MutatingWebhookConfigurations() *gomock.Call { +func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) MutatingWebhookConfigurations() *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MutatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).MutatingWebhookConfigurations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MutatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).MutatingWebhookConfigurations)) + return &MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall{Call: call} +} + +// MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall wrap *gomock.Call +type MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall) Return(arg0 v12.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall) Do(f func() v12.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall) DoAndReturn(f func() v12.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -69,9 +93,33 @@ func (m *MockAdmissionregistrationV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) RESTClient() *MockAdmissionregistrationV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).RESTClient)) + return &MockAdmissionregistrationV1InterfaceRESTClientCall{Call: call} +} + +// MockAdmissionregistrationV1InterfaceRESTClientCall wrap *gomock.Call +type MockAdmissionregistrationV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockAdmissionregistrationV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockAdmissionregistrationV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockAdmissionregistrationV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidatingWebhookConfigurations mocks base method. @@ -83,9 +131,33 @@ func (m *MockAdmissionregistrationV1Interface) ValidatingWebhookConfigurations() } // ValidatingWebhookConfigurations indicates an expected call of ValidatingWebhookConfigurations. -func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) ValidatingWebhookConfigurations() *gomock.Call { +func (mr *MockAdmissionregistrationV1InterfaceMockRecorder) ValidatingWebhookConfigurations() *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).ValidatingWebhookConfigurations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1Interface)(nil).ValidatingWebhookConfigurations)) + return &MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall{Call: call} +} + +// MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall wrap *gomock.Call +type MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall) Return(arg0 v12.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall) Do(f func() v12.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall) DoAndReturn(f func() v12.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMutatingWebhookConfigurationV1Interface is a mock of MutatingWebhookConfigurationInterface interface. @@ -121,9 +193,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Apply(arg0 context.Context } // Apply indicates an expected call of Apply. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceApplyCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceApplyCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceApplyCall) Return(arg0 *v1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceApplyCall) Do(f func(context.Context, *v11.MutatingWebhookConfigurationApplyConfiguration, v10.ApplyOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.MutatingWebhookConfigurationApplyConfiguration, v10.ApplyOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -136,9 +232,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Create(arg0 context.Contex } // Create indicates an expected call of Create. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Create), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceCreateCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceCreateCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceCreateCall) Return(arg0 *v1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceCreateCall) Do(f func(context.Context, *v1.MutatingWebhookConfiguration, v10.CreateOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.MutatingWebhookConfiguration, v10.CreateOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -150,9 +270,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Delete(arg0 context.Contex } // Delete indicates an expected call of Delete. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceDeleteCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceDeleteCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCall) Return(arg0 error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -164,9 +308,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) DeleteCollection(arg0 cont } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall) Return(arg0 error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockMutatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -179,9 +347,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Get(arg0 context.Context, } // Get indicates an expected call of Get. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Get), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceGetCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceGetCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceGetCall) Return(arg0 *v1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -194,9 +386,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) List(arg0 context.Context, } // List indicates an expected call of List. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) List(arg0, arg1 any) *MockMutatingWebhookConfigurationV1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).List), arg0, arg1) + return &MockMutatingWebhookConfigurationV1InterfaceListCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceListCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceListCall) Return(arg0 *v1.MutatingWebhookConfigurationList, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.MutatingWebhookConfigurationList, error)) *MockMutatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.MutatingWebhookConfigurationList, error)) *MockMutatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -213,10 +429,34 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Patch(arg0 context.Context } // Patch indicates an expected call of Patch. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockMutatingWebhookConfigurationV1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Patch), varargs...) + return &MockMutatingWebhookConfigurationV1InterfacePatchCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfacePatchCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfacePatchCall) Return(arg0 *v1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -229,9 +469,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Update(arg0 context.Contex } // Update indicates an expected call of Update. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Update), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1InterfaceUpdateCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceUpdateCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceUpdateCall) Return(arg0 *v1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceUpdateCall) Do(f func(context.Context, *v1.MutatingWebhookConfiguration, v10.UpdateOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.MutatingWebhookConfiguration, v10.UpdateOptions) (*v1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -244,9 +508,33 @@ func (m *MockMutatingWebhookConfigurationV1Interface) Watch(arg0 context.Context } // Watch indicates an expected call of Watch. -func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockMutatingWebhookConfigurationV1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Interface)(nil).Watch), arg0, arg1) + return &MockMutatingWebhookConfigurationV1InterfaceWatchCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1InterfaceWatchCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockMutatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1InterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockMutatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1InterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockMutatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockValidatingWebhookConfigurationV1Interface is a mock of ValidatingWebhookConfigurationInterface interface. @@ -282,9 +570,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Apply(arg0 context.Conte } // Apply indicates an expected call of Apply. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceApplyCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceApplyCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceApplyCall) Return(arg0 *v1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceApplyCall) Do(f func(context.Context, *v11.ValidatingWebhookConfigurationApplyConfiguration, v10.ApplyOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.ValidatingWebhookConfigurationApplyConfiguration, v10.ApplyOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -297,9 +609,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Create(arg0 context.Cont } // Create indicates an expected call of Create. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Create), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceCreateCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceCreateCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceCreateCall) Return(arg0 *v1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceCreateCall) Do(f func(context.Context, *v1.ValidatingWebhookConfiguration, v10.CreateOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.ValidatingWebhookConfiguration, v10.CreateOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -311,9 +647,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Delete(arg0 context.Cont } // Delete indicates an expected call of Delete. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceDeleteCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceDeleteCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCall) Return(arg0 error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -325,9 +685,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) DeleteCollection(arg0 co } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall) Return(arg0 error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockValidatingWebhookConfigurationV1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -340,9 +724,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Get(arg0 context.Context } // Get indicates an expected call of Get. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Get), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceGetCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceGetCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceGetCall) Return(arg0 *v1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -355,9 +763,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) List(arg0 context.Contex } // List indicates an expected call of List. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) List(arg0, arg1 any) *MockValidatingWebhookConfigurationV1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).List), arg0, arg1) + return &MockValidatingWebhookConfigurationV1InterfaceListCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceListCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceListCall) Return(arg0 *v1.ValidatingWebhookConfigurationList, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.ValidatingWebhookConfigurationList, error)) *MockValidatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.ValidatingWebhookConfigurationList, error)) *MockValidatingWebhookConfigurationV1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -374,10 +806,34 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Patch(arg0 context.Conte } // Patch indicates an expected call of Patch. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockValidatingWebhookConfigurationV1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Patch), varargs...) + return &MockValidatingWebhookConfigurationV1InterfacePatchCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfacePatchCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfacePatchCall) Return(arg0 *v1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -390,9 +846,33 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Update(arg0 context.Cont } // Update indicates an expected call of Update. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Update), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1InterfaceUpdateCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceUpdateCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceUpdateCall) Return(arg0 *v1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceUpdateCall) Do(f func(context.Context, *v1.ValidatingWebhookConfiguration, v10.UpdateOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.ValidatingWebhookConfiguration, v10.UpdateOptions) (*v1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -405,7 +885,31 @@ func (m *MockValidatingWebhookConfigurationV1Interface) Watch(arg0 context.Conte } // Watch indicates an expected call of Watch. -func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockValidatingWebhookConfigurationV1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Interface)(nil).Watch), arg0, arg1) + return &MockValidatingWebhookConfigurationV1InterfaceWatchCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1InterfaceWatchCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockValidatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1InterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockValidatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1InterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockValidatingWebhookConfigurationV1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/admissionregistrationv1beta1_mock.go b/caas/kubernetes/provider/mocks/admissionregistrationv1beta1_mock.go index 77834293c01..0bff048390f 100644 --- a/caas/kubernetes/provider/mocks/admissionregistrationv1beta1_mock.go +++ b/caas/kubernetes/provider/mocks/admissionregistrationv1beta1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/admissionregistrationv1beta1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Beta1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Beta1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1 AdmissionregistrationV1beta1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface +// mockgen -typed -package mocks -destination mocks/admissionregistrationv1beta1_mock.go -mock_names=MutatingWebhookConfigurationInterface=MockMutatingWebhookConfigurationV1Beta1Interface,ValidatingWebhookConfigurationInterface=MockValidatingWebhookConfigurationV1Beta1Interface k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1 AdmissionregistrationV1beta1Interface,MutatingWebhookConfigurationInterface,ValidatingWebhookConfigurationInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockAdmissionregistrationV1beta1Interface) MutatingWebhookConfiguration } // MutatingWebhookConfigurations indicates an expected call of MutatingWebhookConfigurations. -func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) MutatingWebhookConfigurations() *gomock.Call { +func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) MutatingWebhookConfigurations() *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MutatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).MutatingWebhookConfigurations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MutatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).MutatingWebhookConfigurations)) + return &MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall{Call: call} +} + +// MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall wrap *gomock.Call +type MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall) Return(arg0 v1beta11.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall) Do(f func() v1beta11.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall) DoAndReturn(f func() v1beta11.MutatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceMutatingWebhookConfigurationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -69,9 +93,33 @@ func (m *MockAdmissionregistrationV1beta1Interface) RESTClient() rest.Interface } // RESTClient indicates an expected call of RESTClient. -func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) RESTClient() *MockAdmissionregistrationV1beta1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).RESTClient)) + return &MockAdmissionregistrationV1beta1InterfaceRESTClientCall{Call: call} +} + +// MockAdmissionregistrationV1beta1InterfaceRESTClientCall wrap *gomock.Call +type MockAdmissionregistrationV1beta1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1beta1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockAdmissionregistrationV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1beta1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockAdmissionregistrationV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1beta1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockAdmissionregistrationV1beta1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidatingAdmissionPolicies mocks base method. @@ -83,9 +131,33 @@ func (m *MockAdmissionregistrationV1beta1Interface) ValidatingAdmissionPolicies( } // ValidatingAdmissionPolicies indicates an expected call of ValidatingAdmissionPolicies. -func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingAdmissionPolicies() *gomock.Call { +func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingAdmissionPolicies() *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingAdmissionPolicies", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingAdmissionPolicies)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingAdmissionPolicies", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingAdmissionPolicies)) + return &MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall{Call: call} +} + +// MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall wrap *gomock.Call +type MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall) Return(arg0 v1beta11.ValidatingAdmissionPolicyInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall) Do(f func() v1beta11.ValidatingAdmissionPolicyInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall) DoAndReturn(f func() v1beta11.ValidatingAdmissionPolicyInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPoliciesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidatingAdmissionPolicyBindings mocks base method. @@ -97,9 +169,33 @@ func (m *MockAdmissionregistrationV1beta1Interface) ValidatingAdmissionPolicyBin } // ValidatingAdmissionPolicyBindings indicates an expected call of ValidatingAdmissionPolicyBindings. -func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingAdmissionPolicyBindings() *gomock.Call { +func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingAdmissionPolicyBindings() *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingAdmissionPolicyBindings", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingAdmissionPolicyBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingAdmissionPolicyBindings", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingAdmissionPolicyBindings)) + return &MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall{Call: call} +} + +// MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall wrap *gomock.Call +type MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall) Return(arg0 v1beta11.ValidatingAdmissionPolicyBindingInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall) Do(f func() v1beta11.ValidatingAdmissionPolicyBindingInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall) DoAndReturn(f func() v1beta11.ValidatingAdmissionPolicyBindingInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingAdmissionPolicyBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidatingWebhookConfigurations mocks base method. @@ -111,9 +207,33 @@ func (m *MockAdmissionregistrationV1beta1Interface) ValidatingWebhookConfigurati } // ValidatingWebhookConfigurations indicates an expected call of ValidatingWebhookConfigurations. -func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingWebhookConfigurations() *gomock.Call { +func (mr *MockAdmissionregistrationV1beta1InterfaceMockRecorder) ValidatingWebhookConfigurations() *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingWebhookConfigurations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatingWebhookConfigurations", reflect.TypeOf((*MockAdmissionregistrationV1beta1Interface)(nil).ValidatingWebhookConfigurations)) + return &MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall{Call: call} +} + +// MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall wrap *gomock.Call +type MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall) Return(arg0 v1beta11.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall) Do(f func() v1beta11.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall) DoAndReturn(f func() v1beta11.ValidatingWebhookConfigurationInterface) *MockAdmissionregistrationV1beta1InterfaceValidatingWebhookConfigurationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMutatingWebhookConfigurationV1Beta1Interface is a mock of MutatingWebhookConfigurationInterface interface. @@ -149,9 +269,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Apply(arg0 context.Co } // Apply indicates an expected call of Apply. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall) Return(arg0 *v1beta1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall) Do(f func(context.Context, *v1beta10.MutatingWebhookConfigurationApplyConfiguration, v1.ApplyOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v1beta10.MutatingWebhookConfigurationApplyConfiguration, v1.ApplyOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -164,9 +308,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Create(arg0 context.C } // Create indicates an expected call of Create. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall) Return(arg0 *v1beta1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall) Do(f func(context.Context, *v1beta1.MutatingWebhookConfiguration, v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1beta1.MutatingWebhookConfiguration, v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -178,9 +346,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Delete(arg0 context.C } // Delete indicates an expected call of Delete. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall) Return(arg0 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions) error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions) error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -192,9 +384,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) DeleteCollection(arg0 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) Return(arg0 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockMutatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -207,9 +423,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Get(arg0 context.Cont } // Get indicates an expected call of Get. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall) Return(arg0 *v1beta1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -222,9 +462,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) List(arg0 context.Con } // List indicates an expected call of List. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).List), arg0, arg1) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceListCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceListCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall) Return(arg0 *v1beta1.MutatingWebhookConfigurationList, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -241,10 +505,34 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Patch(arg0 context.Co } // Patch indicates an expected call of Patch. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Patch), varargs...) + return &MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall) Return(arg0 *v1beta1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -257,9 +545,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Update(arg0 context.C } // Update indicates an expected call of Update. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall) Return(arg0 *v1beta1.MutatingWebhookConfiguration, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall) Do(f func(context.Context, *v1beta1.MutatingWebhookConfiguration, v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1beta1.MutatingWebhookConfiguration, v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -272,9 +584,33 @@ func (m *MockMutatingWebhookConfigurationV1Beta1Interface) Watch(arg0 context.Co } // Watch indicates an expected call of Watch. -func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockMutatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMutatingWebhookConfigurationV1Beta1Interface)(nil).Watch), arg0, arg1) + return &MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall{Call: call} +} + +// MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall wrap *gomock.Call +type MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockMutatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockValidatingWebhookConfigurationV1Beta1Interface is a mock of ValidatingWebhookConfigurationInterface interface. @@ -310,9 +646,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Apply(arg0 context. } // Apply indicates an expected call of Apply. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall) Return(arg0 *v1beta1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall) Do(f func(context.Context, *v1beta10.ValidatingWebhookConfigurationApplyConfiguration, v1.ApplyOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v1beta10.ValidatingWebhookConfigurationApplyConfiguration, v1.ApplyOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -325,9 +685,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Create(arg0 context } // Create indicates an expected call of Create. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall) Return(arg0 *v1beta1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall) Do(f func(context.Context, *v1beta1.ValidatingWebhookConfiguration, v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1beta1.ValidatingWebhookConfiguration, v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -339,9 +723,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Delete(arg0 context } // Delete indicates an expected call of Delete. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall) Return(arg0 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions) error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions) error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -353,9 +761,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) DeleteCollection(ar } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) Return(arg0 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockValidatingWebhookConfigurationV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -368,9 +800,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Get(arg0 context.Co } // Get indicates an expected call of Get. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall) Return(arg0 *v1beta1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -383,9 +839,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) List(arg0 context.C } // List indicates an expected call of List. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).List), arg0, arg1) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceListCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceListCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall) Return(arg0 *v1beta1.ValidatingWebhookConfigurationList, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -402,10 +882,34 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Patch(arg0 context. } // Patch indicates an expected call of Patch. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Patch), varargs...) + return &MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall) Return(arg0 *v1beta1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -418,9 +922,33 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Update(arg0 context } // Update indicates an expected call of Update. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall) Return(arg0 *v1beta1.ValidatingWebhookConfiguration, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall) Do(f func(context.Context, *v1beta1.ValidatingWebhookConfiguration, v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1beta1.ValidatingWebhookConfiguration, v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -433,7 +961,31 @@ func (m *MockValidatingWebhookConfigurationV1Beta1Interface) Watch(arg0 context. } // Watch indicates an expected call of Watch. -func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatingWebhookConfigurationV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockValidatingWebhookConfigurationV1Beta1Interface)(nil).Watch), arg0, arg1) + return &MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall{Call: call} +} + +// MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall wrap *gomock.Call +type MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockValidatingWebhookConfigurationV1Beta1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/apiextensionsclientset_mock.go b/caas/kubernetes/provider/mocks/apiextensionsclientset_mock.go index 071c86fba44..2628c489714 100644 --- a/caas/kubernetes/provider/mocks/apiextensionsclientset_mock.go +++ b/caas/kubernetes/provider/mocks/apiextensionsclientset_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/apiextensionsclientset_mock.go -mock_names=Interface=MockApiExtensionsClientInterface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset Interface +// mockgen -typed -package mocks -destination mocks/apiextensionsclientset_mock.go -mock_names=Interface=MockApiExtensionsClientInterface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset Interface // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockApiExtensionsClientInterface) ApiextensionsV1() v1.ApiextensionsV1I } // ApiextensionsV1 indicates an expected call of ApiextensionsV1. -func (mr *MockApiExtensionsClientInterfaceMockRecorder) ApiextensionsV1() *gomock.Call { +func (mr *MockApiExtensionsClientInterfaceMockRecorder) ApiextensionsV1() *MockApiExtensionsClientInterfaceApiextensionsV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiextensionsV1", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).ApiextensionsV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiextensionsV1", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).ApiextensionsV1)) + return &MockApiExtensionsClientInterfaceApiextensionsV1Call{Call: call} +} + +// MockApiExtensionsClientInterfaceApiextensionsV1Call wrap *gomock.Call +type MockApiExtensionsClientInterfaceApiextensionsV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiExtensionsClientInterfaceApiextensionsV1Call) Return(arg0 v1.ApiextensionsV1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiExtensionsClientInterfaceApiextensionsV1Call) Do(f func() v1.ApiextensionsV1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiExtensionsClientInterfaceApiextensionsV1Call) DoAndReturn(f func() v1.ApiextensionsV1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ApiextensionsV1beta1 mocks base method. @@ -64,9 +88,33 @@ func (m *MockApiExtensionsClientInterface) ApiextensionsV1beta1() v1beta1.Apiext } // ApiextensionsV1beta1 indicates an expected call of ApiextensionsV1beta1. -func (mr *MockApiExtensionsClientInterfaceMockRecorder) ApiextensionsV1beta1() *gomock.Call { +func (mr *MockApiExtensionsClientInterfaceMockRecorder) ApiextensionsV1beta1() *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiextensionsV1beta1", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).ApiextensionsV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiextensionsV1beta1", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).ApiextensionsV1beta1)) + return &MockApiExtensionsClientInterfaceApiextensionsV1beta1Call{Call: call} +} + +// MockApiExtensionsClientInterfaceApiextensionsV1beta1Call wrap *gomock.Call +type MockApiExtensionsClientInterfaceApiextensionsV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call) Return(arg0 v1beta1.ApiextensionsV1beta1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call) Do(f func() v1beta1.ApiextensionsV1beta1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call) DoAndReturn(f func() v1beta1.ApiextensionsV1beta1Interface) *MockApiExtensionsClientInterfaceApiextensionsV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // Discovery mocks base method. @@ -78,7 +126,31 @@ func (m *MockApiExtensionsClientInterface) Discovery() discovery.DiscoveryInterf } // Discovery indicates an expected call of Discovery. -func (mr *MockApiExtensionsClientInterfaceMockRecorder) Discovery() *gomock.Call { +func (mr *MockApiExtensionsClientInterfaceMockRecorder) Discovery() *MockApiExtensionsClientInterfaceDiscoveryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discovery", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).Discovery)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discovery", reflect.TypeOf((*MockApiExtensionsClientInterface)(nil).Discovery)) + return &MockApiExtensionsClientInterfaceDiscoveryCall{Call: call} +} + +// MockApiExtensionsClientInterfaceDiscoveryCall wrap *gomock.Call +type MockApiExtensionsClientInterfaceDiscoveryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiExtensionsClientInterfaceDiscoveryCall) Return(arg0 discovery.DiscoveryInterface) *MockApiExtensionsClientInterfaceDiscoveryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiExtensionsClientInterfaceDiscoveryCall) Do(f func() discovery.DiscoveryInterface) *MockApiExtensionsClientInterfaceDiscoveryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiExtensionsClientInterfaceDiscoveryCall) DoAndReturn(f func() discovery.DiscoveryInterface) *MockApiExtensionsClientInterfaceDiscoveryCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/apiextensionsv1_mock.go b/caas/kubernetes/provider/mocks/apiextensionsv1_mock.go index 46631b3df56..11ebdbf11ca 100644 --- a/caas/kubernetes/provider/mocks/apiextensionsv1_mock.go +++ b/caas/kubernetes/provider/mocks/apiextensionsv1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/apiextensionsv1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 ApiextensionsV1Interface,CustomResourceDefinitionInterface +// mockgen -typed -package mocks -destination mocks/apiextensionsv1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 ApiextensionsV1Interface,CustomResourceDefinitionInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockApiextensionsV1Interface) CustomResourceDefinitions() v11.CustomRes } // CustomResourceDefinitions indicates an expected call of CustomResourceDefinitions. -func (mr *MockApiextensionsV1InterfaceMockRecorder) CustomResourceDefinitions() *gomock.Call { +func (mr *MockApiextensionsV1InterfaceMockRecorder) CustomResourceDefinitions() *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomResourceDefinitions", reflect.TypeOf((*MockApiextensionsV1Interface)(nil).CustomResourceDefinitions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomResourceDefinitions", reflect.TypeOf((*MockApiextensionsV1Interface)(nil).CustomResourceDefinitions)) + return &MockApiextensionsV1InterfaceCustomResourceDefinitionsCall{Call: call} +} + +// MockApiextensionsV1InterfaceCustomResourceDefinitionsCall wrap *gomock.Call +type MockApiextensionsV1InterfaceCustomResourceDefinitionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall) Return(arg0 v11.CustomResourceDefinitionInterface) *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall) Do(f func() v11.CustomResourceDefinitionInterface) *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall) DoAndReturn(f func() v11.CustomResourceDefinitionInterface) *MockApiextensionsV1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -69,9 +93,33 @@ func (m *MockApiextensionsV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockApiextensionsV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockApiextensionsV1InterfaceMockRecorder) RESTClient() *MockApiextensionsV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockApiextensionsV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockApiextensionsV1Interface)(nil).RESTClient)) + return &MockApiextensionsV1InterfaceRESTClientCall{Call: call} +} + +// MockApiextensionsV1InterfaceRESTClientCall wrap *gomock.Call +type MockApiextensionsV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiextensionsV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockApiextensionsV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiextensionsV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockApiextensionsV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiextensionsV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockApiextensionsV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCustomResourceDefinitionV1Interface is a mock of CustomResourceDefinitionInterface interface. @@ -107,9 +155,33 @@ func (m *MockCustomResourceDefinitionV1Interface) Apply(arg0 context.Context, ar } // Apply indicates an expected call of Apply. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceApplyCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceApplyCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceApplyCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceApplyCall) Do(f func(context.Context, *v10.CustomResourceDefinitionApplyConfiguration, v12.ApplyOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v10.CustomResourceDefinitionApplyConfiguration, v12.ApplyOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -122,9 +194,33 @@ func (m *MockCustomResourceDefinitionV1Interface) ApplyStatus(arg0 context.Conte } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceApplyStatusCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceApplyStatusCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceApplyStatusCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceApplyStatusCall) Do(f func(context.Context, *v10.CustomResourceDefinitionApplyConfiguration, v12.ApplyOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v10.CustomResourceDefinitionApplyConfiguration, v12.ApplyOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -137,9 +233,33 @@ func (m *MockCustomResourceDefinitionV1Interface) Create(arg0 context.Context, a } // Create indicates an expected call of Create. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Create), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceCreateCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceCreateCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceCreateCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceCreateCall) Do(f func(context.Context, *v1.CustomResourceDefinition, v12.CreateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.CustomResourceDefinition, v12.CreateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -151,9 +271,33 @@ func (m *MockCustomResourceDefinitionV1Interface) Delete(arg0 context.Context, a } // Delete indicates an expected call of Delete. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceDeleteCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceDeleteCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCall) Return(arg0 error) *MockCustomResourceDefinitionV1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCall) Do(f func(context.Context, string, v12.DeleteOptions) error) *MockCustomResourceDefinitionV1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v12.DeleteOptions) error) *MockCustomResourceDefinitionV1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -165,9 +309,33 @@ func (m *MockCustomResourceDefinitionV1Interface) DeleteCollection(arg0 context. } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall) Return(arg0 error) *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall) Do(f func(context.Context, v12.DeleteOptions, v12.ListOptions) error) *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v12.DeleteOptions, v12.ListOptions) error) *MockCustomResourceDefinitionV1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -180,9 +348,33 @@ func (m *MockCustomResourceDefinitionV1Interface) Get(arg0 context.Context, arg1 } // Get indicates an expected call of Get. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Get), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceGetCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceGetCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceGetCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceGetCall) Do(f func(context.Context, string, v12.GetOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v12.GetOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -195,9 +387,33 @@ func (m *MockCustomResourceDefinitionV1Interface) List(arg0 context.Context, arg } // List indicates an expected call of List. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) List(arg0, arg1 any) *MockCustomResourceDefinitionV1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).List), arg0, arg1) + return &MockCustomResourceDefinitionV1InterfaceListCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceListCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceListCall) Return(arg0 *v1.CustomResourceDefinitionList, arg1 error) *MockCustomResourceDefinitionV1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceListCall) Do(f func(context.Context, v12.ListOptions) (*v1.CustomResourceDefinitionList, error)) *MockCustomResourceDefinitionV1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceListCall) DoAndReturn(f func(context.Context, v12.ListOptions) (*v1.CustomResourceDefinitionList, error)) *MockCustomResourceDefinitionV1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -214,10 +430,34 @@ func (m *MockCustomResourceDefinitionV1Interface) Patch(arg0 context.Context, ar } // Patch indicates an expected call of Patch. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockCustomResourceDefinitionV1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Patch), varargs...) + return &MockCustomResourceDefinitionV1InterfacePatchCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfacePatchCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfacePatchCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v12.PatchOptions, ...string) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v12.PatchOptions, ...string) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -230,9 +470,33 @@ func (m *MockCustomResourceDefinitionV1Interface) Update(arg0 context.Context, a } // Update indicates an expected call of Update. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Update), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceUpdateCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceUpdateCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceUpdateCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceUpdateCall) Do(f func(context.Context, *v1.CustomResourceDefinition, v12.UpdateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.CustomResourceDefinition, v12.UpdateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -245,9 +509,33 @@ func (m *MockCustomResourceDefinitionV1Interface) UpdateStatus(arg0 context.Cont } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1InterfaceUpdateStatusCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceUpdateStatusCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall) Return(arg0 *v1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall) Do(f func(context.Context, *v1.CustomResourceDefinition, v12.UpdateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.CustomResourceDefinition, v12.UpdateOptions) (*v1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1InterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -260,7 +548,31 @@ func (m *MockCustomResourceDefinitionV1Interface) Watch(arg0 context.Context, ar } // Watch indicates an expected call of Watch. -func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockCustomResourceDefinitionV1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockCustomResourceDefinitionV1Interface)(nil).Watch), arg0, arg1) + return &MockCustomResourceDefinitionV1InterfaceWatchCall{Call: call} +} + +// MockCustomResourceDefinitionV1InterfaceWatchCall wrap *gomock.Call +type MockCustomResourceDefinitionV1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockCustomResourceDefinitionV1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1InterfaceWatchCall) Do(f func(context.Context, v12.ListOptions) (watch.Interface, error)) *MockCustomResourceDefinitionV1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1InterfaceWatchCall) DoAndReturn(f func(context.Context, v12.ListOptions) (watch.Interface, error)) *MockCustomResourceDefinitionV1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/apiextensionsv1beta1_mock.go b/caas/kubernetes/provider/mocks/apiextensionsv1beta1_mock.go index 95ff75cef72..9d55c40ab9d 100644 --- a/caas/kubernetes/provider/mocks/apiextensionsv1beta1_mock.go +++ b/caas/kubernetes/provider/mocks/apiextensionsv1beta1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/apiextensionsv1beta1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Beta1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 ApiextensionsV1beta1Interface,CustomResourceDefinitionInterface +// mockgen -typed -package mocks -destination mocks/apiextensionsv1beta1_mock.go -mock_names=CustomResourceDefinitionInterface=MockCustomResourceDefinitionV1Beta1Interface k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 ApiextensionsV1beta1Interface,CustomResourceDefinitionInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockApiextensionsV1beta1Interface) CustomResourceDefinitions() v1beta11 } // CustomResourceDefinitions indicates an expected call of CustomResourceDefinitions. -func (mr *MockApiextensionsV1beta1InterfaceMockRecorder) CustomResourceDefinitions() *gomock.Call { +func (mr *MockApiextensionsV1beta1InterfaceMockRecorder) CustomResourceDefinitions() *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomResourceDefinitions", reflect.TypeOf((*MockApiextensionsV1beta1Interface)(nil).CustomResourceDefinitions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomResourceDefinitions", reflect.TypeOf((*MockApiextensionsV1beta1Interface)(nil).CustomResourceDefinitions)) + return &MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall{Call: call} +} + +// MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall wrap *gomock.Call +type MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall) Return(arg0 v1beta11.CustomResourceDefinitionInterface) *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall) Do(f func() v1beta11.CustomResourceDefinitionInterface) *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall) DoAndReturn(f func() v1beta11.CustomResourceDefinitionInterface) *MockApiextensionsV1beta1InterfaceCustomResourceDefinitionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -69,9 +93,33 @@ func (m *MockApiextensionsV1beta1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockApiextensionsV1beta1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockApiextensionsV1beta1InterfaceMockRecorder) RESTClient() *MockApiextensionsV1beta1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockApiextensionsV1beta1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockApiextensionsV1beta1Interface)(nil).RESTClient)) + return &MockApiextensionsV1beta1InterfaceRESTClientCall{Call: call} +} + +// MockApiextensionsV1beta1InterfaceRESTClientCall wrap *gomock.Call +type MockApiextensionsV1beta1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApiextensionsV1beta1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockApiextensionsV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApiextensionsV1beta1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockApiextensionsV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApiextensionsV1beta1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockApiextensionsV1beta1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCustomResourceDefinitionV1Beta1Interface is a mock of CustomResourceDefinitionInterface interface. @@ -107,9 +155,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Apply(arg0 context.Contex } // Apply indicates an expected call of Apply. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceApplyCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceApplyCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall) Do(f func(context.Context, *v1beta10.CustomResourceDefinitionApplyConfiguration, v1.ApplyOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v1beta10.CustomResourceDefinitionApplyConfiguration, v1.ApplyOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -122,9 +194,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) ApplyStatus(arg0 context. } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall) Do(f func(context.Context, *v1beta10.CustomResourceDefinitionApplyConfiguration, v1.ApplyOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v1beta10.CustomResourceDefinitionApplyConfiguration, v1.ApplyOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -137,9 +233,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Create(arg0 context.Conte } // Create indicates an expected call of Create. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceCreateCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceCreateCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall) Do(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -151,9 +271,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Delete(arg0 context.Conte } // Delete indicates an expected call of Delete. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall) Return(arg0 error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions) error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions) error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -165,9 +309,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) DeleteCollection(arg0 con } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall) Return(arg0 error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockCustomResourceDefinitionV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -180,9 +348,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Get(arg0 context.Context, } // Get indicates an expected call of Get. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceGetCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceGetCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceGetCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -195,9 +387,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) List(arg0 context.Context } // List indicates an expected call of List. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *MockCustomResourceDefinitionV1Beta1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).List), arg0, arg1) + return &MockCustomResourceDefinitionV1Beta1InterfaceListCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceListCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceListCall) Return(arg0 *v1beta1.CustomResourceDefinitionList, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error)) *MockCustomResourceDefinitionV1Beta1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error)) *MockCustomResourceDefinitionV1Beta1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -214,10 +430,34 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Patch(arg0 context.Contex } // Patch indicates an expected call of Patch. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockCustomResourceDefinitionV1Beta1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Patch), varargs...) + return &MockCustomResourceDefinitionV1Beta1InterfacePatchCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfacePatchCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfacePatchCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -230,9 +470,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Update(arg0 context.Conte } // Update indicates an expected call of Update. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall) Do(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -245,9 +509,33 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) UpdateStatus(arg0 context } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall) Return(arg0 *v1beta1.CustomResourceDefinition, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall) Do(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1beta1.CustomResourceDefinition, v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)) *MockCustomResourceDefinitionV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -260,7 +548,31 @@ func (m *MockCustomResourceDefinitionV1Beta1Interface) Watch(arg0 context.Contex } // Watch indicates an expected call of Watch. -func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockCustomResourceDefinitionV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockCustomResourceDefinitionV1Beta1Interface)(nil).Watch), arg0, arg1) + return &MockCustomResourceDefinitionV1Beta1InterfaceWatchCall{Call: call} +} + +// MockCustomResourceDefinitionV1Beta1InterfaceWatchCall wrap *gomock.Call +type MockCustomResourceDefinitionV1Beta1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockCustomResourceDefinitionV1Beta1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/appv1_mock.go b/caas/kubernetes/provider/mocks/appv1_mock.go index f833e31d1e5..989708536e2 100644 --- a/caas/kubernetes/provider/mocks/appv1_mock.go +++ b/caas/kubernetes/provider/mocks/appv1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/appv1_mock.go k8s.io/client-go/kubernetes/typed/apps/v1 AppsV1Interface,DeploymentInterface,StatefulSetInterface,DaemonSetInterface +// mockgen -typed -package mocks -destination mocks/appv1_mock.go k8s.io/client-go/kubernetes/typed/apps/v1 AppsV1Interface,DeploymentInterface,StatefulSetInterface,DaemonSetInterface // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAppsV1Interface) ControllerRevisions(arg0 string) v14.ControllerRev } // ControllerRevisions indicates an expected call of ControllerRevisions. -func (mr *MockAppsV1InterfaceMockRecorder) ControllerRevisions(arg0 any) *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) ControllerRevisions(arg0 any) *MockAppsV1InterfaceControllerRevisionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerRevisions", reflect.TypeOf((*MockAppsV1Interface)(nil).ControllerRevisions), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerRevisions", reflect.TypeOf((*MockAppsV1Interface)(nil).ControllerRevisions), arg0) + return &MockAppsV1InterfaceControllerRevisionsCall{Call: call} +} + +// MockAppsV1InterfaceControllerRevisionsCall wrap *gomock.Call +type MockAppsV1InterfaceControllerRevisionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceControllerRevisionsCall) Return(arg0 v14.ControllerRevisionInterface) *MockAppsV1InterfaceControllerRevisionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceControllerRevisionsCall) Do(f func(string) v14.ControllerRevisionInterface) *MockAppsV1InterfaceControllerRevisionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceControllerRevisionsCall) DoAndReturn(f func(string) v14.ControllerRevisionInterface) *MockAppsV1InterfaceControllerRevisionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DaemonSets mocks base method. @@ -71,9 +95,33 @@ func (m *MockAppsV1Interface) DaemonSets(arg0 string) v14.DaemonSetInterface { } // DaemonSets indicates an expected call of DaemonSets. -func (mr *MockAppsV1InterfaceMockRecorder) DaemonSets(arg0 any) *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) DaemonSets(arg0 any) *MockAppsV1InterfaceDaemonSetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DaemonSets", reflect.TypeOf((*MockAppsV1Interface)(nil).DaemonSets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DaemonSets", reflect.TypeOf((*MockAppsV1Interface)(nil).DaemonSets), arg0) + return &MockAppsV1InterfaceDaemonSetsCall{Call: call} +} + +// MockAppsV1InterfaceDaemonSetsCall wrap *gomock.Call +type MockAppsV1InterfaceDaemonSetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceDaemonSetsCall) Return(arg0 v14.DaemonSetInterface) *MockAppsV1InterfaceDaemonSetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceDaemonSetsCall) Do(f func(string) v14.DaemonSetInterface) *MockAppsV1InterfaceDaemonSetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceDaemonSetsCall) DoAndReturn(f func(string) v14.DaemonSetInterface) *MockAppsV1InterfaceDaemonSetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Deployments mocks base method. @@ -85,9 +133,33 @@ func (m *MockAppsV1Interface) Deployments(arg0 string) v14.DeploymentInterface { } // Deployments indicates an expected call of Deployments. -func (mr *MockAppsV1InterfaceMockRecorder) Deployments(arg0 any) *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) Deployments(arg0 any) *MockAppsV1InterfaceDeploymentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deployments", reflect.TypeOf((*MockAppsV1Interface)(nil).Deployments), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deployments", reflect.TypeOf((*MockAppsV1Interface)(nil).Deployments), arg0) + return &MockAppsV1InterfaceDeploymentsCall{Call: call} +} + +// MockAppsV1InterfaceDeploymentsCall wrap *gomock.Call +type MockAppsV1InterfaceDeploymentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceDeploymentsCall) Return(arg0 v14.DeploymentInterface) *MockAppsV1InterfaceDeploymentsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceDeploymentsCall) Do(f func(string) v14.DeploymentInterface) *MockAppsV1InterfaceDeploymentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceDeploymentsCall) DoAndReturn(f func(string) v14.DeploymentInterface) *MockAppsV1InterfaceDeploymentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -99,9 +171,33 @@ func (m *MockAppsV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockAppsV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) RESTClient() *MockAppsV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAppsV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockAppsV1Interface)(nil).RESTClient)) + return &MockAppsV1InterfaceRESTClientCall{Call: call} +} + +// MockAppsV1InterfaceRESTClientCall wrap *gomock.Call +type MockAppsV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockAppsV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockAppsV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockAppsV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplicaSets mocks base method. @@ -113,9 +209,33 @@ func (m *MockAppsV1Interface) ReplicaSets(arg0 string) v14.ReplicaSetInterface { } // ReplicaSets indicates an expected call of ReplicaSets. -func (mr *MockAppsV1InterfaceMockRecorder) ReplicaSets(arg0 any) *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) ReplicaSets(arg0 any) *MockAppsV1InterfaceReplicaSetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicaSets", reflect.TypeOf((*MockAppsV1Interface)(nil).ReplicaSets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicaSets", reflect.TypeOf((*MockAppsV1Interface)(nil).ReplicaSets), arg0) + return &MockAppsV1InterfaceReplicaSetsCall{Call: call} +} + +// MockAppsV1InterfaceReplicaSetsCall wrap *gomock.Call +type MockAppsV1InterfaceReplicaSetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceReplicaSetsCall) Return(arg0 v14.ReplicaSetInterface) *MockAppsV1InterfaceReplicaSetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceReplicaSetsCall) Do(f func(string) v14.ReplicaSetInterface) *MockAppsV1InterfaceReplicaSetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceReplicaSetsCall) DoAndReturn(f func(string) v14.ReplicaSetInterface) *MockAppsV1InterfaceReplicaSetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatefulSets mocks base method. @@ -127,9 +247,33 @@ func (m *MockAppsV1Interface) StatefulSets(arg0 string) v14.StatefulSetInterface } // StatefulSets indicates an expected call of StatefulSets. -func (mr *MockAppsV1InterfaceMockRecorder) StatefulSets(arg0 any) *gomock.Call { +func (mr *MockAppsV1InterfaceMockRecorder) StatefulSets(arg0 any) *MockAppsV1InterfaceStatefulSetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatefulSets", reflect.TypeOf((*MockAppsV1Interface)(nil).StatefulSets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatefulSets", reflect.TypeOf((*MockAppsV1Interface)(nil).StatefulSets), arg0) + return &MockAppsV1InterfaceStatefulSetsCall{Call: call} +} + +// MockAppsV1InterfaceStatefulSetsCall wrap *gomock.Call +type MockAppsV1InterfaceStatefulSetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAppsV1InterfaceStatefulSetsCall) Return(arg0 v14.StatefulSetInterface) *MockAppsV1InterfaceStatefulSetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAppsV1InterfaceStatefulSetsCall) Do(f func(string) v14.StatefulSetInterface) *MockAppsV1InterfaceStatefulSetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAppsV1InterfaceStatefulSetsCall) DoAndReturn(f func(string) v14.StatefulSetInterface) *MockAppsV1InterfaceStatefulSetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDeploymentInterface is a mock of DeploymentInterface interface. @@ -165,9 +309,33 @@ func (m *MockDeploymentInterface) Apply(arg0 context.Context, arg1 *v12.Deployme } // Apply indicates an expected call of Apply. -func (mr *MockDeploymentInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockDeploymentInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockDeploymentInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockDeploymentInterface)(nil).Apply), arg0, arg1, arg2) + return &MockDeploymentInterfaceApplyCall{Call: call} +} + +// MockDeploymentInterfaceApplyCall wrap *gomock.Call +type MockDeploymentInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceApplyCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceApplyCall) Do(f func(context.Context, *v12.DeploymentApplyConfiguration, v11.ApplyOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.DeploymentApplyConfiguration, v11.ApplyOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyScale mocks base method. @@ -180,9 +348,33 @@ func (m *MockDeploymentInterface) ApplyScale(arg0 context.Context, arg1 string, } // ApplyScale indicates an expected call of ApplyScale. -func (mr *MockDeploymentInterfaceMockRecorder) ApplyScale(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) ApplyScale(arg0, arg1, arg2, arg3 any) *MockDeploymentInterfaceApplyScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyScale", reflect.TypeOf((*MockDeploymentInterface)(nil).ApplyScale), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyScale", reflect.TypeOf((*MockDeploymentInterface)(nil).ApplyScale), arg0, arg1, arg2, arg3) + return &MockDeploymentInterfaceApplyScaleCall{Call: call} +} + +// MockDeploymentInterfaceApplyScaleCall wrap *gomock.Call +type MockDeploymentInterfaceApplyScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceApplyScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockDeploymentInterfaceApplyScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceApplyScaleCall) Do(f func(context.Context, string, *v13.ScaleApplyConfiguration, v11.ApplyOptions) (*v10.Scale, error)) *MockDeploymentInterfaceApplyScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceApplyScaleCall) DoAndReturn(f func(context.Context, string, *v13.ScaleApplyConfiguration, v11.ApplyOptions) (*v10.Scale, error)) *MockDeploymentInterfaceApplyScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -195,9 +387,33 @@ func (m *MockDeploymentInterface) ApplyStatus(arg0 context.Context, arg1 *v12.De } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockDeploymentInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockDeploymentInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockDeploymentInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockDeploymentInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockDeploymentInterfaceApplyStatusCall{Call: call} +} + +// MockDeploymentInterfaceApplyStatusCall wrap *gomock.Call +type MockDeploymentInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceApplyStatusCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceApplyStatusCall) Do(f func(context.Context, *v12.DeploymentApplyConfiguration, v11.ApplyOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.DeploymentApplyConfiguration, v11.ApplyOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -210,9 +426,33 @@ func (m *MockDeploymentInterface) Create(arg0 context.Context, arg1 *v1.Deployme } // Create indicates an expected call of Create. -func (mr *MockDeploymentInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockDeploymentInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDeploymentInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDeploymentInterface)(nil).Create), arg0, arg1, arg2) + return &MockDeploymentInterfaceCreateCall{Call: call} +} + +// MockDeploymentInterfaceCreateCall wrap *gomock.Call +type MockDeploymentInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceCreateCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceCreateCall) Do(f func(context.Context, *v1.Deployment, v11.CreateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Deployment, v11.CreateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -224,9 +464,33 @@ func (m *MockDeploymentInterface) Delete(arg0 context.Context, arg1 string, arg2 } // Delete indicates an expected call of Delete. -func (mr *MockDeploymentInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockDeploymentInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeploymentInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeploymentInterface)(nil).Delete), arg0, arg1, arg2) + return &MockDeploymentInterfaceDeleteCall{Call: call} +} + +// MockDeploymentInterfaceDeleteCall wrap *gomock.Call +type MockDeploymentInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceDeleteCall) Return(arg0 error) *MockDeploymentInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockDeploymentInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockDeploymentInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -238,9 +502,33 @@ func (m *MockDeploymentInterface) DeleteCollection(arg0 context.Context, arg1 v1 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockDeploymentInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockDeploymentInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockDeploymentInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockDeploymentInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockDeploymentInterfaceDeleteCollectionCall{Call: call} +} + +// MockDeploymentInterfaceDeleteCollectionCall wrap *gomock.Call +type MockDeploymentInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceDeleteCollectionCall) Return(arg0 error) *MockDeploymentInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockDeploymentInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockDeploymentInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -253,9 +541,33 @@ func (m *MockDeploymentInterface) Get(arg0 context.Context, arg1 string, arg2 v1 } // Get indicates an expected call of Get. -func (mr *MockDeploymentInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockDeploymentInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDeploymentInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDeploymentInterface)(nil).Get), arg0, arg1, arg2) + return &MockDeploymentInterfaceGetCall{Call: call} +} + +// MockDeploymentInterfaceGetCall wrap *gomock.Call +type MockDeploymentInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceGetCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetScale mocks base method. @@ -268,9 +580,33 @@ func (m *MockDeploymentInterface) GetScale(arg0 context.Context, arg1 string, ar } // GetScale indicates an expected call of GetScale. -func (mr *MockDeploymentInterfaceMockRecorder) GetScale(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) GetScale(arg0, arg1, arg2 any) *MockDeploymentInterfaceGetScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetScale", reflect.TypeOf((*MockDeploymentInterface)(nil).GetScale), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetScale", reflect.TypeOf((*MockDeploymentInterface)(nil).GetScale), arg0, arg1, arg2) + return &MockDeploymentInterfaceGetScaleCall{Call: call} +} + +// MockDeploymentInterfaceGetScaleCall wrap *gomock.Call +type MockDeploymentInterfaceGetScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceGetScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockDeploymentInterfaceGetScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceGetScaleCall) Do(f func(context.Context, string, v11.GetOptions) (*v10.Scale, error)) *MockDeploymentInterfaceGetScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceGetScaleCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v10.Scale, error)) *MockDeploymentInterfaceGetScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -283,9 +619,33 @@ func (m *MockDeploymentInterface) List(arg0 context.Context, arg1 v11.ListOption } // List indicates an expected call of List. -func (mr *MockDeploymentInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) List(arg0, arg1 any) *MockDeploymentInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDeploymentInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDeploymentInterface)(nil).List), arg0, arg1) + return &MockDeploymentInterfaceListCall{Call: call} +} + +// MockDeploymentInterfaceListCall wrap *gomock.Call +type MockDeploymentInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceListCall) Return(arg0 *v1.DeploymentList, arg1 error) *MockDeploymentInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.DeploymentList, error)) *MockDeploymentInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.DeploymentList, error)) *MockDeploymentInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -302,10 +662,34 @@ func (m *MockDeploymentInterface) Patch(arg0 context.Context, arg1 string, arg2 } // Patch indicates an expected call of Patch. -func (mr *MockDeploymentInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockDeploymentInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockDeploymentInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockDeploymentInterface)(nil).Patch), varargs...) + return &MockDeploymentInterfacePatchCall{Call: call} +} + +// MockDeploymentInterfacePatchCall wrap *gomock.Call +type MockDeploymentInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfacePatchCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Deployment, error)) *MockDeploymentInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Deployment, error)) *MockDeploymentInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -318,9 +702,33 @@ func (m *MockDeploymentInterface) Update(arg0 context.Context, arg1 *v1.Deployme } // Update indicates an expected call of Update. -func (mr *MockDeploymentInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockDeploymentInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDeploymentInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDeploymentInterface)(nil).Update), arg0, arg1, arg2) + return &MockDeploymentInterfaceUpdateCall{Call: call} +} + +// MockDeploymentInterfaceUpdateCall wrap *gomock.Call +type MockDeploymentInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceUpdateCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceUpdateCall) Do(f func(context.Context, *v1.Deployment, v11.UpdateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Deployment, v11.UpdateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateScale mocks base method. @@ -333,9 +741,33 @@ func (m *MockDeploymentInterface) UpdateScale(arg0 context.Context, arg1 string, } // UpdateScale indicates an expected call of UpdateScale. -func (mr *MockDeploymentInterfaceMockRecorder) UpdateScale(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) UpdateScale(arg0, arg1, arg2, arg3 any) *MockDeploymentInterfaceUpdateScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateScale", reflect.TypeOf((*MockDeploymentInterface)(nil).UpdateScale), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateScale", reflect.TypeOf((*MockDeploymentInterface)(nil).UpdateScale), arg0, arg1, arg2, arg3) + return &MockDeploymentInterfaceUpdateScaleCall{Call: call} +} + +// MockDeploymentInterfaceUpdateScaleCall wrap *gomock.Call +type MockDeploymentInterfaceUpdateScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceUpdateScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockDeploymentInterfaceUpdateScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceUpdateScaleCall) Do(f func(context.Context, string, *v10.Scale, v11.UpdateOptions) (*v10.Scale, error)) *MockDeploymentInterfaceUpdateScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceUpdateScaleCall) DoAndReturn(f func(context.Context, string, *v10.Scale, v11.UpdateOptions) (*v10.Scale, error)) *MockDeploymentInterfaceUpdateScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -348,9 +780,33 @@ func (m *MockDeploymentInterface) UpdateStatus(arg0 context.Context, arg1 *v1.De } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockDeploymentInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockDeploymentInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockDeploymentInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockDeploymentInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockDeploymentInterfaceUpdateStatusCall{Call: call} +} + +// MockDeploymentInterfaceUpdateStatusCall wrap *gomock.Call +type MockDeploymentInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceUpdateStatusCall) Return(arg0 *v1.Deployment, arg1 error) *MockDeploymentInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Deployment, v11.UpdateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Deployment, v11.UpdateOptions) (*v1.Deployment, error)) *MockDeploymentInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -363,9 +819,33 @@ func (m *MockDeploymentInterface) Watch(arg0 context.Context, arg1 v11.ListOptio } // Watch indicates an expected call of Watch. -func (mr *MockDeploymentInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockDeploymentInterfaceMockRecorder) Watch(arg0, arg1 any) *MockDeploymentInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockDeploymentInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockDeploymentInterface)(nil).Watch), arg0, arg1) + return &MockDeploymentInterfaceWatchCall{Call: call} +} + +// MockDeploymentInterfaceWatchCall wrap *gomock.Call +type MockDeploymentInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeploymentInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockDeploymentInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeploymentInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockDeploymentInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeploymentInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockDeploymentInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStatefulSetInterface is a mock of StatefulSetInterface interface. @@ -401,9 +881,33 @@ func (m *MockStatefulSetInterface) Apply(arg0 context.Context, arg1 *v12.Statefu } // Apply indicates an expected call of Apply. -func (mr *MockStatefulSetInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockStatefulSetInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockStatefulSetInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockStatefulSetInterface)(nil).Apply), arg0, arg1, arg2) + return &MockStatefulSetInterfaceApplyCall{Call: call} +} + +// MockStatefulSetInterfaceApplyCall wrap *gomock.Call +type MockStatefulSetInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceApplyCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceApplyCall) Do(f func(context.Context, *v12.StatefulSetApplyConfiguration, v11.ApplyOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.StatefulSetApplyConfiguration, v11.ApplyOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyScale mocks base method. @@ -416,9 +920,33 @@ func (m *MockStatefulSetInterface) ApplyScale(arg0 context.Context, arg1 string, } // ApplyScale indicates an expected call of ApplyScale. -func (mr *MockStatefulSetInterfaceMockRecorder) ApplyScale(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) ApplyScale(arg0, arg1, arg2, arg3 any) *MockStatefulSetInterfaceApplyScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).ApplyScale), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).ApplyScale), arg0, arg1, arg2, arg3) + return &MockStatefulSetInterfaceApplyScaleCall{Call: call} +} + +// MockStatefulSetInterfaceApplyScaleCall wrap *gomock.Call +type MockStatefulSetInterfaceApplyScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceApplyScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockStatefulSetInterfaceApplyScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceApplyScaleCall) Do(f func(context.Context, string, *v13.ScaleApplyConfiguration, v11.ApplyOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceApplyScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceApplyScaleCall) DoAndReturn(f func(context.Context, string, *v13.ScaleApplyConfiguration, v11.ApplyOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceApplyScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -431,9 +959,33 @@ func (m *MockStatefulSetInterface) ApplyStatus(arg0 context.Context, arg1 *v12.S } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockStatefulSetInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockStatefulSetInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockStatefulSetInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockStatefulSetInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockStatefulSetInterfaceApplyStatusCall{Call: call} +} + +// MockStatefulSetInterfaceApplyStatusCall wrap *gomock.Call +type MockStatefulSetInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceApplyStatusCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceApplyStatusCall) Do(f func(context.Context, *v12.StatefulSetApplyConfiguration, v11.ApplyOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.StatefulSetApplyConfiguration, v11.ApplyOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -446,9 +998,33 @@ func (m *MockStatefulSetInterface) Create(arg0 context.Context, arg1 *v1.Statefu } // Create indicates an expected call of Create. -func (mr *MockStatefulSetInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockStatefulSetInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockStatefulSetInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockStatefulSetInterface)(nil).Create), arg0, arg1, arg2) + return &MockStatefulSetInterfaceCreateCall{Call: call} +} + +// MockStatefulSetInterfaceCreateCall wrap *gomock.Call +type MockStatefulSetInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceCreateCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceCreateCall) Do(f func(context.Context, *v1.StatefulSet, v11.CreateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.StatefulSet, v11.CreateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -460,9 +1036,33 @@ func (m *MockStatefulSetInterface) Delete(arg0 context.Context, arg1 string, arg } // Delete indicates an expected call of Delete. -func (mr *MockStatefulSetInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockStatefulSetInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStatefulSetInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStatefulSetInterface)(nil).Delete), arg0, arg1, arg2) + return &MockStatefulSetInterfaceDeleteCall{Call: call} +} + +// MockStatefulSetInterfaceDeleteCall wrap *gomock.Call +type MockStatefulSetInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceDeleteCall) Return(arg0 error) *MockStatefulSetInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockStatefulSetInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockStatefulSetInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -474,9 +1074,33 @@ func (m *MockStatefulSetInterface) DeleteCollection(arg0 context.Context, arg1 v } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockStatefulSetInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockStatefulSetInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockStatefulSetInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockStatefulSetInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockStatefulSetInterfaceDeleteCollectionCall{Call: call} +} + +// MockStatefulSetInterfaceDeleteCollectionCall wrap *gomock.Call +type MockStatefulSetInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceDeleteCollectionCall) Return(arg0 error) *MockStatefulSetInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockStatefulSetInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockStatefulSetInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -489,9 +1113,33 @@ func (m *MockStatefulSetInterface) Get(arg0 context.Context, arg1 string, arg2 v } // Get indicates an expected call of Get. -func (mr *MockStatefulSetInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockStatefulSetInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStatefulSetInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStatefulSetInterface)(nil).Get), arg0, arg1, arg2) + return &MockStatefulSetInterfaceGetCall{Call: call} +} + +// MockStatefulSetInterfaceGetCall wrap *gomock.Call +type MockStatefulSetInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceGetCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetScale mocks base method. @@ -504,9 +1152,33 @@ func (m *MockStatefulSetInterface) GetScale(arg0 context.Context, arg1 string, a } // GetScale indicates an expected call of GetScale. -func (mr *MockStatefulSetInterfaceMockRecorder) GetScale(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) GetScale(arg0, arg1, arg2 any) *MockStatefulSetInterfaceGetScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).GetScale), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).GetScale), arg0, arg1, arg2) + return &MockStatefulSetInterfaceGetScaleCall{Call: call} +} + +// MockStatefulSetInterfaceGetScaleCall wrap *gomock.Call +type MockStatefulSetInterfaceGetScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceGetScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockStatefulSetInterfaceGetScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceGetScaleCall) Do(f func(context.Context, string, v11.GetOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceGetScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceGetScaleCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceGetScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -519,9 +1191,33 @@ func (m *MockStatefulSetInterface) List(arg0 context.Context, arg1 v11.ListOptio } // List indicates an expected call of List. -func (mr *MockStatefulSetInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) List(arg0, arg1 any) *MockStatefulSetInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStatefulSetInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStatefulSetInterface)(nil).List), arg0, arg1) + return &MockStatefulSetInterfaceListCall{Call: call} +} + +// MockStatefulSetInterfaceListCall wrap *gomock.Call +type MockStatefulSetInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceListCall) Return(arg0 *v1.StatefulSetList, arg1 error) *MockStatefulSetInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.StatefulSetList, error)) *MockStatefulSetInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.StatefulSetList, error)) *MockStatefulSetInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -538,10 +1234,34 @@ func (m *MockStatefulSetInterface) Patch(arg0 context.Context, arg1 string, arg2 } // Patch indicates an expected call of Patch. -func (mr *MockStatefulSetInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockStatefulSetInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockStatefulSetInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockStatefulSetInterface)(nil).Patch), varargs...) + return &MockStatefulSetInterfacePatchCall{Call: call} +} + +// MockStatefulSetInterfacePatchCall wrap *gomock.Call +type MockStatefulSetInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfacePatchCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.StatefulSet, error)) *MockStatefulSetInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.StatefulSet, error)) *MockStatefulSetInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -554,9 +1274,33 @@ func (m *MockStatefulSetInterface) Update(arg0 context.Context, arg1 *v1.Statefu } // Update indicates an expected call of Update. -func (mr *MockStatefulSetInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockStatefulSetInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockStatefulSetInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockStatefulSetInterface)(nil).Update), arg0, arg1, arg2) + return &MockStatefulSetInterfaceUpdateCall{Call: call} +} + +// MockStatefulSetInterfaceUpdateCall wrap *gomock.Call +type MockStatefulSetInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceUpdateCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceUpdateCall) Do(f func(context.Context, *v1.StatefulSet, v11.UpdateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.StatefulSet, v11.UpdateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateScale mocks base method. @@ -569,9 +1313,33 @@ func (m *MockStatefulSetInterface) UpdateScale(arg0 context.Context, arg1 string } // UpdateScale indicates an expected call of UpdateScale. -func (mr *MockStatefulSetInterfaceMockRecorder) UpdateScale(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) UpdateScale(arg0, arg1, arg2, arg3 any) *MockStatefulSetInterfaceUpdateScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).UpdateScale), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateScale", reflect.TypeOf((*MockStatefulSetInterface)(nil).UpdateScale), arg0, arg1, arg2, arg3) + return &MockStatefulSetInterfaceUpdateScaleCall{Call: call} +} + +// MockStatefulSetInterfaceUpdateScaleCall wrap *gomock.Call +type MockStatefulSetInterfaceUpdateScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceUpdateScaleCall) Return(arg0 *v10.Scale, arg1 error) *MockStatefulSetInterfaceUpdateScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceUpdateScaleCall) Do(f func(context.Context, string, *v10.Scale, v11.UpdateOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceUpdateScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceUpdateScaleCall) DoAndReturn(f func(context.Context, string, *v10.Scale, v11.UpdateOptions) (*v10.Scale, error)) *MockStatefulSetInterfaceUpdateScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -584,9 +1352,33 @@ func (m *MockStatefulSetInterface) UpdateStatus(arg0 context.Context, arg1 *v1.S } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockStatefulSetInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockStatefulSetInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockStatefulSetInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockStatefulSetInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockStatefulSetInterfaceUpdateStatusCall{Call: call} +} + +// MockStatefulSetInterfaceUpdateStatusCall wrap *gomock.Call +type MockStatefulSetInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceUpdateStatusCall) Return(arg0 *v1.StatefulSet, arg1 error) *MockStatefulSetInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.StatefulSet, v11.UpdateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.StatefulSet, v11.UpdateOptions) (*v1.StatefulSet, error)) *MockStatefulSetInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -599,9 +1391,33 @@ func (m *MockStatefulSetInterface) Watch(arg0 context.Context, arg1 v11.ListOpti } // Watch indicates an expected call of Watch. -func (mr *MockStatefulSetInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockStatefulSetInterfaceMockRecorder) Watch(arg0, arg1 any) *MockStatefulSetInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockStatefulSetInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockStatefulSetInterface)(nil).Watch), arg0, arg1) + return &MockStatefulSetInterfaceWatchCall{Call: call} +} + +// MockStatefulSetInterfaceWatchCall wrap *gomock.Call +type MockStatefulSetInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatefulSetInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockStatefulSetInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatefulSetInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockStatefulSetInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatefulSetInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockStatefulSetInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDaemonSetInterface is a mock of DaemonSetInterface interface. @@ -637,9 +1453,33 @@ func (m *MockDaemonSetInterface) Apply(arg0 context.Context, arg1 *v12.DaemonSet } // Apply indicates an expected call of Apply. -func (mr *MockDaemonSetInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockDaemonSetInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockDaemonSetInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockDaemonSetInterface)(nil).Apply), arg0, arg1, arg2) + return &MockDaemonSetInterfaceApplyCall{Call: call} +} + +// MockDaemonSetInterfaceApplyCall wrap *gomock.Call +type MockDaemonSetInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceApplyCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceApplyCall) Do(f func(context.Context, *v12.DaemonSetApplyConfiguration, v11.ApplyOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.DaemonSetApplyConfiguration, v11.ApplyOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -652,9 +1492,33 @@ func (m *MockDaemonSetInterface) ApplyStatus(arg0 context.Context, arg1 *v12.Dae } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockDaemonSetInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockDaemonSetInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockDaemonSetInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockDaemonSetInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockDaemonSetInterfaceApplyStatusCall{Call: call} +} + +// MockDaemonSetInterfaceApplyStatusCall wrap *gomock.Call +type MockDaemonSetInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceApplyStatusCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceApplyStatusCall) Do(f func(context.Context, *v12.DaemonSetApplyConfiguration, v11.ApplyOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.DaemonSetApplyConfiguration, v11.ApplyOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -667,9 +1531,33 @@ func (m *MockDaemonSetInterface) Create(arg0 context.Context, arg1 *v1.DaemonSet } // Create indicates an expected call of Create. -func (mr *MockDaemonSetInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockDaemonSetInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDaemonSetInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDaemonSetInterface)(nil).Create), arg0, arg1, arg2) + return &MockDaemonSetInterfaceCreateCall{Call: call} +} + +// MockDaemonSetInterfaceCreateCall wrap *gomock.Call +type MockDaemonSetInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceCreateCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceCreateCall) Do(f func(context.Context, *v1.DaemonSet, v11.CreateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.DaemonSet, v11.CreateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -681,9 +1569,33 @@ func (m *MockDaemonSetInterface) Delete(arg0 context.Context, arg1 string, arg2 } // Delete indicates an expected call of Delete. -func (mr *MockDaemonSetInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockDaemonSetInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDaemonSetInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDaemonSetInterface)(nil).Delete), arg0, arg1, arg2) + return &MockDaemonSetInterfaceDeleteCall{Call: call} +} + +// MockDaemonSetInterfaceDeleteCall wrap *gomock.Call +type MockDaemonSetInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceDeleteCall) Return(arg0 error) *MockDaemonSetInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockDaemonSetInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockDaemonSetInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -695,9 +1607,33 @@ func (m *MockDaemonSetInterface) DeleteCollection(arg0 context.Context, arg1 v11 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockDaemonSetInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockDaemonSetInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockDaemonSetInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockDaemonSetInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockDaemonSetInterfaceDeleteCollectionCall{Call: call} +} + +// MockDaemonSetInterfaceDeleteCollectionCall wrap *gomock.Call +type MockDaemonSetInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceDeleteCollectionCall) Return(arg0 error) *MockDaemonSetInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockDaemonSetInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockDaemonSetInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -710,9 +1646,33 @@ func (m *MockDaemonSetInterface) Get(arg0 context.Context, arg1 string, arg2 v11 } // Get indicates an expected call of Get. -func (mr *MockDaemonSetInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockDaemonSetInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDaemonSetInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDaemonSetInterface)(nil).Get), arg0, arg1, arg2) + return &MockDaemonSetInterfaceGetCall{Call: call} +} + +// MockDaemonSetInterfaceGetCall wrap *gomock.Call +type MockDaemonSetInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceGetCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -725,9 +1685,33 @@ func (m *MockDaemonSetInterface) List(arg0 context.Context, arg1 v11.ListOptions } // List indicates an expected call of List. -func (mr *MockDaemonSetInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) List(arg0, arg1 any) *MockDaemonSetInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDaemonSetInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDaemonSetInterface)(nil).List), arg0, arg1) + return &MockDaemonSetInterfaceListCall{Call: call} +} + +// MockDaemonSetInterfaceListCall wrap *gomock.Call +type MockDaemonSetInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceListCall) Return(arg0 *v1.DaemonSetList, arg1 error) *MockDaemonSetInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.DaemonSetList, error)) *MockDaemonSetInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.DaemonSetList, error)) *MockDaemonSetInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -744,10 +1728,34 @@ func (m *MockDaemonSetInterface) Patch(arg0 context.Context, arg1 string, arg2 t } // Patch indicates an expected call of Patch. -func (mr *MockDaemonSetInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockDaemonSetInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockDaemonSetInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockDaemonSetInterface)(nil).Patch), varargs...) + return &MockDaemonSetInterfacePatchCall{Call: call} +} + +// MockDaemonSetInterfacePatchCall wrap *gomock.Call +type MockDaemonSetInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfacePatchCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.DaemonSet, error)) *MockDaemonSetInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.DaemonSet, error)) *MockDaemonSetInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -760,9 +1768,33 @@ func (m *MockDaemonSetInterface) Update(arg0 context.Context, arg1 *v1.DaemonSet } // Update indicates an expected call of Update. -func (mr *MockDaemonSetInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockDaemonSetInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDaemonSetInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDaemonSetInterface)(nil).Update), arg0, arg1, arg2) + return &MockDaemonSetInterfaceUpdateCall{Call: call} +} + +// MockDaemonSetInterfaceUpdateCall wrap *gomock.Call +type MockDaemonSetInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceUpdateCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceUpdateCall) Do(f func(context.Context, *v1.DaemonSet, v11.UpdateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.DaemonSet, v11.UpdateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -775,9 +1807,33 @@ func (m *MockDaemonSetInterface) UpdateStatus(arg0 context.Context, arg1 *v1.Dae } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockDaemonSetInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockDaemonSetInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockDaemonSetInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockDaemonSetInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockDaemonSetInterfaceUpdateStatusCall{Call: call} +} + +// MockDaemonSetInterfaceUpdateStatusCall wrap *gomock.Call +type MockDaemonSetInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceUpdateStatusCall) Return(arg0 *v1.DaemonSet, arg1 error) *MockDaemonSetInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.DaemonSet, v11.UpdateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.DaemonSet, v11.UpdateOptions) (*v1.DaemonSet, error)) *MockDaemonSetInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -790,7 +1846,31 @@ func (m *MockDaemonSetInterface) Watch(arg0 context.Context, arg1 v11.ListOption } // Watch indicates an expected call of Watch. -func (mr *MockDaemonSetInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockDaemonSetInterfaceMockRecorder) Watch(arg0, arg1 any) *MockDaemonSetInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockDaemonSetInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockDaemonSetInterface)(nil).Watch), arg0, arg1) + return &MockDaemonSetInterfaceWatchCall{Call: call} +} + +// MockDaemonSetInterfaceWatchCall wrap *gomock.Call +type MockDaemonSetInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDaemonSetInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockDaemonSetInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDaemonSetInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockDaemonSetInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDaemonSetInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockDaemonSetInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/context_mock.go b/caas/kubernetes/provider/mocks/context_mock.go index 0a8cee117ab..54f18a5d176 100644 --- a/caas/kubernetes/provider/mocks/context_mock.go +++ b/caas/kubernetes/provider/mocks/context_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/context_mock.go context Context +// mockgen -typed -package mocks -destination mocks/context_mock.go context Context // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockContext) Deadline() (time.Time, bool) { } // Deadline indicates an expected call of Deadline. -func (mr *MockContextMockRecorder) Deadline() *gomock.Call { +func (mr *MockContextMockRecorder) Deadline() *MockContextDeadlineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline)) + return &MockContextDeadlineCall{Call: call} +} + +// MockContextDeadlineCall wrap *gomock.Call +type MockContextDeadlineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDeadlineCall) Return(arg0 time.Time, arg1 bool) *MockContextDeadlineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDeadlineCall) Do(f func() (time.Time, bool)) *MockContextDeadlineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDeadlineCall) DoAndReturn(f func() (time.Time, bool)) *MockContextDeadlineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -63,9 +87,33 @@ func (m *MockContext) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockContextMockRecorder) Done() *gomock.Call { +func (mr *MockContextMockRecorder) Done() *MockContextDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done)) + return &MockContextDoneCall{Call: call} +} + +// MockContextDoneCall wrap *gomock.Call +type MockContextDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDoneCall) Return(arg0 <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDoneCall) Do(f func() <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDoneCall) DoAndReturn(f func() <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -77,9 +125,33 @@ func (m *MockContext) Err() error { } // Err indicates an expected call of Err. -func (mr *MockContextMockRecorder) Err() *gomock.Call { +func (mr *MockContextMockRecorder) Err() *MockContextErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err)) + return &MockContextErrCall{Call: call} +} + +// MockContextErrCall wrap *gomock.Call +type MockContextErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextErrCall) Return(arg0 error) *MockContextErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextErrCall) Do(f func() error) *MockContextErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextErrCall) DoAndReturn(f func() error) *MockContextErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -91,7 +163,31 @@ func (m *MockContext) Value(arg0 any) any { } // Value indicates an expected call of Value. -func (mr *MockContextMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Value(arg0 any) *MockContextValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0) + return &MockContextValueCall{Call: call} +} + +// MockContextValueCall wrap *gomock.Call +type MockContextValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextValueCall) Return(arg0 any) *MockContextValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextValueCall) Do(f func(any) any) *MockContextValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextValueCall) DoAndReturn(f func(any) any) *MockContextValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/corev1_mock.go b/caas/kubernetes/provider/mocks/corev1_mock.go index b43b785cf20..bfc4145d483 100644 --- a/caas/kubernetes/provider/mocks/corev1_mock.go +++ b/caas/kubernetes/provider/mocks/corev1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/corev1_mock.go k8s.io/client-go/kubernetes/typed/core/v1 EventInterface,CoreV1Interface,NamespaceInterface,PodInterface,ServiceInterface,ConfigMapInterface,PersistentVolumeInterface,PersistentVolumeClaimInterface,SecretInterface,NodeInterface +// mockgen -typed -package mocks -destination mocks/corev1_mock.go k8s.io/client-go/kubernetes/typed/core/v1 EventInterface,CoreV1Interface,NamespaceInterface,PodInterface,ServiceInterface,ConfigMapInterface,PersistentVolumeInterface,PersistentVolumeClaimInterface,SecretInterface,NodeInterface // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockEventInterface) Apply(arg0 context.Context, arg1 *v12.EventApplyCon } // Apply indicates an expected call of Apply. -func (mr *MockEventInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockEventInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockEventInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockEventInterface)(nil).Apply), arg0, arg1, arg2) + return &MockEventInterfaceApplyCall{Call: call} +} + +// MockEventInterfaceApplyCall wrap *gomock.Call +type MockEventInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceApplyCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceApplyCall) Do(f func(context.Context, *v12.EventApplyConfiguration, v11.ApplyOptions) (*v1.Event, error)) *MockEventInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.EventApplyConfiguration, v11.ApplyOptions) (*v1.Event, error)) *MockEventInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -75,9 +99,33 @@ func (m *MockEventInterface) Create(arg0 context.Context, arg1 *v1.Event, arg2 v } // Create indicates an expected call of Create. -func (mr *MockEventInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockEventInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEventInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEventInterface)(nil).Create), arg0, arg1, arg2) + return &MockEventInterfaceCreateCall{Call: call} +} + +// MockEventInterfaceCreateCall wrap *gomock.Call +type MockEventInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceCreateCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceCreateCall) Do(f func(context.Context, *v1.Event, v11.CreateOptions) (*v1.Event, error)) *MockEventInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Event, v11.CreateOptions) (*v1.Event, error)) *MockEventInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateWithEventNamespace mocks base method. @@ -90,9 +138,33 @@ func (m *MockEventInterface) CreateWithEventNamespace(arg0 *v1.Event) (*v1.Event } // CreateWithEventNamespace indicates an expected call of CreateWithEventNamespace. -func (mr *MockEventInterfaceMockRecorder) CreateWithEventNamespace(arg0 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) CreateWithEventNamespace(arg0 any) *MockEventInterfaceCreateWithEventNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).CreateWithEventNamespace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).CreateWithEventNamespace), arg0) + return &MockEventInterfaceCreateWithEventNamespaceCall{Call: call} +} + +// MockEventInterfaceCreateWithEventNamespaceCall wrap *gomock.Call +type MockEventInterfaceCreateWithEventNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceCreateWithEventNamespaceCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceCreateWithEventNamespaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceCreateWithEventNamespaceCall) Do(f func(*v1.Event) (*v1.Event, error)) *MockEventInterfaceCreateWithEventNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceCreateWithEventNamespaceCall) DoAndReturn(f func(*v1.Event) (*v1.Event, error)) *MockEventInterfaceCreateWithEventNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -104,9 +176,33 @@ func (m *MockEventInterface) Delete(arg0 context.Context, arg1 string, arg2 v11. } // Delete indicates an expected call of Delete. -func (mr *MockEventInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockEventInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockEventInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockEventInterface)(nil).Delete), arg0, arg1, arg2) + return &MockEventInterfaceDeleteCall{Call: call} +} + +// MockEventInterfaceDeleteCall wrap *gomock.Call +type MockEventInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceDeleteCall) Return(arg0 error) *MockEventInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockEventInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockEventInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -118,9 +214,33 @@ func (m *MockEventInterface) DeleteCollection(arg0 context.Context, arg1 v11.Del } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockEventInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockEventInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockEventInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockEventInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockEventInterfaceDeleteCollectionCall{Call: call} +} + +// MockEventInterfaceDeleteCollectionCall wrap *gomock.Call +type MockEventInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceDeleteCollectionCall) Return(arg0 error) *MockEventInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockEventInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockEventInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -133,9 +253,33 @@ func (m *MockEventInterface) Get(arg0 context.Context, arg1 string, arg2 v11.Get } // Get indicates an expected call of Get. -func (mr *MockEventInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockEventInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockEventInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockEventInterface)(nil).Get), arg0, arg1, arg2) + return &MockEventInterfaceGetCall{Call: call} +} + +// MockEventInterfaceGetCall wrap *gomock.Call +type MockEventInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceGetCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Event, error)) *MockEventInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Event, error)) *MockEventInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetFieldSelector mocks base method. @@ -147,9 +291,33 @@ func (m *MockEventInterface) GetFieldSelector(arg0, arg1, arg2, arg3 *string) fi } // GetFieldSelector indicates an expected call of GetFieldSelector. -func (mr *MockEventInterfaceMockRecorder) GetFieldSelector(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) GetFieldSelector(arg0, arg1, arg2, arg3 any) *MockEventInterfaceGetFieldSelectorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFieldSelector", reflect.TypeOf((*MockEventInterface)(nil).GetFieldSelector), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFieldSelector", reflect.TypeOf((*MockEventInterface)(nil).GetFieldSelector), arg0, arg1, arg2, arg3) + return &MockEventInterfaceGetFieldSelectorCall{Call: call} +} + +// MockEventInterfaceGetFieldSelectorCall wrap *gomock.Call +type MockEventInterfaceGetFieldSelectorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceGetFieldSelectorCall) Return(arg0 fields.Selector) *MockEventInterfaceGetFieldSelectorCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceGetFieldSelectorCall) Do(f func(*string, *string, *string, *string) fields.Selector) *MockEventInterfaceGetFieldSelectorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceGetFieldSelectorCall) DoAndReturn(f func(*string, *string, *string, *string) fields.Selector) *MockEventInterfaceGetFieldSelectorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -162,9 +330,33 @@ func (m *MockEventInterface) List(arg0 context.Context, arg1 v11.ListOptions) (* } // List indicates an expected call of List. -func (mr *MockEventInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) List(arg0, arg1 any) *MockEventInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockEventInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockEventInterface)(nil).List), arg0, arg1) + return &MockEventInterfaceListCall{Call: call} +} + +// MockEventInterfaceListCall wrap *gomock.Call +type MockEventInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceListCall) Return(arg0 *v1.EventList, arg1 error) *MockEventInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.EventList, error)) *MockEventInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.EventList, error)) *MockEventInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -181,10 +373,34 @@ func (m *MockEventInterface) Patch(arg0 context.Context, arg1 string, arg2 types } // Patch indicates an expected call of Patch. -func (mr *MockEventInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockEventInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockEventInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockEventInterface)(nil).Patch), varargs...) + return &MockEventInterfacePatchCall{Call: call} +} + +// MockEventInterfacePatchCall wrap *gomock.Call +type MockEventInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfacePatchCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Event, error)) *MockEventInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Event, error)) *MockEventInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PatchWithEventNamespace mocks base method. @@ -197,9 +413,33 @@ func (m *MockEventInterface) PatchWithEventNamespace(arg0 *v1.Event, arg1 []byte } // PatchWithEventNamespace indicates an expected call of PatchWithEventNamespace. -func (mr *MockEventInterfaceMockRecorder) PatchWithEventNamespace(arg0, arg1 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) PatchWithEventNamespace(arg0, arg1 any) *MockEventInterfacePatchWithEventNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).PatchWithEventNamespace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).PatchWithEventNamespace), arg0, arg1) + return &MockEventInterfacePatchWithEventNamespaceCall{Call: call} +} + +// MockEventInterfacePatchWithEventNamespaceCall wrap *gomock.Call +type MockEventInterfacePatchWithEventNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfacePatchWithEventNamespaceCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfacePatchWithEventNamespaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfacePatchWithEventNamespaceCall) Do(f func(*v1.Event, []byte) (*v1.Event, error)) *MockEventInterfacePatchWithEventNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfacePatchWithEventNamespaceCall) DoAndReturn(f func(*v1.Event, []byte) (*v1.Event, error)) *MockEventInterfacePatchWithEventNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Search mocks base method. @@ -212,9 +452,33 @@ func (m *MockEventInterface) Search(arg0 *runtime.Scheme, arg1 runtime.Object) ( } // Search indicates an expected call of Search. -func (mr *MockEventInterfaceMockRecorder) Search(arg0, arg1 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Search(arg0, arg1 any) *MockEventInterfaceSearchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockEventInterface)(nil).Search), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockEventInterface)(nil).Search), arg0, arg1) + return &MockEventInterfaceSearchCall{Call: call} +} + +// MockEventInterfaceSearchCall wrap *gomock.Call +type MockEventInterfaceSearchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceSearchCall) Return(arg0 *v1.EventList, arg1 error) *MockEventInterfaceSearchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceSearchCall) Do(f func(*runtime.Scheme, runtime.Object) (*v1.EventList, error)) *MockEventInterfaceSearchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceSearchCall) DoAndReturn(f func(*runtime.Scheme, runtime.Object) (*v1.EventList, error)) *MockEventInterfaceSearchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -227,9 +491,33 @@ func (m *MockEventInterface) Update(arg0 context.Context, arg1 *v1.Event, arg2 v } // Update indicates an expected call of Update. -func (mr *MockEventInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockEventInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockEventInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockEventInterface)(nil).Update), arg0, arg1, arg2) + return &MockEventInterfaceUpdateCall{Call: call} +} + +// MockEventInterfaceUpdateCall wrap *gomock.Call +type MockEventInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceUpdateCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceUpdateCall) Do(f func(context.Context, *v1.Event, v11.UpdateOptions) (*v1.Event, error)) *MockEventInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Event, v11.UpdateOptions) (*v1.Event, error)) *MockEventInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateWithEventNamespace mocks base method. @@ -242,9 +530,33 @@ func (m *MockEventInterface) UpdateWithEventNamespace(arg0 *v1.Event) (*v1.Event } // UpdateWithEventNamespace indicates an expected call of UpdateWithEventNamespace. -func (mr *MockEventInterfaceMockRecorder) UpdateWithEventNamespace(arg0 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) UpdateWithEventNamespace(arg0 any) *MockEventInterfaceUpdateWithEventNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).UpdateWithEventNamespace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWithEventNamespace", reflect.TypeOf((*MockEventInterface)(nil).UpdateWithEventNamespace), arg0) + return &MockEventInterfaceUpdateWithEventNamespaceCall{Call: call} +} + +// MockEventInterfaceUpdateWithEventNamespaceCall wrap *gomock.Call +type MockEventInterfaceUpdateWithEventNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceUpdateWithEventNamespaceCall) Return(arg0 *v1.Event, arg1 error) *MockEventInterfaceUpdateWithEventNamespaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceUpdateWithEventNamespaceCall) Do(f func(*v1.Event) (*v1.Event, error)) *MockEventInterfaceUpdateWithEventNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceUpdateWithEventNamespaceCall) DoAndReturn(f func(*v1.Event) (*v1.Event, error)) *MockEventInterfaceUpdateWithEventNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -257,9 +569,33 @@ func (m *MockEventInterface) Watch(arg0 context.Context, arg1 v11.ListOptions) ( } // Watch indicates an expected call of Watch. -func (mr *MockEventInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockEventInterfaceMockRecorder) Watch(arg0, arg1 any) *MockEventInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockEventInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockEventInterface)(nil).Watch), arg0, arg1) + return &MockEventInterfaceWatchCall{Call: call} +} + +// MockEventInterfaceWatchCall wrap *gomock.Call +type MockEventInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockEventInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockEventInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockEventInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCoreV1Interface is a mock of CoreV1Interface interface. @@ -294,9 +630,33 @@ func (m *MockCoreV1Interface) ComponentStatuses() v13.ComponentStatusInterface { } // ComponentStatuses indicates an expected call of ComponentStatuses. -func (mr *MockCoreV1InterfaceMockRecorder) ComponentStatuses() *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) ComponentStatuses() *MockCoreV1InterfaceComponentStatusesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComponentStatuses", reflect.TypeOf((*MockCoreV1Interface)(nil).ComponentStatuses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComponentStatuses", reflect.TypeOf((*MockCoreV1Interface)(nil).ComponentStatuses)) + return &MockCoreV1InterfaceComponentStatusesCall{Call: call} +} + +// MockCoreV1InterfaceComponentStatusesCall wrap *gomock.Call +type MockCoreV1InterfaceComponentStatusesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceComponentStatusesCall) Return(arg0 v13.ComponentStatusInterface) *MockCoreV1InterfaceComponentStatusesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceComponentStatusesCall) Do(f func() v13.ComponentStatusInterface) *MockCoreV1InterfaceComponentStatusesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceComponentStatusesCall) DoAndReturn(f func() v13.ComponentStatusInterface) *MockCoreV1InterfaceComponentStatusesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConfigMaps mocks base method. @@ -308,9 +668,33 @@ func (m *MockCoreV1Interface) ConfigMaps(arg0 string) v13.ConfigMapInterface { } // ConfigMaps indicates an expected call of ConfigMaps. -func (mr *MockCoreV1InterfaceMockRecorder) ConfigMaps(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) ConfigMaps(arg0 any) *MockCoreV1InterfaceConfigMapsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigMaps", reflect.TypeOf((*MockCoreV1Interface)(nil).ConfigMaps), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigMaps", reflect.TypeOf((*MockCoreV1Interface)(nil).ConfigMaps), arg0) + return &MockCoreV1InterfaceConfigMapsCall{Call: call} +} + +// MockCoreV1InterfaceConfigMapsCall wrap *gomock.Call +type MockCoreV1InterfaceConfigMapsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceConfigMapsCall) Return(arg0 v13.ConfigMapInterface) *MockCoreV1InterfaceConfigMapsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceConfigMapsCall) Do(f func(string) v13.ConfigMapInterface) *MockCoreV1InterfaceConfigMapsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceConfigMapsCall) DoAndReturn(f func(string) v13.ConfigMapInterface) *MockCoreV1InterfaceConfigMapsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -322,9 +706,33 @@ func (m *MockCoreV1Interface) Endpoints(arg0 string) v13.EndpointsInterface { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockCoreV1InterfaceMockRecorder) Endpoints(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Endpoints(arg0 any) *MockCoreV1InterfaceEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockCoreV1Interface)(nil).Endpoints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockCoreV1Interface)(nil).Endpoints), arg0) + return &MockCoreV1InterfaceEndpointsCall{Call: call} +} + +// MockCoreV1InterfaceEndpointsCall wrap *gomock.Call +type MockCoreV1InterfaceEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceEndpointsCall) Return(arg0 v13.EndpointsInterface) *MockCoreV1InterfaceEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceEndpointsCall) Do(f func(string) v13.EndpointsInterface) *MockCoreV1InterfaceEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceEndpointsCall) DoAndReturn(f func(string) v13.EndpointsInterface) *MockCoreV1InterfaceEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Events mocks base method. @@ -336,9 +744,33 @@ func (m *MockCoreV1Interface) Events(arg0 string) v13.EventInterface { } // Events indicates an expected call of Events. -func (mr *MockCoreV1InterfaceMockRecorder) Events(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Events(arg0 any) *MockCoreV1InterfaceEventsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Events", reflect.TypeOf((*MockCoreV1Interface)(nil).Events), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Events", reflect.TypeOf((*MockCoreV1Interface)(nil).Events), arg0) + return &MockCoreV1InterfaceEventsCall{Call: call} +} + +// MockCoreV1InterfaceEventsCall wrap *gomock.Call +type MockCoreV1InterfaceEventsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceEventsCall) Return(arg0 v13.EventInterface) *MockCoreV1InterfaceEventsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceEventsCall) Do(f func(string) v13.EventInterface) *MockCoreV1InterfaceEventsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceEventsCall) DoAndReturn(f func(string) v13.EventInterface) *MockCoreV1InterfaceEventsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LimitRanges mocks base method. @@ -350,9 +782,33 @@ func (m *MockCoreV1Interface) LimitRanges(arg0 string) v13.LimitRangeInterface { } // LimitRanges indicates an expected call of LimitRanges. -func (mr *MockCoreV1InterfaceMockRecorder) LimitRanges(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) LimitRanges(arg0 any) *MockCoreV1InterfaceLimitRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LimitRanges", reflect.TypeOf((*MockCoreV1Interface)(nil).LimitRanges), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LimitRanges", reflect.TypeOf((*MockCoreV1Interface)(nil).LimitRanges), arg0) + return &MockCoreV1InterfaceLimitRangesCall{Call: call} +} + +// MockCoreV1InterfaceLimitRangesCall wrap *gomock.Call +type MockCoreV1InterfaceLimitRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceLimitRangesCall) Return(arg0 v13.LimitRangeInterface) *MockCoreV1InterfaceLimitRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceLimitRangesCall) Do(f func(string) v13.LimitRangeInterface) *MockCoreV1InterfaceLimitRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceLimitRangesCall) DoAndReturn(f func(string) v13.LimitRangeInterface) *MockCoreV1InterfaceLimitRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Namespaces mocks base method. @@ -364,9 +820,33 @@ func (m *MockCoreV1Interface) Namespaces() v13.NamespaceInterface { } // Namespaces indicates an expected call of Namespaces. -func (mr *MockCoreV1InterfaceMockRecorder) Namespaces() *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Namespaces() *MockCoreV1InterfaceNamespacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespaces", reflect.TypeOf((*MockCoreV1Interface)(nil).Namespaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespaces", reflect.TypeOf((*MockCoreV1Interface)(nil).Namespaces)) + return &MockCoreV1InterfaceNamespacesCall{Call: call} +} + +// MockCoreV1InterfaceNamespacesCall wrap *gomock.Call +type MockCoreV1InterfaceNamespacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceNamespacesCall) Return(arg0 v13.NamespaceInterface) *MockCoreV1InterfaceNamespacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceNamespacesCall) Do(f func() v13.NamespaceInterface) *MockCoreV1InterfaceNamespacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceNamespacesCall) DoAndReturn(f func() v13.NamespaceInterface) *MockCoreV1InterfaceNamespacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nodes mocks base method. @@ -378,9 +858,33 @@ func (m *MockCoreV1Interface) Nodes() v13.NodeInterface { } // Nodes indicates an expected call of Nodes. -func (mr *MockCoreV1InterfaceMockRecorder) Nodes() *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Nodes() *MockCoreV1InterfaceNodesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nodes", reflect.TypeOf((*MockCoreV1Interface)(nil).Nodes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nodes", reflect.TypeOf((*MockCoreV1Interface)(nil).Nodes)) + return &MockCoreV1InterfaceNodesCall{Call: call} +} + +// MockCoreV1InterfaceNodesCall wrap *gomock.Call +type MockCoreV1InterfaceNodesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceNodesCall) Return(arg0 v13.NodeInterface) *MockCoreV1InterfaceNodesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceNodesCall) Do(f func() v13.NodeInterface) *MockCoreV1InterfaceNodesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceNodesCall) DoAndReturn(f func() v13.NodeInterface) *MockCoreV1InterfaceNodesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PersistentVolumeClaims mocks base method. @@ -392,9 +896,33 @@ func (m *MockCoreV1Interface) PersistentVolumeClaims(arg0 string) v13.Persistent } // PersistentVolumeClaims indicates an expected call of PersistentVolumeClaims. -func (mr *MockCoreV1InterfaceMockRecorder) PersistentVolumeClaims(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) PersistentVolumeClaims(arg0 any) *MockCoreV1InterfacePersistentVolumeClaimsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersistentVolumeClaims", reflect.TypeOf((*MockCoreV1Interface)(nil).PersistentVolumeClaims), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersistentVolumeClaims", reflect.TypeOf((*MockCoreV1Interface)(nil).PersistentVolumeClaims), arg0) + return &MockCoreV1InterfacePersistentVolumeClaimsCall{Call: call} +} + +// MockCoreV1InterfacePersistentVolumeClaimsCall wrap *gomock.Call +type MockCoreV1InterfacePersistentVolumeClaimsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfacePersistentVolumeClaimsCall) Return(arg0 v13.PersistentVolumeClaimInterface) *MockCoreV1InterfacePersistentVolumeClaimsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfacePersistentVolumeClaimsCall) Do(f func(string) v13.PersistentVolumeClaimInterface) *MockCoreV1InterfacePersistentVolumeClaimsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfacePersistentVolumeClaimsCall) DoAndReturn(f func(string) v13.PersistentVolumeClaimInterface) *MockCoreV1InterfacePersistentVolumeClaimsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PersistentVolumes mocks base method. @@ -406,9 +934,33 @@ func (m *MockCoreV1Interface) PersistentVolumes() v13.PersistentVolumeInterface } // PersistentVolumes indicates an expected call of PersistentVolumes. -func (mr *MockCoreV1InterfaceMockRecorder) PersistentVolumes() *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) PersistentVolumes() *MockCoreV1InterfacePersistentVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersistentVolumes", reflect.TypeOf((*MockCoreV1Interface)(nil).PersistentVolumes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersistentVolumes", reflect.TypeOf((*MockCoreV1Interface)(nil).PersistentVolumes)) + return &MockCoreV1InterfacePersistentVolumesCall{Call: call} +} + +// MockCoreV1InterfacePersistentVolumesCall wrap *gomock.Call +type MockCoreV1InterfacePersistentVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfacePersistentVolumesCall) Return(arg0 v13.PersistentVolumeInterface) *MockCoreV1InterfacePersistentVolumesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfacePersistentVolumesCall) Do(f func() v13.PersistentVolumeInterface) *MockCoreV1InterfacePersistentVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfacePersistentVolumesCall) DoAndReturn(f func() v13.PersistentVolumeInterface) *MockCoreV1InterfacePersistentVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PodTemplates mocks base method. @@ -420,9 +972,33 @@ func (m *MockCoreV1Interface) PodTemplates(arg0 string) v13.PodTemplateInterface } // PodTemplates indicates an expected call of PodTemplates. -func (mr *MockCoreV1InterfaceMockRecorder) PodTemplates(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) PodTemplates(arg0 any) *MockCoreV1InterfacePodTemplatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PodTemplates", reflect.TypeOf((*MockCoreV1Interface)(nil).PodTemplates), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PodTemplates", reflect.TypeOf((*MockCoreV1Interface)(nil).PodTemplates), arg0) + return &MockCoreV1InterfacePodTemplatesCall{Call: call} +} + +// MockCoreV1InterfacePodTemplatesCall wrap *gomock.Call +type MockCoreV1InterfacePodTemplatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfacePodTemplatesCall) Return(arg0 v13.PodTemplateInterface) *MockCoreV1InterfacePodTemplatesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfacePodTemplatesCall) Do(f func(string) v13.PodTemplateInterface) *MockCoreV1InterfacePodTemplatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfacePodTemplatesCall) DoAndReturn(f func(string) v13.PodTemplateInterface) *MockCoreV1InterfacePodTemplatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pods mocks base method. @@ -434,9 +1010,33 @@ func (m *MockCoreV1Interface) Pods(arg0 string) v13.PodInterface { } // Pods indicates an expected call of Pods. -func (mr *MockCoreV1InterfaceMockRecorder) Pods(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Pods(arg0 any) *MockCoreV1InterfacePodsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pods", reflect.TypeOf((*MockCoreV1Interface)(nil).Pods), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pods", reflect.TypeOf((*MockCoreV1Interface)(nil).Pods), arg0) + return &MockCoreV1InterfacePodsCall{Call: call} +} + +// MockCoreV1InterfacePodsCall wrap *gomock.Call +type MockCoreV1InterfacePodsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfacePodsCall) Return(arg0 v13.PodInterface) *MockCoreV1InterfacePodsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfacePodsCall) Do(f func(string) v13.PodInterface) *MockCoreV1InterfacePodsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfacePodsCall) DoAndReturn(f func(string) v13.PodInterface) *MockCoreV1InterfacePodsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -448,9 +1048,33 @@ func (m *MockCoreV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockCoreV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) RESTClient() *MockCoreV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockCoreV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockCoreV1Interface)(nil).RESTClient)) + return &MockCoreV1InterfaceRESTClientCall{Call: call} +} + +// MockCoreV1InterfaceRESTClientCall wrap *gomock.Call +type MockCoreV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockCoreV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockCoreV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockCoreV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplicationControllers mocks base method. @@ -462,9 +1086,33 @@ func (m *MockCoreV1Interface) ReplicationControllers(arg0 string) v13.Replicatio } // ReplicationControllers indicates an expected call of ReplicationControllers. -func (mr *MockCoreV1InterfaceMockRecorder) ReplicationControllers(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) ReplicationControllers(arg0 any) *MockCoreV1InterfaceReplicationControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicationControllers", reflect.TypeOf((*MockCoreV1Interface)(nil).ReplicationControllers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicationControllers", reflect.TypeOf((*MockCoreV1Interface)(nil).ReplicationControllers), arg0) + return &MockCoreV1InterfaceReplicationControllersCall{Call: call} +} + +// MockCoreV1InterfaceReplicationControllersCall wrap *gomock.Call +type MockCoreV1InterfaceReplicationControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceReplicationControllersCall) Return(arg0 v13.ReplicationControllerInterface) *MockCoreV1InterfaceReplicationControllersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceReplicationControllersCall) Do(f func(string) v13.ReplicationControllerInterface) *MockCoreV1InterfaceReplicationControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceReplicationControllersCall) DoAndReturn(f func(string) v13.ReplicationControllerInterface) *MockCoreV1InterfaceReplicationControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResourceQuotas mocks base method. @@ -476,9 +1124,33 @@ func (m *MockCoreV1Interface) ResourceQuotas(arg0 string) v13.ResourceQuotaInter } // ResourceQuotas indicates an expected call of ResourceQuotas. -func (mr *MockCoreV1InterfaceMockRecorder) ResourceQuotas(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) ResourceQuotas(arg0 any) *MockCoreV1InterfaceResourceQuotasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceQuotas", reflect.TypeOf((*MockCoreV1Interface)(nil).ResourceQuotas), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceQuotas", reflect.TypeOf((*MockCoreV1Interface)(nil).ResourceQuotas), arg0) + return &MockCoreV1InterfaceResourceQuotasCall{Call: call} +} + +// MockCoreV1InterfaceResourceQuotasCall wrap *gomock.Call +type MockCoreV1InterfaceResourceQuotasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceResourceQuotasCall) Return(arg0 v13.ResourceQuotaInterface) *MockCoreV1InterfaceResourceQuotasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceResourceQuotasCall) Do(f func(string) v13.ResourceQuotaInterface) *MockCoreV1InterfaceResourceQuotasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceResourceQuotasCall) DoAndReturn(f func(string) v13.ResourceQuotaInterface) *MockCoreV1InterfaceResourceQuotasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secrets mocks base method. @@ -490,9 +1162,33 @@ func (m *MockCoreV1Interface) Secrets(arg0 string) v13.SecretInterface { } // Secrets indicates an expected call of Secrets. -func (mr *MockCoreV1InterfaceMockRecorder) Secrets(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Secrets(arg0 any) *MockCoreV1InterfaceSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockCoreV1Interface)(nil).Secrets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockCoreV1Interface)(nil).Secrets), arg0) + return &MockCoreV1InterfaceSecretsCall{Call: call} +} + +// MockCoreV1InterfaceSecretsCall wrap *gomock.Call +type MockCoreV1InterfaceSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceSecretsCall) Return(arg0 v13.SecretInterface) *MockCoreV1InterfaceSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceSecretsCall) Do(f func(string) v13.SecretInterface) *MockCoreV1InterfaceSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceSecretsCall) DoAndReturn(f func(string) v13.SecretInterface) *MockCoreV1InterfaceSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServiceAccounts mocks base method. @@ -504,9 +1200,33 @@ func (m *MockCoreV1Interface) ServiceAccounts(arg0 string) v13.ServiceAccountInt } // ServiceAccounts indicates an expected call of ServiceAccounts. -func (mr *MockCoreV1InterfaceMockRecorder) ServiceAccounts(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) ServiceAccounts(arg0 any) *MockCoreV1InterfaceServiceAccountsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceAccounts", reflect.TypeOf((*MockCoreV1Interface)(nil).ServiceAccounts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceAccounts", reflect.TypeOf((*MockCoreV1Interface)(nil).ServiceAccounts), arg0) + return &MockCoreV1InterfaceServiceAccountsCall{Call: call} +} + +// MockCoreV1InterfaceServiceAccountsCall wrap *gomock.Call +type MockCoreV1InterfaceServiceAccountsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceServiceAccountsCall) Return(arg0 v13.ServiceAccountInterface) *MockCoreV1InterfaceServiceAccountsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceServiceAccountsCall) Do(f func(string) v13.ServiceAccountInterface) *MockCoreV1InterfaceServiceAccountsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceServiceAccountsCall) DoAndReturn(f func(string) v13.ServiceAccountInterface) *MockCoreV1InterfaceServiceAccountsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Services mocks base method. @@ -518,9 +1238,33 @@ func (m *MockCoreV1Interface) Services(arg0 string) v13.ServiceInterface { } // Services indicates an expected call of Services. -func (mr *MockCoreV1InterfaceMockRecorder) Services(arg0 any) *gomock.Call { +func (mr *MockCoreV1InterfaceMockRecorder) Services(arg0 any) *MockCoreV1InterfaceServicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Services", reflect.TypeOf((*MockCoreV1Interface)(nil).Services), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Services", reflect.TypeOf((*MockCoreV1Interface)(nil).Services), arg0) + return &MockCoreV1InterfaceServicesCall{Call: call} +} + +// MockCoreV1InterfaceServicesCall wrap *gomock.Call +type MockCoreV1InterfaceServicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoreV1InterfaceServicesCall) Return(arg0 v13.ServiceInterface) *MockCoreV1InterfaceServicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoreV1InterfaceServicesCall) Do(f func(string) v13.ServiceInterface) *MockCoreV1InterfaceServicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoreV1InterfaceServicesCall) DoAndReturn(f func(string) v13.ServiceInterface) *MockCoreV1InterfaceServicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNamespaceInterface is a mock of NamespaceInterface interface. @@ -556,9 +1300,33 @@ func (m *MockNamespaceInterface) Apply(arg0 context.Context, arg1 *v12.Namespace } // Apply indicates an expected call of Apply. -func (mr *MockNamespaceInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockNamespaceInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNamespaceInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNamespaceInterface)(nil).Apply), arg0, arg1, arg2) + return &MockNamespaceInterfaceApplyCall{Call: call} +} + +// MockNamespaceInterfaceApplyCall wrap *gomock.Call +type MockNamespaceInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceApplyCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceApplyCall) Do(f func(context.Context, *v12.NamespaceApplyConfiguration, v11.ApplyOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.NamespaceApplyConfiguration, v11.ApplyOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -571,9 +1339,33 @@ func (m *MockNamespaceInterface) ApplyStatus(arg0 context.Context, arg1 *v12.Nam } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockNamespaceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockNamespaceInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNamespaceInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNamespaceInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockNamespaceInterfaceApplyStatusCall{Call: call} +} + +// MockNamespaceInterfaceApplyStatusCall wrap *gomock.Call +type MockNamespaceInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceApplyStatusCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceApplyStatusCall) Do(f func(context.Context, *v12.NamespaceApplyConfiguration, v11.ApplyOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.NamespaceApplyConfiguration, v11.ApplyOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -586,9 +1378,33 @@ func (m *MockNamespaceInterface) Create(arg0 context.Context, arg1 *v1.Namespace } // Create indicates an expected call of Create. -func (mr *MockNamespaceInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockNamespaceInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNamespaceInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNamespaceInterface)(nil).Create), arg0, arg1, arg2) + return &MockNamespaceInterfaceCreateCall{Call: call} +} + +// MockNamespaceInterfaceCreateCall wrap *gomock.Call +type MockNamespaceInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceCreateCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceCreateCall) Do(f func(context.Context, *v1.Namespace, v11.CreateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Namespace, v11.CreateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -600,9 +1416,33 @@ func (m *MockNamespaceInterface) Delete(arg0 context.Context, arg1 string, arg2 } // Delete indicates an expected call of Delete. -func (mr *MockNamespaceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockNamespaceInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNamespaceInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNamespaceInterface)(nil).Delete), arg0, arg1, arg2) + return &MockNamespaceInterfaceDeleteCall{Call: call} +} + +// MockNamespaceInterfaceDeleteCall wrap *gomock.Call +type MockNamespaceInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceDeleteCall) Return(arg0 error) *MockNamespaceInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockNamespaceInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockNamespaceInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Finalize mocks base method. @@ -615,9 +1455,33 @@ func (m *MockNamespaceInterface) Finalize(arg0 context.Context, arg1 *v1.Namespa } // Finalize indicates an expected call of Finalize. -func (mr *MockNamespaceInterfaceMockRecorder) Finalize(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Finalize(arg0, arg1, arg2 any) *MockNamespaceInterfaceFinalizeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockNamespaceInterface)(nil).Finalize), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockNamespaceInterface)(nil).Finalize), arg0, arg1, arg2) + return &MockNamespaceInterfaceFinalizeCall{Call: call} +} + +// MockNamespaceInterfaceFinalizeCall wrap *gomock.Call +type MockNamespaceInterfaceFinalizeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceFinalizeCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceFinalizeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceFinalizeCall) Do(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceFinalizeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceFinalizeCall) DoAndReturn(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceFinalizeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -630,9 +1494,33 @@ func (m *MockNamespaceInterface) Get(arg0 context.Context, arg1 string, arg2 v11 } // Get indicates an expected call of Get. -func (mr *MockNamespaceInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockNamespaceInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNamespaceInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNamespaceInterface)(nil).Get), arg0, arg1, arg2) + return &MockNamespaceInterfaceGetCall{Call: call} +} + +// MockNamespaceInterfaceGetCall wrap *gomock.Call +type MockNamespaceInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceGetCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -645,9 +1533,33 @@ func (m *MockNamespaceInterface) List(arg0 context.Context, arg1 v11.ListOptions } // List indicates an expected call of List. -func (mr *MockNamespaceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) List(arg0, arg1 any) *MockNamespaceInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNamespaceInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNamespaceInterface)(nil).List), arg0, arg1) + return &MockNamespaceInterfaceListCall{Call: call} +} + +// MockNamespaceInterfaceListCall wrap *gomock.Call +type MockNamespaceInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceListCall) Return(arg0 *v1.NamespaceList, arg1 error) *MockNamespaceInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.NamespaceList, error)) *MockNamespaceInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.NamespaceList, error)) *MockNamespaceInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -664,10 +1576,34 @@ func (m *MockNamespaceInterface) Patch(arg0 context.Context, arg1 string, arg2 t } // Patch indicates an expected call of Patch. -func (mr *MockNamespaceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockNamespaceInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNamespaceInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNamespaceInterface)(nil).Patch), varargs...) + return &MockNamespaceInterfacePatchCall{Call: call} +} + +// MockNamespaceInterfacePatchCall wrap *gomock.Call +type MockNamespaceInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfacePatchCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Namespace, error)) *MockNamespaceInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Namespace, error)) *MockNamespaceInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -680,9 +1616,33 @@ func (m *MockNamespaceInterface) Update(arg0 context.Context, arg1 *v1.Namespace } // Update indicates an expected call of Update. -func (mr *MockNamespaceInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockNamespaceInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNamespaceInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNamespaceInterface)(nil).Update), arg0, arg1, arg2) + return &MockNamespaceInterfaceUpdateCall{Call: call} +} + +// MockNamespaceInterfaceUpdateCall wrap *gomock.Call +type MockNamespaceInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceUpdateCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceUpdateCall) Do(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -695,9 +1655,33 @@ func (m *MockNamespaceInterface) UpdateStatus(arg0 context.Context, arg1 *v1.Nam } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockNamespaceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockNamespaceInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNamespaceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNamespaceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockNamespaceInterfaceUpdateStatusCall{Call: call} +} + +// MockNamespaceInterfaceUpdateStatusCall wrap *gomock.Call +type MockNamespaceInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceUpdateStatusCall) Return(arg0 *v1.Namespace, arg1 error) *MockNamespaceInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Namespace, v11.UpdateOptions) (*v1.Namespace, error)) *MockNamespaceInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -710,9 +1694,33 @@ func (m *MockNamespaceInterface) Watch(arg0 context.Context, arg1 v11.ListOption } // Watch indicates an expected call of Watch. -func (mr *MockNamespaceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockNamespaceInterfaceMockRecorder) Watch(arg0, arg1 any) *MockNamespaceInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNamespaceInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNamespaceInterface)(nil).Watch), arg0, arg1) + return &MockNamespaceInterfaceWatchCall{Call: call} +} + +// MockNamespaceInterfaceWatchCall wrap *gomock.Call +type MockNamespaceInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockNamespaceInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockNamespaceInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockNamespaceInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPodInterface is a mock of PodInterface interface. @@ -748,9 +1756,33 @@ func (m *MockPodInterface) Apply(arg0 context.Context, arg1 *v12.PodApplyConfigu } // Apply indicates an expected call of Apply. -func (mr *MockPodInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockPodInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPodInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPodInterface)(nil).Apply), arg0, arg1, arg2) + return &MockPodInterfaceApplyCall{Call: call} +} + +// MockPodInterfaceApplyCall wrap *gomock.Call +type MockPodInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceApplyCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceApplyCall) Do(f func(context.Context, *v12.PodApplyConfiguration, v11.ApplyOptions) (*v1.Pod, error)) *MockPodInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.PodApplyConfiguration, v11.ApplyOptions) (*v1.Pod, error)) *MockPodInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -763,9 +1795,33 @@ func (m *MockPodInterface) ApplyStatus(arg0 context.Context, arg1 *v12.PodApplyC } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockPodInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockPodInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPodInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPodInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockPodInterfaceApplyStatusCall{Call: call} +} + +// MockPodInterfaceApplyStatusCall wrap *gomock.Call +type MockPodInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceApplyStatusCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceApplyStatusCall) Do(f func(context.Context, *v12.PodApplyConfiguration, v11.ApplyOptions) (*v1.Pod, error)) *MockPodInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.PodApplyConfiguration, v11.ApplyOptions) (*v1.Pod, error)) *MockPodInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bind mocks base method. @@ -777,9 +1833,33 @@ func (m *MockPodInterface) Bind(arg0 context.Context, arg1 *v1.Binding, arg2 v11 } // Bind indicates an expected call of Bind. -func (mr *MockPodInterfaceMockRecorder) Bind(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Bind(arg0, arg1, arg2 any) *MockPodInterfaceBindCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockPodInterface)(nil).Bind), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockPodInterface)(nil).Bind), arg0, arg1, arg2) + return &MockPodInterfaceBindCall{Call: call} +} + +// MockPodInterfaceBindCall wrap *gomock.Call +type MockPodInterfaceBindCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceBindCall) Return(arg0 error) *MockPodInterfaceBindCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceBindCall) Do(f func(context.Context, *v1.Binding, v11.CreateOptions) error) *MockPodInterfaceBindCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceBindCall) DoAndReturn(f func(context.Context, *v1.Binding, v11.CreateOptions) error) *MockPodInterfaceBindCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -792,9 +1872,33 @@ func (m *MockPodInterface) Create(arg0 context.Context, arg1 *v1.Pod, arg2 v11.C } // Create indicates an expected call of Create. -func (mr *MockPodInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockPodInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPodInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPodInterface)(nil).Create), arg0, arg1, arg2) + return &MockPodInterfaceCreateCall{Call: call} +} + +// MockPodInterfaceCreateCall wrap *gomock.Call +type MockPodInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceCreateCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceCreateCall) Do(f func(context.Context, *v1.Pod, v11.CreateOptions) (*v1.Pod, error)) *MockPodInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Pod, v11.CreateOptions) (*v1.Pod, error)) *MockPodInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -806,9 +1910,33 @@ func (m *MockPodInterface) Delete(arg0 context.Context, arg1 string, arg2 v11.De } // Delete indicates an expected call of Delete. -func (mr *MockPodInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockPodInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPodInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPodInterface)(nil).Delete), arg0, arg1, arg2) + return &MockPodInterfaceDeleteCall{Call: call} +} + +// MockPodInterfaceDeleteCall wrap *gomock.Call +type MockPodInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceDeleteCall) Return(arg0 error) *MockPodInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockPodInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockPodInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -820,9 +1948,33 @@ func (m *MockPodInterface) DeleteCollection(arg0 context.Context, arg1 v11.Delet } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockPodInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockPodInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPodInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPodInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockPodInterfaceDeleteCollectionCall{Call: call} +} + +// MockPodInterfaceDeleteCollectionCall wrap *gomock.Call +type MockPodInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceDeleteCollectionCall) Return(arg0 error) *MockPodInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPodInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPodInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Evict mocks base method. @@ -834,9 +1986,33 @@ func (m *MockPodInterface) Evict(arg0 context.Context, arg1 *v1beta1.Eviction) e } // Evict indicates an expected call of Evict. -func (mr *MockPodInterfaceMockRecorder) Evict(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Evict(arg0, arg1 any) *MockPodInterfaceEvictCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Evict", reflect.TypeOf((*MockPodInterface)(nil).Evict), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Evict", reflect.TypeOf((*MockPodInterface)(nil).Evict), arg0, arg1) + return &MockPodInterfaceEvictCall{Call: call} +} + +// MockPodInterfaceEvictCall wrap *gomock.Call +type MockPodInterfaceEvictCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceEvictCall) Return(arg0 error) *MockPodInterfaceEvictCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceEvictCall) Do(f func(context.Context, *v1beta1.Eviction) error) *MockPodInterfaceEvictCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceEvictCall) DoAndReturn(f func(context.Context, *v1beta1.Eviction) error) *MockPodInterfaceEvictCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EvictV1 mocks base method. @@ -848,9 +2024,33 @@ func (m *MockPodInterface) EvictV1(arg0 context.Context, arg1 *v10.Eviction) err } // EvictV1 indicates an expected call of EvictV1. -func (mr *MockPodInterfaceMockRecorder) EvictV1(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) EvictV1(arg0, arg1 any) *MockPodInterfaceEvictV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvictV1", reflect.TypeOf((*MockPodInterface)(nil).EvictV1), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvictV1", reflect.TypeOf((*MockPodInterface)(nil).EvictV1), arg0, arg1) + return &MockPodInterfaceEvictV1Call{Call: call} +} + +// MockPodInterfaceEvictV1Call wrap *gomock.Call +type MockPodInterfaceEvictV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceEvictV1Call) Return(arg0 error) *MockPodInterfaceEvictV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceEvictV1Call) Do(f func(context.Context, *v10.Eviction) error) *MockPodInterfaceEvictV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceEvictV1Call) DoAndReturn(f func(context.Context, *v10.Eviction) error) *MockPodInterfaceEvictV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // EvictV1beta1 mocks base method. @@ -862,9 +2062,33 @@ func (m *MockPodInterface) EvictV1beta1(arg0 context.Context, arg1 *v1beta1.Evic } // EvictV1beta1 indicates an expected call of EvictV1beta1. -func (mr *MockPodInterfaceMockRecorder) EvictV1beta1(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) EvictV1beta1(arg0, arg1 any) *MockPodInterfaceEvictV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvictV1beta1", reflect.TypeOf((*MockPodInterface)(nil).EvictV1beta1), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvictV1beta1", reflect.TypeOf((*MockPodInterface)(nil).EvictV1beta1), arg0, arg1) + return &MockPodInterfaceEvictV1beta1Call{Call: call} +} + +// MockPodInterfaceEvictV1beta1Call wrap *gomock.Call +type MockPodInterfaceEvictV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceEvictV1beta1Call) Return(arg0 error) *MockPodInterfaceEvictV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceEvictV1beta1Call) Do(f func(context.Context, *v1beta1.Eviction) error) *MockPodInterfaceEvictV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceEvictV1beta1Call) DoAndReturn(f func(context.Context, *v1beta1.Eviction) error) *MockPodInterfaceEvictV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -877,9 +2101,33 @@ func (m *MockPodInterface) Get(arg0 context.Context, arg1 string, arg2 v11.GetOp } // Get indicates an expected call of Get. -func (mr *MockPodInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockPodInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPodInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPodInterface)(nil).Get), arg0, arg1, arg2) + return &MockPodInterfaceGetCall{Call: call} +} + +// MockPodInterfaceGetCall wrap *gomock.Call +type MockPodInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceGetCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Pod, error)) *MockPodInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Pod, error)) *MockPodInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetLogs mocks base method. @@ -891,9 +2139,33 @@ func (m *MockPodInterface) GetLogs(arg0 string, arg1 *v1.PodLogOptions) *rest.Re } // GetLogs indicates an expected call of GetLogs. -func (mr *MockPodInterfaceMockRecorder) GetLogs(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) GetLogs(arg0, arg1 any) *MockPodInterfaceGetLogsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogs", reflect.TypeOf((*MockPodInterface)(nil).GetLogs), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogs", reflect.TypeOf((*MockPodInterface)(nil).GetLogs), arg0, arg1) + return &MockPodInterfaceGetLogsCall{Call: call} +} + +// MockPodInterfaceGetLogsCall wrap *gomock.Call +type MockPodInterfaceGetLogsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceGetLogsCall) Return(arg0 *rest.Request) *MockPodInterfaceGetLogsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceGetLogsCall) Do(f func(string, *v1.PodLogOptions) *rest.Request) *MockPodInterfaceGetLogsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceGetLogsCall) DoAndReturn(f func(string, *v1.PodLogOptions) *rest.Request) *MockPodInterfaceGetLogsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -906,9 +2178,33 @@ func (m *MockPodInterface) List(arg0 context.Context, arg1 v11.ListOptions) (*v1 } // List indicates an expected call of List. -func (mr *MockPodInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) List(arg0, arg1 any) *MockPodInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPodInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPodInterface)(nil).List), arg0, arg1) + return &MockPodInterfaceListCall{Call: call} +} + +// MockPodInterfaceListCall wrap *gomock.Call +type MockPodInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceListCall) Return(arg0 *v1.PodList, arg1 error) *MockPodInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.PodList, error)) *MockPodInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.PodList, error)) *MockPodInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -925,10 +2221,34 @@ func (m *MockPodInterface) Patch(arg0 context.Context, arg1 string, arg2 types.P } // Patch indicates an expected call of Patch. -func (mr *MockPodInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockPodInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPodInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPodInterface)(nil).Patch), varargs...) + return &MockPodInterfacePatchCall{Call: call} +} + +// MockPodInterfacePatchCall wrap *gomock.Call +type MockPodInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfacePatchCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Pod, error)) *MockPodInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Pod, error)) *MockPodInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProxyGet mocks base method. @@ -940,9 +2260,33 @@ func (m *MockPodInterface) ProxyGet(arg0, arg1, arg2, arg3 string, arg4 map[stri } // ProxyGet indicates an expected call of ProxyGet. -func (mr *MockPodInterfaceMockRecorder) ProxyGet(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) ProxyGet(arg0, arg1, arg2, arg3, arg4 any) *MockPodInterfaceProxyGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyGet", reflect.TypeOf((*MockPodInterface)(nil).ProxyGet), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyGet", reflect.TypeOf((*MockPodInterface)(nil).ProxyGet), arg0, arg1, arg2, arg3, arg4) + return &MockPodInterfaceProxyGetCall{Call: call} +} + +// MockPodInterfaceProxyGetCall wrap *gomock.Call +type MockPodInterfaceProxyGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceProxyGetCall) Return(arg0 rest.ResponseWrapper) *MockPodInterfaceProxyGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceProxyGetCall) Do(f func(string, string, string, string, map[string]string) rest.ResponseWrapper) *MockPodInterfaceProxyGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceProxyGetCall) DoAndReturn(f func(string, string, string, string, map[string]string) rest.ResponseWrapper) *MockPodInterfaceProxyGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -955,9 +2299,33 @@ func (m *MockPodInterface) Update(arg0 context.Context, arg1 *v1.Pod, arg2 v11.U } // Update indicates an expected call of Update. -func (mr *MockPodInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockPodInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPodInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPodInterface)(nil).Update), arg0, arg1, arg2) + return &MockPodInterfaceUpdateCall{Call: call} +} + +// MockPodInterfaceUpdateCall wrap *gomock.Call +type MockPodInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceUpdateCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceUpdateCall) Do(f func(context.Context, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateEphemeralContainers mocks base method. @@ -970,9 +2338,33 @@ func (m *MockPodInterface) UpdateEphemeralContainers(arg0 context.Context, arg1 } // UpdateEphemeralContainers indicates an expected call of UpdateEphemeralContainers. -func (mr *MockPodInterfaceMockRecorder) UpdateEphemeralContainers(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) UpdateEphemeralContainers(arg0, arg1, arg2, arg3 any) *MockPodInterfaceUpdateEphemeralContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEphemeralContainers", reflect.TypeOf((*MockPodInterface)(nil).UpdateEphemeralContainers), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEphemeralContainers", reflect.TypeOf((*MockPodInterface)(nil).UpdateEphemeralContainers), arg0, arg1, arg2, arg3) + return &MockPodInterfaceUpdateEphemeralContainersCall{Call: call} +} + +// MockPodInterfaceUpdateEphemeralContainersCall wrap *gomock.Call +type MockPodInterfaceUpdateEphemeralContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceUpdateEphemeralContainersCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceUpdateEphemeralContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceUpdateEphemeralContainersCall) Do(f func(context.Context, string, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateEphemeralContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceUpdateEphemeralContainersCall) DoAndReturn(f func(context.Context, string, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateEphemeralContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -985,9 +2377,33 @@ func (m *MockPodInterface) UpdateStatus(arg0 context.Context, arg1 *v1.Pod, arg2 } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockPodInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockPodInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPodInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPodInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockPodInterfaceUpdateStatusCall{Call: call} +} + +// MockPodInterfaceUpdateStatusCall wrap *gomock.Call +type MockPodInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceUpdateStatusCall) Return(arg0 *v1.Pod, arg1 error) *MockPodInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Pod, v11.UpdateOptions) (*v1.Pod, error)) *MockPodInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1000,9 +2416,33 @@ func (m *MockPodInterface) Watch(arg0 context.Context, arg1 v11.ListOptions) (wa } // Watch indicates an expected call of Watch. -func (mr *MockPodInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockPodInterfaceMockRecorder) Watch(arg0, arg1 any) *MockPodInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPodInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPodInterface)(nil).Watch), arg0, arg1) + return &MockPodInterfaceWatchCall{Call: call} +} + +// MockPodInterfaceWatchCall wrap *gomock.Call +type MockPodInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPodInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockPodInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPodInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPodInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPodInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPodInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceInterface is a mock of ServiceInterface interface. @@ -1038,9 +2478,33 @@ func (m *MockServiceInterface) Apply(arg0 context.Context, arg1 *v12.ServiceAppl } // Apply indicates an expected call of Apply. -func (mr *MockServiceInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockServiceInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockServiceInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockServiceInterface)(nil).Apply), arg0, arg1, arg2) + return &MockServiceInterfaceApplyCall{Call: call} +} + +// MockServiceInterfaceApplyCall wrap *gomock.Call +type MockServiceInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceApplyCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceApplyCall) Do(f func(context.Context, *v12.ServiceApplyConfiguration, v11.ApplyOptions) (*v1.Service, error)) *MockServiceInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.ServiceApplyConfiguration, v11.ApplyOptions) (*v1.Service, error)) *MockServiceInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -1053,9 +2517,33 @@ func (m *MockServiceInterface) ApplyStatus(arg0 context.Context, arg1 *v12.Servi } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockServiceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockServiceInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockServiceInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockServiceInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockServiceInterfaceApplyStatusCall{Call: call} +} + +// MockServiceInterfaceApplyStatusCall wrap *gomock.Call +type MockServiceInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceApplyStatusCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceApplyStatusCall) Do(f func(context.Context, *v12.ServiceApplyConfiguration, v11.ApplyOptions) (*v1.Service, error)) *MockServiceInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.ServiceApplyConfiguration, v11.ApplyOptions) (*v1.Service, error)) *MockServiceInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1068,9 +2556,33 @@ func (m *MockServiceInterface) Create(arg0 context.Context, arg1 *v1.Service, ar } // Create indicates an expected call of Create. -func (mr *MockServiceInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockServiceInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServiceInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServiceInterface)(nil).Create), arg0, arg1, arg2) + return &MockServiceInterfaceCreateCall{Call: call} +} + +// MockServiceInterfaceCreateCall wrap *gomock.Call +type MockServiceInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceCreateCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceCreateCall) Do(f func(context.Context, *v1.Service, v11.CreateOptions) (*v1.Service, error)) *MockServiceInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Service, v11.CreateOptions) (*v1.Service, error)) *MockServiceInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1082,9 +2594,33 @@ func (m *MockServiceInterface) Delete(arg0 context.Context, arg1 string, arg2 v1 } // Delete indicates an expected call of Delete. -func (mr *MockServiceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockServiceInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServiceInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServiceInterface)(nil).Delete), arg0, arg1, arg2) + return &MockServiceInterfaceDeleteCall{Call: call} +} + +// MockServiceInterfaceDeleteCall wrap *gomock.Call +type MockServiceInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceDeleteCall) Return(arg0 error) *MockServiceInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockServiceInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockServiceInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -1097,9 +2633,33 @@ func (m *MockServiceInterface) Get(arg0 context.Context, arg1 string, arg2 v11.G } // Get indicates an expected call of Get. -func (mr *MockServiceInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockServiceInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceInterface)(nil).Get), arg0, arg1, arg2) + return &MockServiceInterfaceGetCall{Call: call} +} + +// MockServiceInterfaceGetCall wrap *gomock.Call +type MockServiceInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceGetCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Service, error)) *MockServiceInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Service, error)) *MockServiceInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -1112,9 +2672,33 @@ func (m *MockServiceInterface) List(arg0 context.Context, arg1 v11.ListOptions) } // List indicates an expected call of List. -func (mr *MockServiceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) List(arg0, arg1 any) *MockServiceInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceInterface)(nil).List), arg0, arg1) + return &MockServiceInterfaceListCall{Call: call} +} + +// MockServiceInterfaceListCall wrap *gomock.Call +type MockServiceInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceListCall) Return(arg0 *v1.ServiceList, arg1 error) *MockServiceInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.ServiceList, error)) *MockServiceInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.ServiceList, error)) *MockServiceInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -1131,10 +2715,34 @@ func (m *MockServiceInterface) Patch(arg0 context.Context, arg1 string, arg2 typ } // Patch indicates an expected call of Patch. -func (mr *MockServiceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockServiceInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockServiceInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockServiceInterface)(nil).Patch), varargs...) + return &MockServiceInterfacePatchCall{Call: call} +} + +// MockServiceInterfacePatchCall wrap *gomock.Call +type MockServiceInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfacePatchCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Service, error)) *MockServiceInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Service, error)) *MockServiceInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProxyGet mocks base method. @@ -1146,9 +2754,33 @@ func (m *MockServiceInterface) ProxyGet(arg0, arg1, arg2, arg3 string, arg4 map[ } // ProxyGet indicates an expected call of ProxyGet. -func (mr *MockServiceInterfaceMockRecorder) ProxyGet(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) ProxyGet(arg0, arg1, arg2, arg3, arg4 any) *MockServiceInterfaceProxyGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyGet", reflect.TypeOf((*MockServiceInterface)(nil).ProxyGet), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyGet", reflect.TypeOf((*MockServiceInterface)(nil).ProxyGet), arg0, arg1, arg2, arg3, arg4) + return &MockServiceInterfaceProxyGetCall{Call: call} +} + +// MockServiceInterfaceProxyGetCall wrap *gomock.Call +type MockServiceInterfaceProxyGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceProxyGetCall) Return(arg0 rest.ResponseWrapper) *MockServiceInterfaceProxyGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceProxyGetCall) Do(f func(string, string, string, string, map[string]string) rest.ResponseWrapper) *MockServiceInterfaceProxyGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceProxyGetCall) DoAndReturn(f func(string, string, string, string, map[string]string) rest.ResponseWrapper) *MockServiceInterfaceProxyGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -1161,9 +2793,33 @@ func (m *MockServiceInterface) Update(arg0 context.Context, arg1 *v1.Service, ar } // Update indicates an expected call of Update. -func (mr *MockServiceInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockServiceInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServiceInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServiceInterface)(nil).Update), arg0, arg1, arg2) + return &MockServiceInterfaceUpdateCall{Call: call} +} + +// MockServiceInterfaceUpdateCall wrap *gomock.Call +type MockServiceInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceUpdateCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceUpdateCall) Do(f func(context.Context, *v1.Service, v11.UpdateOptions) (*v1.Service, error)) *MockServiceInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Service, v11.UpdateOptions) (*v1.Service, error)) *MockServiceInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -1176,9 +2832,33 @@ func (m *MockServiceInterface) UpdateStatus(arg0 context.Context, arg1 *v1.Servi } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockServiceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockServiceInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockServiceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockServiceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockServiceInterfaceUpdateStatusCall{Call: call} +} + +// MockServiceInterfaceUpdateStatusCall wrap *gomock.Call +type MockServiceInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceUpdateStatusCall) Return(arg0 *v1.Service, arg1 error) *MockServiceInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Service, v11.UpdateOptions) (*v1.Service, error)) *MockServiceInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Service, v11.UpdateOptions) (*v1.Service, error)) *MockServiceInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1191,9 +2871,33 @@ func (m *MockServiceInterface) Watch(arg0 context.Context, arg1 v11.ListOptions) } // Watch indicates an expected call of Watch. -func (mr *MockServiceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceInterfaceMockRecorder) Watch(arg0, arg1 any) *MockServiceInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockServiceInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockServiceInterface)(nil).Watch), arg0, arg1) + return &MockServiceInterfaceWatchCall{Call: call} +} + +// MockServiceInterfaceWatchCall wrap *gomock.Call +type MockServiceInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockServiceInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockServiceInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockServiceInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigMapInterface is a mock of ConfigMapInterface interface. @@ -1229,9 +2933,33 @@ func (m *MockConfigMapInterface) Apply(arg0 context.Context, arg1 *v12.ConfigMap } // Apply indicates an expected call of Apply. -func (mr *MockConfigMapInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockConfigMapInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockConfigMapInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockConfigMapInterface)(nil).Apply), arg0, arg1, arg2) + return &MockConfigMapInterfaceApplyCall{Call: call} +} + +// MockConfigMapInterfaceApplyCall wrap *gomock.Call +type MockConfigMapInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceApplyCall) Return(arg0 *v1.ConfigMap, arg1 error) *MockConfigMapInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceApplyCall) Do(f func(context.Context, *v12.ConfigMapApplyConfiguration, v11.ApplyOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.ConfigMapApplyConfiguration, v11.ApplyOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1244,9 +2972,33 @@ func (m *MockConfigMapInterface) Create(arg0 context.Context, arg1 *v1.ConfigMap } // Create indicates an expected call of Create. -func (mr *MockConfigMapInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockConfigMapInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockConfigMapInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockConfigMapInterface)(nil).Create), arg0, arg1, arg2) + return &MockConfigMapInterfaceCreateCall{Call: call} +} + +// MockConfigMapInterfaceCreateCall wrap *gomock.Call +type MockConfigMapInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceCreateCall) Return(arg0 *v1.ConfigMap, arg1 error) *MockConfigMapInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceCreateCall) Do(f func(context.Context, *v1.ConfigMap, v11.CreateOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.ConfigMap, v11.CreateOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1258,9 +3010,33 @@ func (m *MockConfigMapInterface) Delete(arg0 context.Context, arg1 string, arg2 } // Delete indicates an expected call of Delete. -func (mr *MockConfigMapInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockConfigMapInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockConfigMapInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockConfigMapInterface)(nil).Delete), arg0, arg1, arg2) + return &MockConfigMapInterfaceDeleteCall{Call: call} +} + +// MockConfigMapInterfaceDeleteCall wrap *gomock.Call +type MockConfigMapInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceDeleteCall) Return(arg0 error) *MockConfigMapInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockConfigMapInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockConfigMapInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -1272,9 +3048,33 @@ func (m *MockConfigMapInterface) DeleteCollection(arg0 context.Context, arg1 v11 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockConfigMapInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockConfigMapInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockConfigMapInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockConfigMapInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockConfigMapInterfaceDeleteCollectionCall{Call: call} +} + +// MockConfigMapInterfaceDeleteCollectionCall wrap *gomock.Call +type MockConfigMapInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceDeleteCollectionCall) Return(arg0 error) *MockConfigMapInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockConfigMapInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockConfigMapInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -1287,9 +3087,33 @@ func (m *MockConfigMapInterface) Get(arg0 context.Context, arg1 string, arg2 v11 } // Get indicates an expected call of Get. -func (mr *MockConfigMapInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockConfigMapInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockConfigMapInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockConfigMapInterface)(nil).Get), arg0, arg1, arg2) + return &MockConfigMapInterfaceGetCall{Call: call} +} + +// MockConfigMapInterfaceGetCall wrap *gomock.Call +type MockConfigMapInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceGetCall) Return(arg0 *v1.ConfigMap, arg1 error) *MockConfigMapInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -1302,9 +3126,33 @@ func (m *MockConfigMapInterface) List(arg0 context.Context, arg1 v11.ListOptions } // List indicates an expected call of List. -func (mr *MockConfigMapInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) List(arg0, arg1 any) *MockConfigMapInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockConfigMapInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockConfigMapInterface)(nil).List), arg0, arg1) + return &MockConfigMapInterfaceListCall{Call: call} +} + +// MockConfigMapInterfaceListCall wrap *gomock.Call +type MockConfigMapInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceListCall) Return(arg0 *v1.ConfigMapList, arg1 error) *MockConfigMapInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.ConfigMapList, error)) *MockConfigMapInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.ConfigMapList, error)) *MockConfigMapInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -1321,10 +3169,34 @@ func (m *MockConfigMapInterface) Patch(arg0 context.Context, arg1 string, arg2 t } // Patch indicates an expected call of Patch. -func (mr *MockConfigMapInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockConfigMapInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockConfigMapInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockConfigMapInterface)(nil).Patch), varargs...) + return &MockConfigMapInterfacePatchCall{Call: call} +} + +// MockConfigMapInterfacePatchCall wrap *gomock.Call +type MockConfigMapInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfacePatchCall) Return(arg0 *v1.ConfigMap, arg1 error) *MockConfigMapInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.ConfigMap, error)) *MockConfigMapInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.ConfigMap, error)) *MockConfigMapInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -1337,9 +3209,33 @@ func (m *MockConfigMapInterface) Update(arg0 context.Context, arg1 *v1.ConfigMap } // Update indicates an expected call of Update. -func (mr *MockConfigMapInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockConfigMapInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockConfigMapInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockConfigMapInterface)(nil).Update), arg0, arg1, arg2) + return &MockConfigMapInterfaceUpdateCall{Call: call} +} + +// MockConfigMapInterfaceUpdateCall wrap *gomock.Call +type MockConfigMapInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceUpdateCall) Return(arg0 *v1.ConfigMap, arg1 error) *MockConfigMapInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceUpdateCall) Do(f func(context.Context, *v1.ConfigMap, v11.UpdateOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.ConfigMap, v11.UpdateOptions) (*v1.ConfigMap, error)) *MockConfigMapInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1352,9 +3248,33 @@ func (m *MockConfigMapInterface) Watch(arg0 context.Context, arg1 v11.ListOption } // Watch indicates an expected call of Watch. -func (mr *MockConfigMapInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigMapInterfaceMockRecorder) Watch(arg0, arg1 any) *MockConfigMapInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockConfigMapInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockConfigMapInterface)(nil).Watch), arg0, arg1) + return &MockConfigMapInterfaceWatchCall{Call: call} +} + +// MockConfigMapInterfaceWatchCall wrap *gomock.Call +type MockConfigMapInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMapInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockConfigMapInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMapInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockConfigMapInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMapInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockConfigMapInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPersistentVolumeInterface is a mock of PersistentVolumeInterface interface. @@ -1390,9 +3310,33 @@ func (m *MockPersistentVolumeInterface) Apply(arg0 context.Context, arg1 *v12.Pe } // Apply indicates an expected call of Apply. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Apply), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceApplyCall{Call: call} +} + +// MockPersistentVolumeInterfaceApplyCall wrap *gomock.Call +type MockPersistentVolumeInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceApplyCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceApplyCall) Do(f func(context.Context, *v12.PersistentVolumeApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.PersistentVolumeApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -1405,9 +3349,33 @@ func (m *MockPersistentVolumeInterface) ApplyStatus(arg0 context.Context, arg1 * } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockPersistentVolumeInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceApplyStatusCall{Call: call} +} + +// MockPersistentVolumeInterfaceApplyStatusCall wrap *gomock.Call +type MockPersistentVolumeInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceApplyStatusCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceApplyStatusCall) Do(f func(context.Context, *v12.PersistentVolumeApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.PersistentVolumeApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1420,9 +3388,33 @@ func (m *MockPersistentVolumeInterface) Create(arg0 context.Context, arg1 *v1.Pe } // Create indicates an expected call of Create. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Create), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceCreateCall{Call: call} +} + +// MockPersistentVolumeInterfaceCreateCall wrap *gomock.Call +type MockPersistentVolumeInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceCreateCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceCreateCall) Do(f func(context.Context, *v1.PersistentVolume, v11.CreateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.PersistentVolume, v11.CreateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1434,9 +3426,33 @@ func (m *MockPersistentVolumeInterface) Delete(arg0 context.Context, arg1 string } // Delete indicates an expected call of Delete. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Delete), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceDeleteCall{Call: call} +} + +// MockPersistentVolumeInterfaceDeleteCall wrap *gomock.Call +type MockPersistentVolumeInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceDeleteCall) Return(arg0 error) *MockPersistentVolumeInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockPersistentVolumeInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockPersistentVolumeInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -1448,9 +3464,33 @@ func (m *MockPersistentVolumeInterface) DeleteCollection(arg0 context.Context, a } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockPersistentVolumeInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceDeleteCollectionCall{Call: call} +} + +// MockPersistentVolumeInterfaceDeleteCollectionCall wrap *gomock.Call +type MockPersistentVolumeInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceDeleteCollectionCall) Return(arg0 error) *MockPersistentVolumeInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPersistentVolumeInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPersistentVolumeInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -1463,9 +3503,33 @@ func (m *MockPersistentVolumeInterface) Get(arg0 context.Context, arg1 string, a } // Get indicates an expected call of Get. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Get), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceGetCall{Call: call} +} + +// MockPersistentVolumeInterfaceGetCall wrap *gomock.Call +type MockPersistentVolumeInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceGetCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -1478,9 +3542,33 @@ func (m *MockPersistentVolumeInterface) List(arg0 context.Context, arg1 v11.List } // List indicates an expected call of List. -func (mr *MockPersistentVolumeInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) List(arg0, arg1 any) *MockPersistentVolumeInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).List), arg0, arg1) + return &MockPersistentVolumeInterfaceListCall{Call: call} +} + +// MockPersistentVolumeInterfaceListCall wrap *gomock.Call +type MockPersistentVolumeInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceListCall) Return(arg0 *v1.PersistentVolumeList, arg1 error) *MockPersistentVolumeInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.PersistentVolumeList, error)) *MockPersistentVolumeInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.PersistentVolumeList, error)) *MockPersistentVolumeInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -1497,10 +3585,34 @@ func (m *MockPersistentVolumeInterface) Patch(arg0 context.Context, arg1 string, } // Patch indicates an expected call of Patch. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockPersistentVolumeInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Patch), varargs...) + return &MockPersistentVolumeInterfacePatchCall{Call: call} +} + +// MockPersistentVolumeInterfacePatchCall wrap *gomock.Call +type MockPersistentVolumeInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfacePatchCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -1513,9 +3625,33 @@ func (m *MockPersistentVolumeInterface) Update(arg0 context.Context, arg1 *v1.Pe } // Update indicates an expected call of Update. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Update), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceUpdateCall{Call: call} +} + +// MockPersistentVolumeInterfaceUpdateCall wrap *gomock.Call +type MockPersistentVolumeInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceUpdateCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceUpdateCall) Do(f func(context.Context, *v1.PersistentVolume, v11.UpdateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.PersistentVolume, v11.UpdateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -1528,9 +3664,33 @@ func (m *MockPersistentVolumeInterface) UpdateStatus(arg0 context.Context, arg1 } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockPersistentVolumeInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockPersistentVolumeInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockPersistentVolumeInterfaceUpdateStatusCall{Call: call} +} + +// MockPersistentVolumeInterfaceUpdateStatusCall wrap *gomock.Call +type MockPersistentVolumeInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceUpdateStatusCall) Return(arg0 *v1.PersistentVolume, arg1 error) *MockPersistentVolumeInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.PersistentVolume, v11.UpdateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.PersistentVolume, v11.UpdateOptions) (*v1.PersistentVolume, error)) *MockPersistentVolumeInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1543,9 +3703,33 @@ func (m *MockPersistentVolumeInterface) Watch(arg0 context.Context, arg1 v11.Lis } // Watch indicates an expected call of Watch. -func (mr *MockPersistentVolumeInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockPersistentVolumeInterfaceMockRecorder) Watch(arg0, arg1 any) *MockPersistentVolumeInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPersistentVolumeInterface)(nil).Watch), arg0, arg1) + return &MockPersistentVolumeInterfaceWatchCall{Call: call} +} + +// MockPersistentVolumeInterfaceWatchCall wrap *gomock.Call +type MockPersistentVolumeInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockPersistentVolumeInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPersistentVolumeInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPersistentVolumeInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPersistentVolumeClaimInterface is a mock of PersistentVolumeClaimInterface interface. @@ -1581,9 +3765,33 @@ func (m *MockPersistentVolumeClaimInterface) Apply(arg0 context.Context, arg1 *v } // Apply indicates an expected call of Apply. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Apply), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceApplyCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceApplyCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceApplyCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceApplyCall) Do(f func(context.Context, *v12.PersistentVolumeClaimApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.PersistentVolumeClaimApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -1596,9 +3804,33 @@ func (m *MockPersistentVolumeClaimInterface) ApplyStatus(arg0 context.Context, a } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceApplyStatusCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceApplyStatusCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceApplyStatusCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceApplyStatusCall) Do(f func(context.Context, *v12.PersistentVolumeClaimApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.PersistentVolumeClaimApplyConfiguration, v11.ApplyOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1611,9 +3843,33 @@ func (m *MockPersistentVolumeClaimInterface) Create(arg0 context.Context, arg1 * } // Create indicates an expected call of Create. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Create), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceCreateCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceCreateCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceCreateCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceCreateCall) Do(f func(context.Context, *v1.PersistentVolumeClaim, v11.CreateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.PersistentVolumeClaim, v11.CreateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1625,9 +3881,33 @@ func (m *MockPersistentVolumeClaimInterface) Delete(arg0 context.Context, arg1 s } // Delete indicates an expected call of Delete. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Delete), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceDeleteCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceDeleteCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceDeleteCall) Return(arg0 error) *MockPersistentVolumeClaimInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockPersistentVolumeClaimInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockPersistentVolumeClaimInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -1639,9 +3919,33 @@ func (m *MockPersistentVolumeClaimInterface) DeleteCollection(arg0 context.Conte } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceDeleteCollectionCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceDeleteCollectionCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceDeleteCollectionCall) Return(arg0 error) *MockPersistentVolumeClaimInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPersistentVolumeClaimInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockPersistentVolumeClaimInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -1654,9 +3958,33 @@ func (m *MockPersistentVolumeClaimInterface) Get(arg0 context.Context, arg1 stri } // Get indicates an expected call of Get. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Get), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceGetCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceGetCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceGetCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -1669,9 +3997,33 @@ func (m *MockPersistentVolumeClaimInterface) List(arg0 context.Context, arg1 v11 } // List indicates an expected call of List. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) List(arg0, arg1 any) *MockPersistentVolumeClaimInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).List), arg0, arg1) + return &MockPersistentVolumeClaimInterfaceListCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceListCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceListCall) Return(arg0 *v1.PersistentVolumeClaimList, arg1 error) *MockPersistentVolumeClaimInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.PersistentVolumeClaimList, error)) *MockPersistentVolumeClaimInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.PersistentVolumeClaimList, error)) *MockPersistentVolumeClaimInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -1688,10 +4040,34 @@ func (m *MockPersistentVolumeClaimInterface) Patch(arg0 context.Context, arg1 st } // Patch indicates an expected call of Patch. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockPersistentVolumeClaimInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Patch), varargs...) + return &MockPersistentVolumeClaimInterfacePatchCall{Call: call} +} + +// MockPersistentVolumeClaimInterfacePatchCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfacePatchCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -1704,9 +4080,33 @@ func (m *MockPersistentVolumeClaimInterface) Update(arg0 context.Context, arg1 * } // Update indicates an expected call of Update. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Update), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceUpdateCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceUpdateCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceUpdateCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceUpdateCall) Do(f func(context.Context, *v1.PersistentVolumeClaim, v11.UpdateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.PersistentVolumeClaim, v11.UpdateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -1719,9 +4119,33 @@ func (m *MockPersistentVolumeClaimInterface) UpdateStatus(arg0 context.Context, } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockPersistentVolumeClaimInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockPersistentVolumeClaimInterfaceUpdateStatusCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceUpdateStatusCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceUpdateStatusCall) Return(arg0 *v1.PersistentVolumeClaim, arg1 error) *MockPersistentVolumeClaimInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.PersistentVolumeClaim, v11.UpdateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.PersistentVolumeClaim, v11.UpdateOptions) (*v1.PersistentVolumeClaim, error)) *MockPersistentVolumeClaimInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1734,9 +4158,33 @@ func (m *MockPersistentVolumeClaimInterface) Watch(arg0 context.Context, arg1 v1 } // Watch indicates an expected call of Watch. -func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockPersistentVolumeClaimInterfaceMockRecorder) Watch(arg0, arg1 any) *MockPersistentVolumeClaimInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockPersistentVolumeClaimInterface)(nil).Watch), arg0, arg1) + return &MockPersistentVolumeClaimInterfaceWatchCall{Call: call} +} + +// MockPersistentVolumeClaimInterfaceWatchCall wrap *gomock.Call +type MockPersistentVolumeClaimInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPersistentVolumeClaimInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockPersistentVolumeClaimInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPersistentVolumeClaimInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPersistentVolumeClaimInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPersistentVolumeClaimInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockPersistentVolumeClaimInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretInterface is a mock of SecretInterface interface. @@ -1772,9 +4220,33 @@ func (m *MockSecretInterface) Apply(arg0 context.Context, arg1 *v12.SecretApplyC } // Apply indicates an expected call of Apply. -func (mr *MockSecretInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockSecretInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockSecretInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockSecretInterface)(nil).Apply), arg0, arg1, arg2) + return &MockSecretInterfaceApplyCall{Call: call} +} + +// MockSecretInterfaceApplyCall wrap *gomock.Call +type MockSecretInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceApplyCall) Return(arg0 *v1.Secret, arg1 error) *MockSecretInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceApplyCall) Do(f func(context.Context, *v12.SecretApplyConfiguration, v11.ApplyOptions) (*v1.Secret, error)) *MockSecretInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.SecretApplyConfiguration, v11.ApplyOptions) (*v1.Secret, error)) *MockSecretInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1787,9 +4259,33 @@ func (m *MockSecretInterface) Create(arg0 context.Context, arg1 *v1.Secret, arg2 } // Create indicates an expected call of Create. -func (mr *MockSecretInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockSecretInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSecretInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSecretInterface)(nil).Create), arg0, arg1, arg2) + return &MockSecretInterfaceCreateCall{Call: call} +} + +// MockSecretInterfaceCreateCall wrap *gomock.Call +type MockSecretInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceCreateCall) Return(arg0 *v1.Secret, arg1 error) *MockSecretInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceCreateCall) Do(f func(context.Context, *v1.Secret, v11.CreateOptions) (*v1.Secret, error)) *MockSecretInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Secret, v11.CreateOptions) (*v1.Secret, error)) *MockSecretInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1801,9 +4297,33 @@ func (m *MockSecretInterface) Delete(arg0 context.Context, arg1 string, arg2 v11 } // Delete indicates an expected call of Delete. -func (mr *MockSecretInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockSecretInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSecretInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSecretInterface)(nil).Delete), arg0, arg1, arg2) + return &MockSecretInterfaceDeleteCall{Call: call} +} + +// MockSecretInterfaceDeleteCall wrap *gomock.Call +type MockSecretInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceDeleteCall) Return(arg0 error) *MockSecretInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockSecretInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockSecretInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -1815,9 +4335,33 @@ func (m *MockSecretInterface) DeleteCollection(arg0 context.Context, arg1 v11.De } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockSecretInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockSecretInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockSecretInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockSecretInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockSecretInterfaceDeleteCollectionCall{Call: call} +} + +// MockSecretInterfaceDeleteCollectionCall wrap *gomock.Call +type MockSecretInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceDeleteCollectionCall) Return(arg0 error) *MockSecretInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockSecretInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockSecretInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -1830,9 +4374,33 @@ func (m *MockSecretInterface) Get(arg0 context.Context, arg1 string, arg2 v11.Ge } // Get indicates an expected call of Get. -func (mr *MockSecretInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockSecretInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSecretInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSecretInterface)(nil).Get), arg0, arg1, arg2) + return &MockSecretInterfaceGetCall{Call: call} +} + +// MockSecretInterfaceGetCall wrap *gomock.Call +type MockSecretInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceGetCall) Return(arg0 *v1.Secret, arg1 error) *MockSecretInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Secret, error)) *MockSecretInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Secret, error)) *MockSecretInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -1845,9 +4413,33 @@ func (m *MockSecretInterface) List(arg0 context.Context, arg1 v11.ListOptions) ( } // List indicates an expected call of List. -func (mr *MockSecretInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) List(arg0, arg1 any) *MockSecretInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSecretInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSecretInterface)(nil).List), arg0, arg1) + return &MockSecretInterfaceListCall{Call: call} +} + +// MockSecretInterfaceListCall wrap *gomock.Call +type MockSecretInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceListCall) Return(arg0 *v1.SecretList, arg1 error) *MockSecretInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.SecretList, error)) *MockSecretInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.SecretList, error)) *MockSecretInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -1864,10 +4456,34 @@ func (m *MockSecretInterface) Patch(arg0 context.Context, arg1 string, arg2 type } // Patch indicates an expected call of Patch. -func (mr *MockSecretInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockSecretInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockSecretInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockSecretInterface)(nil).Patch), varargs...) + return &MockSecretInterfacePatchCall{Call: call} +} + +// MockSecretInterfacePatchCall wrap *gomock.Call +type MockSecretInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfacePatchCall) Return(arg0 *v1.Secret, arg1 error) *MockSecretInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Secret, error)) *MockSecretInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Secret, error)) *MockSecretInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -1880,9 +4496,33 @@ func (m *MockSecretInterface) Update(arg0 context.Context, arg1 *v1.Secret, arg2 } // Update indicates an expected call of Update. -func (mr *MockSecretInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockSecretInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSecretInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSecretInterface)(nil).Update), arg0, arg1, arg2) + return &MockSecretInterfaceUpdateCall{Call: call} +} + +// MockSecretInterfaceUpdateCall wrap *gomock.Call +type MockSecretInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceUpdateCall) Return(arg0 *v1.Secret, arg1 error) *MockSecretInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceUpdateCall) Do(f func(context.Context, *v1.Secret, v11.UpdateOptions) (*v1.Secret, error)) *MockSecretInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Secret, v11.UpdateOptions) (*v1.Secret, error)) *MockSecretInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1895,9 +4535,33 @@ func (m *MockSecretInterface) Watch(arg0 context.Context, arg1 v11.ListOptions) } // Watch indicates an expected call of Watch. -func (mr *MockSecretInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretInterfaceMockRecorder) Watch(arg0, arg1 any) *MockSecretInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockSecretInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockSecretInterface)(nil).Watch), arg0, arg1) + return &MockSecretInterfaceWatchCall{Call: call} +} + +// MockSecretInterfaceWatchCall wrap *gomock.Call +type MockSecretInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockSecretInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockSecretInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockSecretInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNodeInterface is a mock of NodeInterface interface. @@ -1933,9 +4597,33 @@ func (m *MockNodeInterface) Apply(arg0 context.Context, arg1 *v12.NodeApplyConfi } // Apply indicates an expected call of Apply. -func (mr *MockNodeInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockNodeInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNodeInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNodeInterface)(nil).Apply), arg0, arg1, arg2) + return &MockNodeInterfaceApplyCall{Call: call} +} + +// MockNodeInterfaceApplyCall wrap *gomock.Call +type MockNodeInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceApplyCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceApplyCall) Do(f func(context.Context, *v12.NodeApplyConfiguration, v11.ApplyOptions) (*v1.Node, error)) *MockNodeInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.NodeApplyConfiguration, v11.ApplyOptions) (*v1.Node, error)) *MockNodeInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -1948,9 +4636,33 @@ func (m *MockNodeInterface) ApplyStatus(arg0 context.Context, arg1 *v12.NodeAppl } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockNodeInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockNodeInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNodeInterface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNodeInterface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockNodeInterfaceApplyStatusCall{Call: call} +} + +// MockNodeInterfaceApplyStatusCall wrap *gomock.Call +type MockNodeInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceApplyStatusCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceApplyStatusCall) Do(f func(context.Context, *v12.NodeApplyConfiguration, v11.ApplyOptions) (*v1.Node, error)) *MockNodeInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v12.NodeApplyConfiguration, v11.ApplyOptions) (*v1.Node, error)) *MockNodeInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1963,9 +4675,33 @@ func (m *MockNodeInterface) Create(arg0 context.Context, arg1 *v1.Node, arg2 v11 } // Create indicates an expected call of Create. -func (mr *MockNodeInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockNodeInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNodeInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNodeInterface)(nil).Create), arg0, arg1, arg2) + return &MockNodeInterfaceCreateCall{Call: call} +} + +// MockNodeInterfaceCreateCall wrap *gomock.Call +type MockNodeInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceCreateCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceCreateCall) Do(f func(context.Context, *v1.Node, v11.CreateOptions) (*v1.Node, error)) *MockNodeInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Node, v11.CreateOptions) (*v1.Node, error)) *MockNodeInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -1977,9 +4713,33 @@ func (m *MockNodeInterface) Delete(arg0 context.Context, arg1 string, arg2 v11.D } // Delete indicates an expected call of Delete. -func (mr *MockNodeInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockNodeInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNodeInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNodeInterface)(nil).Delete), arg0, arg1, arg2) + return &MockNodeInterfaceDeleteCall{Call: call} +} + +// MockNodeInterfaceDeleteCall wrap *gomock.Call +type MockNodeInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceDeleteCall) Return(arg0 error) *MockNodeInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockNodeInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockNodeInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -1991,9 +4751,33 @@ func (m *MockNodeInterface) DeleteCollection(arg0 context.Context, arg1 v11.Dele } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockNodeInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockNodeInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockNodeInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockNodeInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockNodeInterfaceDeleteCollectionCall{Call: call} +} + +// MockNodeInterfaceDeleteCollectionCall wrap *gomock.Call +type MockNodeInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceDeleteCollectionCall) Return(arg0 error) *MockNodeInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockNodeInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockNodeInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -2006,9 +4790,33 @@ func (m *MockNodeInterface) Get(arg0 context.Context, arg1 string, arg2 v11.GetO } // Get indicates an expected call of Get. -func (mr *MockNodeInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockNodeInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNodeInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNodeInterface)(nil).Get), arg0, arg1, arg2) + return &MockNodeInterfaceGetCall{Call: call} +} + +// MockNodeInterfaceGetCall wrap *gomock.Call +type MockNodeInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceGetCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v1.Node, error)) *MockNodeInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v1.Node, error)) *MockNodeInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -2021,9 +4829,33 @@ func (m *MockNodeInterface) List(arg0 context.Context, arg1 v11.ListOptions) (*v } // List indicates an expected call of List. -func (mr *MockNodeInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) List(arg0, arg1 any) *MockNodeInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNodeInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNodeInterface)(nil).List), arg0, arg1) + return &MockNodeInterfaceListCall{Call: call} +} + +// MockNodeInterfaceListCall wrap *gomock.Call +type MockNodeInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceListCall) Return(arg0 *v1.NodeList, arg1 error) *MockNodeInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v1.NodeList, error)) *MockNodeInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v1.NodeList, error)) *MockNodeInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -2040,10 +4872,34 @@ func (m *MockNodeInterface) Patch(arg0 context.Context, arg1 string, arg2 types. } // Patch indicates an expected call of Patch. -func (mr *MockNodeInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockNodeInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNodeInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNodeInterface)(nil).Patch), varargs...) + return &MockNodeInterfacePatchCall{Call: call} +} + +// MockNodeInterfacePatchCall wrap *gomock.Call +type MockNodeInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfacePatchCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Node, error)) *MockNodeInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v1.Node, error)) *MockNodeInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PatchStatus mocks base method. @@ -2056,9 +4912,33 @@ func (m *MockNodeInterface) PatchStatus(arg0 context.Context, arg1 string, arg2 } // PatchStatus indicates an expected call of PatchStatus. -func (mr *MockNodeInterfaceMockRecorder) PatchStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) PatchStatus(arg0, arg1, arg2 any) *MockNodeInterfacePatchStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchStatus", reflect.TypeOf((*MockNodeInterface)(nil).PatchStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchStatus", reflect.TypeOf((*MockNodeInterface)(nil).PatchStatus), arg0, arg1, arg2) + return &MockNodeInterfacePatchStatusCall{Call: call} +} + +// MockNodeInterfacePatchStatusCall wrap *gomock.Call +type MockNodeInterfacePatchStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfacePatchStatusCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfacePatchStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfacePatchStatusCall) Do(f func(context.Context, string, []byte) (*v1.Node, error)) *MockNodeInterfacePatchStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfacePatchStatusCall) DoAndReturn(f func(context.Context, string, []byte) (*v1.Node, error)) *MockNodeInterfacePatchStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -2071,9 +4951,33 @@ func (m *MockNodeInterface) Update(arg0 context.Context, arg1 *v1.Node, arg2 v11 } // Update indicates an expected call of Update. -func (mr *MockNodeInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockNodeInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNodeInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNodeInterface)(nil).Update), arg0, arg1, arg2) + return &MockNodeInterfaceUpdateCall{Call: call} +} + +// MockNodeInterfaceUpdateCall wrap *gomock.Call +type MockNodeInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceUpdateCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceUpdateCall) Do(f func(context.Context, *v1.Node, v11.UpdateOptions) (*v1.Node, error)) *MockNodeInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Node, v11.UpdateOptions) (*v1.Node, error)) *MockNodeInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -2086,9 +4990,33 @@ func (m *MockNodeInterface) UpdateStatus(arg0 context.Context, arg1 *v1.Node, ar } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockNodeInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockNodeInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNodeInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNodeInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockNodeInterfaceUpdateStatusCall{Call: call} +} + +// MockNodeInterfaceUpdateStatusCall wrap *gomock.Call +type MockNodeInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceUpdateStatusCall) Return(arg0 *v1.Node, arg1 error) *MockNodeInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Node, v11.UpdateOptions) (*v1.Node, error)) *MockNodeInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Node, v11.UpdateOptions) (*v1.Node, error)) *MockNodeInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -2101,7 +5029,31 @@ func (m *MockNodeInterface) Watch(arg0 context.Context, arg1 v11.ListOptions) (w } // Watch indicates an expected call of Watch. -func (mr *MockNodeInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockNodeInterfaceMockRecorder) Watch(arg0, arg1 any) *MockNodeInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNodeInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNodeInterface)(nil).Watch), arg0, arg1) + return &MockNodeInterfaceWatchCall{Call: call} +} + +// MockNodeInterfaceWatchCall wrap *gomock.Call +type MockNodeInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockNodeInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockNodeInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockNodeInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/discovery_mock.go b/caas/kubernetes/provider/mocks/discovery_mock.go index 7a6dd91b425..a4df05cd1b3 100644 --- a/caas/kubernetes/provider/mocks/discovery_mock.go +++ b/caas/kubernetes/provider/mocks/discovery_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/discovery_mock.go k8s.io/client-go/discovery DiscoveryInterface +// mockgen -typed -package mocks -destination mocks/discovery_mock.go k8s.io/client-go/discovery DiscoveryInterface // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) { } // OpenAPISchema indicates an expected call of OpenAPISchema. -func (mr *MockDiscoveryInterfaceMockRecorder) OpenAPISchema() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) OpenAPISchema() *MockDiscoveryInterfaceOpenAPISchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenAPISchema", reflect.TypeOf((*MockDiscoveryInterface)(nil).OpenAPISchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenAPISchema", reflect.TypeOf((*MockDiscoveryInterface)(nil).OpenAPISchema)) + return &MockDiscoveryInterfaceOpenAPISchemaCall{Call: call} +} + +// MockDiscoveryInterfaceOpenAPISchemaCall wrap *gomock.Call +type MockDiscoveryInterfaceOpenAPISchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceOpenAPISchemaCall) Return(arg0 *openapi_v2.Document, arg1 error) *MockDiscoveryInterfaceOpenAPISchemaCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceOpenAPISchemaCall) Do(f func() (*openapi_v2.Document, error)) *MockDiscoveryInterfaceOpenAPISchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceOpenAPISchemaCall) DoAndReturn(f func() (*openapi_v2.Document, error)) *MockDiscoveryInterfaceOpenAPISchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenAPIV3 mocks base method. @@ -68,9 +92,33 @@ func (m *MockDiscoveryInterface) OpenAPIV3() openapi.Client { } // OpenAPIV3 indicates an expected call of OpenAPIV3. -func (mr *MockDiscoveryInterfaceMockRecorder) OpenAPIV3() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) OpenAPIV3() *MockDiscoveryInterfaceOpenAPIV3Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenAPIV3", reflect.TypeOf((*MockDiscoveryInterface)(nil).OpenAPIV3)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenAPIV3", reflect.TypeOf((*MockDiscoveryInterface)(nil).OpenAPIV3)) + return &MockDiscoveryInterfaceOpenAPIV3Call{Call: call} +} + +// MockDiscoveryInterfaceOpenAPIV3Call wrap *gomock.Call +type MockDiscoveryInterfaceOpenAPIV3Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceOpenAPIV3Call) Return(arg0 openapi.Client) *MockDiscoveryInterfaceOpenAPIV3Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceOpenAPIV3Call) Do(f func() openapi.Client) *MockDiscoveryInterfaceOpenAPIV3Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceOpenAPIV3Call) DoAndReturn(f func() openapi.Client) *MockDiscoveryInterfaceOpenAPIV3Call { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -82,9 +130,33 @@ func (m *MockDiscoveryInterface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockDiscoveryInterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) RESTClient() *MockDiscoveryInterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockDiscoveryInterface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockDiscoveryInterface)(nil).RESTClient)) + return &MockDiscoveryInterfaceRESTClientCall{Call: call} +} + +// MockDiscoveryInterfaceRESTClientCall wrap *gomock.Call +type MockDiscoveryInterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceRESTClientCall) Return(arg0 rest.Interface) *MockDiscoveryInterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceRESTClientCall) Do(f func() rest.Interface) *MockDiscoveryInterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockDiscoveryInterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerGroups mocks base method. @@ -97,9 +169,33 @@ func (m *MockDiscoveryInterface) ServerGroups() (*v1.APIGroupList, error) { } // ServerGroups indicates an expected call of ServerGroups. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroups() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroups() *MockDiscoveryInterfaceServerGroupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroups", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroups", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroups)) + return &MockDiscoveryInterfaceServerGroupsCall{Call: call} +} + +// MockDiscoveryInterfaceServerGroupsCall wrap *gomock.Call +type MockDiscoveryInterfaceServerGroupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerGroupsCall) Return(arg0 *v1.APIGroupList, arg1 error) *MockDiscoveryInterfaceServerGroupsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerGroupsCall) Do(f func() (*v1.APIGroupList, error)) *MockDiscoveryInterfaceServerGroupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerGroupsCall) DoAndReturn(f func() (*v1.APIGroupList, error)) *MockDiscoveryInterfaceServerGroupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerGroupsAndResources mocks base method. @@ -113,9 +209,33 @@ func (m *MockDiscoveryInterface) ServerGroupsAndResources() ([]*v1.APIGroup, []* } // ServerGroupsAndResources indicates an expected call of ServerGroupsAndResources. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroupsAndResources() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerGroupsAndResources() *MockDiscoveryInterfaceServerGroupsAndResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroupsAndResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroupsAndResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerGroupsAndResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerGroupsAndResources)) + return &MockDiscoveryInterfaceServerGroupsAndResourcesCall{Call: call} +} + +// MockDiscoveryInterfaceServerGroupsAndResourcesCall wrap *gomock.Call +type MockDiscoveryInterfaceServerGroupsAndResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerGroupsAndResourcesCall) Return(arg0 []*v1.APIGroup, arg1 []*v1.APIResourceList, arg2 error) *MockDiscoveryInterfaceServerGroupsAndResourcesCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerGroupsAndResourcesCall) Do(f func() ([]*v1.APIGroup, []*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerGroupsAndResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerGroupsAndResourcesCall) DoAndReturn(f func() ([]*v1.APIGroup, []*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerGroupsAndResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerPreferredNamespacedResources mocks base method. @@ -128,9 +248,33 @@ func (m *MockDiscoveryInterface) ServerPreferredNamespacedResources() ([]*v1.API } // ServerPreferredNamespacedResources indicates an expected call of ServerPreferredNamespacedResources. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredNamespacedResources() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredNamespacedResources() *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredNamespacedResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredNamespacedResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredNamespacedResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredNamespacedResources)) + return &MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall{Call: call} +} + +// MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall wrap *gomock.Call +type MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall) Return(arg0 []*v1.APIResourceList, arg1 error) *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall) Do(f func() ([]*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall) DoAndReturn(f func() ([]*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerPreferredNamespacedResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerPreferredResources mocks base method. @@ -143,9 +287,33 @@ func (m *MockDiscoveryInterface) ServerPreferredResources() ([]*v1.APIResourceLi } // ServerPreferredResources indicates an expected call of ServerPreferredResources. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredResources() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerPreferredResources() *MockDiscoveryInterfaceServerPreferredResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerPreferredResources", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerPreferredResources)) + return &MockDiscoveryInterfaceServerPreferredResourcesCall{Call: call} +} + +// MockDiscoveryInterfaceServerPreferredResourcesCall wrap *gomock.Call +type MockDiscoveryInterfaceServerPreferredResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerPreferredResourcesCall) Return(arg0 []*v1.APIResourceList, arg1 error) *MockDiscoveryInterfaceServerPreferredResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerPreferredResourcesCall) Do(f func() ([]*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerPreferredResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerPreferredResourcesCall) DoAndReturn(f func() ([]*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerPreferredResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerResourcesForGroupVersion mocks base method. @@ -158,9 +326,33 @@ func (m *MockDiscoveryInterface) ServerResourcesForGroupVersion(arg0 string) (*v } // ServerResourcesForGroupVersion indicates an expected call of ServerResourcesForGroupVersion. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerResourcesForGroupVersion(arg0 any) *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerResourcesForGroupVersion(arg0 any) *MockDiscoveryInterfaceServerResourcesForGroupVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerResourcesForGroupVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerResourcesForGroupVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerResourcesForGroupVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerResourcesForGroupVersion), arg0) + return &MockDiscoveryInterfaceServerResourcesForGroupVersionCall{Call: call} +} + +// MockDiscoveryInterfaceServerResourcesForGroupVersionCall wrap *gomock.Call +type MockDiscoveryInterfaceServerResourcesForGroupVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerResourcesForGroupVersionCall) Return(arg0 *v1.APIResourceList, arg1 error) *MockDiscoveryInterfaceServerResourcesForGroupVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerResourcesForGroupVersionCall) Do(f func(string) (*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerResourcesForGroupVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerResourcesForGroupVersionCall) DoAndReturn(f func(string) (*v1.APIResourceList, error)) *MockDiscoveryInterfaceServerResourcesForGroupVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerVersion mocks base method. @@ -173,9 +365,33 @@ func (m *MockDiscoveryInterface) ServerVersion() (*version.Info, error) { } // ServerVersion indicates an expected call of ServerVersion. -func (mr *MockDiscoveryInterfaceMockRecorder) ServerVersion() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) ServerVersion() *MockDiscoveryInterfaceServerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockDiscoveryInterface)(nil).ServerVersion)) + return &MockDiscoveryInterfaceServerVersionCall{Call: call} +} + +// MockDiscoveryInterfaceServerVersionCall wrap *gomock.Call +type MockDiscoveryInterfaceServerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceServerVersionCall) Return(arg0 *version.Info, arg1 error) *MockDiscoveryInterfaceServerVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceServerVersionCall) Do(f func() (*version.Info, error)) *MockDiscoveryInterfaceServerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceServerVersionCall) DoAndReturn(f func() (*version.Info, error)) *MockDiscoveryInterfaceServerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithLegacy mocks base method. @@ -187,7 +403,31 @@ func (m *MockDiscoveryInterface) WithLegacy() discovery.DiscoveryInterface { } // WithLegacy indicates an expected call of WithLegacy. -func (mr *MockDiscoveryInterfaceMockRecorder) WithLegacy() *gomock.Call { +func (mr *MockDiscoveryInterfaceMockRecorder) WithLegacy() *MockDiscoveryInterfaceWithLegacyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithLegacy", reflect.TypeOf((*MockDiscoveryInterface)(nil).WithLegacy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithLegacy", reflect.TypeOf((*MockDiscoveryInterface)(nil).WithLegacy)) + return &MockDiscoveryInterfaceWithLegacyCall{Call: call} +} + +// MockDiscoveryInterfaceWithLegacyCall wrap *gomock.Call +type MockDiscoveryInterfaceWithLegacyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiscoveryInterfaceWithLegacyCall) Return(arg0 discovery.DiscoveryInterface) *MockDiscoveryInterfaceWithLegacyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiscoveryInterfaceWithLegacyCall) Do(f func() discovery.DiscoveryInterface) *MockDiscoveryInterfaceWithLegacyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiscoveryInterfaceWithLegacyCall) DoAndReturn(f func() discovery.DiscoveryInterface) *MockDiscoveryInterfaceWithLegacyCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/dynamic_mock.go b/caas/kubernetes/provider/mocks/dynamic_mock.go index d7988c2d14f..4d996659aec 100644 --- a/caas/kubernetes/provider/mocks/dynamic_mock.go +++ b/caas/kubernetes/provider/mocks/dynamic_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/dynamic_mock.go -mock_names=Interface=MockDynamicInterface k8s.io/client-go/dynamic Interface,ResourceInterface,NamespaceableResourceInterface +// mockgen -typed -package mocks -destination mocks/dynamic_mock.go -mock_names=Interface=MockDynamicInterface k8s.io/client-go/dynamic Interface,ResourceInterface,NamespaceableResourceInterface // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockDynamicInterface) Resource(arg0 schema.GroupVersionResource) dynami } // Resource indicates an expected call of Resource. -func (mr *MockDynamicInterfaceMockRecorder) Resource(arg0 any) *gomock.Call { +func (mr *MockDynamicInterfaceMockRecorder) Resource(arg0 any) *MockDynamicInterfaceResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resource", reflect.TypeOf((*MockDynamicInterface)(nil).Resource), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resource", reflect.TypeOf((*MockDynamicInterface)(nil).Resource), arg0) + return &MockDynamicInterfaceResourceCall{Call: call} +} + +// MockDynamicInterfaceResourceCall wrap *gomock.Call +type MockDynamicInterfaceResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDynamicInterfaceResourceCall) Return(arg0 dynamic.NamespaceableResourceInterface) *MockDynamicInterfaceResourceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDynamicInterfaceResourceCall) Do(f func(schema.GroupVersionResource) dynamic.NamespaceableResourceInterface) *MockDynamicInterfaceResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDynamicInterfaceResourceCall) DoAndReturn(f func(schema.GroupVersionResource) dynamic.NamespaceableResourceInterface) *MockDynamicInterfaceResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockResourceInterface is a mock of ResourceInterface interface. @@ -96,10 +120,34 @@ func (m *MockResourceInterface) Apply(arg0 context.Context, arg1 string, arg2 *u } // Apply indicates an expected call of Apply. -func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *MockResourceInterfaceApplyCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResourceInterface)(nil).Apply), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResourceInterface)(nil).Apply), varargs...) + return &MockResourceInterfaceApplyCall{Call: call} +} + +// MockResourceInterfaceApplyCall wrap *gomock.Call +type MockResourceInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceApplyCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceApplyCall) Do(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceApplyCall) DoAndReturn(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -112,9 +160,33 @@ func (m *MockResourceInterface) ApplyStatus(arg0 context.Context, arg1 string, a } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *MockResourceInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3) + return &MockResourceInterfaceApplyStatusCall{Call: call} +} + +// MockResourceInterfaceApplyStatusCall wrap *gomock.Call +type MockResourceInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceApplyStatusCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceApplyStatusCall) Do(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions) (*unstructured.Unstructured, error)) *MockResourceInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions) (*unstructured.Unstructured, error)) *MockResourceInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -131,10 +203,34 @@ func (m *MockResourceInterface) Create(arg0 context.Context, arg1 *unstructured. } // Create indicates an expected call of Create. -func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *MockResourceInterfaceCreateCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockResourceInterface)(nil).Create), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockResourceInterface)(nil).Create), varargs...) + return &MockResourceInterfaceCreateCall{Call: call} +} + +// MockResourceInterfaceCreateCall wrap *gomock.Call +type MockResourceInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceCreateCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceCreateCall) Do(f func(context.Context, *unstructured.Unstructured, v1.CreateOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceCreateCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.CreateOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -150,10 +246,34 @@ func (m *MockResourceInterface) Delete(arg0 context.Context, arg1 string, arg2 v } // Delete indicates an expected call of Delete. -func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *MockResourceInterfaceDeleteCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResourceInterface)(nil).Delete), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResourceInterface)(nil).Delete), varargs...) + return &MockResourceInterfaceDeleteCall{Call: call} +} + +// MockResourceInterfaceDeleteCall wrap *gomock.Call +type MockResourceInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceDeleteCall) Return(arg0 error) *MockResourceInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions, ...string) error) *MockResourceInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions, ...string) error) *MockResourceInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -165,9 +285,33 @@ func (m *MockResourceInterface) DeleteCollection(arg0 context.Context, arg1 v1.D } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockResourceInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockResourceInterfaceDeleteCollectionCall{Call: call} +} + +// MockResourceInterfaceDeleteCollectionCall wrap *gomock.Call +type MockResourceInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceDeleteCollectionCall) Return(arg0 error) *MockResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -184,10 +328,34 @@ func (m *MockResourceInterface) Get(arg0 context.Context, arg1 string, arg2 v1.G } // Get indicates an expected call of Get. -func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *MockResourceInterfaceGetCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResourceInterface)(nil).Get), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResourceInterface)(nil).Get), varargs...) + return &MockResourceInterfaceGetCall{Call: call} +} + +// MockResourceInterfaceGetCall wrap *gomock.Call +type MockResourceInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceGetCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -200,9 +368,33 @@ func (m *MockResourceInterface) List(arg0 context.Context, arg1 v1.ListOptions) } // List indicates an expected call of List. -func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) List(arg0, arg1 any) *MockResourceInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockResourceInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockResourceInterface)(nil).List), arg0, arg1) + return &MockResourceInterfaceListCall{Call: call} +} + +// MockResourceInterfaceListCall wrap *gomock.Call +type MockResourceInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceListCall) Return(arg0 *unstructured.UnstructuredList, arg1 error) *MockResourceInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*unstructured.UnstructuredList, error)) *MockResourceInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*unstructured.UnstructuredList, error)) *MockResourceInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -219,10 +411,34 @@ func (m *MockResourceInterface) Patch(arg0 context.Context, arg1 string, arg2 ty } // Patch indicates an expected call of Patch. -func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockResourceInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockResourceInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockResourceInterface)(nil).Patch), varargs...) + return &MockResourceInterfacePatchCall{Call: call} +} + +// MockResourceInterfacePatchCall wrap *gomock.Call +type MockResourceInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfacePatchCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -239,10 +455,34 @@ func (m *MockResourceInterface) Update(arg0 context.Context, arg1 *unstructured. } // Update indicates an expected call of Update. -func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *MockResourceInterfaceUpdateCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockResourceInterface)(nil).Update), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockResourceInterface)(nil).Update), varargs...) + return &MockResourceInterfaceUpdateCall{Call: call} +} + +// MockResourceInterfaceUpdateCall wrap *gomock.Call +type MockResourceInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceUpdateCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceUpdateCall) Do(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceUpdateCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) (*unstructured.Unstructured, error)) *MockResourceInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -255,9 +495,33 @@ func (m *MockResourceInterface) UpdateStatus(arg0 context.Context, arg1 *unstruc } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockResourceInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockResourceInterfaceUpdateStatusCall{Call: call} +} + +// MockResourceInterfaceUpdateStatusCall wrap *gomock.Call +type MockResourceInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceUpdateStatusCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockResourceInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceUpdateStatusCall) Do(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions) (*unstructured.Unstructured, error)) *MockResourceInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions) (*unstructured.Unstructured, error)) *MockResourceInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -270,9 +534,33 @@ func (m *MockResourceInterface) Watch(arg0 context.Context, arg1 v1.ListOptions) } // Watch indicates an expected call of Watch. -func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *MockResourceInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockResourceInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockResourceInterface)(nil).Watch), arg0, arg1) + return &MockResourceInterfaceWatchCall{Call: call} +} + +// MockResourceInterfaceWatchCall wrap *gomock.Call +type MockResourceInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockResourceInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceInterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockResourceInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceInterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockResourceInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNamespaceableResourceInterface is a mock of NamespaceableResourceInterface interface. @@ -312,10 +600,34 @@ func (m *MockNamespaceableResourceInterface) Apply(arg0 context.Context, arg1 st } // Apply indicates an expected call of Apply. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Apply(arg0, arg1, arg2, arg3 any, arg4 ...any) *MockNamespaceableResourceInterfaceApplyCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Apply), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Apply), varargs...) + return &MockNamespaceableResourceInterfaceApplyCall{Call: call} +} + +// MockNamespaceableResourceInterfaceApplyCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceApplyCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceApplyCall) Do(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceApplyCall) DoAndReturn(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -328,9 +640,33 @@ func (m *MockNamespaceableResourceInterface) ApplyStatus(arg0 context.Context, a } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2, arg3 any) *MockNamespaceableResourceInterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).ApplyStatus), arg0, arg1, arg2, arg3) + return &MockNamespaceableResourceInterfaceApplyStatusCall{Call: call} +} + +// MockNamespaceableResourceInterfaceApplyStatusCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceApplyStatusCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceApplyStatusCall) Do(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceApplyStatusCall) DoAndReturn(f func(context.Context, string, *unstructured.Unstructured, v1.ApplyOptions) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -347,10 +683,34 @@ func (m *MockNamespaceableResourceInterface) Create(arg0 context.Context, arg1 * } // Create indicates an expected call of Create. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Create(arg0, arg1, arg2 any, arg3 ...any) *MockNamespaceableResourceInterfaceCreateCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Create), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Create), varargs...) + return &MockNamespaceableResourceInterfaceCreateCall{Call: call} +} + +// MockNamespaceableResourceInterfaceCreateCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceCreateCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceCreateCall) Do(f func(context.Context, *unstructured.Unstructured, v1.CreateOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceCreateCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.CreateOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -366,10 +726,34 @@ func (m *MockNamespaceableResourceInterface) Delete(arg0 context.Context, arg1 s } // Delete indicates an expected call of Delete. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Delete(arg0, arg1, arg2 any, arg3 ...any) *MockNamespaceableResourceInterfaceDeleteCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Delete), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Delete), varargs...) + return &MockNamespaceableResourceInterfaceDeleteCall{Call: call} +} + +// MockNamespaceableResourceInterfaceDeleteCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceDeleteCall) Return(arg0 error) *MockNamespaceableResourceInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions, ...string) error) *MockNamespaceableResourceInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions, ...string) error) *MockNamespaceableResourceInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -381,9 +765,33 @@ func (m *MockNamespaceableResourceInterface) DeleteCollection(arg0 context.Conte } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockNamespaceableResourceInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockNamespaceableResourceInterfaceDeleteCollectionCall{Call: call} +} + +// MockNamespaceableResourceInterfaceDeleteCollectionCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceDeleteCollectionCall) Return(arg0 error) *MockNamespaceableResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockNamespaceableResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockNamespaceableResourceInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -400,10 +808,34 @@ func (m *MockNamespaceableResourceInterface) Get(arg0 context.Context, arg1 stri } // Get indicates an expected call of Get. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Get(arg0, arg1, arg2 any, arg3 ...any) *MockNamespaceableResourceInterfaceGetCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Get), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Get), varargs...) + return &MockNamespaceableResourceInterfaceGetCall{Call: call} +} + +// MockNamespaceableResourceInterfaceGetCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceGetCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -416,9 +848,33 @@ func (m *MockNamespaceableResourceInterface) List(arg0 context.Context, arg1 v1. } // List indicates an expected call of List. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) List(arg0, arg1 any) *MockNamespaceableResourceInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).List), arg0, arg1) + return &MockNamespaceableResourceInterfaceListCall{Call: call} +} + +// MockNamespaceableResourceInterfaceListCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceListCall) Return(arg0 *unstructured.UnstructuredList, arg1 error) *MockNamespaceableResourceInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*unstructured.UnstructuredList, error)) *MockNamespaceableResourceInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*unstructured.UnstructuredList, error)) *MockNamespaceableResourceInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Namespace mocks base method. @@ -430,9 +886,33 @@ func (m *MockNamespaceableResourceInterface) Namespace(arg0 string) dynamic.Reso } // Namespace indicates an expected call of Namespace. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Namespace(arg0 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Namespace(arg0 any) *MockNamespaceableResourceInterfaceNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Namespace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Namespace), arg0) + return &MockNamespaceableResourceInterfaceNamespaceCall{Call: call} +} + +// MockNamespaceableResourceInterfaceNamespaceCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceNamespaceCall) Return(arg0 dynamic.ResourceInterface) *MockNamespaceableResourceInterfaceNamespaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceNamespaceCall) Do(f func(string) dynamic.ResourceInterface) *MockNamespaceableResourceInterfaceNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceNamespaceCall) DoAndReturn(f func(string) dynamic.ResourceInterface) *MockNamespaceableResourceInterfaceNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -449,10 +929,34 @@ func (m *MockNamespaceableResourceInterface) Patch(arg0 context.Context, arg1 st } // Patch indicates an expected call of Patch. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockNamespaceableResourceInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Patch), varargs...) + return &MockNamespaceableResourceInterfacePatchCall{Call: call} +} + +// MockNamespaceableResourceInterfacePatchCall wrap *gomock.Call +type MockNamespaceableResourceInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfacePatchCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -469,10 +973,34 @@ func (m *MockNamespaceableResourceInterface) Update(arg0 context.Context, arg1 * } // Update indicates an expected call of Update. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Update(arg0, arg1, arg2 any, arg3 ...any) *MockNamespaceableResourceInterfaceUpdateCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Update), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Update), varargs...) + return &MockNamespaceableResourceInterfaceUpdateCall{Call: call} +} + +// MockNamespaceableResourceInterfaceUpdateCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceUpdateCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceUpdateCall) Do(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceUpdateCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -485,9 +1013,33 @@ func (m *MockNamespaceableResourceInterface) UpdateStatus(arg0 context.Context, } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockNamespaceableResourceInterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockNamespaceableResourceInterfaceUpdateStatusCall{Call: call} +} + +// MockNamespaceableResourceInterfaceUpdateStatusCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceUpdateStatusCall) Return(arg0 *unstructured.Unstructured, arg1 error) *MockNamespaceableResourceInterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceUpdateStatusCall) Do(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *unstructured.Unstructured, v1.UpdateOptions) (*unstructured.Unstructured, error)) *MockNamespaceableResourceInterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -500,7 +1052,31 @@ func (m *MockNamespaceableResourceInterface) Watch(arg0 context.Context, arg1 v1 } // Watch indicates an expected call of Watch. -func (mr *MockNamespaceableResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockNamespaceableResourceInterfaceMockRecorder) Watch(arg0, arg1 any) *MockNamespaceableResourceInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockNamespaceableResourceInterface)(nil).Watch), arg0, arg1) + return &MockNamespaceableResourceInterfaceWatchCall{Call: call} +} + +// MockNamespaceableResourceInterfaceWatchCall wrap *gomock.Call +type MockNamespaceableResourceInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNamespaceableResourceInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockNamespaceableResourceInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNamespaceableResourceInterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockNamespaceableResourceInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNamespaceableResourceInterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockNamespaceableResourceInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/k8sclient_mock.go b/caas/kubernetes/provider/mocks/k8sclient_mock.go index 6e6d6dd9f62..8c814b1f5d9 100644 --- a/caas/kubernetes/provider/mocks/k8sclient_mock.go +++ b/caas/kubernetes/provider/mocks/k8sclient_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/k8sclient_mock.go k8s.io/client-go/kubernetes Interface +// mockgen -typed -package mocks -destination mocks/k8sclient_mock.go k8s.io/client-go/kubernetes Interface // // Package mocks is a generated GoMock package. @@ -99,9 +99,33 @@ func (m *MockInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Inte } // AdmissionregistrationV1 indicates an expected call of AdmissionregistrationV1. -func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1() *MockInterfaceAdmissionregistrationV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1)) + return &MockInterfaceAdmissionregistrationV1Call{Call: call} +} + +// MockInterfaceAdmissionregistrationV1Call wrap *gomock.Call +type MockInterfaceAdmissionregistrationV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAdmissionregistrationV1Call) Return(arg0 v1.AdmissionregistrationV1Interface) *MockInterfaceAdmissionregistrationV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAdmissionregistrationV1Call) Do(f func() v1.AdmissionregistrationV1Interface) *MockInterfaceAdmissionregistrationV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAdmissionregistrationV1Call) DoAndReturn(f func() v1.AdmissionregistrationV1Interface) *MockInterfaceAdmissionregistrationV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AdmissionregistrationV1alpha1 mocks base method. @@ -113,9 +137,33 @@ func (m *MockInterface) AdmissionregistrationV1alpha1() v1alpha1.Admissionregist } // AdmissionregistrationV1alpha1 indicates an expected call of AdmissionregistrationV1alpha1. -func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1alpha1() *MockInterfaceAdmissionregistrationV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1alpha1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1alpha1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1alpha1)) + return &MockInterfaceAdmissionregistrationV1alpha1Call{Call: call} +} + +// MockInterfaceAdmissionregistrationV1alpha1Call wrap *gomock.Call +type MockInterfaceAdmissionregistrationV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAdmissionregistrationV1alpha1Call) Return(arg0 v1alpha1.AdmissionregistrationV1alpha1Interface) *MockInterfaceAdmissionregistrationV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAdmissionregistrationV1alpha1Call) Do(f func() v1alpha1.AdmissionregistrationV1alpha1Interface) *MockInterfaceAdmissionregistrationV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAdmissionregistrationV1alpha1Call) DoAndReturn(f func() v1alpha1.AdmissionregistrationV1alpha1Interface) *MockInterfaceAdmissionregistrationV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AdmissionregistrationV1beta1 mocks base method. @@ -127,9 +175,33 @@ func (m *MockInterface) AdmissionregistrationV1beta1() v1beta1.Admissionregistra } // AdmissionregistrationV1beta1 indicates an expected call of AdmissionregistrationV1beta1. -func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AdmissionregistrationV1beta1() *MockInterfaceAdmissionregistrationV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1beta1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdmissionregistrationV1beta1", reflect.TypeOf((*MockInterface)(nil).AdmissionregistrationV1beta1)) + return &MockInterfaceAdmissionregistrationV1beta1Call{Call: call} +} + +// MockInterfaceAdmissionregistrationV1beta1Call wrap *gomock.Call +type MockInterfaceAdmissionregistrationV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAdmissionregistrationV1beta1Call) Return(arg0 v1beta1.AdmissionregistrationV1beta1Interface) *MockInterfaceAdmissionregistrationV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAdmissionregistrationV1beta1Call) Do(f func() v1beta1.AdmissionregistrationV1beta1Interface) *MockInterfaceAdmissionregistrationV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAdmissionregistrationV1beta1Call) DoAndReturn(f func() v1beta1.AdmissionregistrationV1beta1Interface) *MockInterfaceAdmissionregistrationV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AppsV1 mocks base method. @@ -141,9 +213,33 @@ func (m *MockInterface) AppsV1() v10.AppsV1Interface { } // AppsV1 indicates an expected call of AppsV1. -func (mr *MockInterfaceMockRecorder) AppsV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AppsV1() *MockInterfaceAppsV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1", reflect.TypeOf((*MockInterface)(nil).AppsV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1", reflect.TypeOf((*MockInterface)(nil).AppsV1)) + return &MockInterfaceAppsV1Call{Call: call} +} + +// MockInterfaceAppsV1Call wrap *gomock.Call +type MockInterfaceAppsV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAppsV1Call) Return(arg0 v10.AppsV1Interface) *MockInterfaceAppsV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAppsV1Call) Do(f func() v10.AppsV1Interface) *MockInterfaceAppsV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAppsV1Call) DoAndReturn(f func() v10.AppsV1Interface) *MockInterfaceAppsV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AppsV1beta1 mocks base method. @@ -155,9 +251,33 @@ func (m *MockInterface) AppsV1beta1() v1beta10.AppsV1beta1Interface { } // AppsV1beta1 indicates an expected call of AppsV1beta1. -func (mr *MockInterfaceMockRecorder) AppsV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AppsV1beta1() *MockInterfaceAppsV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1beta1", reflect.TypeOf((*MockInterface)(nil).AppsV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1beta1", reflect.TypeOf((*MockInterface)(nil).AppsV1beta1)) + return &MockInterfaceAppsV1beta1Call{Call: call} +} + +// MockInterfaceAppsV1beta1Call wrap *gomock.Call +type MockInterfaceAppsV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAppsV1beta1Call) Return(arg0 v1beta10.AppsV1beta1Interface) *MockInterfaceAppsV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAppsV1beta1Call) Do(f func() v1beta10.AppsV1beta1Interface) *MockInterfaceAppsV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAppsV1beta1Call) DoAndReturn(f func() v1beta10.AppsV1beta1Interface) *MockInterfaceAppsV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AppsV1beta2 mocks base method. @@ -169,9 +289,33 @@ func (m *MockInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { } // AppsV1beta2 indicates an expected call of AppsV1beta2. -func (mr *MockInterfaceMockRecorder) AppsV1beta2() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AppsV1beta2() *MockInterfaceAppsV1beta2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1beta2", reflect.TypeOf((*MockInterface)(nil).AppsV1beta2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppsV1beta2", reflect.TypeOf((*MockInterface)(nil).AppsV1beta2)) + return &MockInterfaceAppsV1beta2Call{Call: call} +} + +// MockInterfaceAppsV1beta2Call wrap *gomock.Call +type MockInterfaceAppsV1beta2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAppsV1beta2Call) Return(arg0 v1beta2.AppsV1beta2Interface) *MockInterfaceAppsV1beta2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAppsV1beta2Call) Do(f func() v1beta2.AppsV1beta2Interface) *MockInterfaceAppsV1beta2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAppsV1beta2Call) DoAndReturn(f func() v1beta2.AppsV1beta2Interface) *MockInterfaceAppsV1beta2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthenticationV1 mocks base method. @@ -183,9 +327,33 @@ func (m *MockInterface) AuthenticationV1() v11.AuthenticationV1Interface { } // AuthenticationV1 indicates an expected call of AuthenticationV1. -func (mr *MockInterfaceMockRecorder) AuthenticationV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AuthenticationV1() *MockInterfaceAuthenticationV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1)) + return &MockInterfaceAuthenticationV1Call{Call: call} +} + +// MockInterfaceAuthenticationV1Call wrap *gomock.Call +type MockInterfaceAuthenticationV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAuthenticationV1Call) Return(arg0 v11.AuthenticationV1Interface) *MockInterfaceAuthenticationV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAuthenticationV1Call) Do(f func() v11.AuthenticationV1Interface) *MockInterfaceAuthenticationV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAuthenticationV1Call) DoAndReturn(f func() v11.AuthenticationV1Interface) *MockInterfaceAuthenticationV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthenticationV1alpha1 mocks base method. @@ -197,9 +365,33 @@ func (m *MockInterface) AuthenticationV1alpha1() v1alpha11.AuthenticationV1alpha } // AuthenticationV1alpha1 indicates an expected call of AuthenticationV1alpha1. -func (mr *MockInterfaceMockRecorder) AuthenticationV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AuthenticationV1alpha1() *MockInterfaceAuthenticationV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1alpha1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1alpha1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1alpha1)) + return &MockInterfaceAuthenticationV1alpha1Call{Call: call} +} + +// MockInterfaceAuthenticationV1alpha1Call wrap *gomock.Call +type MockInterfaceAuthenticationV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAuthenticationV1alpha1Call) Return(arg0 v1alpha11.AuthenticationV1alpha1Interface) *MockInterfaceAuthenticationV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAuthenticationV1alpha1Call) Do(f func() v1alpha11.AuthenticationV1alpha1Interface) *MockInterfaceAuthenticationV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAuthenticationV1alpha1Call) DoAndReturn(f func() v1alpha11.AuthenticationV1alpha1Interface) *MockInterfaceAuthenticationV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthenticationV1beta1 mocks base method. @@ -211,9 +403,33 @@ func (m *MockInterface) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1In } // AuthenticationV1beta1 indicates an expected call of AuthenticationV1beta1. -func (mr *MockInterfaceMockRecorder) AuthenticationV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AuthenticationV1beta1() *MockInterfaceAuthenticationV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1beta1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticationV1beta1", reflect.TypeOf((*MockInterface)(nil).AuthenticationV1beta1)) + return &MockInterfaceAuthenticationV1beta1Call{Call: call} +} + +// MockInterfaceAuthenticationV1beta1Call wrap *gomock.Call +type MockInterfaceAuthenticationV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAuthenticationV1beta1Call) Return(arg0 v1beta11.AuthenticationV1beta1Interface) *MockInterfaceAuthenticationV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAuthenticationV1beta1Call) Do(f func() v1beta11.AuthenticationV1beta1Interface) *MockInterfaceAuthenticationV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAuthenticationV1beta1Call) DoAndReturn(f func() v1beta11.AuthenticationV1beta1Interface) *MockInterfaceAuthenticationV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthorizationV1 mocks base method. @@ -225,9 +441,33 @@ func (m *MockInterface) AuthorizationV1() v12.AuthorizationV1Interface { } // AuthorizationV1 indicates an expected call of AuthorizationV1. -func (mr *MockInterfaceMockRecorder) AuthorizationV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AuthorizationV1() *MockInterfaceAuthorizationV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizationV1", reflect.TypeOf((*MockInterface)(nil).AuthorizationV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizationV1", reflect.TypeOf((*MockInterface)(nil).AuthorizationV1)) + return &MockInterfaceAuthorizationV1Call{Call: call} +} + +// MockInterfaceAuthorizationV1Call wrap *gomock.Call +type MockInterfaceAuthorizationV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAuthorizationV1Call) Return(arg0 v12.AuthorizationV1Interface) *MockInterfaceAuthorizationV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAuthorizationV1Call) Do(f func() v12.AuthorizationV1Interface) *MockInterfaceAuthorizationV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAuthorizationV1Call) DoAndReturn(f func() v12.AuthorizationV1Interface) *MockInterfaceAuthorizationV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthorizationV1beta1 mocks base method. @@ -239,9 +479,33 @@ func (m *MockInterface) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Inte } // AuthorizationV1beta1 indicates an expected call of AuthorizationV1beta1. -func (mr *MockInterfaceMockRecorder) AuthorizationV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AuthorizationV1beta1() *MockInterfaceAuthorizationV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizationV1beta1", reflect.TypeOf((*MockInterface)(nil).AuthorizationV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizationV1beta1", reflect.TypeOf((*MockInterface)(nil).AuthorizationV1beta1)) + return &MockInterfaceAuthorizationV1beta1Call{Call: call} +} + +// MockInterfaceAuthorizationV1beta1Call wrap *gomock.Call +type MockInterfaceAuthorizationV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAuthorizationV1beta1Call) Return(arg0 v1beta12.AuthorizationV1beta1Interface) *MockInterfaceAuthorizationV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAuthorizationV1beta1Call) Do(f func() v1beta12.AuthorizationV1beta1Interface) *MockInterfaceAuthorizationV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAuthorizationV1beta1Call) DoAndReturn(f func() v1beta12.AuthorizationV1beta1Interface) *MockInterfaceAuthorizationV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AutoscalingV1 mocks base method. @@ -253,9 +517,33 @@ func (m *MockInterface) AutoscalingV1() v13.AutoscalingV1Interface { } // AutoscalingV1 indicates an expected call of AutoscalingV1. -func (mr *MockInterfaceMockRecorder) AutoscalingV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AutoscalingV1() *MockInterfaceAutoscalingV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV1", reflect.TypeOf((*MockInterface)(nil).AutoscalingV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV1", reflect.TypeOf((*MockInterface)(nil).AutoscalingV1)) + return &MockInterfaceAutoscalingV1Call{Call: call} +} + +// MockInterfaceAutoscalingV1Call wrap *gomock.Call +type MockInterfaceAutoscalingV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAutoscalingV1Call) Return(arg0 v13.AutoscalingV1Interface) *MockInterfaceAutoscalingV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAutoscalingV1Call) Do(f func() v13.AutoscalingV1Interface) *MockInterfaceAutoscalingV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAutoscalingV1Call) DoAndReturn(f func() v13.AutoscalingV1Interface) *MockInterfaceAutoscalingV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AutoscalingV2 mocks base method. @@ -267,9 +555,33 @@ func (m *MockInterface) AutoscalingV2() v2.AutoscalingV2Interface { } // AutoscalingV2 indicates an expected call of AutoscalingV2. -func (mr *MockInterfaceMockRecorder) AutoscalingV2() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AutoscalingV2() *MockInterfaceAutoscalingV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2)) + return &MockInterfaceAutoscalingV2Call{Call: call} +} + +// MockInterfaceAutoscalingV2Call wrap *gomock.Call +type MockInterfaceAutoscalingV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAutoscalingV2Call) Return(arg0 v2.AutoscalingV2Interface) *MockInterfaceAutoscalingV2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAutoscalingV2Call) Do(f func() v2.AutoscalingV2Interface) *MockInterfaceAutoscalingV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAutoscalingV2Call) DoAndReturn(f func() v2.AutoscalingV2Interface) *MockInterfaceAutoscalingV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AutoscalingV2beta1 mocks base method. @@ -281,9 +593,33 @@ func (m *MockInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface } // AutoscalingV2beta1 indicates an expected call of AutoscalingV2beta1. -func (mr *MockInterfaceMockRecorder) AutoscalingV2beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AutoscalingV2beta1() *MockInterfaceAutoscalingV2beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2beta1", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2beta1", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2beta1)) + return &MockInterfaceAutoscalingV2beta1Call{Call: call} +} + +// MockInterfaceAutoscalingV2beta1Call wrap *gomock.Call +type MockInterfaceAutoscalingV2beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAutoscalingV2beta1Call) Return(arg0 v2beta1.AutoscalingV2beta1Interface) *MockInterfaceAutoscalingV2beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAutoscalingV2beta1Call) Do(f func() v2beta1.AutoscalingV2beta1Interface) *MockInterfaceAutoscalingV2beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAutoscalingV2beta1Call) DoAndReturn(f func() v2beta1.AutoscalingV2beta1Interface) *MockInterfaceAutoscalingV2beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // AutoscalingV2beta2 mocks base method. @@ -295,9 +631,33 @@ func (m *MockInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface } // AutoscalingV2beta2 indicates an expected call of AutoscalingV2beta2. -func (mr *MockInterfaceMockRecorder) AutoscalingV2beta2() *gomock.Call { +func (mr *MockInterfaceMockRecorder) AutoscalingV2beta2() *MockInterfaceAutoscalingV2beta2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2beta2", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2beta2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutoscalingV2beta2", reflect.TypeOf((*MockInterface)(nil).AutoscalingV2beta2)) + return &MockInterfaceAutoscalingV2beta2Call{Call: call} +} + +// MockInterfaceAutoscalingV2beta2Call wrap *gomock.Call +type MockInterfaceAutoscalingV2beta2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAutoscalingV2beta2Call) Return(arg0 v2beta2.AutoscalingV2beta2Interface) *MockInterfaceAutoscalingV2beta2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAutoscalingV2beta2Call) Do(f func() v2beta2.AutoscalingV2beta2Interface) *MockInterfaceAutoscalingV2beta2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAutoscalingV2beta2Call) DoAndReturn(f func() v2beta2.AutoscalingV2beta2Interface) *MockInterfaceAutoscalingV2beta2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // BatchV1 mocks base method. @@ -309,9 +669,33 @@ func (m *MockInterface) BatchV1() v14.BatchV1Interface { } // BatchV1 indicates an expected call of BatchV1. -func (mr *MockInterfaceMockRecorder) BatchV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) BatchV1() *MockInterfaceBatchV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchV1", reflect.TypeOf((*MockInterface)(nil).BatchV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchV1", reflect.TypeOf((*MockInterface)(nil).BatchV1)) + return &MockInterfaceBatchV1Call{Call: call} +} + +// MockInterfaceBatchV1Call wrap *gomock.Call +type MockInterfaceBatchV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceBatchV1Call) Return(arg0 v14.BatchV1Interface) *MockInterfaceBatchV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceBatchV1Call) Do(f func() v14.BatchV1Interface) *MockInterfaceBatchV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceBatchV1Call) DoAndReturn(f func() v14.BatchV1Interface) *MockInterfaceBatchV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // BatchV1beta1 mocks base method. @@ -323,9 +707,33 @@ func (m *MockInterface) BatchV1beta1() v1beta13.BatchV1beta1Interface { } // BatchV1beta1 indicates an expected call of BatchV1beta1. -func (mr *MockInterfaceMockRecorder) BatchV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) BatchV1beta1() *MockInterfaceBatchV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchV1beta1", reflect.TypeOf((*MockInterface)(nil).BatchV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchV1beta1", reflect.TypeOf((*MockInterface)(nil).BatchV1beta1)) + return &MockInterfaceBatchV1beta1Call{Call: call} +} + +// MockInterfaceBatchV1beta1Call wrap *gomock.Call +type MockInterfaceBatchV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceBatchV1beta1Call) Return(arg0 v1beta13.BatchV1beta1Interface) *MockInterfaceBatchV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceBatchV1beta1Call) Do(f func() v1beta13.BatchV1beta1Interface) *MockInterfaceBatchV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceBatchV1beta1Call) DoAndReturn(f func() v1beta13.BatchV1beta1Interface) *MockInterfaceBatchV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CertificatesV1 mocks base method. @@ -337,9 +745,33 @@ func (m *MockInterface) CertificatesV1() v15.CertificatesV1Interface { } // CertificatesV1 indicates an expected call of CertificatesV1. -func (mr *MockInterfaceMockRecorder) CertificatesV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CertificatesV1() *MockInterfaceCertificatesV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1)) + return &MockInterfaceCertificatesV1Call{Call: call} +} + +// MockInterfaceCertificatesV1Call wrap *gomock.Call +type MockInterfaceCertificatesV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCertificatesV1Call) Return(arg0 v15.CertificatesV1Interface) *MockInterfaceCertificatesV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCertificatesV1Call) Do(f func() v15.CertificatesV1Interface) *MockInterfaceCertificatesV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCertificatesV1Call) DoAndReturn(f func() v15.CertificatesV1Interface) *MockInterfaceCertificatesV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CertificatesV1alpha1 mocks base method. @@ -351,9 +783,33 @@ func (m *MockInterface) CertificatesV1alpha1() v1alpha12.CertificatesV1alpha1Int } // CertificatesV1alpha1 indicates an expected call of CertificatesV1alpha1. -func (mr *MockInterfaceMockRecorder) CertificatesV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CertificatesV1alpha1() *MockInterfaceCertificatesV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1alpha1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1alpha1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1alpha1)) + return &MockInterfaceCertificatesV1alpha1Call{Call: call} +} + +// MockInterfaceCertificatesV1alpha1Call wrap *gomock.Call +type MockInterfaceCertificatesV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCertificatesV1alpha1Call) Return(arg0 v1alpha12.CertificatesV1alpha1Interface) *MockInterfaceCertificatesV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCertificatesV1alpha1Call) Do(f func() v1alpha12.CertificatesV1alpha1Interface) *MockInterfaceCertificatesV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCertificatesV1alpha1Call) DoAndReturn(f func() v1alpha12.CertificatesV1alpha1Interface) *MockInterfaceCertificatesV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CertificatesV1beta1 mocks base method. @@ -365,9 +821,33 @@ func (m *MockInterface) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interf } // CertificatesV1beta1 indicates an expected call of CertificatesV1beta1. -func (mr *MockInterfaceMockRecorder) CertificatesV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CertificatesV1beta1() *MockInterfaceCertificatesV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1beta1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificatesV1beta1", reflect.TypeOf((*MockInterface)(nil).CertificatesV1beta1)) + return &MockInterfaceCertificatesV1beta1Call{Call: call} +} + +// MockInterfaceCertificatesV1beta1Call wrap *gomock.Call +type MockInterfaceCertificatesV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCertificatesV1beta1Call) Return(arg0 v1beta14.CertificatesV1beta1Interface) *MockInterfaceCertificatesV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCertificatesV1beta1Call) Do(f func() v1beta14.CertificatesV1beta1Interface) *MockInterfaceCertificatesV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCertificatesV1beta1Call) DoAndReturn(f func() v1beta14.CertificatesV1beta1Interface) *MockInterfaceCertificatesV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CoordinationV1 mocks base method. @@ -379,9 +859,33 @@ func (m *MockInterface) CoordinationV1() v16.CoordinationV1Interface { } // CoordinationV1 indicates an expected call of CoordinationV1. -func (mr *MockInterfaceMockRecorder) CoordinationV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CoordinationV1() *MockInterfaceCoordinationV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoordinationV1", reflect.TypeOf((*MockInterface)(nil).CoordinationV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoordinationV1", reflect.TypeOf((*MockInterface)(nil).CoordinationV1)) + return &MockInterfaceCoordinationV1Call{Call: call} +} + +// MockInterfaceCoordinationV1Call wrap *gomock.Call +type MockInterfaceCoordinationV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCoordinationV1Call) Return(arg0 v16.CoordinationV1Interface) *MockInterfaceCoordinationV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCoordinationV1Call) Do(f func() v16.CoordinationV1Interface) *MockInterfaceCoordinationV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCoordinationV1Call) DoAndReturn(f func() v16.CoordinationV1Interface) *MockInterfaceCoordinationV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CoordinationV1beta1 mocks base method. @@ -393,9 +897,33 @@ func (m *MockInterface) CoordinationV1beta1() v1beta15.CoordinationV1beta1Interf } // CoordinationV1beta1 indicates an expected call of CoordinationV1beta1. -func (mr *MockInterfaceMockRecorder) CoordinationV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CoordinationV1beta1() *MockInterfaceCoordinationV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoordinationV1beta1", reflect.TypeOf((*MockInterface)(nil).CoordinationV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoordinationV1beta1", reflect.TypeOf((*MockInterface)(nil).CoordinationV1beta1)) + return &MockInterfaceCoordinationV1beta1Call{Call: call} +} + +// MockInterfaceCoordinationV1beta1Call wrap *gomock.Call +type MockInterfaceCoordinationV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCoordinationV1beta1Call) Return(arg0 v1beta15.CoordinationV1beta1Interface) *MockInterfaceCoordinationV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCoordinationV1beta1Call) Do(f func() v1beta15.CoordinationV1beta1Interface) *MockInterfaceCoordinationV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCoordinationV1beta1Call) DoAndReturn(f func() v1beta15.CoordinationV1beta1Interface) *MockInterfaceCoordinationV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CoreV1 mocks base method. @@ -407,9 +935,33 @@ func (m *MockInterface) CoreV1() v17.CoreV1Interface { } // CoreV1 indicates an expected call of CoreV1. -func (mr *MockInterfaceMockRecorder) CoreV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) CoreV1() *MockInterfaceCoreV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoreV1", reflect.TypeOf((*MockInterface)(nil).CoreV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CoreV1", reflect.TypeOf((*MockInterface)(nil).CoreV1)) + return &MockInterfaceCoreV1Call{Call: call} +} + +// MockInterfaceCoreV1Call wrap *gomock.Call +type MockInterfaceCoreV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceCoreV1Call) Return(arg0 v17.CoreV1Interface) *MockInterfaceCoreV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceCoreV1Call) Do(f func() v17.CoreV1Interface) *MockInterfaceCoreV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceCoreV1Call) DoAndReturn(f func() v17.CoreV1Interface) *MockInterfaceCoreV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // Discovery mocks base method. @@ -421,9 +973,33 @@ func (m *MockInterface) Discovery() discovery.DiscoveryInterface { } // Discovery indicates an expected call of Discovery. -func (mr *MockInterfaceMockRecorder) Discovery() *gomock.Call { +func (mr *MockInterfaceMockRecorder) Discovery() *MockInterfaceDiscoveryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discovery", reflect.TypeOf((*MockInterface)(nil).Discovery)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discovery", reflect.TypeOf((*MockInterface)(nil).Discovery)) + return &MockInterfaceDiscoveryCall{Call: call} +} + +// MockInterfaceDiscoveryCall wrap *gomock.Call +type MockInterfaceDiscoveryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceDiscoveryCall) Return(arg0 discovery.DiscoveryInterface) *MockInterfaceDiscoveryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceDiscoveryCall) Do(f func() discovery.DiscoveryInterface) *MockInterfaceDiscoveryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceDiscoveryCall) DoAndReturn(f func() discovery.DiscoveryInterface) *MockInterfaceDiscoveryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DiscoveryV1 mocks base method. @@ -435,9 +1011,33 @@ func (m *MockInterface) DiscoveryV1() v18.DiscoveryV1Interface { } // DiscoveryV1 indicates an expected call of DiscoveryV1. -func (mr *MockInterfaceMockRecorder) DiscoveryV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) DiscoveryV1() *MockInterfaceDiscoveryV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoveryV1", reflect.TypeOf((*MockInterface)(nil).DiscoveryV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoveryV1", reflect.TypeOf((*MockInterface)(nil).DiscoveryV1)) + return &MockInterfaceDiscoveryV1Call{Call: call} +} + +// MockInterfaceDiscoveryV1Call wrap *gomock.Call +type MockInterfaceDiscoveryV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceDiscoveryV1Call) Return(arg0 v18.DiscoveryV1Interface) *MockInterfaceDiscoveryV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceDiscoveryV1Call) Do(f func() v18.DiscoveryV1Interface) *MockInterfaceDiscoveryV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceDiscoveryV1Call) DoAndReturn(f func() v18.DiscoveryV1Interface) *MockInterfaceDiscoveryV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // DiscoveryV1beta1 mocks base method. @@ -449,9 +1049,33 @@ func (m *MockInterface) DiscoveryV1beta1() v1beta16.DiscoveryV1beta1Interface { } // DiscoveryV1beta1 indicates an expected call of DiscoveryV1beta1. -func (mr *MockInterfaceMockRecorder) DiscoveryV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) DiscoveryV1beta1() *MockInterfaceDiscoveryV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoveryV1beta1", reflect.TypeOf((*MockInterface)(nil).DiscoveryV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoveryV1beta1", reflect.TypeOf((*MockInterface)(nil).DiscoveryV1beta1)) + return &MockInterfaceDiscoveryV1beta1Call{Call: call} +} + +// MockInterfaceDiscoveryV1beta1Call wrap *gomock.Call +type MockInterfaceDiscoveryV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceDiscoveryV1beta1Call) Return(arg0 v1beta16.DiscoveryV1beta1Interface) *MockInterfaceDiscoveryV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceDiscoveryV1beta1Call) Do(f func() v1beta16.DiscoveryV1beta1Interface) *MockInterfaceDiscoveryV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceDiscoveryV1beta1Call) DoAndReturn(f func() v1beta16.DiscoveryV1beta1Interface) *MockInterfaceDiscoveryV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // EventsV1 mocks base method. @@ -463,9 +1087,33 @@ func (m *MockInterface) EventsV1() v19.EventsV1Interface { } // EventsV1 indicates an expected call of EventsV1. -func (mr *MockInterfaceMockRecorder) EventsV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) EventsV1() *MockInterfaceEventsV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsV1", reflect.TypeOf((*MockInterface)(nil).EventsV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsV1", reflect.TypeOf((*MockInterface)(nil).EventsV1)) + return &MockInterfaceEventsV1Call{Call: call} +} + +// MockInterfaceEventsV1Call wrap *gomock.Call +type MockInterfaceEventsV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceEventsV1Call) Return(arg0 v19.EventsV1Interface) *MockInterfaceEventsV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceEventsV1Call) Do(f func() v19.EventsV1Interface) *MockInterfaceEventsV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceEventsV1Call) DoAndReturn(f func() v19.EventsV1Interface) *MockInterfaceEventsV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // EventsV1beta1 mocks base method. @@ -477,9 +1125,33 @@ func (m *MockInterface) EventsV1beta1() v1beta17.EventsV1beta1Interface { } // EventsV1beta1 indicates an expected call of EventsV1beta1. -func (mr *MockInterfaceMockRecorder) EventsV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) EventsV1beta1() *MockInterfaceEventsV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsV1beta1", reflect.TypeOf((*MockInterface)(nil).EventsV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsV1beta1", reflect.TypeOf((*MockInterface)(nil).EventsV1beta1)) + return &MockInterfaceEventsV1beta1Call{Call: call} +} + +// MockInterfaceEventsV1beta1Call wrap *gomock.Call +type MockInterfaceEventsV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceEventsV1beta1Call) Return(arg0 v1beta17.EventsV1beta1Interface) *MockInterfaceEventsV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceEventsV1beta1Call) Do(f func() v1beta17.EventsV1beta1Interface) *MockInterfaceEventsV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceEventsV1beta1Call) DoAndReturn(f func() v1beta17.EventsV1beta1Interface) *MockInterfaceEventsV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ExtensionsV1beta1 mocks base method. @@ -491,9 +1163,33 @@ func (m *MockInterface) ExtensionsV1beta1() v1beta18.ExtensionsV1beta1Interface } // ExtensionsV1beta1 indicates an expected call of ExtensionsV1beta1. -func (mr *MockInterfaceMockRecorder) ExtensionsV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) ExtensionsV1beta1() *MockInterfaceExtensionsV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtensionsV1beta1", reflect.TypeOf((*MockInterface)(nil).ExtensionsV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtensionsV1beta1", reflect.TypeOf((*MockInterface)(nil).ExtensionsV1beta1)) + return &MockInterfaceExtensionsV1beta1Call{Call: call} +} + +// MockInterfaceExtensionsV1beta1Call wrap *gomock.Call +type MockInterfaceExtensionsV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceExtensionsV1beta1Call) Return(arg0 v1beta18.ExtensionsV1beta1Interface) *MockInterfaceExtensionsV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceExtensionsV1beta1Call) Do(f func() v1beta18.ExtensionsV1beta1Interface) *MockInterfaceExtensionsV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceExtensionsV1beta1Call) DoAndReturn(f func() v1beta18.ExtensionsV1beta1Interface) *MockInterfaceExtensionsV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // FlowcontrolV1 mocks base method. @@ -505,9 +1201,33 @@ func (m *MockInterface) FlowcontrolV1() v110.FlowcontrolV1Interface { } // FlowcontrolV1 indicates an expected call of FlowcontrolV1. -func (mr *MockInterfaceMockRecorder) FlowcontrolV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) FlowcontrolV1() *MockInterfaceFlowcontrolV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1)) + return &MockInterfaceFlowcontrolV1Call{Call: call} +} + +// MockInterfaceFlowcontrolV1Call wrap *gomock.Call +type MockInterfaceFlowcontrolV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceFlowcontrolV1Call) Return(arg0 v110.FlowcontrolV1Interface) *MockInterfaceFlowcontrolV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceFlowcontrolV1Call) Do(f func() v110.FlowcontrolV1Interface) *MockInterfaceFlowcontrolV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceFlowcontrolV1Call) DoAndReturn(f func() v110.FlowcontrolV1Interface) *MockInterfaceFlowcontrolV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // FlowcontrolV1beta1 mocks base method. @@ -519,9 +1239,33 @@ func (m *MockInterface) FlowcontrolV1beta1() v1beta19.FlowcontrolV1beta1Interfac } // FlowcontrolV1beta1 indicates an expected call of FlowcontrolV1beta1. -func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta1() *MockInterfaceFlowcontrolV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta1", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta1", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta1)) + return &MockInterfaceFlowcontrolV1beta1Call{Call: call} +} + +// MockInterfaceFlowcontrolV1beta1Call wrap *gomock.Call +type MockInterfaceFlowcontrolV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceFlowcontrolV1beta1Call) Return(arg0 v1beta19.FlowcontrolV1beta1Interface) *MockInterfaceFlowcontrolV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceFlowcontrolV1beta1Call) Do(f func() v1beta19.FlowcontrolV1beta1Interface) *MockInterfaceFlowcontrolV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceFlowcontrolV1beta1Call) DoAndReturn(f func() v1beta19.FlowcontrolV1beta1Interface) *MockInterfaceFlowcontrolV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // FlowcontrolV1beta2 mocks base method. @@ -533,9 +1277,33 @@ func (m *MockInterface) FlowcontrolV1beta2() v1beta20.FlowcontrolV1beta2Interfac } // FlowcontrolV1beta2 indicates an expected call of FlowcontrolV1beta2. -func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta2() *gomock.Call { +func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta2() *MockInterfaceFlowcontrolV1beta2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta2", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta2", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta2)) + return &MockInterfaceFlowcontrolV1beta2Call{Call: call} +} + +// MockInterfaceFlowcontrolV1beta2Call wrap *gomock.Call +type MockInterfaceFlowcontrolV1beta2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceFlowcontrolV1beta2Call) Return(arg0 v1beta20.FlowcontrolV1beta2Interface) *MockInterfaceFlowcontrolV1beta2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceFlowcontrolV1beta2Call) Do(f func() v1beta20.FlowcontrolV1beta2Interface) *MockInterfaceFlowcontrolV1beta2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceFlowcontrolV1beta2Call) DoAndReturn(f func() v1beta20.FlowcontrolV1beta2Interface) *MockInterfaceFlowcontrolV1beta2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // FlowcontrolV1beta3 mocks base method. @@ -547,9 +1315,33 @@ func (m *MockInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface } // FlowcontrolV1beta3 indicates an expected call of FlowcontrolV1beta3. -func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta3() *gomock.Call { +func (mr *MockInterfaceMockRecorder) FlowcontrolV1beta3() *MockInterfaceFlowcontrolV1beta3Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta3", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta3)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlowcontrolV1beta3", reflect.TypeOf((*MockInterface)(nil).FlowcontrolV1beta3)) + return &MockInterfaceFlowcontrolV1beta3Call{Call: call} +} + +// MockInterfaceFlowcontrolV1beta3Call wrap *gomock.Call +type MockInterfaceFlowcontrolV1beta3Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceFlowcontrolV1beta3Call) Return(arg0 v1beta3.FlowcontrolV1beta3Interface) *MockInterfaceFlowcontrolV1beta3Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceFlowcontrolV1beta3Call) Do(f func() v1beta3.FlowcontrolV1beta3Interface) *MockInterfaceFlowcontrolV1beta3Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceFlowcontrolV1beta3Call) DoAndReturn(f func() v1beta3.FlowcontrolV1beta3Interface) *MockInterfaceFlowcontrolV1beta3Call { + c.Call = c.Call.DoAndReturn(f) + return c } // InternalV1alpha1 mocks base method. @@ -561,9 +1353,33 @@ func (m *MockInterface) InternalV1alpha1() v1alpha10.InternalV1alpha1Interface { } // InternalV1alpha1 indicates an expected call of InternalV1alpha1. -func (mr *MockInterfaceMockRecorder) InternalV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) InternalV1alpha1() *MockInterfaceInternalV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InternalV1alpha1", reflect.TypeOf((*MockInterface)(nil).InternalV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InternalV1alpha1", reflect.TypeOf((*MockInterface)(nil).InternalV1alpha1)) + return &MockInterfaceInternalV1alpha1Call{Call: call} +} + +// MockInterfaceInternalV1alpha1Call wrap *gomock.Call +type MockInterfaceInternalV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceInternalV1alpha1Call) Return(arg0 v1alpha10.InternalV1alpha1Interface) *MockInterfaceInternalV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceInternalV1alpha1Call) Do(f func() v1alpha10.InternalV1alpha1Interface) *MockInterfaceInternalV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceInternalV1alpha1Call) DoAndReturn(f func() v1alpha10.InternalV1alpha1Interface) *MockInterfaceInternalV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkingV1 mocks base method. @@ -575,9 +1391,33 @@ func (m *MockInterface) NetworkingV1() v111.NetworkingV1Interface { } // NetworkingV1 indicates an expected call of NetworkingV1. -func (mr *MockInterfaceMockRecorder) NetworkingV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NetworkingV1() *MockInterfaceNetworkingV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1)) + return &MockInterfaceNetworkingV1Call{Call: call} +} + +// MockInterfaceNetworkingV1Call wrap *gomock.Call +type MockInterfaceNetworkingV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNetworkingV1Call) Return(arg0 v111.NetworkingV1Interface) *MockInterfaceNetworkingV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNetworkingV1Call) Do(f func() v111.NetworkingV1Interface) *MockInterfaceNetworkingV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNetworkingV1Call) DoAndReturn(f func() v111.NetworkingV1Interface) *MockInterfaceNetworkingV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkingV1alpha1 mocks base method. @@ -589,9 +1429,33 @@ func (m *MockInterface) NetworkingV1alpha1() v1alpha13.NetworkingV1alpha1Interfa } // NetworkingV1alpha1 indicates an expected call of NetworkingV1alpha1. -func (mr *MockInterfaceMockRecorder) NetworkingV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NetworkingV1alpha1() *MockInterfaceNetworkingV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1alpha1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1alpha1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1alpha1)) + return &MockInterfaceNetworkingV1alpha1Call{Call: call} +} + +// MockInterfaceNetworkingV1alpha1Call wrap *gomock.Call +type MockInterfaceNetworkingV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNetworkingV1alpha1Call) Return(arg0 v1alpha13.NetworkingV1alpha1Interface) *MockInterfaceNetworkingV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNetworkingV1alpha1Call) Do(f func() v1alpha13.NetworkingV1alpha1Interface) *MockInterfaceNetworkingV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNetworkingV1alpha1Call) DoAndReturn(f func() v1alpha13.NetworkingV1alpha1Interface) *MockInterfaceNetworkingV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkingV1beta1 mocks base method. @@ -603,9 +1467,33 @@ func (m *MockInterface) NetworkingV1beta1() v1beta110.NetworkingV1beta1Interface } // NetworkingV1beta1 indicates an expected call of NetworkingV1beta1. -func (mr *MockInterfaceMockRecorder) NetworkingV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NetworkingV1beta1() *MockInterfaceNetworkingV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1beta1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkingV1beta1", reflect.TypeOf((*MockInterface)(nil).NetworkingV1beta1)) + return &MockInterfaceNetworkingV1beta1Call{Call: call} +} + +// MockInterfaceNetworkingV1beta1Call wrap *gomock.Call +type MockInterfaceNetworkingV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNetworkingV1beta1Call) Return(arg0 v1beta110.NetworkingV1beta1Interface) *MockInterfaceNetworkingV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNetworkingV1beta1Call) Do(f func() v1beta110.NetworkingV1beta1Interface) *MockInterfaceNetworkingV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNetworkingV1beta1Call) DoAndReturn(f func() v1beta110.NetworkingV1beta1Interface) *MockInterfaceNetworkingV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NodeV1 mocks base method. @@ -617,9 +1505,33 @@ func (m *MockInterface) NodeV1() v112.NodeV1Interface { } // NodeV1 indicates an expected call of NodeV1. -func (mr *MockInterfaceMockRecorder) NodeV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NodeV1() *MockInterfaceNodeV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1", reflect.TypeOf((*MockInterface)(nil).NodeV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1", reflect.TypeOf((*MockInterface)(nil).NodeV1)) + return &MockInterfaceNodeV1Call{Call: call} +} + +// MockInterfaceNodeV1Call wrap *gomock.Call +type MockInterfaceNodeV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNodeV1Call) Return(arg0 v112.NodeV1Interface) *MockInterfaceNodeV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNodeV1Call) Do(f func() v112.NodeV1Interface) *MockInterfaceNodeV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNodeV1Call) DoAndReturn(f func() v112.NodeV1Interface) *MockInterfaceNodeV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NodeV1alpha1 mocks base method. @@ -631,9 +1543,33 @@ func (m *MockInterface) NodeV1alpha1() v1alpha14.NodeV1alpha1Interface { } // NodeV1alpha1 indicates an expected call of NodeV1alpha1. -func (mr *MockInterfaceMockRecorder) NodeV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NodeV1alpha1() *MockInterfaceNodeV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1alpha1", reflect.TypeOf((*MockInterface)(nil).NodeV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1alpha1", reflect.TypeOf((*MockInterface)(nil).NodeV1alpha1)) + return &MockInterfaceNodeV1alpha1Call{Call: call} +} + +// MockInterfaceNodeV1alpha1Call wrap *gomock.Call +type MockInterfaceNodeV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNodeV1alpha1Call) Return(arg0 v1alpha14.NodeV1alpha1Interface) *MockInterfaceNodeV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNodeV1alpha1Call) Do(f func() v1alpha14.NodeV1alpha1Interface) *MockInterfaceNodeV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNodeV1alpha1Call) DoAndReturn(f func() v1alpha14.NodeV1alpha1Interface) *MockInterfaceNodeV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // NodeV1beta1 mocks base method. @@ -645,9 +1581,33 @@ func (m *MockInterface) NodeV1beta1() v1beta111.NodeV1beta1Interface { } // NodeV1beta1 indicates an expected call of NodeV1beta1. -func (mr *MockInterfaceMockRecorder) NodeV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) NodeV1beta1() *MockInterfaceNodeV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1beta1", reflect.TypeOf((*MockInterface)(nil).NodeV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeV1beta1", reflect.TypeOf((*MockInterface)(nil).NodeV1beta1)) + return &MockInterfaceNodeV1beta1Call{Call: call} +} + +// MockInterfaceNodeV1beta1Call wrap *gomock.Call +type MockInterfaceNodeV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceNodeV1beta1Call) Return(arg0 v1beta111.NodeV1beta1Interface) *MockInterfaceNodeV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceNodeV1beta1Call) Do(f func() v1beta111.NodeV1beta1Interface) *MockInterfaceNodeV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceNodeV1beta1Call) DoAndReturn(f func() v1beta111.NodeV1beta1Interface) *MockInterfaceNodeV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // PolicyV1 mocks base method. @@ -659,9 +1619,33 @@ func (m *MockInterface) PolicyV1() v113.PolicyV1Interface { } // PolicyV1 indicates an expected call of PolicyV1. -func (mr *MockInterfaceMockRecorder) PolicyV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) PolicyV1() *MockInterfacePolicyV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyV1", reflect.TypeOf((*MockInterface)(nil).PolicyV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyV1", reflect.TypeOf((*MockInterface)(nil).PolicyV1)) + return &MockInterfacePolicyV1Call{Call: call} +} + +// MockInterfacePolicyV1Call wrap *gomock.Call +type MockInterfacePolicyV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfacePolicyV1Call) Return(arg0 v113.PolicyV1Interface) *MockInterfacePolicyV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfacePolicyV1Call) Do(f func() v113.PolicyV1Interface) *MockInterfacePolicyV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfacePolicyV1Call) DoAndReturn(f func() v113.PolicyV1Interface) *MockInterfacePolicyV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // PolicyV1beta1 mocks base method. @@ -673,9 +1657,33 @@ func (m *MockInterface) PolicyV1beta1() v1beta112.PolicyV1beta1Interface { } // PolicyV1beta1 indicates an expected call of PolicyV1beta1. -func (mr *MockInterfaceMockRecorder) PolicyV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) PolicyV1beta1() *MockInterfacePolicyV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyV1beta1", reflect.TypeOf((*MockInterface)(nil).PolicyV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyV1beta1", reflect.TypeOf((*MockInterface)(nil).PolicyV1beta1)) + return &MockInterfacePolicyV1beta1Call{Call: call} +} + +// MockInterfacePolicyV1beta1Call wrap *gomock.Call +type MockInterfacePolicyV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfacePolicyV1beta1Call) Return(arg0 v1beta112.PolicyV1beta1Interface) *MockInterfacePolicyV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfacePolicyV1beta1Call) Do(f func() v1beta112.PolicyV1beta1Interface) *MockInterfacePolicyV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfacePolicyV1beta1Call) DoAndReturn(f func() v1beta112.PolicyV1beta1Interface) *MockInterfacePolicyV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // RbacV1 mocks base method. @@ -687,9 +1695,33 @@ func (m *MockInterface) RbacV1() v114.RbacV1Interface { } // RbacV1 indicates an expected call of RbacV1. -func (mr *MockInterfaceMockRecorder) RbacV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) RbacV1() *MockInterfaceRbacV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1", reflect.TypeOf((*MockInterface)(nil).RbacV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1", reflect.TypeOf((*MockInterface)(nil).RbacV1)) + return &MockInterfaceRbacV1Call{Call: call} +} + +// MockInterfaceRbacV1Call wrap *gomock.Call +type MockInterfaceRbacV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceRbacV1Call) Return(arg0 v114.RbacV1Interface) *MockInterfaceRbacV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceRbacV1Call) Do(f func() v114.RbacV1Interface) *MockInterfaceRbacV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceRbacV1Call) DoAndReturn(f func() v114.RbacV1Interface) *MockInterfaceRbacV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // RbacV1alpha1 mocks base method. @@ -701,9 +1733,33 @@ func (m *MockInterface) RbacV1alpha1() v1alpha15.RbacV1alpha1Interface { } // RbacV1alpha1 indicates an expected call of RbacV1alpha1. -func (mr *MockInterfaceMockRecorder) RbacV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) RbacV1alpha1() *MockInterfaceRbacV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1alpha1", reflect.TypeOf((*MockInterface)(nil).RbacV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1alpha1", reflect.TypeOf((*MockInterface)(nil).RbacV1alpha1)) + return &MockInterfaceRbacV1alpha1Call{Call: call} +} + +// MockInterfaceRbacV1alpha1Call wrap *gomock.Call +type MockInterfaceRbacV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceRbacV1alpha1Call) Return(arg0 v1alpha15.RbacV1alpha1Interface) *MockInterfaceRbacV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceRbacV1alpha1Call) Do(f func() v1alpha15.RbacV1alpha1Interface) *MockInterfaceRbacV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceRbacV1alpha1Call) DoAndReturn(f func() v1alpha15.RbacV1alpha1Interface) *MockInterfaceRbacV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // RbacV1beta1 mocks base method. @@ -715,9 +1771,33 @@ func (m *MockInterface) RbacV1beta1() v1beta113.RbacV1beta1Interface { } // RbacV1beta1 indicates an expected call of RbacV1beta1. -func (mr *MockInterfaceMockRecorder) RbacV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) RbacV1beta1() *MockInterfaceRbacV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1beta1", reflect.TypeOf((*MockInterface)(nil).RbacV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RbacV1beta1", reflect.TypeOf((*MockInterface)(nil).RbacV1beta1)) + return &MockInterfaceRbacV1beta1Call{Call: call} +} + +// MockInterfaceRbacV1beta1Call wrap *gomock.Call +type MockInterfaceRbacV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceRbacV1beta1Call) Return(arg0 v1beta113.RbacV1beta1Interface) *MockInterfaceRbacV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceRbacV1beta1Call) Do(f func() v1beta113.RbacV1beta1Interface) *MockInterfaceRbacV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceRbacV1beta1Call) DoAndReturn(f func() v1beta113.RbacV1beta1Interface) *MockInterfaceRbacV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ResourceV1alpha2 mocks base method. @@ -729,9 +1809,33 @@ func (m *MockInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { } // ResourceV1alpha2 indicates an expected call of ResourceV1alpha2. -func (mr *MockInterfaceMockRecorder) ResourceV1alpha2() *gomock.Call { +func (mr *MockInterfaceMockRecorder) ResourceV1alpha2() *MockInterfaceResourceV1alpha2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceV1alpha2", reflect.TypeOf((*MockInterface)(nil).ResourceV1alpha2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceV1alpha2", reflect.TypeOf((*MockInterface)(nil).ResourceV1alpha2)) + return &MockInterfaceResourceV1alpha2Call{Call: call} +} + +// MockInterfaceResourceV1alpha2Call wrap *gomock.Call +type MockInterfaceResourceV1alpha2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceResourceV1alpha2Call) Return(arg0 v1alpha2.ResourceV1alpha2Interface) *MockInterfaceResourceV1alpha2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceResourceV1alpha2Call) Do(f func() v1alpha2.ResourceV1alpha2Interface) *MockInterfaceResourceV1alpha2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceResourceV1alpha2Call) DoAndReturn(f func() v1alpha2.ResourceV1alpha2Interface) *MockInterfaceResourceV1alpha2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // SchedulingV1 mocks base method. @@ -743,9 +1847,33 @@ func (m *MockInterface) SchedulingV1() v115.SchedulingV1Interface { } // SchedulingV1 indicates an expected call of SchedulingV1. -func (mr *MockInterfaceMockRecorder) SchedulingV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) SchedulingV1() *MockInterfaceSchedulingV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1)) + return &MockInterfaceSchedulingV1Call{Call: call} +} + +// MockInterfaceSchedulingV1Call wrap *gomock.Call +type MockInterfaceSchedulingV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceSchedulingV1Call) Return(arg0 v115.SchedulingV1Interface) *MockInterfaceSchedulingV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceSchedulingV1Call) Do(f func() v115.SchedulingV1Interface) *MockInterfaceSchedulingV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceSchedulingV1Call) DoAndReturn(f func() v115.SchedulingV1Interface) *MockInterfaceSchedulingV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // SchedulingV1alpha1 mocks base method. @@ -757,9 +1885,33 @@ func (m *MockInterface) SchedulingV1alpha1() v1alpha16.SchedulingV1alpha1Interfa } // SchedulingV1alpha1 indicates an expected call of SchedulingV1alpha1. -func (mr *MockInterfaceMockRecorder) SchedulingV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) SchedulingV1alpha1() *MockInterfaceSchedulingV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1alpha1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1alpha1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1alpha1)) + return &MockInterfaceSchedulingV1alpha1Call{Call: call} +} + +// MockInterfaceSchedulingV1alpha1Call wrap *gomock.Call +type MockInterfaceSchedulingV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceSchedulingV1alpha1Call) Return(arg0 v1alpha16.SchedulingV1alpha1Interface) *MockInterfaceSchedulingV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceSchedulingV1alpha1Call) Do(f func() v1alpha16.SchedulingV1alpha1Interface) *MockInterfaceSchedulingV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceSchedulingV1alpha1Call) DoAndReturn(f func() v1alpha16.SchedulingV1alpha1Interface) *MockInterfaceSchedulingV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // SchedulingV1beta1 mocks base method. @@ -771,9 +1923,33 @@ func (m *MockInterface) SchedulingV1beta1() v1beta114.SchedulingV1beta1Interface } // SchedulingV1beta1 indicates an expected call of SchedulingV1beta1. -func (mr *MockInterfaceMockRecorder) SchedulingV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) SchedulingV1beta1() *MockInterfaceSchedulingV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1beta1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SchedulingV1beta1", reflect.TypeOf((*MockInterface)(nil).SchedulingV1beta1)) + return &MockInterfaceSchedulingV1beta1Call{Call: call} +} + +// MockInterfaceSchedulingV1beta1Call wrap *gomock.Call +type MockInterfaceSchedulingV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceSchedulingV1beta1Call) Return(arg0 v1beta114.SchedulingV1beta1Interface) *MockInterfaceSchedulingV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceSchedulingV1beta1Call) Do(f func() v1beta114.SchedulingV1beta1Interface) *MockInterfaceSchedulingV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceSchedulingV1beta1Call) DoAndReturn(f func() v1beta114.SchedulingV1beta1Interface) *MockInterfaceSchedulingV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageV1 mocks base method. @@ -785,9 +1961,33 @@ func (m *MockInterface) StorageV1() v116.StorageV1Interface { } // StorageV1 indicates an expected call of StorageV1. -func (mr *MockInterfaceMockRecorder) StorageV1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) StorageV1() *MockInterfaceStorageV1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1", reflect.TypeOf((*MockInterface)(nil).StorageV1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1", reflect.TypeOf((*MockInterface)(nil).StorageV1)) + return &MockInterfaceStorageV1Call{Call: call} +} + +// MockInterfaceStorageV1Call wrap *gomock.Call +type MockInterfaceStorageV1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceStorageV1Call) Return(arg0 v116.StorageV1Interface) *MockInterfaceStorageV1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceStorageV1Call) Do(f func() v116.StorageV1Interface) *MockInterfaceStorageV1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceStorageV1Call) DoAndReturn(f func() v116.StorageV1Interface) *MockInterfaceStorageV1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageV1alpha1 mocks base method. @@ -799,9 +1999,33 @@ func (m *MockInterface) StorageV1alpha1() v1alpha17.StorageV1alpha1Interface { } // StorageV1alpha1 indicates an expected call of StorageV1alpha1. -func (mr *MockInterfaceMockRecorder) StorageV1alpha1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) StorageV1alpha1() *MockInterfaceStorageV1alpha1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1alpha1", reflect.TypeOf((*MockInterface)(nil).StorageV1alpha1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1alpha1", reflect.TypeOf((*MockInterface)(nil).StorageV1alpha1)) + return &MockInterfaceStorageV1alpha1Call{Call: call} +} + +// MockInterfaceStorageV1alpha1Call wrap *gomock.Call +type MockInterfaceStorageV1alpha1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceStorageV1alpha1Call) Return(arg0 v1alpha17.StorageV1alpha1Interface) *MockInterfaceStorageV1alpha1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceStorageV1alpha1Call) Do(f func() v1alpha17.StorageV1alpha1Interface) *MockInterfaceStorageV1alpha1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceStorageV1alpha1Call) DoAndReturn(f func() v1alpha17.StorageV1alpha1Interface) *MockInterfaceStorageV1alpha1Call { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageV1beta1 mocks base method. @@ -813,7 +2037,31 @@ func (m *MockInterface) StorageV1beta1() v1beta115.StorageV1beta1Interface { } // StorageV1beta1 indicates an expected call of StorageV1beta1. -func (mr *MockInterfaceMockRecorder) StorageV1beta1() *gomock.Call { +func (mr *MockInterfaceMockRecorder) StorageV1beta1() *MockInterfaceStorageV1beta1Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1beta1", reflect.TypeOf((*MockInterface)(nil).StorageV1beta1)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageV1beta1", reflect.TypeOf((*MockInterface)(nil).StorageV1beta1)) + return &MockInterfaceStorageV1beta1Call{Call: call} +} + +// MockInterfaceStorageV1beta1Call wrap *gomock.Call +type MockInterfaceStorageV1beta1Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceStorageV1beta1Call) Return(arg0 v1beta115.StorageV1beta1Interface) *MockInterfaceStorageV1beta1Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceStorageV1beta1Call) Do(f func() v1beta115.StorageV1beta1Interface) *MockInterfaceStorageV1beta1Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceStorageV1beta1Call) DoAndReturn(f func() v1beta115.StorageV1beta1Interface) *MockInterfaceStorageV1beta1Call { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/networkingv1_mock.go b/caas/kubernetes/provider/mocks/networkingv1_mock.go index bbdd965bba3..86d551ac8e8 100644 --- a/caas/kubernetes/provider/mocks/networkingv1_mock.go +++ b/caas/kubernetes/provider/mocks/networkingv1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/networkingv1_mock.go -mock_names=IngressInterface=MockIngressV1Interface k8s.io/client-go/kubernetes/typed/networking/v1 NetworkingV1Interface,IngressInterface,IngressClassInterface +// mockgen -typed -package mocks -destination mocks/networkingv1_mock.go -mock_names=IngressInterface=MockIngressV1Interface k8s.io/client-go/kubernetes/typed/networking/v1 NetworkingV1Interface,IngressInterface,IngressClassInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockNetworkingV1Interface) IngressClasses() v12.IngressClassInterface { } // IngressClasses indicates an expected call of IngressClasses. -func (mr *MockNetworkingV1InterfaceMockRecorder) IngressClasses() *gomock.Call { +func (mr *MockNetworkingV1InterfaceMockRecorder) IngressClasses() *MockNetworkingV1InterfaceIngressClassesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressClasses", reflect.TypeOf((*MockNetworkingV1Interface)(nil).IngressClasses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressClasses", reflect.TypeOf((*MockNetworkingV1Interface)(nil).IngressClasses)) + return &MockNetworkingV1InterfaceIngressClassesCall{Call: call} +} + +// MockNetworkingV1InterfaceIngressClassesCall wrap *gomock.Call +type MockNetworkingV1InterfaceIngressClassesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1InterfaceIngressClassesCall) Return(arg0 v12.IngressClassInterface) *MockNetworkingV1InterfaceIngressClassesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1InterfaceIngressClassesCall) Do(f func() v12.IngressClassInterface) *MockNetworkingV1InterfaceIngressClassesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1InterfaceIngressClassesCall) DoAndReturn(f func() v12.IngressClassInterface) *MockNetworkingV1InterfaceIngressClassesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ingresses mocks base method. @@ -69,9 +93,33 @@ func (m *MockNetworkingV1Interface) Ingresses(arg0 string) v12.IngressInterface } // Ingresses indicates an expected call of Ingresses. -func (mr *MockNetworkingV1InterfaceMockRecorder) Ingresses(arg0 any) *gomock.Call { +func (mr *MockNetworkingV1InterfaceMockRecorder) Ingresses(arg0 any) *MockNetworkingV1InterfaceIngressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ingresses", reflect.TypeOf((*MockNetworkingV1Interface)(nil).Ingresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ingresses", reflect.TypeOf((*MockNetworkingV1Interface)(nil).Ingresses), arg0) + return &MockNetworkingV1InterfaceIngressesCall{Call: call} +} + +// MockNetworkingV1InterfaceIngressesCall wrap *gomock.Call +type MockNetworkingV1InterfaceIngressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1InterfaceIngressesCall) Return(arg0 v12.IngressInterface) *MockNetworkingV1InterfaceIngressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1InterfaceIngressesCall) Do(f func(string) v12.IngressInterface) *MockNetworkingV1InterfaceIngressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1InterfaceIngressesCall) DoAndReturn(f func(string) v12.IngressInterface) *MockNetworkingV1InterfaceIngressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkPolicies mocks base method. @@ -83,9 +131,33 @@ func (m *MockNetworkingV1Interface) NetworkPolicies(arg0 string) v12.NetworkPoli } // NetworkPolicies indicates an expected call of NetworkPolicies. -func (mr *MockNetworkingV1InterfaceMockRecorder) NetworkPolicies(arg0 any) *gomock.Call { +func (mr *MockNetworkingV1InterfaceMockRecorder) NetworkPolicies(arg0 any) *MockNetworkingV1InterfaceNetworkPoliciesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkPolicies", reflect.TypeOf((*MockNetworkingV1Interface)(nil).NetworkPolicies), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkPolicies", reflect.TypeOf((*MockNetworkingV1Interface)(nil).NetworkPolicies), arg0) + return &MockNetworkingV1InterfaceNetworkPoliciesCall{Call: call} +} + +// MockNetworkingV1InterfaceNetworkPoliciesCall wrap *gomock.Call +type MockNetworkingV1InterfaceNetworkPoliciesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1InterfaceNetworkPoliciesCall) Return(arg0 v12.NetworkPolicyInterface) *MockNetworkingV1InterfaceNetworkPoliciesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1InterfaceNetworkPoliciesCall) Do(f func(string) v12.NetworkPolicyInterface) *MockNetworkingV1InterfaceNetworkPoliciesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1InterfaceNetworkPoliciesCall) DoAndReturn(f func(string) v12.NetworkPolicyInterface) *MockNetworkingV1InterfaceNetworkPoliciesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -97,9 +169,33 @@ func (m *MockNetworkingV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockNetworkingV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockNetworkingV1InterfaceMockRecorder) RESTClient() *MockNetworkingV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockNetworkingV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockNetworkingV1Interface)(nil).RESTClient)) + return &MockNetworkingV1InterfaceRESTClientCall{Call: call} +} + +// MockNetworkingV1InterfaceRESTClientCall wrap *gomock.Call +type MockNetworkingV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockNetworkingV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockNetworkingV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockNetworkingV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockIngressV1Interface is a mock of IngressInterface interface. @@ -135,9 +231,33 @@ func (m *MockIngressV1Interface) Apply(arg0 context.Context, arg1 *v11.IngressAp } // Apply indicates an expected call of Apply. -func (mr *MockIngressV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockIngressV1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressV1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressV1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockIngressV1InterfaceApplyCall{Call: call} +} + +// MockIngressV1InterfaceApplyCall wrap *gomock.Call +type MockIngressV1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceApplyCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceApplyCall) Do(f func(context.Context, *v11.IngressApplyConfiguration, v10.ApplyOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.IngressApplyConfiguration, v10.ApplyOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -150,9 +270,33 @@ func (m *MockIngressV1Interface) ApplyStatus(arg0 context.Context, arg1 *v11.Ing } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockIngressV1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockIngressV1InterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockIngressV1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockIngressV1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockIngressV1InterfaceApplyStatusCall{Call: call} +} + +// MockIngressV1InterfaceApplyStatusCall wrap *gomock.Call +type MockIngressV1InterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceApplyStatusCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceApplyStatusCall) Do(f func(context.Context, *v11.IngressApplyConfiguration, v10.ApplyOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v11.IngressApplyConfiguration, v10.ApplyOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -165,9 +309,33 @@ func (m *MockIngressV1Interface) Create(arg0 context.Context, arg1 *v1.Ingress, } // Create indicates an expected call of Create. -func (mr *MockIngressV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockIngressV1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressV1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressV1Interface)(nil).Create), arg0, arg1, arg2) + return &MockIngressV1InterfaceCreateCall{Call: call} +} + +// MockIngressV1InterfaceCreateCall wrap *gomock.Call +type MockIngressV1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceCreateCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceCreateCall) Do(f func(context.Context, *v1.Ingress, v10.CreateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Ingress, v10.CreateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -179,9 +347,33 @@ func (m *MockIngressV1Interface) Delete(arg0 context.Context, arg1 string, arg2 } // Delete indicates an expected call of Delete. -func (mr *MockIngressV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockIngressV1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressV1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressV1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockIngressV1InterfaceDeleteCall{Call: call} +} + +// MockIngressV1InterfaceDeleteCall wrap *gomock.Call +type MockIngressV1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceDeleteCall) Return(arg0 error) *MockIngressV1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockIngressV1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockIngressV1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -193,9 +385,33 @@ func (m *MockIngressV1Interface) DeleteCollection(arg0 context.Context, arg1 v10 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockIngressV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockIngressV1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressV1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockIngressV1InterfaceDeleteCollectionCall{Call: call} +} + +// MockIngressV1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockIngressV1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceDeleteCollectionCall) Return(arg0 error) *MockIngressV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockIngressV1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockIngressV1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -208,9 +424,33 @@ func (m *MockIngressV1Interface) Get(arg0 context.Context, arg1 string, arg2 v10 } // Get indicates an expected call of Get. -func (mr *MockIngressV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockIngressV1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressV1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressV1Interface)(nil).Get), arg0, arg1, arg2) + return &MockIngressV1InterfaceGetCall{Call: call} +} + +// MockIngressV1InterfaceGetCall wrap *gomock.Call +type MockIngressV1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceGetCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -223,9 +463,33 @@ func (m *MockIngressV1Interface) List(arg0 context.Context, arg1 v10.ListOptions } // List indicates an expected call of List. -func (mr *MockIngressV1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) List(arg0, arg1 any) *MockIngressV1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressV1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressV1Interface)(nil).List), arg0, arg1) + return &MockIngressV1InterfaceListCall{Call: call} +} + +// MockIngressV1InterfaceListCall wrap *gomock.Call +type MockIngressV1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceListCall) Return(arg0 *v1.IngressList, arg1 error) *MockIngressV1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.IngressList, error)) *MockIngressV1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.IngressList, error)) *MockIngressV1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -242,10 +506,34 @@ func (m *MockIngressV1Interface) Patch(arg0 context.Context, arg1 string, arg2 t } // Patch indicates an expected call of Patch. -func (mr *MockIngressV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockIngressV1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressV1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressV1Interface)(nil).Patch), varargs...) + return &MockIngressV1InterfacePatchCall{Call: call} +} + +// MockIngressV1InterfacePatchCall wrap *gomock.Call +type MockIngressV1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfacePatchCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.Ingress, error)) *MockIngressV1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.Ingress, error)) *MockIngressV1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -258,9 +546,33 @@ func (m *MockIngressV1Interface) Update(arg0 context.Context, arg1 *v1.Ingress, } // Update indicates an expected call of Update. -func (mr *MockIngressV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockIngressV1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressV1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressV1Interface)(nil).Update), arg0, arg1, arg2) + return &MockIngressV1InterfaceUpdateCall{Call: call} +} + +// MockIngressV1InterfaceUpdateCall wrap *gomock.Call +type MockIngressV1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceUpdateCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceUpdateCall) Do(f func(context.Context, *v1.Ingress, v10.UpdateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Ingress, v10.UpdateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -273,9 +585,33 @@ func (m *MockIngressV1Interface) UpdateStatus(arg0 context.Context, arg1 *v1.Ing } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockIngressV1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockIngressV1InterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockIngressV1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockIngressV1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockIngressV1InterfaceUpdateStatusCall{Call: call} +} + +// MockIngressV1InterfaceUpdateStatusCall wrap *gomock.Call +type MockIngressV1InterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceUpdateStatusCall) Return(arg0 *v1.Ingress, arg1 error) *MockIngressV1InterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceUpdateStatusCall) Do(f func(context.Context, *v1.Ingress, v10.UpdateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1.Ingress, v10.UpdateOptions) (*v1.Ingress, error)) *MockIngressV1InterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -288,9 +624,33 @@ func (m *MockIngressV1Interface) Watch(arg0 context.Context, arg1 v10.ListOption } // Watch indicates an expected call of Watch. -func (mr *MockIngressV1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressV1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockIngressV1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressV1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressV1Interface)(nil).Watch), arg0, arg1) + return &MockIngressV1InterfaceWatchCall{Call: call} +} + +// MockIngressV1InterfaceWatchCall wrap *gomock.Call +type MockIngressV1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockIngressV1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1InterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockIngressV1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1InterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockIngressV1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockIngressClassInterface is a mock of IngressClassInterface interface. @@ -326,9 +686,33 @@ func (m *MockIngressClassInterface) Apply(arg0 context.Context, arg1 *v11.Ingres } // Apply indicates an expected call of Apply. -func (mr *MockIngressClassInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockIngressClassInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressClassInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressClassInterface)(nil).Apply), arg0, arg1, arg2) + return &MockIngressClassInterfaceApplyCall{Call: call} +} + +// MockIngressClassInterfaceApplyCall wrap *gomock.Call +type MockIngressClassInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceApplyCall) Return(arg0 *v1.IngressClass, arg1 error) *MockIngressClassInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceApplyCall) Do(f func(context.Context, *v11.IngressClassApplyConfiguration, v10.ApplyOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.IngressClassApplyConfiguration, v10.ApplyOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -341,9 +725,33 @@ func (m *MockIngressClassInterface) Create(arg0 context.Context, arg1 *v1.Ingres } // Create indicates an expected call of Create. -func (mr *MockIngressClassInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockIngressClassInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressClassInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressClassInterface)(nil).Create), arg0, arg1, arg2) + return &MockIngressClassInterfaceCreateCall{Call: call} +} + +// MockIngressClassInterfaceCreateCall wrap *gomock.Call +type MockIngressClassInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceCreateCall) Return(arg0 *v1.IngressClass, arg1 error) *MockIngressClassInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceCreateCall) Do(f func(context.Context, *v1.IngressClass, v10.CreateOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.IngressClass, v10.CreateOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -355,9 +763,33 @@ func (m *MockIngressClassInterface) Delete(arg0 context.Context, arg1 string, ar } // Delete indicates an expected call of Delete. -func (mr *MockIngressClassInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockIngressClassInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressClassInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressClassInterface)(nil).Delete), arg0, arg1, arg2) + return &MockIngressClassInterfaceDeleteCall{Call: call} +} + +// MockIngressClassInterfaceDeleteCall wrap *gomock.Call +type MockIngressClassInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceDeleteCall) Return(arg0 error) *MockIngressClassInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockIngressClassInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockIngressClassInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -369,9 +801,33 @@ func (m *MockIngressClassInterface) DeleteCollection(arg0 context.Context, arg1 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockIngressClassInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockIngressClassInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressClassInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressClassInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockIngressClassInterfaceDeleteCollectionCall{Call: call} +} + +// MockIngressClassInterfaceDeleteCollectionCall wrap *gomock.Call +type MockIngressClassInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceDeleteCollectionCall) Return(arg0 error) *MockIngressClassInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockIngressClassInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockIngressClassInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -384,9 +840,33 @@ func (m *MockIngressClassInterface) Get(arg0 context.Context, arg1 string, arg2 } // Get indicates an expected call of Get. -func (mr *MockIngressClassInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockIngressClassInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressClassInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressClassInterface)(nil).Get), arg0, arg1, arg2) + return &MockIngressClassInterfaceGetCall{Call: call} +} + +// MockIngressClassInterfaceGetCall wrap *gomock.Call +type MockIngressClassInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceGetCall) Return(arg0 *v1.IngressClass, arg1 error) *MockIngressClassInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -399,9 +879,33 @@ func (m *MockIngressClassInterface) List(arg0 context.Context, arg1 v10.ListOpti } // List indicates an expected call of List. -func (mr *MockIngressClassInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) List(arg0, arg1 any) *MockIngressClassInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressClassInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressClassInterface)(nil).List), arg0, arg1) + return &MockIngressClassInterfaceListCall{Call: call} +} + +// MockIngressClassInterfaceListCall wrap *gomock.Call +type MockIngressClassInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceListCall) Return(arg0 *v1.IngressClassList, arg1 error) *MockIngressClassInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.IngressClassList, error)) *MockIngressClassInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.IngressClassList, error)) *MockIngressClassInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -418,10 +922,34 @@ func (m *MockIngressClassInterface) Patch(arg0 context.Context, arg1 string, arg } // Patch indicates an expected call of Patch. -func (mr *MockIngressClassInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockIngressClassInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressClassInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressClassInterface)(nil).Patch), varargs...) + return &MockIngressClassInterfacePatchCall{Call: call} +} + +// MockIngressClassInterfacePatchCall wrap *gomock.Call +type MockIngressClassInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfacePatchCall) Return(arg0 *v1.IngressClass, arg1 error) *MockIngressClassInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.IngressClass, error)) *MockIngressClassInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.IngressClass, error)) *MockIngressClassInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -434,9 +962,33 @@ func (m *MockIngressClassInterface) Update(arg0 context.Context, arg1 *v1.Ingres } // Update indicates an expected call of Update. -func (mr *MockIngressClassInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockIngressClassInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressClassInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressClassInterface)(nil).Update), arg0, arg1, arg2) + return &MockIngressClassInterfaceUpdateCall{Call: call} +} + +// MockIngressClassInterfaceUpdateCall wrap *gomock.Call +type MockIngressClassInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceUpdateCall) Return(arg0 *v1.IngressClass, arg1 error) *MockIngressClassInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceUpdateCall) Do(f func(context.Context, *v1.IngressClass, v10.UpdateOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.IngressClass, v10.UpdateOptions) (*v1.IngressClass, error)) *MockIngressClassInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -449,7 +1001,31 @@ func (m *MockIngressClassInterface) Watch(arg0 context.Context, arg1 v10.ListOpt } // Watch indicates an expected call of Watch. -func (mr *MockIngressClassInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressClassInterfaceMockRecorder) Watch(arg0, arg1 any) *MockIngressClassInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressClassInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressClassInterface)(nil).Watch), arg0, arg1) + return &MockIngressClassInterfaceWatchCall{Call: call} +} + +// MockIngressClassInterfaceWatchCall wrap *gomock.Call +type MockIngressClassInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressClassInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockIngressClassInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressClassInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockIngressClassInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressClassInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockIngressClassInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/networkingv1beta1_mock.go b/caas/kubernetes/provider/mocks/networkingv1beta1_mock.go index c6a160726d5..aea8982fe83 100644 --- a/caas/kubernetes/provider/mocks/networkingv1beta1_mock.go +++ b/caas/kubernetes/provider/mocks/networkingv1beta1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/networkingv1beta1_mock.go -mock_names=IngressInterface=MockIngressV1Beta1Interface k8s.io/client-go/kubernetes/typed/networking/v1beta1 NetworkingV1beta1Interface,IngressInterface +// mockgen -typed -package mocks -destination mocks/networkingv1beta1_mock.go -mock_names=IngressInterface=MockIngressV1Beta1Interface k8s.io/client-go/kubernetes/typed/networking/v1beta1 NetworkingV1beta1Interface,IngressInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockNetworkingV1beta1Interface) IngressClasses() v1beta11.IngressClassI } // IngressClasses indicates an expected call of IngressClasses. -func (mr *MockNetworkingV1beta1InterfaceMockRecorder) IngressClasses() *gomock.Call { +func (mr *MockNetworkingV1beta1InterfaceMockRecorder) IngressClasses() *MockNetworkingV1beta1InterfaceIngressClassesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressClasses", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).IngressClasses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressClasses", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).IngressClasses)) + return &MockNetworkingV1beta1InterfaceIngressClassesCall{Call: call} +} + +// MockNetworkingV1beta1InterfaceIngressClassesCall wrap *gomock.Call +type MockNetworkingV1beta1InterfaceIngressClassesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1beta1InterfaceIngressClassesCall) Return(arg0 v1beta11.IngressClassInterface) *MockNetworkingV1beta1InterfaceIngressClassesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1beta1InterfaceIngressClassesCall) Do(f func() v1beta11.IngressClassInterface) *MockNetworkingV1beta1InterfaceIngressClassesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1beta1InterfaceIngressClassesCall) DoAndReturn(f func() v1beta11.IngressClassInterface) *MockNetworkingV1beta1InterfaceIngressClassesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ingresses mocks base method. @@ -69,9 +93,33 @@ func (m *MockNetworkingV1beta1Interface) Ingresses(arg0 string) v1beta11.Ingress } // Ingresses indicates an expected call of Ingresses. -func (mr *MockNetworkingV1beta1InterfaceMockRecorder) Ingresses(arg0 any) *gomock.Call { +func (mr *MockNetworkingV1beta1InterfaceMockRecorder) Ingresses(arg0 any) *MockNetworkingV1beta1InterfaceIngressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ingresses", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).Ingresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ingresses", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).Ingresses), arg0) + return &MockNetworkingV1beta1InterfaceIngressesCall{Call: call} +} + +// MockNetworkingV1beta1InterfaceIngressesCall wrap *gomock.Call +type MockNetworkingV1beta1InterfaceIngressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1beta1InterfaceIngressesCall) Return(arg0 v1beta11.IngressInterface) *MockNetworkingV1beta1InterfaceIngressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1beta1InterfaceIngressesCall) Do(f func(string) v1beta11.IngressInterface) *MockNetworkingV1beta1InterfaceIngressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1beta1InterfaceIngressesCall) DoAndReturn(f func(string) v1beta11.IngressInterface) *MockNetworkingV1beta1InterfaceIngressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -83,9 +131,33 @@ func (m *MockNetworkingV1beta1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockNetworkingV1beta1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockNetworkingV1beta1InterfaceMockRecorder) RESTClient() *MockNetworkingV1beta1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockNetworkingV1beta1Interface)(nil).RESTClient)) + return &MockNetworkingV1beta1InterfaceRESTClientCall{Call: call} +} + +// MockNetworkingV1beta1InterfaceRESTClientCall wrap *gomock.Call +type MockNetworkingV1beta1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingV1beta1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockNetworkingV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingV1beta1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockNetworkingV1beta1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingV1beta1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockNetworkingV1beta1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockIngressV1Beta1Interface is a mock of IngressInterface interface. @@ -121,9 +193,33 @@ func (m *MockIngressV1Beta1Interface) Apply(arg0 context.Context, arg1 *v1beta10 } // Apply indicates an expected call of Apply. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Apply), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceApplyCall{Call: call} +} + +// MockIngressV1Beta1InterfaceApplyCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceApplyCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceApplyCall) Do(f func(context.Context, *v1beta10.IngressApplyConfiguration, v1.ApplyOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceApplyCall) DoAndReturn(f func(context.Context, *v1beta10.IngressApplyConfiguration, v1.ApplyOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyStatus mocks base method. @@ -136,9 +232,33 @@ func (m *MockIngressV1Beta1Interface) ApplyStatus(arg0 context.Context, arg1 *v1 } // ApplyStatus indicates an expected call of ApplyStatus. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) ApplyStatus(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceApplyStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStatus", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).ApplyStatus), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceApplyStatusCall{Call: call} +} + +// MockIngressV1Beta1InterfaceApplyStatusCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceApplyStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceApplyStatusCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceApplyStatusCall) Do(f func(context.Context, *v1beta10.IngressApplyConfiguration, v1.ApplyOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceApplyStatusCall) DoAndReturn(f func(context.Context, *v1beta10.IngressApplyConfiguration, v1.ApplyOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceApplyStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -151,9 +271,33 @@ func (m *MockIngressV1Beta1Interface) Create(arg0 context.Context, arg1 *v1beta1 } // Create indicates an expected call of Create. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Create), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceCreateCall{Call: call} +} + +// MockIngressV1Beta1InterfaceCreateCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceCreateCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceCreateCall) Do(f func(context.Context, *v1beta1.Ingress, v1.CreateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceCreateCall) DoAndReturn(f func(context.Context, *v1beta1.Ingress, v1.CreateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -165,9 +309,33 @@ func (m *MockIngressV1Beta1Interface) Delete(arg0 context.Context, arg1 string, } // Delete indicates an expected call of Delete. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Delete), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceDeleteCall{Call: call} +} + +// MockIngressV1Beta1InterfaceDeleteCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceDeleteCall) Return(arg0 error) *MockIngressV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceDeleteCall) Do(f func(context.Context, string, v1.DeleteOptions) error) *MockIngressV1Beta1InterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v1.DeleteOptions) error) *MockIngressV1Beta1InterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -179,9 +347,33 @@ func (m *MockIngressV1Beta1Interface) DeleteCollection(arg0 context.Context, arg } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceDeleteCollectionCall{Call: call} +} + +// MockIngressV1Beta1InterfaceDeleteCollectionCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceDeleteCollectionCall) Return(arg0 error) *MockIngressV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceDeleteCollectionCall) Do(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockIngressV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v1.DeleteOptions, v1.ListOptions) error) *MockIngressV1Beta1InterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -194,9 +386,33 @@ func (m *MockIngressV1Beta1Interface) Get(arg0 context.Context, arg1 string, arg } // Get indicates an expected call of Get. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Get), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceGetCall{Call: call} +} + +// MockIngressV1Beta1InterfaceGetCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceGetCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceGetCall) Do(f func(context.Context, string, v1.GetOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceGetCall) DoAndReturn(f func(context.Context, string, v1.GetOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -209,9 +425,33 @@ func (m *MockIngressV1Beta1Interface) List(arg0 context.Context, arg1 v1.ListOpt } // List indicates an expected call of List. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) List(arg0, arg1 any) *MockIngressV1Beta1InterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).List), arg0, arg1) + return &MockIngressV1Beta1InterfaceListCall{Call: call} +} + +// MockIngressV1Beta1InterfaceListCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceListCall) Return(arg0 *v1beta1.IngressList, arg1 error) *MockIngressV1Beta1InterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceListCall) Do(f func(context.Context, v1.ListOptions) (*v1beta1.IngressList, error)) *MockIngressV1Beta1InterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceListCall) DoAndReturn(f func(context.Context, v1.ListOptions) (*v1beta1.IngressList, error)) *MockIngressV1Beta1InterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -228,10 +468,34 @@ func (m *MockIngressV1Beta1Interface) Patch(arg0 context.Context, arg1 string, a } // Patch indicates an expected call of Patch. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockIngressV1Beta1InterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Patch), varargs...) + return &MockIngressV1Beta1InterfacePatchCall{Call: call} +} + +// MockIngressV1Beta1InterfacePatchCall wrap *gomock.Call +type MockIngressV1Beta1InterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfacePatchCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -244,9 +508,33 @@ func (m *MockIngressV1Beta1Interface) Update(arg0 context.Context, arg1 *v1beta1 } // Update indicates an expected call of Update. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Update), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceUpdateCall{Call: call} +} + +// MockIngressV1Beta1InterfaceUpdateCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceUpdateCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceUpdateCall) Do(f func(context.Context, *v1beta1.Ingress, v1.UpdateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1beta1.Ingress, v1.UpdateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatus mocks base method. @@ -259,9 +547,33 @@ func (m *MockIngressV1Beta1Interface) UpdateStatus(arg0 context.Context, arg1 *v } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) UpdateStatus(arg0, arg1, arg2 any) *MockIngressV1Beta1InterfaceUpdateStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).UpdateStatus), arg0, arg1, arg2) + return &MockIngressV1Beta1InterfaceUpdateStatusCall{Call: call} +} + +// MockIngressV1Beta1InterfaceUpdateStatusCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceUpdateStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceUpdateStatusCall) Return(arg0 *v1beta1.Ingress, arg1 error) *MockIngressV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceUpdateStatusCall) Do(f func(context.Context, *v1beta1.Ingress, v1.UpdateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceUpdateStatusCall) DoAndReturn(f func(context.Context, *v1beta1.Ingress, v1.UpdateOptions) (*v1beta1.Ingress, error)) *MockIngressV1Beta1InterfaceUpdateStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -274,7 +586,31 @@ func (m *MockIngressV1Beta1Interface) Watch(arg0 context.Context, arg1 v1.ListOp } // Watch indicates an expected call of Watch. -func (mr *MockIngressV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockIngressV1Beta1InterfaceMockRecorder) Watch(arg0, arg1 any) *MockIngressV1Beta1InterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockIngressV1Beta1Interface)(nil).Watch), arg0, arg1) + return &MockIngressV1Beta1InterfaceWatchCall{Call: call} +} + +// MockIngressV1Beta1InterfaceWatchCall wrap *gomock.Call +type MockIngressV1Beta1InterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIngressV1Beta1InterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockIngressV1Beta1InterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIngressV1Beta1InterfaceWatchCall) Do(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockIngressV1Beta1InterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIngressV1Beta1InterfaceWatchCall) DoAndReturn(f func(context.Context, v1.ListOptions) (watch.Interface, error)) *MockIngressV1Beta1InterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/rbacv1_mock.go b/caas/kubernetes/provider/mocks/rbacv1_mock.go index c97c12000fc..089e87b62ec 100644 --- a/caas/kubernetes/provider/mocks/rbacv1_mock.go +++ b/caas/kubernetes/provider/mocks/rbacv1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/rbacv1_mock.go k8s.io/client-go/kubernetes/typed/rbac/v1 RbacV1Interface,ClusterRoleBindingInterface,ClusterRoleInterface,RoleInterface,RoleBindingInterface +// mockgen -typed -package mocks -destination mocks/rbacv1_mock.go k8s.io/client-go/kubernetes/typed/rbac/v1 RbacV1Interface,ClusterRoleBindingInterface,ClusterRoleInterface,RoleInterface,RoleBindingInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockRbacV1Interface) ClusterRoleBindings() v12.ClusterRoleBindingInterf } // ClusterRoleBindings indicates an expected call of ClusterRoleBindings. -func (mr *MockRbacV1InterfaceMockRecorder) ClusterRoleBindings() *gomock.Call { +func (mr *MockRbacV1InterfaceMockRecorder) ClusterRoleBindings() *MockRbacV1InterfaceClusterRoleBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterRoleBindings", reflect.TypeOf((*MockRbacV1Interface)(nil).ClusterRoleBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterRoleBindings", reflect.TypeOf((*MockRbacV1Interface)(nil).ClusterRoleBindings)) + return &MockRbacV1InterfaceClusterRoleBindingsCall{Call: call} +} + +// MockRbacV1InterfaceClusterRoleBindingsCall wrap *gomock.Call +type MockRbacV1InterfaceClusterRoleBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRbacV1InterfaceClusterRoleBindingsCall) Return(arg0 v12.ClusterRoleBindingInterface) *MockRbacV1InterfaceClusterRoleBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRbacV1InterfaceClusterRoleBindingsCall) Do(f func() v12.ClusterRoleBindingInterface) *MockRbacV1InterfaceClusterRoleBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRbacV1InterfaceClusterRoleBindingsCall) DoAndReturn(f func() v12.ClusterRoleBindingInterface) *MockRbacV1InterfaceClusterRoleBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClusterRoles mocks base method. @@ -69,9 +93,33 @@ func (m *MockRbacV1Interface) ClusterRoles() v12.ClusterRoleInterface { } // ClusterRoles indicates an expected call of ClusterRoles. -func (mr *MockRbacV1InterfaceMockRecorder) ClusterRoles() *gomock.Call { +func (mr *MockRbacV1InterfaceMockRecorder) ClusterRoles() *MockRbacV1InterfaceClusterRolesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterRoles", reflect.TypeOf((*MockRbacV1Interface)(nil).ClusterRoles)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterRoles", reflect.TypeOf((*MockRbacV1Interface)(nil).ClusterRoles)) + return &MockRbacV1InterfaceClusterRolesCall{Call: call} +} + +// MockRbacV1InterfaceClusterRolesCall wrap *gomock.Call +type MockRbacV1InterfaceClusterRolesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRbacV1InterfaceClusterRolesCall) Return(arg0 v12.ClusterRoleInterface) *MockRbacV1InterfaceClusterRolesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRbacV1InterfaceClusterRolesCall) Do(f func() v12.ClusterRoleInterface) *MockRbacV1InterfaceClusterRolesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRbacV1InterfaceClusterRolesCall) DoAndReturn(f func() v12.ClusterRoleInterface) *MockRbacV1InterfaceClusterRolesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -83,9 +131,33 @@ func (m *MockRbacV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockRbacV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockRbacV1InterfaceMockRecorder) RESTClient() *MockRbacV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockRbacV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockRbacV1Interface)(nil).RESTClient)) + return &MockRbacV1InterfaceRESTClientCall{Call: call} +} + +// MockRbacV1InterfaceRESTClientCall wrap *gomock.Call +type MockRbacV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRbacV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockRbacV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRbacV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockRbacV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRbacV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockRbacV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RoleBindings mocks base method. @@ -97,9 +169,33 @@ func (m *MockRbacV1Interface) RoleBindings(arg0 string) v12.RoleBindingInterface } // RoleBindings indicates an expected call of RoleBindings. -func (mr *MockRbacV1InterfaceMockRecorder) RoleBindings(arg0 any) *gomock.Call { +func (mr *MockRbacV1InterfaceMockRecorder) RoleBindings(arg0 any) *MockRbacV1InterfaceRoleBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleBindings", reflect.TypeOf((*MockRbacV1Interface)(nil).RoleBindings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleBindings", reflect.TypeOf((*MockRbacV1Interface)(nil).RoleBindings), arg0) + return &MockRbacV1InterfaceRoleBindingsCall{Call: call} +} + +// MockRbacV1InterfaceRoleBindingsCall wrap *gomock.Call +type MockRbacV1InterfaceRoleBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRbacV1InterfaceRoleBindingsCall) Return(arg0 v12.RoleBindingInterface) *MockRbacV1InterfaceRoleBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRbacV1InterfaceRoleBindingsCall) Do(f func(string) v12.RoleBindingInterface) *MockRbacV1InterfaceRoleBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRbacV1InterfaceRoleBindingsCall) DoAndReturn(f func(string) v12.RoleBindingInterface) *MockRbacV1InterfaceRoleBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Roles mocks base method. @@ -111,9 +207,33 @@ func (m *MockRbacV1Interface) Roles(arg0 string) v12.RoleInterface { } // Roles indicates an expected call of Roles. -func (mr *MockRbacV1InterfaceMockRecorder) Roles(arg0 any) *gomock.Call { +func (mr *MockRbacV1InterfaceMockRecorder) Roles(arg0 any) *MockRbacV1InterfaceRolesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Roles", reflect.TypeOf((*MockRbacV1Interface)(nil).Roles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Roles", reflect.TypeOf((*MockRbacV1Interface)(nil).Roles), arg0) + return &MockRbacV1InterfaceRolesCall{Call: call} +} + +// MockRbacV1InterfaceRolesCall wrap *gomock.Call +type MockRbacV1InterfaceRolesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRbacV1InterfaceRolesCall) Return(arg0 v12.RoleInterface) *MockRbacV1InterfaceRolesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRbacV1InterfaceRolesCall) Do(f func(string) v12.RoleInterface) *MockRbacV1InterfaceRolesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRbacV1InterfaceRolesCall) DoAndReturn(f func(string) v12.RoleInterface) *MockRbacV1InterfaceRolesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClusterRoleBindingInterface is a mock of ClusterRoleBindingInterface interface. @@ -149,9 +269,33 @@ func (m *MockClusterRoleBindingInterface) Apply(arg0 context.Context, arg1 *v11. } // Apply indicates an expected call of Apply. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Apply), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceApplyCall{Call: call} +} + +// MockClusterRoleBindingInterfaceApplyCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceApplyCall) Return(arg0 *v1.ClusterRoleBinding, arg1 error) *MockClusterRoleBindingInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceApplyCall) Do(f func(context.Context, *v11.ClusterRoleBindingApplyConfiguration, v10.ApplyOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.ClusterRoleBindingApplyConfiguration, v10.ApplyOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -164,9 +308,33 @@ func (m *MockClusterRoleBindingInterface) Create(arg0 context.Context, arg1 *v1. } // Create indicates an expected call of Create. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Create), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceCreateCall{Call: call} +} + +// MockClusterRoleBindingInterfaceCreateCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceCreateCall) Return(arg0 *v1.ClusterRoleBinding, arg1 error) *MockClusterRoleBindingInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceCreateCall) Do(f func(context.Context, *v1.ClusterRoleBinding, v10.CreateOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.ClusterRoleBinding, v10.CreateOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -178,9 +346,33 @@ func (m *MockClusterRoleBindingInterface) Delete(arg0 context.Context, arg1 stri } // Delete indicates an expected call of Delete. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Delete), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceDeleteCall{Call: call} +} + +// MockClusterRoleBindingInterfaceDeleteCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceDeleteCall) Return(arg0 error) *MockClusterRoleBindingInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockClusterRoleBindingInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockClusterRoleBindingInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -192,9 +384,33 @@ func (m *MockClusterRoleBindingInterface) DeleteCollection(arg0 context.Context, } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceDeleteCollectionCall{Call: call} +} + +// MockClusterRoleBindingInterfaceDeleteCollectionCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceDeleteCollectionCall) Return(arg0 error) *MockClusterRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockClusterRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockClusterRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -207,9 +423,33 @@ func (m *MockClusterRoleBindingInterface) Get(arg0 context.Context, arg1 string, } // Get indicates an expected call of Get. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Get), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceGetCall{Call: call} +} + +// MockClusterRoleBindingInterfaceGetCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceGetCall) Return(arg0 *v1.ClusterRoleBinding, arg1 error) *MockClusterRoleBindingInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -222,9 +462,33 @@ func (m *MockClusterRoleBindingInterface) List(arg0 context.Context, arg1 v10.Li } // List indicates an expected call of List. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) List(arg0, arg1 any) *MockClusterRoleBindingInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).List), arg0, arg1) + return &MockClusterRoleBindingInterfaceListCall{Call: call} +} + +// MockClusterRoleBindingInterfaceListCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceListCall) Return(arg0 *v1.ClusterRoleBindingList, arg1 error) *MockClusterRoleBindingInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.ClusterRoleBindingList, error)) *MockClusterRoleBindingInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.ClusterRoleBindingList, error)) *MockClusterRoleBindingInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -241,10 +505,34 @@ func (m *MockClusterRoleBindingInterface) Patch(arg0 context.Context, arg1 strin } // Patch indicates an expected call of Patch. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockClusterRoleBindingInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Patch), varargs...) + return &MockClusterRoleBindingInterfacePatchCall{Call: call} +} + +// MockClusterRoleBindingInterfacePatchCall wrap *gomock.Call +type MockClusterRoleBindingInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfacePatchCall) Return(arg0 *v1.ClusterRoleBinding, arg1 error) *MockClusterRoleBindingInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -257,9 +545,33 @@ func (m *MockClusterRoleBindingInterface) Update(arg0 context.Context, arg1 *v1. } // Update indicates an expected call of Update. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockClusterRoleBindingInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Update), arg0, arg1, arg2) + return &MockClusterRoleBindingInterfaceUpdateCall{Call: call} +} + +// MockClusterRoleBindingInterfaceUpdateCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceUpdateCall) Return(arg0 *v1.ClusterRoleBinding, arg1 error) *MockClusterRoleBindingInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceUpdateCall) Do(f func(context.Context, *v1.ClusterRoleBinding, v10.UpdateOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.ClusterRoleBinding, v10.UpdateOptions) (*v1.ClusterRoleBinding, error)) *MockClusterRoleBindingInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -272,9 +584,33 @@ func (m *MockClusterRoleBindingInterface) Watch(arg0 context.Context, arg1 v10.L } // Watch indicates an expected call of Watch. -func (mr *MockClusterRoleBindingInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockClusterRoleBindingInterfaceMockRecorder) Watch(arg0, arg1 any) *MockClusterRoleBindingInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockClusterRoleBindingInterface)(nil).Watch), arg0, arg1) + return &MockClusterRoleBindingInterfaceWatchCall{Call: call} +} + +// MockClusterRoleBindingInterfaceWatchCall wrap *gomock.Call +type MockClusterRoleBindingInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleBindingInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockClusterRoleBindingInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleBindingInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockClusterRoleBindingInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleBindingInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockClusterRoleBindingInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClusterRoleInterface is a mock of ClusterRoleInterface interface. @@ -310,9 +646,33 @@ func (m *MockClusterRoleInterface) Apply(arg0 context.Context, arg1 *v11.Cluster } // Apply indicates an expected call of Apply. -func (mr *MockClusterRoleInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockClusterRoleInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockClusterRoleInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockClusterRoleInterface)(nil).Apply), arg0, arg1, arg2) + return &MockClusterRoleInterfaceApplyCall{Call: call} +} + +// MockClusterRoleInterfaceApplyCall wrap *gomock.Call +type MockClusterRoleInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceApplyCall) Return(arg0 *v1.ClusterRole, arg1 error) *MockClusterRoleInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceApplyCall) Do(f func(context.Context, *v11.ClusterRoleApplyConfiguration, v10.ApplyOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.ClusterRoleApplyConfiguration, v10.ApplyOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -325,9 +685,33 @@ func (m *MockClusterRoleInterface) Create(arg0 context.Context, arg1 *v1.Cluster } // Create indicates an expected call of Create. -func (mr *MockClusterRoleInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockClusterRoleInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterRoleInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterRoleInterface)(nil).Create), arg0, arg1, arg2) + return &MockClusterRoleInterfaceCreateCall{Call: call} +} + +// MockClusterRoleInterfaceCreateCall wrap *gomock.Call +type MockClusterRoleInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceCreateCall) Return(arg0 *v1.ClusterRole, arg1 error) *MockClusterRoleInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceCreateCall) Do(f func(context.Context, *v1.ClusterRole, v10.CreateOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.ClusterRole, v10.CreateOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -339,9 +723,33 @@ func (m *MockClusterRoleInterface) Delete(arg0 context.Context, arg1 string, arg } // Delete indicates an expected call of Delete. -func (mr *MockClusterRoleInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockClusterRoleInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterRoleInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterRoleInterface)(nil).Delete), arg0, arg1, arg2) + return &MockClusterRoleInterfaceDeleteCall{Call: call} +} + +// MockClusterRoleInterfaceDeleteCall wrap *gomock.Call +type MockClusterRoleInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceDeleteCall) Return(arg0 error) *MockClusterRoleInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockClusterRoleInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockClusterRoleInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -353,9 +761,33 @@ func (m *MockClusterRoleInterface) DeleteCollection(arg0 context.Context, arg1 v } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockClusterRoleInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockClusterRoleInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockClusterRoleInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockClusterRoleInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockClusterRoleInterfaceDeleteCollectionCall{Call: call} +} + +// MockClusterRoleInterfaceDeleteCollectionCall wrap *gomock.Call +type MockClusterRoleInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceDeleteCollectionCall) Return(arg0 error) *MockClusterRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockClusterRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockClusterRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -368,9 +800,33 @@ func (m *MockClusterRoleInterface) Get(arg0 context.Context, arg1 string, arg2 v } // Get indicates an expected call of Get. -func (mr *MockClusterRoleInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockClusterRoleInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterRoleInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterRoleInterface)(nil).Get), arg0, arg1, arg2) + return &MockClusterRoleInterfaceGetCall{Call: call} +} + +// MockClusterRoleInterfaceGetCall wrap *gomock.Call +type MockClusterRoleInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceGetCall) Return(arg0 *v1.ClusterRole, arg1 error) *MockClusterRoleInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -383,9 +839,33 @@ func (m *MockClusterRoleInterface) List(arg0 context.Context, arg1 v10.ListOptio } // List indicates an expected call of List. -func (mr *MockClusterRoleInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) List(arg0, arg1 any) *MockClusterRoleInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterRoleInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterRoleInterface)(nil).List), arg0, arg1) + return &MockClusterRoleInterfaceListCall{Call: call} +} + +// MockClusterRoleInterfaceListCall wrap *gomock.Call +type MockClusterRoleInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceListCall) Return(arg0 *v1.ClusterRoleList, arg1 error) *MockClusterRoleInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.ClusterRoleList, error)) *MockClusterRoleInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.ClusterRoleList, error)) *MockClusterRoleInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -402,10 +882,34 @@ func (m *MockClusterRoleInterface) Patch(arg0 context.Context, arg1 string, arg2 } // Patch indicates an expected call of Patch. -func (mr *MockClusterRoleInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockClusterRoleInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClusterRoleInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClusterRoleInterface)(nil).Patch), varargs...) + return &MockClusterRoleInterfacePatchCall{Call: call} +} + +// MockClusterRoleInterfacePatchCall wrap *gomock.Call +type MockClusterRoleInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfacePatchCall) Return(arg0 *v1.ClusterRole, arg1 error) *MockClusterRoleInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ClusterRole, error)) *MockClusterRoleInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.ClusterRole, error)) *MockClusterRoleInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -418,9 +922,33 @@ func (m *MockClusterRoleInterface) Update(arg0 context.Context, arg1 *v1.Cluster } // Update indicates an expected call of Update. -func (mr *MockClusterRoleInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockClusterRoleInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterRoleInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterRoleInterface)(nil).Update), arg0, arg1, arg2) + return &MockClusterRoleInterfaceUpdateCall{Call: call} +} + +// MockClusterRoleInterfaceUpdateCall wrap *gomock.Call +type MockClusterRoleInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceUpdateCall) Return(arg0 *v1.ClusterRole, arg1 error) *MockClusterRoleInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceUpdateCall) Do(f func(context.Context, *v1.ClusterRole, v10.UpdateOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.ClusterRole, v10.UpdateOptions) (*v1.ClusterRole, error)) *MockClusterRoleInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -433,9 +961,33 @@ func (m *MockClusterRoleInterface) Watch(arg0 context.Context, arg1 v10.ListOpti } // Watch indicates an expected call of Watch. -func (mr *MockClusterRoleInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockClusterRoleInterfaceMockRecorder) Watch(arg0, arg1 any) *MockClusterRoleInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockClusterRoleInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockClusterRoleInterface)(nil).Watch), arg0, arg1) + return &MockClusterRoleInterfaceWatchCall{Call: call} +} + +// MockClusterRoleInterfaceWatchCall wrap *gomock.Call +type MockClusterRoleInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterRoleInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockClusterRoleInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterRoleInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockClusterRoleInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterRoleInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockClusterRoleInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRoleInterface is a mock of RoleInterface interface. @@ -471,9 +1023,33 @@ func (m *MockRoleInterface) Apply(arg0 context.Context, arg1 *v11.RoleApplyConfi } // Apply indicates an expected call of Apply. -func (mr *MockRoleInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockRoleInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockRoleInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockRoleInterface)(nil).Apply), arg0, arg1, arg2) + return &MockRoleInterfaceApplyCall{Call: call} +} + +// MockRoleInterfaceApplyCall wrap *gomock.Call +type MockRoleInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceApplyCall) Return(arg0 *v1.Role, arg1 error) *MockRoleInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceApplyCall) Do(f func(context.Context, *v11.RoleApplyConfiguration, v10.ApplyOptions) (*v1.Role, error)) *MockRoleInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.RoleApplyConfiguration, v10.ApplyOptions) (*v1.Role, error)) *MockRoleInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -486,9 +1062,33 @@ func (m *MockRoleInterface) Create(arg0 context.Context, arg1 *v1.Role, arg2 v10 } // Create indicates an expected call of Create. -func (mr *MockRoleInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockRoleInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRoleInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRoleInterface)(nil).Create), arg0, arg1, arg2) + return &MockRoleInterfaceCreateCall{Call: call} +} + +// MockRoleInterfaceCreateCall wrap *gomock.Call +type MockRoleInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceCreateCall) Return(arg0 *v1.Role, arg1 error) *MockRoleInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceCreateCall) Do(f func(context.Context, *v1.Role, v10.CreateOptions) (*v1.Role, error)) *MockRoleInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.Role, v10.CreateOptions) (*v1.Role, error)) *MockRoleInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -500,9 +1100,33 @@ func (m *MockRoleInterface) Delete(arg0 context.Context, arg1 string, arg2 v10.D } // Delete indicates an expected call of Delete. -func (mr *MockRoleInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockRoleInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRoleInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRoleInterface)(nil).Delete), arg0, arg1, arg2) + return &MockRoleInterfaceDeleteCall{Call: call} +} + +// MockRoleInterfaceDeleteCall wrap *gomock.Call +type MockRoleInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceDeleteCall) Return(arg0 error) *MockRoleInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockRoleInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockRoleInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -514,9 +1138,33 @@ func (m *MockRoleInterface) DeleteCollection(arg0 context.Context, arg1 v10.Dele } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockRoleInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockRoleInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockRoleInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockRoleInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockRoleInterfaceDeleteCollectionCall{Call: call} +} + +// MockRoleInterfaceDeleteCollectionCall wrap *gomock.Call +type MockRoleInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceDeleteCollectionCall) Return(arg0 error) *MockRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockRoleInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -529,9 +1177,33 @@ func (m *MockRoleInterface) Get(arg0 context.Context, arg1 string, arg2 v10.GetO } // Get indicates an expected call of Get. -func (mr *MockRoleInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockRoleInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRoleInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRoleInterface)(nil).Get), arg0, arg1, arg2) + return &MockRoleInterfaceGetCall{Call: call} +} + +// MockRoleInterfaceGetCall wrap *gomock.Call +type MockRoleInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceGetCall) Return(arg0 *v1.Role, arg1 error) *MockRoleInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.Role, error)) *MockRoleInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.Role, error)) *MockRoleInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -544,9 +1216,33 @@ func (m *MockRoleInterface) List(arg0 context.Context, arg1 v10.ListOptions) (*v } // List indicates an expected call of List. -func (mr *MockRoleInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) List(arg0, arg1 any) *MockRoleInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRoleInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRoleInterface)(nil).List), arg0, arg1) + return &MockRoleInterfaceListCall{Call: call} +} + +// MockRoleInterfaceListCall wrap *gomock.Call +type MockRoleInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceListCall) Return(arg0 *v1.RoleList, arg1 error) *MockRoleInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.RoleList, error)) *MockRoleInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.RoleList, error)) *MockRoleInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -563,10 +1259,34 @@ func (m *MockRoleInterface) Patch(arg0 context.Context, arg1 string, arg2 types. } // Patch indicates an expected call of Patch. -func (mr *MockRoleInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockRoleInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRoleInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRoleInterface)(nil).Patch), varargs...) + return &MockRoleInterfacePatchCall{Call: call} +} + +// MockRoleInterfacePatchCall wrap *gomock.Call +type MockRoleInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfacePatchCall) Return(arg0 *v1.Role, arg1 error) *MockRoleInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.Role, error)) *MockRoleInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.Role, error)) *MockRoleInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -579,9 +1299,33 @@ func (m *MockRoleInterface) Update(arg0 context.Context, arg1 *v1.Role, arg2 v10 } // Update indicates an expected call of Update. -func (mr *MockRoleInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockRoleInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRoleInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRoleInterface)(nil).Update), arg0, arg1, arg2) + return &MockRoleInterfaceUpdateCall{Call: call} +} + +// MockRoleInterfaceUpdateCall wrap *gomock.Call +type MockRoleInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceUpdateCall) Return(arg0 *v1.Role, arg1 error) *MockRoleInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceUpdateCall) Do(f func(context.Context, *v1.Role, v10.UpdateOptions) (*v1.Role, error)) *MockRoleInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.Role, v10.UpdateOptions) (*v1.Role, error)) *MockRoleInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -594,9 +1338,33 @@ func (m *MockRoleInterface) Watch(arg0 context.Context, arg1 v10.ListOptions) (w } // Watch indicates an expected call of Watch. -func (mr *MockRoleInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockRoleInterfaceMockRecorder) Watch(arg0, arg1 any) *MockRoleInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockRoleInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockRoleInterface)(nil).Watch), arg0, arg1) + return &MockRoleInterfaceWatchCall{Call: call} +} + +// MockRoleInterfaceWatchCall wrap *gomock.Call +type MockRoleInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockRoleInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockRoleInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockRoleInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRoleBindingInterface is a mock of RoleBindingInterface interface. @@ -632,9 +1400,33 @@ func (m *MockRoleBindingInterface) Apply(arg0 context.Context, arg1 *v11.RoleBin } // Apply indicates an expected call of Apply. -func (mr *MockRoleBindingInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockRoleBindingInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockRoleBindingInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockRoleBindingInterface)(nil).Apply), arg0, arg1, arg2) + return &MockRoleBindingInterfaceApplyCall{Call: call} +} + +// MockRoleBindingInterfaceApplyCall wrap *gomock.Call +type MockRoleBindingInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceApplyCall) Return(arg0 *v1.RoleBinding, arg1 error) *MockRoleBindingInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceApplyCall) Do(f func(context.Context, *v11.RoleBindingApplyConfiguration, v10.ApplyOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.RoleBindingApplyConfiguration, v10.ApplyOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -647,9 +1439,33 @@ func (m *MockRoleBindingInterface) Create(arg0 context.Context, arg1 *v1.RoleBin } // Create indicates an expected call of Create. -func (mr *MockRoleBindingInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockRoleBindingInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRoleBindingInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRoleBindingInterface)(nil).Create), arg0, arg1, arg2) + return &MockRoleBindingInterfaceCreateCall{Call: call} +} + +// MockRoleBindingInterfaceCreateCall wrap *gomock.Call +type MockRoleBindingInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceCreateCall) Return(arg0 *v1.RoleBinding, arg1 error) *MockRoleBindingInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceCreateCall) Do(f func(context.Context, *v1.RoleBinding, v10.CreateOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.RoleBinding, v10.CreateOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -661,9 +1477,33 @@ func (m *MockRoleBindingInterface) Delete(arg0 context.Context, arg1 string, arg } // Delete indicates an expected call of Delete. -func (mr *MockRoleBindingInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockRoleBindingInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRoleBindingInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRoleBindingInterface)(nil).Delete), arg0, arg1, arg2) + return &MockRoleBindingInterfaceDeleteCall{Call: call} +} + +// MockRoleBindingInterfaceDeleteCall wrap *gomock.Call +type MockRoleBindingInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceDeleteCall) Return(arg0 error) *MockRoleBindingInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockRoleBindingInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockRoleBindingInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -675,9 +1515,33 @@ func (m *MockRoleBindingInterface) DeleteCollection(arg0 context.Context, arg1 v } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockRoleBindingInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockRoleBindingInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockRoleBindingInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockRoleBindingInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockRoleBindingInterfaceDeleteCollectionCall{Call: call} +} + +// MockRoleBindingInterfaceDeleteCollectionCall wrap *gomock.Call +type MockRoleBindingInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceDeleteCollectionCall) Return(arg0 error) *MockRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockRoleBindingInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -690,9 +1554,33 @@ func (m *MockRoleBindingInterface) Get(arg0 context.Context, arg1 string, arg2 v } // Get indicates an expected call of Get. -func (mr *MockRoleBindingInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockRoleBindingInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRoleBindingInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRoleBindingInterface)(nil).Get), arg0, arg1, arg2) + return &MockRoleBindingInterfaceGetCall{Call: call} +} + +// MockRoleBindingInterfaceGetCall wrap *gomock.Call +type MockRoleBindingInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceGetCall) Return(arg0 *v1.RoleBinding, arg1 error) *MockRoleBindingInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -705,9 +1593,33 @@ func (m *MockRoleBindingInterface) List(arg0 context.Context, arg1 v10.ListOptio } // List indicates an expected call of List. -func (mr *MockRoleBindingInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) List(arg0, arg1 any) *MockRoleBindingInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRoleBindingInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRoleBindingInterface)(nil).List), arg0, arg1) + return &MockRoleBindingInterfaceListCall{Call: call} +} + +// MockRoleBindingInterfaceListCall wrap *gomock.Call +type MockRoleBindingInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceListCall) Return(arg0 *v1.RoleBindingList, arg1 error) *MockRoleBindingInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.RoleBindingList, error)) *MockRoleBindingInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.RoleBindingList, error)) *MockRoleBindingInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -724,10 +1636,34 @@ func (m *MockRoleBindingInterface) Patch(arg0 context.Context, arg1 string, arg2 } // Patch indicates an expected call of Patch. -func (mr *MockRoleBindingInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockRoleBindingInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRoleBindingInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRoleBindingInterface)(nil).Patch), varargs...) + return &MockRoleBindingInterfacePatchCall{Call: call} +} + +// MockRoleBindingInterfacePatchCall wrap *gomock.Call +type MockRoleBindingInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfacePatchCall) Return(arg0 *v1.RoleBinding, arg1 error) *MockRoleBindingInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.RoleBinding, error)) *MockRoleBindingInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.RoleBinding, error)) *MockRoleBindingInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -740,9 +1676,33 @@ func (m *MockRoleBindingInterface) Update(arg0 context.Context, arg1 *v1.RoleBin } // Update indicates an expected call of Update. -func (mr *MockRoleBindingInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockRoleBindingInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRoleBindingInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRoleBindingInterface)(nil).Update), arg0, arg1, arg2) + return &MockRoleBindingInterfaceUpdateCall{Call: call} +} + +// MockRoleBindingInterfaceUpdateCall wrap *gomock.Call +type MockRoleBindingInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceUpdateCall) Return(arg0 *v1.RoleBinding, arg1 error) *MockRoleBindingInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceUpdateCall) Do(f func(context.Context, *v1.RoleBinding, v10.UpdateOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.RoleBinding, v10.UpdateOptions) (*v1.RoleBinding, error)) *MockRoleBindingInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -755,7 +1715,31 @@ func (m *MockRoleBindingInterface) Watch(arg0 context.Context, arg1 v10.ListOpti } // Watch indicates an expected call of Watch. -func (mr *MockRoleBindingInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockRoleBindingInterfaceMockRecorder) Watch(arg0, arg1 any) *MockRoleBindingInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockRoleBindingInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockRoleBindingInterface)(nil).Watch), arg0, arg1) + return &MockRoleBindingInterfaceWatchCall{Call: call} +} + +// MockRoleBindingInterfaceWatchCall wrap *gomock.Call +type MockRoleBindingInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoleBindingInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockRoleBindingInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoleBindingInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockRoleBindingInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoleBindingInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockRoleBindingInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/restclient_mock.go b/caas/kubernetes/provider/mocks/restclient_mock.go index 1fc8f058a03..135dd0392f1 100644 --- a/caas/kubernetes/provider/mocks/restclient_mock.go +++ b/caas/kubernetes/provider/mocks/restclient_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface +// mockgen -typed -package mocks -destination mocks/restclient_mock.go -mock_names=Interface=MockRestClientInterface k8s.io/client-go/rest Interface // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockRestClientInterface) APIVersion() schema.GroupVersion { } // APIVersion indicates an expected call of APIVersion. -func (mr *MockRestClientInterfaceMockRecorder) APIVersion() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) APIVersion() *MockRestClientInterfaceAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRestClientInterface)(nil).APIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRestClientInterface)(nil).APIVersion)) + return &MockRestClientInterfaceAPIVersionCall{Call: call} +} + +// MockRestClientInterfaceAPIVersionCall wrap *gomock.Call +type MockRestClientInterfaceAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfaceAPIVersionCall) Return(arg0 schema.GroupVersion) *MockRestClientInterfaceAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfaceAPIVersionCall) Do(f func() schema.GroupVersion) *MockRestClientInterfaceAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfaceAPIVersionCall) DoAndReturn(f func() schema.GroupVersion) *MockRestClientInterfaceAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -65,9 +89,33 @@ func (m *MockRestClientInterface) Delete() *rest.Request { } // Delete indicates an expected call of Delete. -func (mr *MockRestClientInterfaceMockRecorder) Delete() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Delete() *MockRestClientInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRestClientInterface)(nil).Delete)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRestClientInterface)(nil).Delete)) + return &MockRestClientInterfaceDeleteCall{Call: call} +} + +// MockRestClientInterfaceDeleteCall wrap *gomock.Call +type MockRestClientInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfaceDeleteCall) Return(arg0 *rest.Request) *MockRestClientInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfaceDeleteCall) Do(f func() *rest.Request) *MockRestClientInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfaceDeleteCall) DoAndReturn(f func() *rest.Request) *MockRestClientInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -79,9 +127,33 @@ func (m *MockRestClientInterface) Get() *rest.Request { } // Get indicates an expected call of Get. -func (mr *MockRestClientInterfaceMockRecorder) Get() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Get() *MockRestClientInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRestClientInterface)(nil).Get)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRestClientInterface)(nil).Get)) + return &MockRestClientInterfaceGetCall{Call: call} +} + +// MockRestClientInterfaceGetCall wrap *gomock.Call +type MockRestClientInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfaceGetCall) Return(arg0 *rest.Request) *MockRestClientInterfaceGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfaceGetCall) Do(f func() *rest.Request) *MockRestClientInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfaceGetCall) DoAndReturn(f func() *rest.Request) *MockRestClientInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRateLimiter mocks base method. @@ -93,9 +165,33 @@ func (m *MockRestClientInterface) GetRateLimiter() flowcontrol.RateLimiter { } // GetRateLimiter indicates an expected call of GetRateLimiter. -func (mr *MockRestClientInterfaceMockRecorder) GetRateLimiter() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) GetRateLimiter() *MockRestClientInterfaceGetRateLimiterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRateLimiter", reflect.TypeOf((*MockRestClientInterface)(nil).GetRateLimiter)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRateLimiter", reflect.TypeOf((*MockRestClientInterface)(nil).GetRateLimiter)) + return &MockRestClientInterfaceGetRateLimiterCall{Call: call} +} + +// MockRestClientInterfaceGetRateLimiterCall wrap *gomock.Call +type MockRestClientInterfaceGetRateLimiterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfaceGetRateLimiterCall) Return(arg0 flowcontrol.RateLimiter) *MockRestClientInterfaceGetRateLimiterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfaceGetRateLimiterCall) Do(f func() flowcontrol.RateLimiter) *MockRestClientInterfaceGetRateLimiterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfaceGetRateLimiterCall) DoAndReturn(f func() flowcontrol.RateLimiter) *MockRestClientInterfaceGetRateLimiterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -107,9 +203,33 @@ func (m *MockRestClientInterface) Patch(arg0 types.PatchType) *rest.Request { } // Patch indicates an expected call of Patch. -func (mr *MockRestClientInterfaceMockRecorder) Patch(arg0 any) *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Patch(arg0 any) *MockRestClientInterfacePatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRestClientInterface)(nil).Patch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRestClientInterface)(nil).Patch), arg0) + return &MockRestClientInterfacePatchCall{Call: call} +} + +// MockRestClientInterfacePatchCall wrap *gomock.Call +type MockRestClientInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfacePatchCall) Return(arg0 *rest.Request) *MockRestClientInterfacePatchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfacePatchCall) Do(f func(types.PatchType) *rest.Request) *MockRestClientInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfacePatchCall) DoAndReturn(f func(types.PatchType) *rest.Request) *MockRestClientInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Post mocks base method. @@ -121,9 +241,33 @@ func (m *MockRestClientInterface) Post() *rest.Request { } // Post indicates an expected call of Post. -func (mr *MockRestClientInterfaceMockRecorder) Post() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Post() *MockRestClientInterfacePostCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockRestClientInterface)(nil).Post)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockRestClientInterface)(nil).Post)) + return &MockRestClientInterfacePostCall{Call: call} +} + +// MockRestClientInterfacePostCall wrap *gomock.Call +type MockRestClientInterfacePostCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfacePostCall) Return(arg0 *rest.Request) *MockRestClientInterfacePostCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfacePostCall) Do(f func() *rest.Request) *MockRestClientInterfacePostCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfacePostCall) DoAndReturn(f func() *rest.Request) *MockRestClientInterfacePostCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -135,9 +279,33 @@ func (m *MockRestClientInterface) Put() *rest.Request { } // Put indicates an expected call of Put. -func (mr *MockRestClientInterfaceMockRecorder) Put() *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Put() *MockRestClientInterfacePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockRestClientInterface)(nil).Put)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockRestClientInterface)(nil).Put)) + return &MockRestClientInterfacePutCall{Call: call} +} + +// MockRestClientInterfacePutCall wrap *gomock.Call +type MockRestClientInterfacePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfacePutCall) Return(arg0 *rest.Request) *MockRestClientInterfacePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfacePutCall) Do(f func() *rest.Request) *MockRestClientInterfacePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfacePutCall) DoAndReturn(f func() *rest.Request) *MockRestClientInterfacePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Verb mocks base method. @@ -149,7 +317,31 @@ func (m *MockRestClientInterface) Verb(arg0 string) *rest.Request { } // Verb indicates an expected call of Verb. -func (mr *MockRestClientInterfaceMockRecorder) Verb(arg0 any) *gomock.Call { +func (mr *MockRestClientInterfaceMockRecorder) Verb(arg0 any) *MockRestClientInterfaceVerbCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verb", reflect.TypeOf((*MockRestClientInterface)(nil).Verb), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verb", reflect.TypeOf((*MockRestClientInterface)(nil).Verb), arg0) + return &MockRestClientInterfaceVerbCall{Call: call} +} + +// MockRestClientInterfaceVerbCall wrap *gomock.Call +type MockRestClientInterfaceVerbCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRestClientInterfaceVerbCall) Return(arg0 *rest.Request) *MockRestClientInterfaceVerbCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRestClientInterfaceVerbCall) Do(f func(string) *rest.Request) *MockRestClientInterfaceVerbCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRestClientInterfaceVerbCall) DoAndReturn(f func(string) *rest.Request) *MockRestClientInterfaceVerbCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/serviceaccount_mock.go b/caas/kubernetes/provider/mocks/serviceaccount_mock.go index 94ff17d81ef..49193cc2419 100644 --- a/caas/kubernetes/provider/mocks/serviceaccount_mock.go +++ b/caas/kubernetes/provider/mocks/serviceaccount_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface +// mockgen -typed -package mocks -destination mocks/serviceaccount_mock.go k8s.io/client-go/kubernetes/typed/core/v1 ServiceAccountInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockServiceAccountInterface) Apply(arg0 context.Context, arg1 *v12.Serv } // Apply indicates an expected call of Apply. -func (mr *MockServiceAccountInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockServiceAccountInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockServiceAccountInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockServiceAccountInterface)(nil).Apply), arg0, arg1, arg2) + return &MockServiceAccountInterfaceApplyCall{Call: call} +} + +// MockServiceAccountInterfaceApplyCall wrap *gomock.Call +type MockServiceAccountInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceApplyCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceApplyCall) Do(f func(context.Context, *v12.ServiceAccountApplyConfiguration, v11.ApplyOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceApplyCall) DoAndReturn(f func(context.Context, *v12.ServiceAccountApplyConfiguration, v11.ApplyOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -70,9 +94,33 @@ func (m *MockServiceAccountInterface) Create(arg0 context.Context, arg1 *v10.Ser } // Create indicates an expected call of Create. -func (mr *MockServiceAccountInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockServiceAccountInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServiceAccountInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServiceAccountInterface)(nil).Create), arg0, arg1, arg2) + return &MockServiceAccountInterfaceCreateCall{Call: call} +} + +// MockServiceAccountInterfaceCreateCall wrap *gomock.Call +type MockServiceAccountInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceCreateCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceCreateCall) Do(f func(context.Context, *v10.ServiceAccount, v11.CreateOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceCreateCall) DoAndReturn(f func(context.Context, *v10.ServiceAccount, v11.CreateOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateToken mocks base method. @@ -85,9 +133,33 @@ func (m *MockServiceAccountInterface) CreateToken(arg0 context.Context, arg1 str } // CreateToken indicates an expected call of CreateToken. -func (mr *MockServiceAccountInterfaceMockRecorder) CreateToken(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) CreateToken(arg0, arg1, arg2, arg3 any) *MockServiceAccountInterfaceCreateTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateToken", reflect.TypeOf((*MockServiceAccountInterface)(nil).CreateToken), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateToken", reflect.TypeOf((*MockServiceAccountInterface)(nil).CreateToken), arg0, arg1, arg2, arg3) + return &MockServiceAccountInterfaceCreateTokenCall{Call: call} +} + +// MockServiceAccountInterfaceCreateTokenCall wrap *gomock.Call +type MockServiceAccountInterfaceCreateTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceCreateTokenCall) Return(arg0 *v1.TokenRequest, arg1 error) *MockServiceAccountInterfaceCreateTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceCreateTokenCall) Do(f func(context.Context, string, *v1.TokenRequest, v11.CreateOptions) (*v1.TokenRequest, error)) *MockServiceAccountInterfaceCreateTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceCreateTokenCall) DoAndReturn(f func(context.Context, string, *v1.TokenRequest, v11.CreateOptions) (*v1.TokenRequest, error)) *MockServiceAccountInterfaceCreateTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -99,9 +171,33 @@ func (m *MockServiceAccountInterface) Delete(arg0 context.Context, arg1 string, } // Delete indicates an expected call of Delete. -func (mr *MockServiceAccountInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockServiceAccountInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServiceAccountInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServiceAccountInterface)(nil).Delete), arg0, arg1, arg2) + return &MockServiceAccountInterfaceDeleteCall{Call: call} +} + +// MockServiceAccountInterfaceDeleteCall wrap *gomock.Call +type MockServiceAccountInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceDeleteCall) Return(arg0 error) *MockServiceAccountInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceDeleteCall) Do(f func(context.Context, string, v11.DeleteOptions) error) *MockServiceAccountInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v11.DeleteOptions) error) *MockServiceAccountInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -113,9 +209,33 @@ func (m *MockServiceAccountInterface) DeleteCollection(arg0 context.Context, arg } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockServiceAccountInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockServiceAccountInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockServiceAccountInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockServiceAccountInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockServiceAccountInterfaceDeleteCollectionCall{Call: call} +} + +// MockServiceAccountInterfaceDeleteCollectionCall wrap *gomock.Call +type MockServiceAccountInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceDeleteCollectionCall) Return(arg0 error) *MockServiceAccountInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceDeleteCollectionCall) Do(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockServiceAccountInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v11.DeleteOptions, v11.ListOptions) error) *MockServiceAccountInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -128,9 +248,33 @@ func (m *MockServiceAccountInterface) Get(arg0 context.Context, arg1 string, arg } // Get indicates an expected call of Get. -func (mr *MockServiceAccountInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockServiceAccountInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceAccountInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceAccountInterface)(nil).Get), arg0, arg1, arg2) + return &MockServiceAccountInterfaceGetCall{Call: call} +} + +// MockServiceAccountInterfaceGetCall wrap *gomock.Call +type MockServiceAccountInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceGetCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceGetCall) Do(f func(context.Context, string, v11.GetOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceGetCall) DoAndReturn(f func(context.Context, string, v11.GetOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -143,9 +287,33 @@ func (m *MockServiceAccountInterface) List(arg0 context.Context, arg1 v11.ListOp } // List indicates an expected call of List. -func (mr *MockServiceAccountInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) List(arg0, arg1 any) *MockServiceAccountInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountInterface)(nil).List), arg0, arg1) + return &MockServiceAccountInterfaceListCall{Call: call} +} + +// MockServiceAccountInterfaceListCall wrap *gomock.Call +type MockServiceAccountInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceListCall) Return(arg0 *v10.ServiceAccountList, arg1 error) *MockServiceAccountInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceListCall) Do(f func(context.Context, v11.ListOptions) (*v10.ServiceAccountList, error)) *MockServiceAccountInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceListCall) DoAndReturn(f func(context.Context, v11.ListOptions) (*v10.ServiceAccountList, error)) *MockServiceAccountInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -162,10 +330,34 @@ func (m *MockServiceAccountInterface) Patch(arg0 context.Context, arg1 string, a } // Patch indicates an expected call of Patch. -func (mr *MockServiceAccountInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockServiceAccountInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockServiceAccountInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockServiceAccountInterface)(nil).Patch), varargs...) + return &MockServiceAccountInterfacePatchCall{Call: call} +} + +// MockServiceAccountInterfacePatchCall wrap *gomock.Call +type MockServiceAccountInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfacePatchCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v10.ServiceAccount, error)) *MockServiceAccountInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v11.PatchOptions, ...string) (*v10.ServiceAccount, error)) *MockServiceAccountInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -178,9 +370,33 @@ func (m *MockServiceAccountInterface) Update(arg0 context.Context, arg1 *v10.Ser } // Update indicates an expected call of Update. -func (mr *MockServiceAccountInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockServiceAccountInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServiceAccountInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServiceAccountInterface)(nil).Update), arg0, arg1, arg2) + return &MockServiceAccountInterfaceUpdateCall{Call: call} +} + +// MockServiceAccountInterfaceUpdateCall wrap *gomock.Call +type MockServiceAccountInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceUpdateCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceUpdateCall) Do(f func(context.Context, *v10.ServiceAccount, v11.UpdateOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v10.ServiceAccount, v11.UpdateOptions) (*v10.ServiceAccount, error)) *MockServiceAccountInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -193,7 +409,31 @@ func (m *MockServiceAccountInterface) Watch(arg0 context.Context, arg1 v11.ListO } // Watch indicates an expected call of Watch. -func (mr *MockServiceAccountInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceAccountInterfaceMockRecorder) Watch(arg0, arg1 any) *MockServiceAccountInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockServiceAccountInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockServiceAccountInterface)(nil).Watch), arg0, arg1) + return &MockServiceAccountInterfaceWatchCall{Call: call} +} + +// MockServiceAccountInterfaceWatchCall wrap *gomock.Call +type MockServiceAccountInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockServiceAccountInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInterfaceWatchCall) Do(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockServiceAccountInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInterfaceWatchCall) DoAndReturn(f func(context.Context, v11.ListOptions) (watch.Interface, error)) *MockServiceAccountInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/serviceaccountinformer_mock.go b/caas/kubernetes/provider/mocks/serviceaccountinformer_mock.go index 38404477e32..0427a3e8194 100644 --- a/caas/kubernetes/provider/mocks/serviceaccountinformer_mock.go +++ b/caas/kubernetes/provider/mocks/serviceaccountinformer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/serviceaccountinformer_mock.go k8s.io/client-go/informers/core/v1 ServiceAccountInformer +// mockgen -typed -package mocks -destination mocks/serviceaccountinformer_mock.go k8s.io/client-go/informers/core/v1 ServiceAccountInformer // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockServiceAccountInformer) Informer() cache.SharedIndexInformer { } // Informer indicates an expected call of Informer. -func (mr *MockServiceAccountInformerMockRecorder) Informer() *gomock.Call { +func (mr *MockServiceAccountInformerMockRecorder) Informer() *MockServiceAccountInformerInformerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Informer", reflect.TypeOf((*MockServiceAccountInformer)(nil).Informer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Informer", reflect.TypeOf((*MockServiceAccountInformer)(nil).Informer)) + return &MockServiceAccountInformerInformerCall{Call: call} +} + +// MockServiceAccountInformerInformerCall wrap *gomock.Call +type MockServiceAccountInformerInformerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInformerInformerCall) Return(arg0 cache.SharedIndexInformer) *MockServiceAccountInformerInformerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInformerInformerCall) Do(f func() cache.SharedIndexInformer) *MockServiceAccountInformerInformerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInformerInformerCall) DoAndReturn(f func() cache.SharedIndexInformer) *MockServiceAccountInformerInformerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Lister mocks base method. @@ -63,7 +87,31 @@ func (m *MockServiceAccountInformer) Lister() v1.ServiceAccountLister { } // Lister indicates an expected call of Lister. -func (mr *MockServiceAccountInformerMockRecorder) Lister() *gomock.Call { +func (mr *MockServiceAccountInformerMockRecorder) Lister() *MockServiceAccountInformerListerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lister", reflect.TypeOf((*MockServiceAccountInformer)(nil).Lister)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lister", reflect.TypeOf((*MockServiceAccountInformer)(nil).Lister)) + return &MockServiceAccountInformerListerCall{Call: call} +} + +// MockServiceAccountInformerListerCall wrap *gomock.Call +type MockServiceAccountInformerListerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountInformerListerCall) Return(arg0 v1.ServiceAccountLister) *MockServiceAccountInformerListerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountInformerListerCall) Do(f func() v1.ServiceAccountLister) *MockServiceAccountInformerListerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountInformerListerCall) DoAndReturn(f func() v1.ServiceAccountLister) *MockServiceAccountInformerListerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/serviceaccountlister_mock.go b/caas/kubernetes/provider/mocks/serviceaccountlister_mock.go index ecd5d993b26..da795153e13 100644 --- a/caas/kubernetes/provider/mocks/serviceaccountlister_mock.go +++ b/caas/kubernetes/provider/mocks/serviceaccountlister_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/serviceaccountlister_mock.go k8s.io/client-go/listers/core/v1 ServiceAccountLister,ServiceAccountNamespaceLister +// mockgen -typed -package mocks -destination mocks/serviceaccountlister_mock.go k8s.io/client-go/listers/core/v1 ServiceAccountLister,ServiceAccountNamespaceLister // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockServiceAccountLister) List(arg0 labels.Selector) ([]*v1.ServiceAcco } // List indicates an expected call of List. -func (mr *MockServiceAccountListerMockRecorder) List(arg0 any) *gomock.Call { +func (mr *MockServiceAccountListerMockRecorder) List(arg0 any) *MockServiceAccountListerListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountLister)(nil).List), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountLister)(nil).List), arg0) + return &MockServiceAccountListerListCall{Call: call} +} + +// MockServiceAccountListerListCall wrap *gomock.Call +type MockServiceAccountListerListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountListerListCall) Return(arg0 []*v1.ServiceAccount, arg1 error) *MockServiceAccountListerListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountListerListCall) Do(f func(labels.Selector) ([]*v1.ServiceAccount, error)) *MockServiceAccountListerListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountListerListCall) DoAndReturn(f func(labels.Selector) ([]*v1.ServiceAccount, error)) *MockServiceAccountListerListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServiceAccounts mocks base method. @@ -65,9 +89,33 @@ func (m *MockServiceAccountLister) ServiceAccounts(arg0 string) v10.ServiceAccou } // ServiceAccounts indicates an expected call of ServiceAccounts. -func (mr *MockServiceAccountListerMockRecorder) ServiceAccounts(arg0 any) *gomock.Call { +func (mr *MockServiceAccountListerMockRecorder) ServiceAccounts(arg0 any) *MockServiceAccountListerServiceAccountsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceAccounts", reflect.TypeOf((*MockServiceAccountLister)(nil).ServiceAccounts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceAccounts", reflect.TypeOf((*MockServiceAccountLister)(nil).ServiceAccounts), arg0) + return &MockServiceAccountListerServiceAccountsCall{Call: call} +} + +// MockServiceAccountListerServiceAccountsCall wrap *gomock.Call +type MockServiceAccountListerServiceAccountsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountListerServiceAccountsCall) Return(arg0 v10.ServiceAccountNamespaceLister) *MockServiceAccountListerServiceAccountsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountListerServiceAccountsCall) Do(f func(string) v10.ServiceAccountNamespaceLister) *MockServiceAccountListerServiceAccountsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountListerServiceAccountsCall) DoAndReturn(f func(string) v10.ServiceAccountNamespaceLister) *MockServiceAccountListerServiceAccountsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceAccountNamespaceLister is a mock of ServiceAccountNamespaceLister interface. @@ -103,9 +151,33 @@ func (m *MockServiceAccountNamespaceLister) Get(arg0 string) (*v1.ServiceAccount } // Get indicates an expected call of Get. -func (mr *MockServiceAccountNamespaceListerMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockServiceAccountNamespaceListerMockRecorder) Get(arg0 any) *MockServiceAccountNamespaceListerGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceAccountNamespaceLister)(nil).Get), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceAccountNamespaceLister)(nil).Get), arg0) + return &MockServiceAccountNamespaceListerGetCall{Call: call} +} + +// MockServiceAccountNamespaceListerGetCall wrap *gomock.Call +type MockServiceAccountNamespaceListerGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountNamespaceListerGetCall) Return(arg0 *v1.ServiceAccount, arg1 error) *MockServiceAccountNamespaceListerGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountNamespaceListerGetCall) Do(f func(string) (*v1.ServiceAccount, error)) *MockServiceAccountNamespaceListerGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountNamespaceListerGetCall) DoAndReturn(f func(string) (*v1.ServiceAccount, error)) *MockServiceAccountNamespaceListerGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -118,7 +190,31 @@ func (m *MockServiceAccountNamespaceLister) List(arg0 labels.Selector) ([]*v1.Se } // List indicates an expected call of List. -func (mr *MockServiceAccountNamespaceListerMockRecorder) List(arg0 any) *gomock.Call { +func (mr *MockServiceAccountNamespaceListerMockRecorder) List(arg0 any) *MockServiceAccountNamespaceListerListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountNamespaceLister)(nil).List), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountNamespaceLister)(nil).List), arg0) + return &MockServiceAccountNamespaceListerListCall{Call: call} +} + +// MockServiceAccountNamespaceListerListCall wrap *gomock.Call +type MockServiceAccountNamespaceListerListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountNamespaceListerListCall) Return(arg0 []*v1.ServiceAccount, arg1 error) *MockServiceAccountNamespaceListerListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountNamespaceListerListCall) Do(f func(labels.Selector) ([]*v1.ServiceAccount, error)) *MockServiceAccountNamespaceListerListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountNamespaceListerListCall) DoAndReturn(f func(labels.Selector) ([]*v1.ServiceAccount, error)) *MockServiceAccountNamespaceListerListCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/sharedindexinformer_mock.go b/caas/kubernetes/provider/mocks/sharedindexinformer_mock.go index 9d04ab9e53b..fa5e6c9224f 100644 --- a/caas/kubernetes/provider/mocks/sharedindexinformer_mock.go +++ b/caas/kubernetes/provider/mocks/sharedindexinformer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/sharedindexinformer_mock.go k8s.io/client-go/tools/cache SharedIndexInformer +// mockgen -typed -package mocks -destination mocks/sharedindexinformer_mock.go k8s.io/client-go/tools/cache SharedIndexInformer // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockSharedIndexInformer) AddEventHandler(arg0 cache.ResourceEventHandle } // AddEventHandler indicates an expected call of AddEventHandler. -func (mr *MockSharedIndexInformerMockRecorder) AddEventHandler(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) AddEventHandler(arg0 any) *MockSharedIndexInformerAddEventHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEventHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddEventHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEventHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddEventHandler), arg0) + return &MockSharedIndexInformerAddEventHandlerCall{Call: call} +} + +// MockSharedIndexInformerAddEventHandlerCall wrap *gomock.Call +type MockSharedIndexInformerAddEventHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerAddEventHandlerCall) Return(arg0 cache.ResourceEventHandlerRegistration, arg1 error) *MockSharedIndexInformerAddEventHandlerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerAddEventHandlerCall) Do(f func(cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)) *MockSharedIndexInformerAddEventHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerAddEventHandlerCall) DoAndReturn(f func(cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)) *MockSharedIndexInformerAddEventHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddEventHandlerWithResyncPeriod mocks base method. @@ -65,9 +89,33 @@ func (m *MockSharedIndexInformer) AddEventHandlerWithResyncPeriod(arg0 cache.Res } // AddEventHandlerWithResyncPeriod indicates an expected call of AddEventHandlerWithResyncPeriod. -func (mr *MockSharedIndexInformerMockRecorder) AddEventHandlerWithResyncPeriod(arg0, arg1 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) AddEventHandlerWithResyncPeriod(arg0, arg1 any) *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEventHandlerWithResyncPeriod", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddEventHandlerWithResyncPeriod), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEventHandlerWithResyncPeriod", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddEventHandlerWithResyncPeriod), arg0, arg1) + return &MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall{Call: call} +} + +// MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall wrap *gomock.Call +type MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall) Return(arg0 cache.ResourceEventHandlerRegistration, arg1 error) *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall) Do(f func(cache.ResourceEventHandler, time.Duration) (cache.ResourceEventHandlerRegistration, error)) *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall) DoAndReturn(f func(cache.ResourceEventHandler, time.Duration) (cache.ResourceEventHandlerRegistration, error)) *MockSharedIndexInformerAddEventHandlerWithResyncPeriodCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddIndexers mocks base method. @@ -79,9 +127,33 @@ func (m *MockSharedIndexInformer) AddIndexers(arg0 cache.Indexers) error { } // AddIndexers indicates an expected call of AddIndexers. -func (mr *MockSharedIndexInformerMockRecorder) AddIndexers(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) AddIndexers(arg0 any) *MockSharedIndexInformerAddIndexersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIndexers", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddIndexers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIndexers", reflect.TypeOf((*MockSharedIndexInformer)(nil).AddIndexers), arg0) + return &MockSharedIndexInformerAddIndexersCall{Call: call} +} + +// MockSharedIndexInformerAddIndexersCall wrap *gomock.Call +type MockSharedIndexInformerAddIndexersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerAddIndexersCall) Return(arg0 error) *MockSharedIndexInformerAddIndexersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerAddIndexersCall) Do(f func(cache.Indexers) error) *MockSharedIndexInformerAddIndexersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerAddIndexersCall) DoAndReturn(f func(cache.Indexers) error) *MockSharedIndexInformerAddIndexersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetController mocks base method. @@ -93,9 +165,33 @@ func (m *MockSharedIndexInformer) GetController() cache.Controller { } // GetController indicates an expected call of GetController. -func (mr *MockSharedIndexInformerMockRecorder) GetController() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) GetController() *MockSharedIndexInformerGetControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetController", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetController", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetController)) + return &MockSharedIndexInformerGetControllerCall{Call: call} +} + +// MockSharedIndexInformerGetControllerCall wrap *gomock.Call +type MockSharedIndexInformerGetControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerGetControllerCall) Return(arg0 cache.Controller) *MockSharedIndexInformerGetControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerGetControllerCall) Do(f func() cache.Controller) *MockSharedIndexInformerGetControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerGetControllerCall) DoAndReturn(f func() cache.Controller) *MockSharedIndexInformerGetControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetIndexer mocks base method. @@ -107,9 +203,33 @@ func (m *MockSharedIndexInformer) GetIndexer() cache.Indexer { } // GetIndexer indicates an expected call of GetIndexer. -func (mr *MockSharedIndexInformerMockRecorder) GetIndexer() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) GetIndexer() *MockSharedIndexInformerGetIndexerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndexer", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetIndexer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndexer", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetIndexer)) + return &MockSharedIndexInformerGetIndexerCall{Call: call} +} + +// MockSharedIndexInformerGetIndexerCall wrap *gomock.Call +type MockSharedIndexInformerGetIndexerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerGetIndexerCall) Return(arg0 cache.Indexer) *MockSharedIndexInformerGetIndexerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerGetIndexerCall) Do(f func() cache.Indexer) *MockSharedIndexInformerGetIndexerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerGetIndexerCall) DoAndReturn(f func() cache.Indexer) *MockSharedIndexInformerGetIndexerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStore mocks base method. @@ -121,9 +241,33 @@ func (m *MockSharedIndexInformer) GetStore() cache.Store { } // GetStore indicates an expected call of GetStore. -func (mr *MockSharedIndexInformerMockRecorder) GetStore() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) GetStore() *MockSharedIndexInformerGetStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStore", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStore", reflect.TypeOf((*MockSharedIndexInformer)(nil).GetStore)) + return &MockSharedIndexInformerGetStoreCall{Call: call} +} + +// MockSharedIndexInformerGetStoreCall wrap *gomock.Call +type MockSharedIndexInformerGetStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerGetStoreCall) Return(arg0 cache.Store) *MockSharedIndexInformerGetStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerGetStoreCall) Do(f func() cache.Store) *MockSharedIndexInformerGetStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerGetStoreCall) DoAndReturn(f func() cache.Store) *MockSharedIndexInformerGetStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasSynced mocks base method. @@ -135,9 +279,33 @@ func (m *MockSharedIndexInformer) HasSynced() bool { } // HasSynced indicates an expected call of HasSynced. -func (mr *MockSharedIndexInformerMockRecorder) HasSynced() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) HasSynced() *MockSharedIndexInformerHasSyncedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSynced", reflect.TypeOf((*MockSharedIndexInformer)(nil).HasSynced)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSynced", reflect.TypeOf((*MockSharedIndexInformer)(nil).HasSynced)) + return &MockSharedIndexInformerHasSyncedCall{Call: call} +} + +// MockSharedIndexInformerHasSyncedCall wrap *gomock.Call +type MockSharedIndexInformerHasSyncedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerHasSyncedCall) Return(arg0 bool) *MockSharedIndexInformerHasSyncedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerHasSyncedCall) Do(f func() bool) *MockSharedIndexInformerHasSyncedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerHasSyncedCall) DoAndReturn(f func() bool) *MockSharedIndexInformerHasSyncedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsStopped mocks base method. @@ -149,9 +317,33 @@ func (m *MockSharedIndexInformer) IsStopped() bool { } // IsStopped indicates an expected call of IsStopped. -func (mr *MockSharedIndexInformerMockRecorder) IsStopped() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) IsStopped() *MockSharedIndexInformerIsStoppedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsStopped", reflect.TypeOf((*MockSharedIndexInformer)(nil).IsStopped)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsStopped", reflect.TypeOf((*MockSharedIndexInformer)(nil).IsStopped)) + return &MockSharedIndexInformerIsStoppedCall{Call: call} +} + +// MockSharedIndexInformerIsStoppedCall wrap *gomock.Call +type MockSharedIndexInformerIsStoppedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerIsStoppedCall) Return(arg0 bool) *MockSharedIndexInformerIsStoppedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerIsStoppedCall) Do(f func() bool) *MockSharedIndexInformerIsStoppedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerIsStoppedCall) DoAndReturn(f func() bool) *MockSharedIndexInformerIsStoppedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LastSyncResourceVersion mocks base method. @@ -163,9 +355,33 @@ func (m *MockSharedIndexInformer) LastSyncResourceVersion() string { } // LastSyncResourceVersion indicates an expected call of LastSyncResourceVersion. -func (mr *MockSharedIndexInformerMockRecorder) LastSyncResourceVersion() *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) LastSyncResourceVersion() *MockSharedIndexInformerLastSyncResourceVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastSyncResourceVersion", reflect.TypeOf((*MockSharedIndexInformer)(nil).LastSyncResourceVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastSyncResourceVersion", reflect.TypeOf((*MockSharedIndexInformer)(nil).LastSyncResourceVersion)) + return &MockSharedIndexInformerLastSyncResourceVersionCall{Call: call} +} + +// MockSharedIndexInformerLastSyncResourceVersionCall wrap *gomock.Call +type MockSharedIndexInformerLastSyncResourceVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerLastSyncResourceVersionCall) Return(arg0 string) *MockSharedIndexInformerLastSyncResourceVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerLastSyncResourceVersionCall) Do(f func() string) *MockSharedIndexInformerLastSyncResourceVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerLastSyncResourceVersionCall) DoAndReturn(f func() string) *MockSharedIndexInformerLastSyncResourceVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveEventHandler mocks base method. @@ -177,9 +393,33 @@ func (m *MockSharedIndexInformer) RemoveEventHandler(arg0 cache.ResourceEventHan } // RemoveEventHandler indicates an expected call of RemoveEventHandler. -func (mr *MockSharedIndexInformerMockRecorder) RemoveEventHandler(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) RemoveEventHandler(arg0 any) *MockSharedIndexInformerRemoveEventHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveEventHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).RemoveEventHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveEventHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).RemoveEventHandler), arg0) + return &MockSharedIndexInformerRemoveEventHandlerCall{Call: call} +} + +// MockSharedIndexInformerRemoveEventHandlerCall wrap *gomock.Call +type MockSharedIndexInformerRemoveEventHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerRemoveEventHandlerCall) Return(arg0 error) *MockSharedIndexInformerRemoveEventHandlerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerRemoveEventHandlerCall) Do(f func(cache.ResourceEventHandlerRegistration) error) *MockSharedIndexInformerRemoveEventHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerRemoveEventHandlerCall) DoAndReturn(f func(cache.ResourceEventHandlerRegistration) error) *MockSharedIndexInformerRemoveEventHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -189,9 +429,33 @@ func (m *MockSharedIndexInformer) Run(arg0 <-chan struct{}) { } // Run indicates an expected call of Run. -func (mr *MockSharedIndexInformerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) Run(arg0 any) *MockSharedIndexInformerRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSharedIndexInformer)(nil).Run), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSharedIndexInformer)(nil).Run), arg0) + return &MockSharedIndexInformerRunCall{Call: call} +} + +// MockSharedIndexInformerRunCall wrap *gomock.Call +type MockSharedIndexInformerRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerRunCall) Return() *MockSharedIndexInformerRunCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerRunCall) Do(f func(<-chan struct{})) *MockSharedIndexInformerRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerRunCall) DoAndReturn(f func(<-chan struct{})) *MockSharedIndexInformerRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetTransform mocks base method. @@ -203,9 +467,33 @@ func (m *MockSharedIndexInformer) SetTransform(arg0 cache.TransformFunc) error { } // SetTransform indicates an expected call of SetTransform. -func (mr *MockSharedIndexInformerMockRecorder) SetTransform(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) SetTransform(arg0 any) *MockSharedIndexInformerSetTransformCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTransform", reflect.TypeOf((*MockSharedIndexInformer)(nil).SetTransform), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTransform", reflect.TypeOf((*MockSharedIndexInformer)(nil).SetTransform), arg0) + return &MockSharedIndexInformerSetTransformCall{Call: call} +} + +// MockSharedIndexInformerSetTransformCall wrap *gomock.Call +type MockSharedIndexInformerSetTransformCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerSetTransformCall) Return(arg0 error) *MockSharedIndexInformerSetTransformCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerSetTransformCall) Do(f func(cache.TransformFunc) error) *MockSharedIndexInformerSetTransformCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerSetTransformCall) DoAndReturn(f func(cache.TransformFunc) error) *MockSharedIndexInformerSetTransformCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetWatchErrorHandler mocks base method. @@ -217,7 +505,31 @@ func (m *MockSharedIndexInformer) SetWatchErrorHandler(arg0 cache.WatchErrorHand } // SetWatchErrorHandler indicates an expected call of SetWatchErrorHandler. -func (mr *MockSharedIndexInformerMockRecorder) SetWatchErrorHandler(arg0 any) *gomock.Call { +func (mr *MockSharedIndexInformerMockRecorder) SetWatchErrorHandler(arg0 any) *MockSharedIndexInformerSetWatchErrorHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWatchErrorHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).SetWatchErrorHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWatchErrorHandler", reflect.TypeOf((*MockSharedIndexInformer)(nil).SetWatchErrorHandler), arg0) + return &MockSharedIndexInformerSetWatchErrorHandlerCall{Call: call} +} + +// MockSharedIndexInformerSetWatchErrorHandlerCall wrap *gomock.Call +type MockSharedIndexInformerSetWatchErrorHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSharedIndexInformerSetWatchErrorHandlerCall) Return(arg0 error) *MockSharedIndexInformerSetWatchErrorHandlerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSharedIndexInformerSetWatchErrorHandlerCall) Do(f func(cache.WatchErrorHandler) error) *MockSharedIndexInformerSetWatchErrorHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSharedIndexInformerSetWatchErrorHandlerCall) DoAndReturn(f func(cache.WatchErrorHandler) error) *MockSharedIndexInformerSetWatchErrorHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/mocks/storagev1_mock.go b/caas/kubernetes/provider/mocks/storagev1_mock.go index d61a4de960d..60ebfc6f443 100644 --- a/caas/kubernetes/provider/mocks/storagev1_mock.go +++ b/caas/kubernetes/provider/mocks/storagev1_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/storagev1_mock.go k8s.io/client-go/kubernetes/typed/storage/v1 StorageV1Interface,StorageClassInterface +// mockgen -typed -package mocks -destination mocks/storagev1_mock.go k8s.io/client-go/kubernetes/typed/storage/v1 StorageV1Interface,StorageClassInterface // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockStorageV1Interface) CSIDrivers() v12.CSIDriverInterface { } // CSIDrivers indicates an expected call of CSIDrivers. -func (mr *MockStorageV1InterfaceMockRecorder) CSIDrivers() *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) CSIDrivers() *MockStorageV1InterfaceCSIDriversCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSIDrivers", reflect.TypeOf((*MockStorageV1Interface)(nil).CSIDrivers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSIDrivers", reflect.TypeOf((*MockStorageV1Interface)(nil).CSIDrivers)) + return &MockStorageV1InterfaceCSIDriversCall{Call: call} +} + +// MockStorageV1InterfaceCSIDriversCall wrap *gomock.Call +type MockStorageV1InterfaceCSIDriversCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceCSIDriversCall) Return(arg0 v12.CSIDriverInterface) *MockStorageV1InterfaceCSIDriversCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceCSIDriversCall) Do(f func() v12.CSIDriverInterface) *MockStorageV1InterfaceCSIDriversCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceCSIDriversCall) DoAndReturn(f func() v12.CSIDriverInterface) *MockStorageV1InterfaceCSIDriversCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CSINodes mocks base method. @@ -69,9 +93,33 @@ func (m *MockStorageV1Interface) CSINodes() v12.CSINodeInterface { } // CSINodes indicates an expected call of CSINodes. -func (mr *MockStorageV1InterfaceMockRecorder) CSINodes() *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) CSINodes() *MockStorageV1InterfaceCSINodesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSINodes", reflect.TypeOf((*MockStorageV1Interface)(nil).CSINodes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSINodes", reflect.TypeOf((*MockStorageV1Interface)(nil).CSINodes)) + return &MockStorageV1InterfaceCSINodesCall{Call: call} +} + +// MockStorageV1InterfaceCSINodesCall wrap *gomock.Call +type MockStorageV1InterfaceCSINodesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceCSINodesCall) Return(arg0 v12.CSINodeInterface) *MockStorageV1InterfaceCSINodesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceCSINodesCall) Do(f func() v12.CSINodeInterface) *MockStorageV1InterfaceCSINodesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceCSINodesCall) DoAndReturn(f func() v12.CSINodeInterface) *MockStorageV1InterfaceCSINodesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CSIStorageCapacities mocks base method. @@ -83,9 +131,33 @@ func (m *MockStorageV1Interface) CSIStorageCapacities(arg0 string) v12.CSIStorag } // CSIStorageCapacities indicates an expected call of CSIStorageCapacities. -func (mr *MockStorageV1InterfaceMockRecorder) CSIStorageCapacities(arg0 any) *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) CSIStorageCapacities(arg0 any) *MockStorageV1InterfaceCSIStorageCapacitiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSIStorageCapacities", reflect.TypeOf((*MockStorageV1Interface)(nil).CSIStorageCapacities), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CSIStorageCapacities", reflect.TypeOf((*MockStorageV1Interface)(nil).CSIStorageCapacities), arg0) + return &MockStorageV1InterfaceCSIStorageCapacitiesCall{Call: call} +} + +// MockStorageV1InterfaceCSIStorageCapacitiesCall wrap *gomock.Call +type MockStorageV1InterfaceCSIStorageCapacitiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceCSIStorageCapacitiesCall) Return(arg0 v12.CSIStorageCapacityInterface) *MockStorageV1InterfaceCSIStorageCapacitiesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceCSIStorageCapacitiesCall) Do(f func(string) v12.CSIStorageCapacityInterface) *MockStorageV1InterfaceCSIStorageCapacitiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceCSIStorageCapacitiesCall) DoAndReturn(f func(string) v12.CSIStorageCapacityInterface) *MockStorageV1InterfaceCSIStorageCapacitiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RESTClient mocks base method. @@ -97,9 +169,33 @@ func (m *MockStorageV1Interface) RESTClient() rest.Interface { } // RESTClient indicates an expected call of RESTClient. -func (mr *MockStorageV1InterfaceMockRecorder) RESTClient() *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) RESTClient() *MockStorageV1InterfaceRESTClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockStorageV1Interface)(nil).RESTClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTClient", reflect.TypeOf((*MockStorageV1Interface)(nil).RESTClient)) + return &MockStorageV1InterfaceRESTClientCall{Call: call} +} + +// MockStorageV1InterfaceRESTClientCall wrap *gomock.Call +type MockStorageV1InterfaceRESTClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceRESTClientCall) Return(arg0 rest.Interface) *MockStorageV1InterfaceRESTClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceRESTClientCall) Do(f func() rest.Interface) *MockStorageV1InterfaceRESTClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceRESTClientCall) DoAndReturn(f func() rest.Interface) *MockStorageV1InterfaceRESTClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageClasses mocks base method. @@ -111,9 +207,33 @@ func (m *MockStorageV1Interface) StorageClasses() v12.StorageClassInterface { } // StorageClasses indicates an expected call of StorageClasses. -func (mr *MockStorageV1InterfaceMockRecorder) StorageClasses() *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) StorageClasses() *MockStorageV1InterfaceStorageClassesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageClasses", reflect.TypeOf((*MockStorageV1Interface)(nil).StorageClasses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageClasses", reflect.TypeOf((*MockStorageV1Interface)(nil).StorageClasses)) + return &MockStorageV1InterfaceStorageClassesCall{Call: call} +} + +// MockStorageV1InterfaceStorageClassesCall wrap *gomock.Call +type MockStorageV1InterfaceStorageClassesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceStorageClassesCall) Return(arg0 v12.StorageClassInterface) *MockStorageV1InterfaceStorageClassesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceStorageClassesCall) Do(f func() v12.StorageClassInterface) *MockStorageV1InterfaceStorageClassesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceStorageClassesCall) DoAndReturn(f func() v12.StorageClassInterface) *MockStorageV1InterfaceStorageClassesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VolumeAttachments mocks base method. @@ -125,9 +245,33 @@ func (m *MockStorageV1Interface) VolumeAttachments() v12.VolumeAttachmentInterfa } // VolumeAttachments indicates an expected call of VolumeAttachments. -func (mr *MockStorageV1InterfaceMockRecorder) VolumeAttachments() *gomock.Call { +func (mr *MockStorageV1InterfaceMockRecorder) VolumeAttachments() *MockStorageV1InterfaceVolumeAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachments", reflect.TypeOf((*MockStorageV1Interface)(nil).VolumeAttachments)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeAttachments", reflect.TypeOf((*MockStorageV1Interface)(nil).VolumeAttachments)) + return &MockStorageV1InterfaceVolumeAttachmentsCall{Call: call} +} + +// MockStorageV1InterfaceVolumeAttachmentsCall wrap *gomock.Call +type MockStorageV1InterfaceVolumeAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageV1InterfaceVolumeAttachmentsCall) Return(arg0 v12.VolumeAttachmentInterface) *MockStorageV1InterfaceVolumeAttachmentsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageV1InterfaceVolumeAttachmentsCall) Do(f func() v12.VolumeAttachmentInterface) *MockStorageV1InterfaceVolumeAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageV1InterfaceVolumeAttachmentsCall) DoAndReturn(f func() v12.VolumeAttachmentInterface) *MockStorageV1InterfaceVolumeAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageClassInterface is a mock of StorageClassInterface interface. @@ -163,9 +307,33 @@ func (m *MockStorageClassInterface) Apply(arg0 context.Context, arg1 *v11.Storag } // Apply indicates an expected call of Apply. -func (mr *MockStorageClassInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Apply(arg0, arg1, arg2 any) *MockStorageClassInterfaceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockStorageClassInterface)(nil).Apply), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockStorageClassInterface)(nil).Apply), arg0, arg1, arg2) + return &MockStorageClassInterfaceApplyCall{Call: call} +} + +// MockStorageClassInterfaceApplyCall wrap *gomock.Call +type MockStorageClassInterfaceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceApplyCall) Return(arg0 *v1.StorageClass, arg1 error) *MockStorageClassInterfaceApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceApplyCall) Do(f func(context.Context, *v11.StorageClassApplyConfiguration, v10.ApplyOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceApplyCall) DoAndReturn(f func(context.Context, *v11.StorageClassApplyConfiguration, v10.ApplyOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -178,9 +346,33 @@ func (m *MockStorageClassInterface) Create(arg0 context.Context, arg1 *v1.Storag } // Create indicates an expected call of Create. -func (mr *MockStorageClassInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Create(arg0, arg1, arg2 any) *MockStorageClassInterfaceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockStorageClassInterface)(nil).Create), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockStorageClassInterface)(nil).Create), arg0, arg1, arg2) + return &MockStorageClassInterfaceCreateCall{Call: call} +} + +// MockStorageClassInterfaceCreateCall wrap *gomock.Call +type MockStorageClassInterfaceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceCreateCall) Return(arg0 *v1.StorageClass, arg1 error) *MockStorageClassInterfaceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceCreateCall) Do(f func(context.Context, *v1.StorageClass, v10.CreateOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceCreateCall) DoAndReturn(f func(context.Context, *v1.StorageClass, v10.CreateOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -192,9 +384,33 @@ func (m *MockStorageClassInterface) Delete(arg0 context.Context, arg1 string, ar } // Delete indicates an expected call of Delete. -func (mr *MockStorageClassInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Delete(arg0, arg1, arg2 any) *MockStorageClassInterfaceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorageClassInterface)(nil).Delete), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorageClassInterface)(nil).Delete), arg0, arg1, arg2) + return &MockStorageClassInterfaceDeleteCall{Call: call} +} + +// MockStorageClassInterfaceDeleteCall wrap *gomock.Call +type MockStorageClassInterfaceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceDeleteCall) Return(arg0 error) *MockStorageClassInterfaceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceDeleteCall) Do(f func(context.Context, string, v10.DeleteOptions) error) *MockStorageClassInterfaceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceDeleteCall) DoAndReturn(f func(context.Context, string, v10.DeleteOptions) error) *MockStorageClassInterfaceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCollection mocks base method. @@ -206,9 +422,33 @@ func (m *MockStorageClassInterface) DeleteCollection(arg0 context.Context, arg1 } // DeleteCollection indicates an expected call of DeleteCollection. -func (mr *MockStorageClassInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) DeleteCollection(arg0, arg1, arg2 any) *MockStorageClassInterfaceDeleteCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockStorageClassInterface)(nil).DeleteCollection), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCollection", reflect.TypeOf((*MockStorageClassInterface)(nil).DeleteCollection), arg0, arg1, arg2) + return &MockStorageClassInterfaceDeleteCollectionCall{Call: call} +} + +// MockStorageClassInterfaceDeleteCollectionCall wrap *gomock.Call +type MockStorageClassInterfaceDeleteCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceDeleteCollectionCall) Return(arg0 error) *MockStorageClassInterfaceDeleteCollectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceDeleteCollectionCall) Do(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockStorageClassInterfaceDeleteCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceDeleteCollectionCall) DoAndReturn(f func(context.Context, v10.DeleteOptions, v10.ListOptions) error) *MockStorageClassInterfaceDeleteCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -221,9 +461,33 @@ func (m *MockStorageClassInterface) Get(arg0 context.Context, arg1 string, arg2 } // Get indicates an expected call of Get. -func (mr *MockStorageClassInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *MockStorageClassInterfaceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorageClassInterface)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorageClassInterface)(nil).Get), arg0, arg1, arg2) + return &MockStorageClassInterfaceGetCall{Call: call} +} + +// MockStorageClassInterfaceGetCall wrap *gomock.Call +type MockStorageClassInterfaceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceGetCall) Return(arg0 *v1.StorageClass, arg1 error) *MockStorageClassInterfaceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceGetCall) Do(f func(context.Context, string, v10.GetOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceGetCall) DoAndReturn(f func(context.Context, string, v10.GetOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -236,9 +500,33 @@ func (m *MockStorageClassInterface) List(arg0 context.Context, arg1 v10.ListOpti } // List indicates an expected call of List. -func (mr *MockStorageClassInterfaceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) List(arg0, arg1 any) *MockStorageClassInterfaceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStorageClassInterface)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStorageClassInterface)(nil).List), arg0, arg1) + return &MockStorageClassInterfaceListCall{Call: call} +} + +// MockStorageClassInterfaceListCall wrap *gomock.Call +type MockStorageClassInterfaceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceListCall) Return(arg0 *v1.StorageClassList, arg1 error) *MockStorageClassInterfaceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceListCall) Do(f func(context.Context, v10.ListOptions) (*v1.StorageClassList, error)) *MockStorageClassInterfaceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceListCall) DoAndReturn(f func(context.Context, v10.ListOptions) (*v1.StorageClassList, error)) *MockStorageClassInterfaceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Patch mocks base method. @@ -255,10 +543,34 @@ func (m *MockStorageClassInterface) Patch(arg0 context.Context, arg1 string, arg } // Patch indicates an expected call of Patch. -func (mr *MockStorageClassInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any, arg5 ...any) *MockStorageClassInterfacePatchCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3, arg4}, arg5...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockStorageClassInterface)(nil).Patch), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockStorageClassInterface)(nil).Patch), varargs...) + return &MockStorageClassInterfacePatchCall{Call: call} +} + +// MockStorageClassInterfacePatchCall wrap *gomock.Call +type MockStorageClassInterfacePatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfacePatchCall) Return(arg0 *v1.StorageClass, arg1 error) *MockStorageClassInterfacePatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfacePatchCall) Do(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.StorageClass, error)) *MockStorageClassInterfacePatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfacePatchCall) DoAndReturn(f func(context.Context, string, types.PatchType, []byte, v10.PatchOptions, ...string) (*v1.StorageClass, error)) *MockStorageClassInterfacePatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -271,9 +583,33 @@ func (m *MockStorageClassInterface) Update(arg0 context.Context, arg1 *v1.Storag } // Update indicates an expected call of Update. -func (mr *MockStorageClassInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Update(arg0, arg1, arg2 any) *MockStorageClassInterfaceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockStorageClassInterface)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockStorageClassInterface)(nil).Update), arg0, arg1, arg2) + return &MockStorageClassInterfaceUpdateCall{Call: call} +} + +// MockStorageClassInterfaceUpdateCall wrap *gomock.Call +type MockStorageClassInterfaceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceUpdateCall) Return(arg0 *v1.StorageClass, arg1 error) *MockStorageClassInterfaceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceUpdateCall) Do(f func(context.Context, *v1.StorageClass, v10.UpdateOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceUpdateCall) DoAndReturn(f func(context.Context, *v1.StorageClass, v10.UpdateOptions) (*v1.StorageClass, error)) *MockStorageClassInterfaceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -286,7 +622,31 @@ func (m *MockStorageClassInterface) Watch(arg0 context.Context, arg1 v10.ListOpt } // Watch indicates an expected call of Watch. -func (mr *MockStorageClassInterfaceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClassInterfaceMockRecorder) Watch(arg0, arg1 any) *MockStorageClassInterfaceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockStorageClassInterface)(nil).Watch), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockStorageClassInterface)(nil).Watch), arg0, arg1) + return &MockStorageClassInterfaceWatchCall{Call: call} +} + +// MockStorageClassInterfaceWatchCall wrap *gomock.Call +type MockStorageClassInterfaceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClassInterfaceWatchCall) Return(arg0 watch.Interface, arg1 error) *MockStorageClassInterfaceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClassInterfaceWatchCall) Do(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockStorageClassInterfaceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClassInterfaceWatchCall) DoAndReturn(f func(context.Context, v10.ListOptions) (watch.Interface, error)) *MockStorageClassInterfaceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/resources/interface.go b/caas/kubernetes/provider/resources/interface.go index dd333e5c2f1..76e5a7367a6 100644 --- a/caas/kubernetes/provider/resources/interface.go +++ b/caas/kubernetes/provider/resources/interface.go @@ -14,7 +14,7 @@ import ( "github.com/juju/juju/core/status" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/caas/kubernetes/provider/resources Resource,Applier +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/caas/kubernetes/provider/resources Resource,Applier const ( // JujuFieldManager marks the resource changes were made by Juju. diff --git a/caas/kubernetes/provider/resources/mocks/resources_mock.go b/caas/kubernetes/provider/resources/mocks/resources_mock.go index 228bb8ed51f..b8389319990 100644 --- a/caas/kubernetes/provider/resources/mocks/resources_mock.go +++ b/caas/kubernetes/provider/resources/mocks/resources_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/caas/kubernetes/provider/resources Resource,Applier +// mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/caas/kubernetes/provider/resources Resource,Applier // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockResource) Apply(arg0 context.Context, arg1 kubernetes.Interface) er } // Apply indicates an expected call of Apply. -func (mr *MockResourceMockRecorder) Apply(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceMockRecorder) Apply(arg0, arg1 any) *MockResourceApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResource)(nil).Apply), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockResource)(nil).Apply), arg0, arg1) + return &MockResourceApplyCall{Call: call} +} + +// MockResourceApplyCall wrap *gomock.Call +type MockResourceApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceApplyCall) Return(arg0 error) *MockResourceApplyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceApplyCall) Do(f func(context.Context, kubernetes.Interface) error) *MockResourceApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceApplyCall) DoAndReturn(f func(context.Context, kubernetes.Interface) error) *MockResourceApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clone mocks base method. @@ -68,9 +92,33 @@ func (m *MockResource) Clone() resources.Resource { } // Clone indicates an expected call of Clone. -func (mr *MockResourceMockRecorder) Clone() *gomock.Call { +func (mr *MockResourceMockRecorder) Clone() *MockResourceCloneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockResource)(nil).Clone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockResource)(nil).Clone)) + return &MockResourceCloneCall{Call: call} +} + +// MockResourceCloneCall wrap *gomock.Call +type MockResourceCloneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceCloneCall) Return(arg0 resources.Resource) *MockResourceCloneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceCloneCall) Do(f func() resources.Resource) *MockResourceCloneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceCloneCall) DoAndReturn(f func() resources.Resource) *MockResourceCloneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ComputeStatus mocks base method. @@ -85,9 +133,33 @@ func (m *MockResource) ComputeStatus(arg0 context.Context, arg1 kubernetes.Inter } // ComputeStatus indicates an expected call of ComputeStatus. -func (mr *MockResourceMockRecorder) ComputeStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourceMockRecorder) ComputeStatus(arg0, arg1, arg2 any) *MockResourceComputeStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComputeStatus", reflect.TypeOf((*MockResource)(nil).ComputeStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComputeStatus", reflect.TypeOf((*MockResource)(nil).ComputeStatus), arg0, arg1, arg2) + return &MockResourceComputeStatusCall{Call: call} +} + +// MockResourceComputeStatusCall wrap *gomock.Call +type MockResourceComputeStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceComputeStatusCall) Return(arg0 string, arg1 status.Status, arg2 time.Time, arg3 error) *MockResourceComputeStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceComputeStatusCall) Do(f func(context.Context, kubernetes.Interface, time.Time) (string, status.Status, time.Time, error)) *MockResourceComputeStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceComputeStatusCall) DoAndReturn(f func(context.Context, kubernetes.Interface, time.Time) (string, status.Status, time.Time, error)) *MockResourceComputeStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -99,9 +171,33 @@ func (m *MockResource) Delete(arg0 context.Context, arg1 kubernetes.Interface) e } // Delete indicates an expected call of Delete. -func (mr *MockResourceMockRecorder) Delete(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceMockRecorder) Delete(arg0, arg1 any) *MockResourceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResource)(nil).Delete), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockResource)(nil).Delete), arg0, arg1) + return &MockResourceDeleteCall{Call: call} +} + +// MockResourceDeleteCall wrap *gomock.Call +type MockResourceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceDeleteCall) Return(arg0 error) *MockResourceDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceDeleteCall) Do(f func(context.Context, kubernetes.Interface) error) *MockResourceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceDeleteCall) DoAndReturn(f func(context.Context, kubernetes.Interface) error) *MockResourceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Events mocks base method. @@ -114,9 +210,33 @@ func (m *MockResource) Events(arg0 context.Context, arg1 kubernetes.Interface) ( } // Events indicates an expected call of Events. -func (mr *MockResourceMockRecorder) Events(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceMockRecorder) Events(arg0, arg1 any) *MockResourceEventsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Events", reflect.TypeOf((*MockResource)(nil).Events), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Events", reflect.TypeOf((*MockResource)(nil).Events), arg0, arg1) + return &MockResourceEventsCall{Call: call} +} + +// MockResourceEventsCall wrap *gomock.Call +type MockResourceEventsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceEventsCall) Return(arg0 []v1.Event, arg1 error) *MockResourceEventsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceEventsCall) Do(f func(context.Context, kubernetes.Interface) ([]v1.Event, error)) *MockResourceEventsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceEventsCall) DoAndReturn(f func(context.Context, kubernetes.Interface) ([]v1.Event, error)) *MockResourceEventsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -128,9 +248,33 @@ func (m *MockResource) Get(arg0 context.Context, arg1 kubernetes.Interface) erro } // Get indicates an expected call of Get. -func (mr *MockResourceMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceMockRecorder) Get(arg0, arg1 any) *MockResourceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResource)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockResource)(nil).Get), arg0, arg1) + return &MockResourceGetCall{Call: call} +} + +// MockResourceGetCall wrap *gomock.Call +type MockResourceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceGetCall) Return(arg0 error) *MockResourceGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceGetCall) Do(f func(context.Context, kubernetes.Interface) error) *MockResourceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceGetCall) DoAndReturn(f func(context.Context, kubernetes.Interface) error) *MockResourceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObjectMeta mocks base method. @@ -142,9 +286,33 @@ func (m *MockResource) GetObjectMeta() v10.Object { } // GetObjectMeta indicates an expected call of GetObjectMeta. -func (mr *MockResourceMockRecorder) GetObjectMeta() *gomock.Call { +func (mr *MockResourceMockRecorder) GetObjectMeta() *MockResourceGetObjectMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectMeta", reflect.TypeOf((*MockResource)(nil).GetObjectMeta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectMeta", reflect.TypeOf((*MockResource)(nil).GetObjectMeta)) + return &MockResourceGetObjectMetaCall{Call: call} +} + +// MockResourceGetObjectMetaCall wrap *gomock.Call +type MockResourceGetObjectMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceGetObjectMetaCall) Return(arg0 v10.Object) *MockResourceGetObjectMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceGetObjectMetaCall) Do(f func() v10.Object) *MockResourceGetObjectMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceGetObjectMetaCall) DoAndReturn(f func() v10.Object) *MockResourceGetObjectMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ID mocks base method. @@ -156,9 +324,33 @@ func (m *MockResource) ID() resources.ID { } // ID indicates an expected call of ID. -func (mr *MockResourceMockRecorder) ID() *gomock.Call { +func (mr *MockResourceMockRecorder) ID() *MockResourceIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockResource)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockResource)(nil).ID)) + return &MockResourceIDCall{Call: call} +} + +// MockResourceIDCall wrap *gomock.Call +type MockResourceIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceIDCall) Return(arg0 resources.ID) *MockResourceIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceIDCall) Do(f func() resources.ID) *MockResourceIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceIDCall) DoAndReturn(f func() resources.ID) *MockResourceIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -170,9 +362,33 @@ func (m *MockResource) String() string { } // String indicates an expected call of String. -func (mr *MockResourceMockRecorder) String() *gomock.Call { +func (mr *MockResourceMockRecorder) String() *MockResourceStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockResource)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockResource)(nil).String)) + return &MockResourceStringCall{Call: call} +} + +// MockResourceStringCall wrap *gomock.Call +type MockResourceStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceStringCall) Return(arg0 string) *MockResourceStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceStringCall) Do(f func() string) *MockResourceStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceStringCall) DoAndReturn(f func() string) *MockResourceStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplier is a mock of Applier interface. @@ -209,9 +425,33 @@ func (m *MockApplier) Apply(arg0 ...resources.Resource) { } // Apply indicates an expected call of Apply. -func (mr *MockApplierMockRecorder) Apply(arg0 ...any) *gomock.Call { +func (mr *MockApplierMockRecorder) Apply(arg0 ...any) *MockApplierApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockApplier)(nil).Apply), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockApplier)(nil).Apply), arg0...) + return &MockApplierApplyCall{Call: call} +} + +// MockApplierApplyCall wrap *gomock.Call +type MockApplierApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplierApplyCall) Return() *MockApplierApplyCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplierApplyCall) Do(f func(...resources.Resource)) *MockApplierApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplierApplyCall) DoAndReturn(f func(...resources.Resource)) *MockApplierApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplySet mocks base method. @@ -221,9 +461,33 @@ func (m *MockApplier) ApplySet(arg0, arg1 []resources.Resource) { } // ApplySet indicates an expected call of ApplySet. -func (mr *MockApplierMockRecorder) ApplySet(arg0, arg1 any) *gomock.Call { +func (mr *MockApplierMockRecorder) ApplySet(arg0, arg1 any) *MockApplierApplySetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplySet", reflect.TypeOf((*MockApplier)(nil).ApplySet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplySet", reflect.TypeOf((*MockApplier)(nil).ApplySet), arg0, arg1) + return &MockApplierApplySetCall{Call: call} +} + +// MockApplierApplySetCall wrap *gomock.Call +type MockApplierApplySetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplierApplySetCall) Return() *MockApplierApplySetCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplierApplySetCall) Do(f func([]resources.Resource, []resources.Resource)) *MockApplierApplySetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplierApplySetCall) DoAndReturn(f func([]resources.Resource, []resources.Resource)) *MockApplierApplySetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -237,9 +501,33 @@ func (m *MockApplier) Delete(arg0 ...resources.Resource) { } // Delete indicates an expected call of Delete. -func (mr *MockApplierMockRecorder) Delete(arg0 ...any) *gomock.Call { +func (mr *MockApplierMockRecorder) Delete(arg0 ...any) *MockApplierDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockApplier)(nil).Delete), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockApplier)(nil).Delete), arg0...) + return &MockApplierDeleteCall{Call: call} +} + +// MockApplierDeleteCall wrap *gomock.Call +type MockApplierDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplierDeleteCall) Return() *MockApplierDeleteCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplierDeleteCall) Do(f func(...resources.Resource)) *MockApplierDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplierDeleteCall) DoAndReturn(f func(...resources.Resource)) *MockApplierDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -251,7 +539,31 @@ func (m *MockApplier) Run(arg0 context.Context, arg1 kubernetes.Interface, arg2 } // Run indicates an expected call of Run. -func (mr *MockApplierMockRecorder) Run(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplierMockRecorder) Run(arg0, arg1, arg2 any) *MockApplierRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockApplier)(nil).Run), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockApplier)(nil).Run), arg0, arg1, arg2) + return &MockApplierRunCall{Call: call} +} + +// MockApplierRunCall wrap *gomock.Call +type MockApplierRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplierRunCall) Return(arg0 error) *MockApplierRunCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplierRunCall) Do(f func(context.Context, kubernetes.Interface, bool) error) *MockApplierRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplierRunCall) DoAndReturn(f func(context.Context, kubernetes.Interface, bool) error) *MockApplierRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/kubernetes/provider/teardown_test.go b/caas/kubernetes/provider/teardown_test.go index 2200cc1ef7c..26aad793ab7 100644 --- a/caas/kubernetes/provider/teardown_test.go +++ b/caas/kubernetes/provider/teardown_test.go @@ -155,7 +155,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockClusterRoleBindings.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -165,7 +165,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockClusterRoles.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -179,12 +179,12 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * Version: "v1alpha2", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list all custom resources for crd "v1". s.mockNamespaceableResourceClient.EXPECT().List(gomock.Any(), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(&unstructured.UnstructuredList{}, nil), + ).Return(&unstructured.UnstructuredList{}, nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -192,7 +192,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * Version: "v1", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list cluster wide all custom resource definitions for listing custom resources. s.mockCustomResourceDefinitionV1.EXPECT().List(gomock.Any(), v1.ListOptions{}).AnyTimes(). @@ -202,7 +202,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockNamespaceableResourceClient.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -210,13 +210,13 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * Version: "v1alpha2", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // delete all custom resources for crd "v1". s.mockNamespaceableResourceClient.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -224,7 +224,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * Version: "v1", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list cluster wide all custom resource definitions for deleting custom resources. s.mockCustomResourceDefinitionV1.EXPECT().List(gomock.Any(), v1.ListOptions{}).AnyTimes(). @@ -238,7 +238,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockCustomResourceDefinitionV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -248,7 +248,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockMutatingWebhookConfigurationV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -258,7 +258,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockValidatingWebhookConfigurationV1.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(s.k8sNotFoundError()), + ).Return(s.k8sNotFoundError()).Call, ) // timer +1. @@ -268,7 +268,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownSuccess(c * s.mockStorageClass.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ) var wg sync.WaitGroup @@ -435,13 +435,13 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownTimeout(c * Version: "v1alpha2", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // delete all custom resources for crd "v1". s.mockNamespaceableResourceClient.EXPECT().DeleteCollection(gomock.Any(), s.deleteOptions(v1.DeletePropagationForeground, ""), v1.ListOptions{LabelSelector: "juju-resource-lifecycle notin (persistent),model.juju.is/name=test"}, - ).Return(nil), + ).Return(nil).Call, ).After( s.mockDynamicClient.EXPECT().Resource( schema.GroupVersionResource{ @@ -449,7 +449,7 @@ func (s *K8sBrokerSuite) TestDeleteClusterScopeResourcesModelTeardownTimeout(c * Version: "v1", Resource: crdClusterScope.Spec.Names.Plural, }, - ).Return(s.mockNamespaceableResourceClient), + ).Return(s.mockNamespaceableResourceClient).Call, ).After( // list cluster wide all custom resource definitions for deleting custom resources. s.mockCustomResourceDefinitionV1.EXPECT().List(gomock.Any(), v1.ListOptions{}).AnyTimes(). @@ -517,7 +517,7 @@ func (s *K8sBrokerSuite) TestDeleteNamespaceModelTeardown(c *gc.C) { Return(nil) // still terminating. s.mockNamespaces.EXPECT().Get(gomock.Any(), "test", v1.GetOptions{}). - DoAndReturn(func(_, _, _ interface{}) (*core.Namespace, error) { + DoAndReturn(func(_ context.Context, _ string, _ v1.GetOptions) (*core.Namespace, error) { namespaceFirer() return ns, nil }) @@ -566,7 +566,7 @@ func (s *K8sBrokerSuite) TestDeleteNamespaceModelTeardownFailed(c *gc.C) { Return(nil) // still terminating. s.mockNamespaces.EXPECT().Get(gomock.Any(), "test", v1.GetOptions{}). - DoAndReturn(func(_, _, _ interface{}) (*core.Namespace, error) { + DoAndReturn(func(_ context.Context, _ string, _ v1.GetOptions) (*core.Namespace, error) { namespaceFirer() return ns, nil }) diff --git a/caas/mocks/application_mock.go b/caas/mocks/application_mock.go index 31e9b052afe..6d8f130e96e 100644 --- a/caas/mocks/application_mock.go +++ b/caas/mocks/application_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/caas Application +// mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/caas Application // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockApplication) ApplicationPodSpec(arg0 caas.ApplicationConfig) (*v1.P } // ApplicationPodSpec indicates an expected call of ApplicationPodSpec. -func (mr *MockApplicationMockRecorder) ApplicationPodSpec(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationPodSpec(arg0 any) *MockApplicationApplicationPodSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationPodSpec", reflect.TypeOf((*MockApplication)(nil).ApplicationPodSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationPodSpec", reflect.TypeOf((*MockApplication)(nil).ApplicationPodSpec), arg0) + return &MockApplicationApplicationPodSpecCall{Call: call} +} + +// MockApplicationApplicationPodSpecCall wrap *gomock.Call +type MockApplicationApplicationPodSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationPodSpecCall) Return(arg0 *v1.PodSpec, arg1 error) *MockApplicationApplicationPodSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationPodSpecCall) Do(f func(caas.ApplicationConfig) (*v1.PodSpec, error)) *MockApplicationApplicationPodSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationPodSpecCall) DoAndReturn(f func(caas.ApplicationConfig) (*v1.PodSpec, error)) *MockApplicationApplicationPodSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -66,9 +90,33 @@ func (m *MockApplication) Delete() error { } // Delete indicates an expected call of Delete. -func (mr *MockApplicationMockRecorder) Delete() *gomock.Call { +func (mr *MockApplicationMockRecorder) Delete() *MockApplicationDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockApplication)(nil).Delete)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockApplication)(nil).Delete)) + return &MockApplicationDeleteCall{Call: call} +} + +// MockApplicationDeleteCall wrap *gomock.Call +type MockApplicationDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDeleteCall) Return(arg0 error) *MockApplicationDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDeleteCall) Do(f func() error) *MockApplicationDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDeleteCall) DoAndReturn(f func() error) *MockApplicationDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ensure mocks base method. @@ -80,9 +128,33 @@ func (m *MockApplication) Ensure(arg0 caas.ApplicationConfig) error { } // Ensure indicates an expected call of Ensure. -func (mr *MockApplicationMockRecorder) Ensure(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Ensure(arg0 any) *MockApplicationEnsureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ensure", reflect.TypeOf((*MockApplication)(nil).Ensure), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ensure", reflect.TypeOf((*MockApplication)(nil).Ensure), arg0) + return &MockApplicationEnsureCall{Call: call} +} + +// MockApplicationEnsureCall wrap *gomock.Call +type MockApplicationEnsureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEnsureCall) Return(arg0 error) *MockApplicationEnsureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEnsureCall) Do(f func(caas.ApplicationConfig) error) *MockApplicationEnsureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEnsureCall) DoAndReturn(f func(caas.ApplicationConfig) error) *MockApplicationEnsureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Exists mocks base method. @@ -95,9 +167,33 @@ func (m *MockApplication) Exists() (caas.DeploymentState, error) { } // Exists indicates an expected call of Exists. -func (mr *MockApplicationMockRecorder) Exists() *gomock.Call { +func (mr *MockApplicationMockRecorder) Exists() *MockApplicationExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockApplication)(nil).Exists)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockApplication)(nil).Exists)) + return &MockApplicationExistsCall{Call: call} +} + +// MockApplicationExistsCall wrap *gomock.Call +type MockApplicationExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExistsCall) Return(arg0 caas.DeploymentState, arg1 error) *MockApplicationExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExistsCall) Do(f func() (caas.DeploymentState, error)) *MockApplicationExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExistsCall) DoAndReturn(f func() (caas.DeploymentState, error)) *MockApplicationExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Scale mocks base method. @@ -109,9 +205,33 @@ func (m *MockApplication) Scale(arg0 int) error { } // Scale indicates an expected call of Scale. -func (mr *MockApplicationMockRecorder) Scale(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Scale(arg0 any) *MockApplicationScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scale", reflect.TypeOf((*MockApplication)(nil).Scale), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scale", reflect.TypeOf((*MockApplication)(nil).Scale), arg0) + return &MockApplicationScaleCall{Call: call} +} + +// MockApplicationScaleCall wrap *gomock.Call +type MockApplicationScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationScaleCall) Return(arg0 error) *MockApplicationScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationScaleCall) Do(f func(int) error) *MockApplicationScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationScaleCall) DoAndReturn(f func(int) error) *MockApplicationScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Service mocks base method. @@ -124,9 +244,33 @@ func (m *MockApplication) Service() (*caas.Service, error) { } // Service indicates an expected call of Service. -func (mr *MockApplicationMockRecorder) Service() *gomock.Call { +func (mr *MockApplicationMockRecorder) Service() *MockApplicationServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Service", reflect.TypeOf((*MockApplication)(nil).Service)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Service", reflect.TypeOf((*MockApplication)(nil).Service)) + return &MockApplicationServiceCall{Call: call} +} + +// MockApplicationServiceCall wrap *gomock.Call +type MockApplicationServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceCall) Return(arg0 *caas.Service, arg1 error) *MockApplicationServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceCall) Do(f func() (*caas.Service, error)) *MockApplicationServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceCall) DoAndReturn(f func() (*caas.Service, error)) *MockApplicationServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // State mocks base method. @@ -139,9 +283,33 @@ func (m *MockApplication) State() (caas.ApplicationState, error) { } // State indicates an expected call of State. -func (mr *MockApplicationMockRecorder) State() *gomock.Call { +func (mr *MockApplicationMockRecorder) State() *MockApplicationStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockApplication)(nil).State)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockApplication)(nil).State)) + return &MockApplicationStateCall{Call: call} +} + +// MockApplicationStateCall wrap *gomock.Call +type MockApplicationStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationStateCall) Return(arg0 caas.ApplicationState, arg1 error) *MockApplicationStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationStateCall) Do(f func() (caas.ApplicationState, error)) *MockApplicationStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationStateCall) DoAndReturn(f func() (caas.ApplicationState, error)) *MockApplicationStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Trust mocks base method. @@ -153,9 +321,33 @@ func (m *MockApplication) Trust(arg0 bool) error { } // Trust indicates an expected call of Trust. -func (mr *MockApplicationMockRecorder) Trust(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Trust(arg0 any) *MockApplicationTrustCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trust", reflect.TypeOf((*MockApplication)(nil).Trust), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trust", reflect.TypeOf((*MockApplication)(nil).Trust), arg0) + return &MockApplicationTrustCall{Call: call} +} + +// MockApplicationTrustCall wrap *gomock.Call +type MockApplicationTrustCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationTrustCall) Return(arg0 error) *MockApplicationTrustCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationTrustCall) Do(f func(bool) error) *MockApplicationTrustCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationTrustCall) DoAndReturn(f func(bool) error) *MockApplicationTrustCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -168,9 +360,33 @@ func (m *MockApplication) Units() ([]caas.Unit, error) { } // Units indicates an expected call of Units. -func (mr *MockApplicationMockRecorder) Units() *gomock.Call { +func (mr *MockApplicationMockRecorder) Units() *MockApplicationUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockApplication)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockApplication)(nil).Units)) + return &MockApplicationUnitsCall{Call: call} +} + +// MockApplicationUnitsCall wrap *gomock.Call +type MockApplicationUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnitsCall) Return(arg0 []caas.Unit, arg1 error) *MockApplicationUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnitsCall) Do(f func() ([]caas.Unit, error)) *MockApplicationUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnitsCall) DoAndReturn(f func() ([]caas.Unit, error)) *MockApplicationUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitsToRemove mocks base method. @@ -183,9 +399,33 @@ func (m *MockApplication) UnitsToRemove(arg0 context.Context, arg1 int) ([]strin } // UnitsToRemove indicates an expected call of UnitsToRemove. -func (mr *MockApplicationMockRecorder) UnitsToRemove(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UnitsToRemove(arg0, arg1 any) *MockApplicationUnitsToRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsToRemove", reflect.TypeOf((*MockApplication)(nil).UnitsToRemove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsToRemove", reflect.TypeOf((*MockApplication)(nil).UnitsToRemove), arg0, arg1) + return &MockApplicationUnitsToRemoveCall{Call: call} +} + +// MockApplicationUnitsToRemoveCall wrap *gomock.Call +type MockApplicationUnitsToRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnitsToRemoveCall) Return(arg0 []string, arg1 error) *MockApplicationUnitsToRemoveCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnitsToRemoveCall) Do(f func(context.Context, int) ([]string, error)) *MockApplicationUnitsToRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnitsToRemoveCall) DoAndReturn(f func(context.Context, int) ([]string, error)) *MockApplicationUnitsToRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePorts mocks base method. @@ -197,9 +437,33 @@ func (m *MockApplication) UpdatePorts(arg0 []caas.ServicePort, arg1 bool) error } // UpdatePorts indicates an expected call of UpdatePorts. -func (mr *MockApplicationMockRecorder) UpdatePorts(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdatePorts(arg0, arg1 any) *MockApplicationUpdatePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePorts", reflect.TypeOf((*MockApplication)(nil).UpdatePorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePorts", reflect.TypeOf((*MockApplication)(nil).UpdatePorts), arg0, arg1) + return &MockApplicationUpdatePortsCall{Call: call} +} + +// MockApplicationUpdatePortsCall wrap *gomock.Call +type MockApplicationUpdatePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdatePortsCall) Return(arg0 error) *MockApplicationUpdatePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdatePortsCall) Do(f func([]caas.ServicePort, bool) error) *MockApplicationUpdatePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdatePortsCall) DoAndReturn(f func([]caas.ServicePort, bool) error) *MockApplicationUpdatePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateService mocks base method. @@ -211,9 +475,33 @@ func (m *MockApplication) UpdateService(arg0 caas.ServiceParam) error { } // UpdateService indicates an expected call of UpdateService. -func (mr *MockApplicationMockRecorder) UpdateService(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) UpdateService(arg0 any) *MockApplicationUpdateServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockApplication)(nil).UpdateService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockApplication)(nil).UpdateService), arg0) + return &MockApplicationUpdateServiceCall{Call: call} +} + +// MockApplicationUpdateServiceCall wrap *gomock.Call +type MockApplicationUpdateServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUpdateServiceCall) Return(arg0 error) *MockApplicationUpdateServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUpdateServiceCall) Do(f func(caas.ServiceParam) error) *MockApplicationUpdateServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUpdateServiceCall) DoAndReturn(f func(caas.ServiceParam) error) *MockApplicationUpdateServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -226,9 +514,33 @@ func (m *MockApplication) Watch(arg0 context.Context) (watcher.Watcher[struct{}] } // Watch indicates an expected call of Watch. -func (mr *MockApplicationMockRecorder) Watch(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Watch(arg0 any) *MockApplicationWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch), arg0) + return &MockApplicationWatchCall{Call: call} +} + +// MockApplicationWatchCall wrap *gomock.Call +type MockApplicationWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationWatchCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockApplicationWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationWatchCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationWatchCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchReplicas mocks base method. @@ -241,7 +553,31 @@ func (m *MockApplication) WatchReplicas() (watcher.Watcher[struct{}], error) { } // WatchReplicas indicates an expected call of WatchReplicas. -func (mr *MockApplicationMockRecorder) WatchReplicas() *gomock.Call { +func (mr *MockApplicationMockRecorder) WatchReplicas() *MockApplicationWatchReplicasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchReplicas", reflect.TypeOf((*MockApplication)(nil).WatchReplicas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchReplicas", reflect.TypeOf((*MockApplication)(nil).WatchReplicas)) + return &MockApplicationWatchReplicasCall{Call: call} +} + +// MockApplicationWatchReplicasCall wrap *gomock.Call +type MockApplicationWatchReplicasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationWatchReplicasCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockApplicationWatchReplicasCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationWatchReplicasCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchReplicasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationWatchReplicasCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchReplicasCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/mocks/broker_mock.go b/caas/mocks/broker_mock.go index 354ee8fae14..9aec3c6db1a 100644 --- a/caas/mocks/broker_mock.go +++ b/caas/mocks/broker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/caas Broker +// mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/caas Broker // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockBroker) APIVersion() (string, error) { } // APIVersion indicates an expected call of APIVersion. -func (mr *MockBrokerMockRecorder) APIVersion() *gomock.Call { +func (mr *MockBrokerMockRecorder) APIVersion() *MockBrokerAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockBroker)(nil).APIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockBroker)(nil).APIVersion)) + return &MockBrokerAPIVersionCall{Call: call} +} + +// MockBrokerAPIVersionCall wrap *gomock.Call +type MockBrokerAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAPIVersionCall) Return(arg0 string, arg1 error) *MockBrokerAPIVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAPIVersionCall) Do(f func() (string, error)) *MockBrokerAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAPIVersionCall) DoAndReturn(f func() (string, error)) *MockBrokerAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AdoptResources mocks base method. @@ -74,9 +98,33 @@ func (m *MockBroker) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 st } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockBrokerMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockBrokerAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockBroker)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockBroker)(nil).AdoptResources), arg0, arg1, arg2) + return &MockBrokerAdoptResourcesCall{Call: call} +} + +// MockBrokerAdoptResourcesCall wrap *gomock.Call +type MockBrokerAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAdoptResourcesCall) Return(arg0 error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AnnotateUnit mocks base method. @@ -88,9 +136,33 @@ func (m *MockBroker) AnnotateUnit(arg0 context.Context, arg1, arg2 string, arg3 } // AnnotateUnit indicates an expected call of AnnotateUnit. -func (mr *MockBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *MockBrokerAnnotateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + return &MockBrokerAnnotateUnitCall{Call: call} +} + +// MockBrokerAnnotateUnitCall wrap *gomock.Call +type MockBrokerAnnotateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAnnotateUnitCall) Return(arg0 error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAnnotateUnitCall) Do(f func(context.Context, string, string, names.UnitTag) error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAnnotateUnitCall) DoAndReturn(f func(context.Context, string, string, names.UnitTag) error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -102,9 +174,33 @@ func (m *MockBroker) Application(arg0 string, arg1 caas.DeploymentType) caas.App } // Application indicates an expected call of Application. -func (mr *MockBrokerMockRecorder) Application(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Application(arg0, arg1 any) *MockBrokerApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBroker)(nil).Application), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBroker)(nil).Application), arg0, arg1) + return &MockBrokerApplicationCall{Call: call} +} + +// MockBrokerApplicationCall wrap *gomock.Call +type MockBrokerApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerApplicationCall) Return(arg0 caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerApplicationCall) Do(f func(string, caas.DeploymentType) caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerApplicationCall) DoAndReturn(f func(string, caas.DeploymentType) caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -117,9 +213,33 @@ func (m *MockBroker) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext.P } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockBrokerMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockBrokerBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBroker)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBroker)(nil).Bootstrap), arg0, arg1, arg2) + return &MockBrokerBootstrapCall{Call: call} +} + +// MockBrokerBootstrapCall wrap *gomock.Call +type MockBrokerBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockBrokerBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBrokerBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBrokerBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCloudCredentials mocks base method. @@ -131,9 +251,33 @@ func (m *MockBroker) CheckCloudCredentials(arg0 context.Context) error { } // CheckCloudCredentials indicates an expected call of CheckCloudCredentials. -func (mr *MockBrokerMockRecorder) CheckCloudCredentials(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) CheckCloudCredentials(arg0 any) *MockBrokerCheckCloudCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCloudCredentials", reflect.TypeOf((*MockBroker)(nil).CheckCloudCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCloudCredentials", reflect.TypeOf((*MockBroker)(nil).CheckCloudCredentials), arg0) + return &MockBrokerCheckCloudCredentialsCall{Call: call} +} + +// MockBrokerCheckCloudCredentialsCall wrap *gomock.Call +type MockBrokerCheckCloudCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerCheckCloudCredentialsCall) Return(arg0 error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerCheckCloudCredentialsCall) Do(f func(context.Context) error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerCheckCloudCredentialsCall) DoAndReturn(f func(context.Context) error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -145,9 +289,33 @@ func (m *MockBroker) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockBrokerMockRecorder) Config() *gomock.Call { +func (mr *MockBrokerMockRecorder) Config() *MockBrokerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBroker)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBroker)(nil).Config)) + return &MockBrokerConfigCall{Call: call} +} + +// MockBrokerConfigCall wrap *gomock.Call +type MockBrokerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerConfigCall) Return(arg0 *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerConfigCall) Do(f func() *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerConfigCall) DoAndReturn(f func() *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -160,9 +328,33 @@ func (m *MockBroker) ConstraintsValidator(arg0 envcontext.ProviderCallContext) ( } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockBrokerMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ConstraintsValidator(arg0 any) *MockBrokerConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBroker)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBroker)(nil).ConstraintsValidator), arg0) + return &MockBrokerConstraintsValidatorCall{Call: call} +} + +// MockBrokerConstraintsValidatorCall wrap *gomock.Call +type MockBrokerConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -174,9 +366,33 @@ func (m *MockBroker) Create(arg0 envcontext.ProviderCallContext, arg1 environs.C } // Create indicates an expected call of Create. -func (mr *MockBrokerMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Create(arg0, arg1 any) *MockBrokerCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBroker)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBroker)(nil).Create), arg0, arg1) + return &MockBrokerCreateCall{Call: call} +} + +// MockBrokerCreateCall wrap *gomock.Call +type MockBrokerCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerCreateCall) Return(arg0 error) *MockBrokerCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBrokerCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBrokerCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteJujuSecret mocks base method. @@ -188,9 +404,33 @@ func (m *MockBroker) DeleteJujuSecret(arg0 context.Context, arg1 string) error { } // DeleteJujuSecret indicates an expected call of DeleteJujuSecret. -func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *MockBrokerDeleteJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + return &MockBrokerDeleteJujuSecretCall{Call: call} +} + +// MockBrokerDeleteJujuSecretCall wrap *gomock.Call +type MockBrokerDeleteJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDeleteJujuSecretCall) Return(arg0 error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDeleteJujuSecretCall) Do(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDeleteJujuSecretCall) DoAndReturn(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -202,9 +442,33 @@ func (m *MockBroker) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockBrokerMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Destroy(arg0 any) *MockBrokerDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBroker)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBroker)(nil).Destroy), arg0) + return &MockBrokerDestroyCall{Call: call} +} + +// MockBrokerDestroyCall wrap *gomock.Call +type MockBrokerDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDestroyCall) Return(arg0 error) *MockBrokerDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockBrokerDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockBrokerDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -216,9 +480,33 @@ func (m *MockBroker) DestroyController(arg0 envcontext.ProviderCallContext, arg1 } // DestroyController indicates an expected call of DestroyController. -func (mr *MockBrokerMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) DestroyController(arg0, arg1 any) *MockBrokerDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBroker)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBroker)(nil).DestroyController), arg0, arg1) + return &MockBrokerDestroyControllerCall{Call: call} +} + +// MockBrokerDestroyControllerCall wrap *gomock.Call +type MockBrokerDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDestroyControllerCall) Return(arg0 error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureImageRepoSecret mocks base method. @@ -230,9 +518,33 @@ func (m *MockBroker) EnsureImageRepoSecret(arg0 context.Context, arg1 docker.Ima } // EnsureImageRepoSecret indicates an expected call of EnsureImageRepoSecret. -func (mr *MockBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *MockBrokerEnsureImageRepoSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + return &MockBrokerEnsureImageRepoSecretCall{Call: call} +} + +// MockBrokerEnsureImageRepoSecretCall wrap *gomock.Call +type MockBrokerEnsureImageRepoSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureImageRepoSecretCall) Return(arg0 error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureImageRepoSecretCall) Do(f func(context.Context, docker.ImageRepoDetails) error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureImageRepoSecretCall) DoAndReturn(f func(context.Context, docker.ImageRepoDetails) error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureModelOperator mocks base method. @@ -244,9 +556,33 @@ func (m *MockBroker) EnsureModelOperator(arg0 context.Context, arg1, arg2 string } // EnsureModelOperator indicates an expected call of EnsureModelOperator. -func (mr *MockBrokerMockRecorder) EnsureModelOperator(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureModelOperator(arg0, arg1, arg2, arg3 any) *MockBrokerEnsureModelOperatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureModelOperator", reflect.TypeOf((*MockBroker)(nil).EnsureModelOperator), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureModelOperator", reflect.TypeOf((*MockBroker)(nil).EnsureModelOperator), arg0, arg1, arg2, arg3) + return &MockBrokerEnsureModelOperatorCall{Call: call} +} + +// MockBrokerEnsureModelOperatorCall wrap *gomock.Call +type MockBrokerEnsureModelOperatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureModelOperatorCall) Return(arg0 error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureModelOperatorCall) Do(f func(context.Context, string, string, *caas.ModelOperatorConfig) error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureModelOperatorCall) DoAndReturn(f func(context.Context, string, string, *caas.ModelOperatorConfig) error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureSecretAccessToken mocks base method. @@ -259,9 +595,33 @@ func (m *MockBroker) EnsureSecretAccessToken(arg0 context.Context, arg1 string, } // EnsureSecretAccessToken indicates an expected call of EnsureSecretAccessToken. -func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *MockBrokerEnsureSecretAccessTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + return &MockBrokerEnsureSecretAccessTokenCall{Call: call} +} + +// MockBrokerEnsureSecretAccessTokenCall wrap *gomock.Call +type MockBrokerEnsureSecretAccessTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureSecretAccessTokenCall) Return(arg0 string, arg1 error) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureSecretAccessTokenCall) Do(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureSecretAccessTokenCall) DoAndReturn(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetJujuSecret mocks base method. @@ -274,9 +634,33 @@ func (m *MockBroker) GetJujuSecret(arg0 context.Context, arg1 string) (secrets.S } // GetJujuSecret indicates an expected call of GetJujuSecret. -func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *MockBrokerGetJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + return &MockBrokerGetJujuSecretCall{Call: call} +} + +// MockBrokerGetJujuSecretCall wrap *gomock.Call +type MockBrokerGetJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetJujuSecretCall) Return(arg0 secrets.SecretValue, arg1 error) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetJujuSecretCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetJujuSecretCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretToken mocks base method. @@ -289,9 +673,33 @@ func (m *MockBroker) GetSecretToken(arg0 context.Context, arg1 string) (string, } // GetSecretToken indicates an expected call of GetSecretToken. -func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *MockBrokerGetSecretTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + return &MockBrokerGetSecretTokenCall{Call: call} +} + +// MockBrokerGetSecretTokenCall wrap *gomock.Call +type MockBrokerGetSecretTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetSecretTokenCall) Return(arg0 string, arg1 error) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetSecretTokenCall) Do(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetSecretTokenCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetService mocks base method. @@ -304,9 +712,33 @@ func (m *MockBroker) GetService(arg0 context.Context, arg1 string, arg2 bool) (* } // GetService indicates an expected call of GetService. -func (mr *MockBrokerMockRecorder) GetService(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetService(arg0, arg1, arg2 any) *MockBrokerGetServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockBroker)(nil).GetService), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockBroker)(nil).GetService), arg0, arg1, arg2) + return &MockBrokerGetServiceCall{Call: call} +} + +// MockBrokerGetServiceCall wrap *gomock.Call +type MockBrokerGetServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetServiceCall) Return(arg0 *caas.Service, arg1 error) *MockBrokerGetServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetServiceCall) Do(f func(context.Context, string, bool) (*caas.Service, error)) *MockBrokerGetServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetServiceCall) DoAndReturn(f func(context.Context, string, bool) (*caas.Service, error)) *MockBrokerGetServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelOperator mocks base method. @@ -319,9 +751,33 @@ func (m *MockBroker) ModelOperator(arg0 context.Context) (*caas.ModelOperatorCon } // ModelOperator indicates an expected call of ModelOperator. -func (mr *MockBrokerMockRecorder) ModelOperator(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ModelOperator(arg0 any) *MockBrokerModelOperatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperator", reflect.TypeOf((*MockBroker)(nil).ModelOperator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperator", reflect.TypeOf((*MockBroker)(nil).ModelOperator), arg0) + return &MockBrokerModelOperatorCall{Call: call} +} + +// MockBrokerModelOperatorCall wrap *gomock.Call +type MockBrokerModelOperatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerModelOperatorCall) Return(arg0 *caas.ModelOperatorConfig, arg1 error) *MockBrokerModelOperatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerModelOperatorCall) Do(f func(context.Context) (*caas.ModelOperatorConfig, error)) *MockBrokerModelOperatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerModelOperatorCall) DoAndReturn(f func(context.Context) (*caas.ModelOperatorConfig, error)) *MockBrokerModelOperatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelOperatorExists mocks base method. @@ -334,9 +790,33 @@ func (m *MockBroker) ModelOperatorExists(arg0 context.Context) (bool, error) { } // ModelOperatorExists indicates an expected call of ModelOperatorExists. -func (mr *MockBrokerMockRecorder) ModelOperatorExists(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ModelOperatorExists(arg0 any) *MockBrokerModelOperatorExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperatorExists", reflect.TypeOf((*MockBroker)(nil).ModelOperatorExists), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperatorExists", reflect.TypeOf((*MockBroker)(nil).ModelOperatorExists), arg0) + return &MockBrokerModelOperatorExistsCall{Call: call} +} + +// MockBrokerModelOperatorExistsCall wrap *gomock.Call +type MockBrokerModelOperatorExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerModelOperatorExistsCall) Return(arg0 bool, arg1 error) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerModelOperatorExistsCall) Do(f func(context.Context) (bool, error)) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerModelOperatorExistsCall) DoAndReturn(f func(context.Context) (bool, error)) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -348,9 +828,33 @@ func (m *MockBroker) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockBrokerMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) PrecheckInstance(arg0, arg1 any) *MockBrokerPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockBroker)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockBroker)(nil).PrecheckInstance), arg0, arg1) + return &MockBrokerPrecheckInstanceCall{Call: call} +} + +// MockBrokerPrecheckInstanceCall wrap *gomock.Call +type MockBrokerPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerPrecheckInstanceCall) Return(arg0 error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -362,9 +866,33 @@ func (m *MockBroker) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 st } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockBrokerMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockBrokerPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBroker)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBroker)(nil).PrepareForBootstrap), arg0, arg1) + return &MockBrokerPrepareForBootstrapCall{Call: call} +} + +// MockBrokerPrepareForBootstrapCall wrap *gomock.Call +type MockBrokerPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerPrepareForBootstrapCall) Return(arg0 error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -376,9 +904,33 @@ func (m *MockBroker) Provider() caas.ContainerEnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockBrokerMockRecorder) Provider() *gomock.Call { +func (mr *MockBrokerMockRecorder) Provider() *MockBrokerProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockBroker)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockBroker)(nil).Provider)) + return &MockBrokerProviderCall{Call: call} +} + +// MockBrokerProviderCall wrap *gomock.Call +type MockBrokerProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerProviderCall) Return(arg0 caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerProviderCall) Do(f func() caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerProviderCall) DoAndReturn(f func() caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProxyToApplication mocks base method. @@ -391,9 +943,33 @@ func (m *MockBroker) ProxyToApplication(arg0 context.Context, arg1, arg2 string) } // ProxyToApplication indicates an expected call of ProxyToApplication. -func (mr *MockBrokerMockRecorder) ProxyToApplication(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ProxyToApplication(arg0, arg1, arg2 any) *MockBrokerProxyToApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyToApplication", reflect.TypeOf((*MockBroker)(nil).ProxyToApplication), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyToApplication", reflect.TypeOf((*MockBroker)(nil).ProxyToApplication), arg0, arg1, arg2) + return &MockBrokerProxyToApplicationCall{Call: call} +} + +// MockBrokerProxyToApplicationCall wrap *gomock.Call +type MockBrokerProxyToApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerProxyToApplicationCall) Return(arg0 proxy.Proxier, arg1 error) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerProxyToApplicationCall) Do(f func(context.Context, string, string) (proxy.Proxier, error)) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerProxyToApplicationCall) DoAndReturn(f func(context.Context, string, string) (proxy.Proxier, error)) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveJujuSecret mocks base method. @@ -406,9 +982,33 @@ func (m *MockBroker) SaveJujuSecret(arg0 context.Context, arg1 string, arg2 secr } // SaveJujuSecret indicates an expected call of SaveJujuSecret. -func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *MockBrokerSaveJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + return &MockBrokerSaveJujuSecretCall{Call: call} +} + +// MockBrokerSaveJujuSecretCall wrap *gomock.Call +type MockBrokerSaveJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerSaveJujuSecretCall) Return(arg0 string, arg1 error) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerSaveJujuSecretCall) Do(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerSaveJujuSecretCall) DoAndReturn(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -420,9 +1020,33 @@ func (m *MockBroker) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockBrokerMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) SetConfig(arg0, arg1 any) *MockBrokerSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBroker)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBroker)(nil).SetConfig), arg0, arg1) + return &MockBrokerSetConfigCall{Call: call} +} + +// MockBrokerSetConfigCall wrap *gomock.Call +type MockBrokerSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerSetConfigCall) Return(arg0 error) *MockBrokerSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockBrokerSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockBrokerSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -435,9 +1059,33 @@ func (m *MockBroker) StorageProvider(arg0 storage.ProviderType) (storage.Provide } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockBrokerMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) StorageProvider(arg0 any) *MockBrokerStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBroker)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBroker)(nil).StorageProvider), arg0) + return &MockBrokerStorageProviderCall{Call: call} +} + +// MockBrokerStorageProviderCall wrap *gomock.Call +type MockBrokerStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockBrokerStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockBrokerStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockBrokerStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -450,9 +1098,33 @@ func (m *MockBroker) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockBrokerMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockBrokerMockRecorder) StorageProviderTypes() *MockBrokerStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBroker)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBroker)(nil).StorageProviderTypes)) + return &MockBrokerStorageProviderTypesCall{Call: call} +} + +// MockBrokerStorageProviderTypesCall wrap *gomock.Call +type MockBrokerStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -465,9 +1137,33 @@ func (m *MockBroker) Units(arg0 context.Context, arg1 string) ([]caas.Unit, erro } // Units indicates an expected call of Units. -func (mr *MockBrokerMockRecorder) Units(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Units(arg0, arg1 any) *MockBrokerUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockBroker)(nil).Units), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockBroker)(nil).Units), arg0, arg1) + return &MockBrokerUnitsCall{Call: call} +} + +// MockBrokerUnitsCall wrap *gomock.Call +type MockBrokerUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerUnitsCall) Return(arg0 []caas.Unit, arg1 error) *MockBrokerUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerUnitsCall) Do(f func(context.Context, string) ([]caas.Unit, error)) *MockBrokerUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerUnitsCall) DoAndReturn(f func(context.Context, string) ([]caas.Unit, error)) *MockBrokerUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -479,9 +1175,33 @@ func (m *MockBroker) Upgrade(arg0 context.Context, arg1 string, arg2 version.Num } // Upgrade indicates an expected call of Upgrade. -func (mr *MockBrokerMockRecorder) Upgrade(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Upgrade(arg0, arg1, arg2 any) *MockBrokerUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockBroker)(nil).Upgrade), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockBroker)(nil).Upgrade), arg0, arg1, arg2) + return &MockBrokerUpgradeCall{Call: call} +} + +// MockBrokerUpgradeCall wrap *gomock.Call +type MockBrokerUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerUpgradeCall) Return(arg0 error) *MockBrokerUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerUpgradeCall) Do(f func(context.Context, string, version.Number) error) *MockBrokerUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerUpgradeCall) DoAndReturn(f func(context.Context, string, version.Number) error) *MockBrokerUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateStorageClass mocks base method. @@ -493,9 +1213,33 @@ func (m *MockBroker) ValidateStorageClass(arg0 context.Context, arg1 map[string] } // ValidateStorageClass indicates an expected call of ValidateStorageClass. -func (mr *MockBrokerMockRecorder) ValidateStorageClass(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ValidateStorageClass(arg0, arg1 any) *MockBrokerValidateStorageClassCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockBroker)(nil).ValidateStorageClass), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockBroker)(nil).ValidateStorageClass), arg0, arg1) + return &MockBrokerValidateStorageClassCall{Call: call} +} + +// MockBrokerValidateStorageClassCall wrap *gomock.Call +type MockBrokerValidateStorageClassCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerValidateStorageClassCall) Return(arg0 error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerValidateStorageClassCall) Do(f func(context.Context, map[string]any) error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerValidateStorageClassCall) DoAndReturn(f func(context.Context, map[string]any) error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -508,7 +1252,31 @@ func (m *MockBroker) Version() (*version.Number, error) { } // Version indicates an expected call of Version. -func (mr *MockBrokerMockRecorder) Version() *gomock.Call { +func (mr *MockBrokerMockRecorder) Version() *MockBrokerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + return &MockBrokerVersionCall{Call: call} +} + +// MockBrokerVersionCall wrap *gomock.Call +type MockBrokerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerVersionCall) Return(arg0 *version.Number, arg1 error) *MockBrokerVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerVersionCall) Do(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/caas/package_test.go b/caas/package_test.go index 63c26d6e288..9b35a5c5a90 100644 --- a/caas/package_test.go +++ b/caas/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/caas Broker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/caas Application +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/caas Broker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/caas Application func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/cmd/containeragent/initialize/command.go b/cmd/containeragent/initialize/command.go index 44c07f98af2..2261f1e8346 100644 --- a/cmd/containeragent/initialize/command.go +++ b/cmd/containeragent/initialize/command.go @@ -33,7 +33,7 @@ import ( "github.com/juju/juju/internal/worker/introspection" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/cmd/containeragent/initialize ApplicationAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/cmd/containeragent/initialize ApplicationAPI type initCommand struct { cmd.CommandBase diff --git a/cmd/containeragent/initialize/mocks/application_mock.go b/cmd/containeragent/initialize/mocks/application_mock.go index 2775e2421eb..783911167e3 100644 --- a/cmd/containeragent/initialize/mocks/application_mock.go +++ b/cmd/containeragent/initialize/mocks/application_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/application_mock.go github.com/juju/juju/cmd/containeragent/initialize ApplicationAPI +// mockgen -typed -package mocks -destination mocks/application_mock.go github.com/juju/juju/cmd/containeragent/initialize ApplicationAPI // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockApplicationAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockApplicationAPIMockRecorder) Close() *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) Close() *MockApplicationAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + return &MockApplicationAPICloseCall{Call: call} +} + +// MockApplicationAPICloseCall wrap *gomock.Call +type MockApplicationAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPICloseCall) Return(arg0 error) *MockApplicationAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPICloseCall) Do(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPICloseCall) DoAndReturn(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitIntroduction mocks base method. @@ -64,7 +88,31 @@ func (m *MockApplicationAPI) UnitIntroduction(arg0 context.Context, arg1, arg2 s } // UnitIntroduction indicates an expected call of UnitIntroduction. -func (mr *MockApplicationAPIMockRecorder) UnitIntroduction(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) UnitIntroduction(arg0, arg1, arg2 any) *MockApplicationAPIUnitIntroductionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitIntroduction", reflect.TypeOf((*MockApplicationAPI)(nil).UnitIntroduction), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitIntroduction", reflect.TypeOf((*MockApplicationAPI)(nil).UnitIntroduction), arg0, arg1, arg2) + return &MockApplicationAPIUnitIntroductionCall{Call: call} +} + +// MockApplicationAPIUnitIntroductionCall wrap *gomock.Call +type MockApplicationAPIUnitIntroductionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPIUnitIntroductionCall) Return(arg0 *caasapplication.UnitConfig, arg1 error) *MockApplicationAPIUnitIntroductionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPIUnitIntroductionCall) Do(f func(context.Context, string, string) (*caasapplication.UnitConfig, error)) *MockApplicationAPIUnitIntroductionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPIUnitIntroductionCall) DoAndReturn(f func(context.Context, string, string) (*caasapplication.UnitConfig, error)) *MockApplicationAPIUnitIntroductionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/containeragent/utils/environment.go b/cmd/containeragent/utils/environment.go index 3a9c70818e7..24858892011 100644 --- a/cmd/containeragent/utils/environment.go +++ b/cmd/containeragent/utils/environment.go @@ -5,7 +5,7 @@ package utils import "os" -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/environment_mock.go github.com/juju/juju/cmd/containeragent/utils Environment +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/environment_mock.go github.com/juju/juju/cmd/containeragent/utils Environment // Environment provides methods for reading a file or writing to a file. type Environment interface { diff --git a/cmd/containeragent/utils/filesystem.go b/cmd/containeragent/utils/filesystem.go index acf7a1b65df..b406e80aeaa 100644 --- a/cmd/containeragent/utils/filesystem.go +++ b/cmd/containeragent/utils/filesystem.go @@ -8,7 +8,7 @@ import ( "os" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/file_mock.go github.com/juju/juju/cmd/containeragent/utils FileReaderWriter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/file_mock.go github.com/juju/juju/cmd/containeragent/utils FileReaderWriter // FileReaderWriter provides methods for reading a file or writing to a file. type FileReaderWriter interface { diff --git a/cmd/containeragent/utils/mocks/environment_mock.go b/cmd/containeragent/utils/mocks/environment_mock.go index 546b1687e4e..f5bb8473507 100644 --- a/cmd/containeragent/utils/mocks/environment_mock.go +++ b/cmd/containeragent/utils/mocks/environment_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/environment_mock.go github.com/juju/juju/cmd/containeragent/utils Environment +// mockgen -typed -package mocks -destination mocks/environment_mock.go github.com/juju/juju/cmd/containeragent/utils Environment // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockEnvironment) ExpandEnv(arg0 string) string { } // ExpandEnv indicates an expected call of ExpandEnv. -func (mr *MockEnvironmentMockRecorder) ExpandEnv(arg0 any) *gomock.Call { +func (mr *MockEnvironmentMockRecorder) ExpandEnv(arg0 any) *MockEnvironmentExpandEnvCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpandEnv", reflect.TypeOf((*MockEnvironment)(nil).ExpandEnv), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpandEnv", reflect.TypeOf((*MockEnvironment)(nil).ExpandEnv), arg0) + return &MockEnvironmentExpandEnvCall{Call: call} +} + +// MockEnvironmentExpandEnvCall wrap *gomock.Call +type MockEnvironmentExpandEnvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironmentExpandEnvCall) Return(arg0 string) *MockEnvironmentExpandEnvCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironmentExpandEnvCall) Do(f func(string) string) *MockEnvironmentExpandEnvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironmentExpandEnvCall) DoAndReturn(f func(string) string) *MockEnvironmentExpandEnvCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Getenv mocks base method. @@ -61,9 +85,33 @@ func (m *MockEnvironment) Getenv(arg0 string) string { } // Getenv indicates an expected call of Getenv. -func (mr *MockEnvironmentMockRecorder) Getenv(arg0 any) *gomock.Call { +func (mr *MockEnvironmentMockRecorder) Getenv(arg0 any) *MockEnvironmentGetenvCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Getenv", reflect.TypeOf((*MockEnvironment)(nil).Getenv), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Getenv", reflect.TypeOf((*MockEnvironment)(nil).Getenv), arg0) + return &MockEnvironmentGetenvCall{Call: call} +} + +// MockEnvironmentGetenvCall wrap *gomock.Call +type MockEnvironmentGetenvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironmentGetenvCall) Return(arg0 string) *MockEnvironmentGetenvCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironmentGetenvCall) Do(f func(string) string) *MockEnvironmentGetenvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironmentGetenvCall) DoAndReturn(f func(string) string) *MockEnvironmentGetenvCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Setenv mocks base method. @@ -75,9 +123,33 @@ func (m *MockEnvironment) Setenv(arg0, arg1 string) error { } // Setenv indicates an expected call of Setenv. -func (mr *MockEnvironmentMockRecorder) Setenv(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironmentMockRecorder) Setenv(arg0, arg1 any) *MockEnvironmentSetenvCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setenv", reflect.TypeOf((*MockEnvironment)(nil).Setenv), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setenv", reflect.TypeOf((*MockEnvironment)(nil).Setenv), arg0, arg1) + return &MockEnvironmentSetenvCall{Call: call} +} + +// MockEnvironmentSetenvCall wrap *gomock.Call +type MockEnvironmentSetenvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironmentSetenvCall) Return(arg0 error) *MockEnvironmentSetenvCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironmentSetenvCall) Do(f func(string, string) error) *MockEnvironmentSetenvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironmentSetenvCall) DoAndReturn(f func(string, string) error) *MockEnvironmentSetenvCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unsetenv mocks base method. @@ -89,7 +161,31 @@ func (m *MockEnvironment) Unsetenv(arg0 string) error { } // Unsetenv indicates an expected call of Unsetenv. -func (mr *MockEnvironmentMockRecorder) Unsetenv(arg0 any) *gomock.Call { +func (mr *MockEnvironmentMockRecorder) Unsetenv(arg0 any) *MockEnvironmentUnsetenvCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsetenv", reflect.TypeOf((*MockEnvironment)(nil).Unsetenv), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsetenv", reflect.TypeOf((*MockEnvironment)(nil).Unsetenv), arg0) + return &MockEnvironmentUnsetenvCall{Call: call} +} + +// MockEnvironmentUnsetenvCall wrap *gomock.Call +type MockEnvironmentUnsetenvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironmentUnsetenvCall) Return(arg0 error) *MockEnvironmentUnsetenvCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironmentUnsetenvCall) Do(f func(string) error) *MockEnvironmentUnsetenvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironmentUnsetenvCall) DoAndReturn(f func(string) error) *MockEnvironmentUnsetenvCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/containeragent/utils/mocks/file_mock.go b/cmd/containeragent/utils/mocks/file_mock.go index 093d07114b2..dadca30896c 100644 --- a/cmd/containeragent/utils/mocks/file_mock.go +++ b/cmd/containeragent/utils/mocks/file_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/file_mock.go github.com/juju/juju/cmd/containeragent/utils FileReaderWriter +// mockgen -typed -package mocks -destination mocks/file_mock.go github.com/juju/juju/cmd/containeragent/utils FileReaderWriter // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockFileReaderWriter) MkdirAll(arg0 string, arg1 fs.FileMode) error { } // MkdirAll indicates an expected call of MkdirAll. -func (mr *MockFileReaderWriterMockRecorder) MkdirAll(arg0, arg1 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) MkdirAll(arg0, arg1 any) *MockFileReaderWriterMkdirAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MkdirAll", reflect.TypeOf((*MockFileReaderWriter)(nil).MkdirAll), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MkdirAll", reflect.TypeOf((*MockFileReaderWriter)(nil).MkdirAll), arg0, arg1) + return &MockFileReaderWriterMkdirAllCall{Call: call} +} + +// MockFileReaderWriterMkdirAllCall wrap *gomock.Call +type MockFileReaderWriterMkdirAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterMkdirAllCall) Return(arg0 error) *MockFileReaderWriterMkdirAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterMkdirAllCall) Do(f func(string, fs.FileMode) error) *MockFileReaderWriterMkdirAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterMkdirAllCall) DoAndReturn(f func(string, fs.FileMode) error) *MockFileReaderWriterMkdirAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadFile mocks base method. @@ -64,9 +88,33 @@ func (m *MockFileReaderWriter) ReadFile(arg0 string) ([]byte, error) { } // ReadFile indicates an expected call of ReadFile. -func (mr *MockFileReaderWriterMockRecorder) ReadFile(arg0 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) ReadFile(arg0 any) *MockFileReaderWriterReadFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFile", reflect.TypeOf((*MockFileReaderWriter)(nil).ReadFile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFile", reflect.TypeOf((*MockFileReaderWriter)(nil).ReadFile), arg0) + return &MockFileReaderWriterReadFileCall{Call: call} +} + +// MockFileReaderWriterReadFileCall wrap *gomock.Call +type MockFileReaderWriterReadFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterReadFileCall) Return(arg0 []byte, arg1 error) *MockFileReaderWriterReadFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterReadFileCall) Do(f func(string) ([]byte, error)) *MockFileReaderWriterReadFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterReadFileCall) DoAndReturn(f func(string) ([]byte, error)) *MockFileReaderWriterReadFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reader mocks base method. @@ -79,9 +127,33 @@ func (m *MockFileReaderWriter) Reader(arg0 string) (io.ReadCloser, error) { } // Reader indicates an expected call of Reader. -func (mr *MockFileReaderWriterMockRecorder) Reader(arg0 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) Reader(arg0 any) *MockFileReaderWriterReaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockFileReaderWriter)(nil).Reader), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockFileReaderWriter)(nil).Reader), arg0) + return &MockFileReaderWriterReaderCall{Call: call} +} + +// MockFileReaderWriterReaderCall wrap *gomock.Call +type MockFileReaderWriterReaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterReaderCall) Return(arg0 io.ReadCloser, arg1 error) *MockFileReaderWriterReaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterReaderCall) Do(f func(string) (io.ReadCloser, error)) *MockFileReaderWriterReaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterReaderCall) DoAndReturn(f func(string) (io.ReadCloser, error)) *MockFileReaderWriterReaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAll mocks base method. @@ -93,9 +165,33 @@ func (m *MockFileReaderWriter) RemoveAll(arg0 string) error { } // RemoveAll indicates an expected call of RemoveAll. -func (mr *MockFileReaderWriterMockRecorder) RemoveAll(arg0 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) RemoveAll(arg0 any) *MockFileReaderWriterRemoveAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFileReaderWriter)(nil).RemoveAll), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFileReaderWriter)(nil).RemoveAll), arg0) + return &MockFileReaderWriterRemoveAllCall{Call: call} +} + +// MockFileReaderWriterRemoveAllCall wrap *gomock.Call +type MockFileReaderWriterRemoveAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterRemoveAllCall) Return(arg0 error) *MockFileReaderWriterRemoveAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterRemoveAllCall) Do(f func(string) error) *MockFileReaderWriterRemoveAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterRemoveAllCall) DoAndReturn(f func(string) error) *MockFileReaderWriterRemoveAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stat mocks base method. @@ -108,9 +204,33 @@ func (m *MockFileReaderWriter) Stat(arg0 string) (fs.FileInfo, error) { } // Stat indicates an expected call of Stat. -func (mr *MockFileReaderWriterMockRecorder) Stat(arg0 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) Stat(arg0 any) *MockFileReaderWriterStatCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFileReaderWriter)(nil).Stat), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFileReaderWriter)(nil).Stat), arg0) + return &MockFileReaderWriterStatCall{Call: call} +} + +// MockFileReaderWriterStatCall wrap *gomock.Call +type MockFileReaderWriterStatCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterStatCall) Return(arg0 fs.FileInfo, arg1 error) *MockFileReaderWriterStatCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterStatCall) Do(f func(string) (fs.FileInfo, error)) *MockFileReaderWriterStatCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterStatCall) DoAndReturn(f func(string) (fs.FileInfo, error)) *MockFileReaderWriterStatCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Symlink mocks base method. @@ -122,9 +242,33 @@ func (m *MockFileReaderWriter) Symlink(arg0, arg1 string) error { } // Symlink indicates an expected call of Symlink. -func (mr *MockFileReaderWriterMockRecorder) Symlink(arg0, arg1 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) Symlink(arg0, arg1 any) *MockFileReaderWriterSymlinkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Symlink", reflect.TypeOf((*MockFileReaderWriter)(nil).Symlink), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Symlink", reflect.TypeOf((*MockFileReaderWriter)(nil).Symlink), arg0, arg1) + return &MockFileReaderWriterSymlinkCall{Call: call} +} + +// MockFileReaderWriterSymlinkCall wrap *gomock.Call +type MockFileReaderWriterSymlinkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterSymlinkCall) Return(arg0 error) *MockFileReaderWriterSymlinkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterSymlinkCall) Do(f func(string, string) error) *MockFileReaderWriterSymlinkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterSymlinkCall) DoAndReturn(f func(string, string) error) *MockFileReaderWriterSymlinkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteFile mocks base method. @@ -136,9 +280,33 @@ func (m *MockFileReaderWriter) WriteFile(arg0 string, arg1 []byte, arg2 fs.FileM } // WriteFile indicates an expected call of WriteFile. -func (mr *MockFileReaderWriterMockRecorder) WriteFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) WriteFile(arg0, arg1, arg2 any) *MockFileReaderWriterWriteFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockFileReaderWriter)(nil).WriteFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockFileReaderWriter)(nil).WriteFile), arg0, arg1, arg2) + return &MockFileReaderWriterWriteFileCall{Call: call} +} + +// MockFileReaderWriterWriteFileCall wrap *gomock.Call +type MockFileReaderWriterWriteFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterWriteFileCall) Return(arg0 error) *MockFileReaderWriterWriteFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterWriteFileCall) Do(f func(string, []byte, fs.FileMode) error) *MockFileReaderWriterWriteFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterWriteFileCall) DoAndReturn(f func(string, []byte, fs.FileMode) error) *MockFileReaderWriterWriteFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Writer mocks base method. @@ -151,7 +319,31 @@ func (m *MockFileReaderWriter) Writer(arg0 string, arg1 fs.FileMode) (io.WriteCl } // Writer indicates an expected call of Writer. -func (mr *MockFileReaderWriterMockRecorder) Writer(arg0, arg1 any) *gomock.Call { +func (mr *MockFileReaderWriterMockRecorder) Writer(arg0, arg1 any) *MockFileReaderWriterWriterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writer", reflect.TypeOf((*MockFileReaderWriter)(nil).Writer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writer", reflect.TypeOf((*MockFileReaderWriter)(nil).Writer), arg0, arg1) + return &MockFileReaderWriterWriterCall{Call: call} +} + +// MockFileReaderWriterWriterCall wrap *gomock.Call +type MockFileReaderWriterWriterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileReaderWriterWriterCall) Return(arg0 io.WriteCloser, arg1 error) *MockFileReaderWriterWriterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileReaderWriterWriterCall) Do(f func(string, fs.FileMode) (io.WriteCloser, error)) *MockFileReaderWriterWriterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileReaderWriterWriterCall) DoAndReturn(f func(string, fs.FileMode) (io.WriteCloser, error)) *MockFileReaderWriterWriterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/bundle/mocks/bundledatasource_mock.go b/cmd/juju/application/bundle/mocks/bundledatasource_mock.go index 5f7de2880c7..bae8ce496f5 100644 --- a/cmd/juju/application/bundle/mocks/bundledatasource_mock.go +++ b/cmd/juju/application/bundle/mocks/bundledatasource_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/bundledatasource_mock.go github.com/juju/juju/cmd/juju/application/bundle BundleDataSource +// mockgen -typed -package mocks -destination mocks/bundledatasource_mock.go github.com/juju/juju/cmd/juju/application/bundle BundleDataSource // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockBundleDataSource) BasePath() string { } // BasePath indicates an expected call of BasePath. -func (mr *MockBundleDataSourceMockRecorder) BasePath() *gomock.Call { +func (mr *MockBundleDataSourceMockRecorder) BasePath() *MockBundleDataSourceBasePathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BasePath", reflect.TypeOf((*MockBundleDataSource)(nil).BasePath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BasePath", reflect.TypeOf((*MockBundleDataSource)(nil).BasePath)) + return &MockBundleDataSourceBasePathCall{Call: call} +} + +// MockBundleDataSourceBasePathCall wrap *gomock.Call +type MockBundleDataSourceBasePathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleDataSourceBasePathCall) Return(arg0 string) *MockBundleDataSourceBasePathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleDataSourceBasePathCall) Do(f func() string) *MockBundleDataSourceBasePathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleDataSourceBasePathCall) DoAndReturn(f func() string) *MockBundleDataSourceBasePathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Parts mocks base method. @@ -62,9 +86,33 @@ func (m *MockBundleDataSource) Parts() []*charm.BundleDataPart { } // Parts indicates an expected call of Parts. -func (mr *MockBundleDataSourceMockRecorder) Parts() *gomock.Call { +func (mr *MockBundleDataSourceMockRecorder) Parts() *MockBundleDataSourcePartsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parts", reflect.TypeOf((*MockBundleDataSource)(nil).Parts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parts", reflect.TypeOf((*MockBundleDataSource)(nil).Parts)) + return &MockBundleDataSourcePartsCall{Call: call} +} + +// MockBundleDataSourcePartsCall wrap *gomock.Call +type MockBundleDataSourcePartsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleDataSourcePartsCall) Return(arg0 []*charm.BundleDataPart) *MockBundleDataSourcePartsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleDataSourcePartsCall) Do(f func() []*charm.BundleDataPart) *MockBundleDataSourcePartsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleDataSourcePartsCall) DoAndReturn(f func() []*charm.BundleDataPart) *MockBundleDataSourcePartsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveInclude mocks base method. @@ -77,7 +125,31 @@ func (m *MockBundleDataSource) ResolveInclude(arg0 string) ([]byte, error) { } // ResolveInclude indicates an expected call of ResolveInclude. -func (mr *MockBundleDataSourceMockRecorder) ResolveInclude(arg0 any) *gomock.Call { +func (mr *MockBundleDataSourceMockRecorder) ResolveInclude(arg0 any) *MockBundleDataSourceResolveIncludeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveInclude", reflect.TypeOf((*MockBundleDataSource)(nil).ResolveInclude), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveInclude", reflect.TypeOf((*MockBundleDataSource)(nil).ResolveInclude), arg0) + return &MockBundleDataSourceResolveIncludeCall{Call: call} +} + +// MockBundleDataSourceResolveIncludeCall wrap *gomock.Call +type MockBundleDataSourceResolveIncludeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleDataSourceResolveIncludeCall) Return(arg0 []byte, arg1 error) *MockBundleDataSourceResolveIncludeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleDataSourceResolveIncludeCall) Do(f func(string) ([]byte, error)) *MockBundleDataSourceResolveIncludeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleDataSourceResolveIncludeCall) DoAndReturn(f func(string) ([]byte, error)) *MockBundleDataSourceResolveIncludeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/bundle/mocks/modelextractor_mock.go b/cmd/juju/application/bundle/mocks/modelextractor_mock.go index 27114ad470f..0ec51969d4b 100644 --- a/cmd/juju/application/bundle/mocks/modelextractor_mock.go +++ b/cmd/juju/application/bundle/mocks/modelextractor_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelextractor_mock.go github.com/juju/juju/cmd/juju/application/bundle ModelExtractor +// mockgen -typed -package mocks -destination mocks/modelextractor_mock.go github.com/juju/juju/cmd/juju/application/bundle ModelExtractor // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockModelExtractor) GetAnnotations(arg0 []string) ([]params.Annotations } // GetAnnotations indicates an expected call of GetAnnotations. -func (mr *MockModelExtractorMockRecorder) GetAnnotations(arg0 any) *gomock.Call { +func (mr *MockModelExtractorMockRecorder) GetAnnotations(arg0 any) *MockModelExtractorGetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockModelExtractor)(nil).GetAnnotations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockModelExtractor)(nil).GetAnnotations), arg0) + return &MockModelExtractorGetAnnotationsCall{Call: call} +} + +// MockModelExtractorGetAnnotationsCall wrap *gomock.Call +type MockModelExtractorGetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExtractorGetAnnotationsCall) Return(arg0 []params.AnnotationsGetResult, arg1 error) *MockModelExtractorGetAnnotationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExtractorGetAnnotationsCall) Do(f func([]string) ([]params.AnnotationsGetResult, error)) *MockModelExtractorGetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExtractorGetAnnotationsCall) DoAndReturn(f func([]string) ([]params.AnnotationsGetResult, error)) *MockModelExtractorGetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConfig mocks base method. @@ -69,10 +93,34 @@ func (m *MockModelExtractor) GetConfig(arg0 string, arg1 ...string) ([]map[strin } // GetConfig indicates an expected call of GetConfig. -func (mr *MockModelExtractorMockRecorder) GetConfig(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockModelExtractorMockRecorder) GetConfig(arg0 any, arg1 ...any) *MockModelExtractorGetConfigCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockModelExtractor)(nil).GetConfig), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockModelExtractor)(nil).GetConfig), varargs...) + return &MockModelExtractorGetConfigCall{Call: call} +} + +// MockModelExtractorGetConfigCall wrap *gomock.Call +type MockModelExtractorGetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExtractorGetConfigCall) Return(arg0 []map[string]any, arg1 error) *MockModelExtractorGetConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExtractorGetConfigCall) Do(f func(string, ...string) ([]map[string]any, error)) *MockModelExtractorGetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExtractorGetConfigCall) DoAndReturn(f func(string, ...string) ([]map[string]any, error)) *MockModelExtractorGetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConstraints mocks base method. @@ -89,9 +137,33 @@ func (m *MockModelExtractor) GetConstraints(arg0 ...string) ([]constraints.Value } // GetConstraints indicates an expected call of GetConstraints. -func (mr *MockModelExtractorMockRecorder) GetConstraints(arg0 ...any) *gomock.Call { +func (mr *MockModelExtractorMockRecorder) GetConstraints(arg0 ...any) *MockModelExtractorGetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockModelExtractor)(nil).GetConstraints), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockModelExtractor)(nil).GetConstraints), arg0...) + return &MockModelExtractorGetConstraintsCall{Call: call} +} + +// MockModelExtractorGetConstraintsCall wrap *gomock.Call +type MockModelExtractorGetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExtractorGetConstraintsCall) Return(arg0 []constraints.Value, arg1 error) *MockModelExtractorGetConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExtractorGetConstraintsCall) Do(f func(...string) ([]constraints.Value, error)) *MockModelExtractorGetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExtractorGetConstraintsCall) DoAndReturn(f func(...string) ([]constraints.Value, error)) *MockModelExtractorGetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sequences mocks base method. @@ -104,7 +176,31 @@ func (m *MockModelExtractor) Sequences() (map[string]int, error) { } // Sequences indicates an expected call of Sequences. -func (mr *MockModelExtractorMockRecorder) Sequences() *gomock.Call { +func (mr *MockModelExtractorMockRecorder) Sequences() *MockModelExtractorSequencesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockModelExtractor)(nil).Sequences)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockModelExtractor)(nil).Sequences)) + return &MockModelExtractorSequencesCall{Call: call} +} + +// MockModelExtractorSequencesCall wrap *gomock.Call +type MockModelExtractorSequencesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExtractorSequencesCall) Return(arg0 map[string]int, arg1 error) *MockModelExtractorSequencesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExtractorSequencesCall) Do(f func() (map[string]int, error)) *MockModelExtractorSequencesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExtractorSequencesCall) DoAndReturn(f func() (map[string]int, error)) *MockModelExtractorSequencesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/bundle/package_test.go b/cmd/juju/application/bundle/package_test.go index 2bb977a29fc..b62471c6880 100644 --- a/cmd/juju/application/bundle/package_test.go +++ b/cmd/juju/application/bundle/package_test.go @@ -13,5 +13,5 @@ func TestPackage(t *stdtesting.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelextractor_mock.go github.com/juju/juju/cmd/juju/application/bundle ModelExtractor -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/bundledatasource_mock.go github.com/juju/juju/cmd/juju/application/bundle BundleDataSource +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelextractor_mock.go github.com/juju/juju/cmd/juju/application/bundle ModelExtractor +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/bundledatasource_mock.go github.com/juju/juju/cmd/juju/application/bundle BundleDataSource diff --git a/cmd/juju/application/deployer/mocks/api_mock.go b/cmd/juju/application/deployer/mocks/api_mock.go index 18ac5584ddb..40d8308be06 100644 --- a/cmd/juju/application/deployer/mocks/api_mock.go +++ b/cmd/juju/application/deployer/mocks/api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/api_mock.go github.com/juju/juju/api AllWatch +// mockgen -typed -package mocks -destination mocks/api_mock.go github.com/juju/juju/api AllWatch // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAllWatch) Next() ([]params.Delta, error) { } // Next indicates an expected call of Next. -func (mr *MockAllWatchMockRecorder) Next() *gomock.Call { +func (mr *MockAllWatchMockRecorder) Next() *MockAllWatchNextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockAllWatch)(nil).Next)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockAllWatch)(nil).Next)) + return &MockAllWatchNextCall{Call: call} +} + +// MockAllWatchNextCall wrap *gomock.Call +type MockAllWatchNextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllWatchNextCall) Return(arg0 []params.Delta, arg1 error) *MockAllWatchNextCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllWatchNextCall) Do(f func() ([]params.Delta, error)) *MockAllWatchNextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllWatchNextCall) DoAndReturn(f func() ([]params.Delta, error)) *MockAllWatchNextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -63,7 +87,31 @@ func (m *MockAllWatch) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockAllWatchMockRecorder) Stop() *gomock.Call { +func (mr *MockAllWatchMockRecorder) Stop() *MockAllWatchStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockAllWatch)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockAllWatch)(nil).Stop)) + return &MockAllWatchStopCall{Call: call} +} + +// MockAllWatchStopCall wrap *gomock.Call +type MockAllWatchStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllWatchStopCall) Return(arg0 error) *MockAllWatchStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllWatchStopCall) Do(f func() error) *MockAllWatchStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllWatchStopCall) DoAndReturn(f func() error) *MockAllWatchStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/charm_mock.go b/cmd/juju/application/deployer/mocks/charm_mock.go index d18eae2cb6d..44028f59f38 100644 --- a/cmd/juju/application/deployer/mocks/charm_mock.go +++ b/cmd/juju/application/deployer/mocks/charm_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charm_mock.go github.com/juju/charm/v13 Charm +// mockgen -typed -package mocks -destination mocks/charm_mock.go github.com/juju/charm/v13 Charm // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCharm) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmMockRecorder) Actions() *MockCharmActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + return &MockCharmActionsCall{Call: call} +} + +// MockCharmActionsCall wrap *gomock.Call +type MockCharmActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmActionsCall) Return(arg0 *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmActionsCall) Do(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -62,9 +86,33 @@ func (m *MockCharm) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmMockRecorder) Config() *gomock.Call { +func (mr *MockCharmMockRecorder) Config() *MockCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + return &MockCharmConfigCall{Call: call} +} + +// MockCharmConfigCall wrap *gomock.Call +type MockCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmConfigCall) Return(arg0 *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmConfigCall) Do(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -76,9 +124,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -90,9 +162,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -104,7 +200,31 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/deploy_mock.go b/cmd/juju/application/deployer/mocks/deploy_mock.go index 390267861f4..905e6286e34 100644 --- a/cmd/juju/application/deployer/mocks/deploy_mock.go +++ b/cmd/juju/application/deployer/mocks/deploy_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/deploy_mock.go github.com/juju/juju/cmd/juju/application/deployer DeployerAPI,CharmReader,DeployConfigFlag +// mockgen -typed -package mocks -destination mocks/deploy_mock.go github.com/juju/juju/cmd/juju/application/deployer DeployerAPI,CharmReader,DeployConfigFlag // // Package mocks is a generated GoMock package. @@ -64,9 +64,33 @@ func (m *MockDeployerAPI) APICall(arg0 context.Context, arg1 string, arg2 int, a } // APICall indicates an expected call of APICall. -func (mr *MockDeployerAPIMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockDeployerAPIAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockDeployerAPI)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockDeployerAPI)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockDeployerAPIAPICallCall{Call: call} +} + +// MockDeployerAPIAPICallCall wrap *gomock.Call +type MockDeployerAPIAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAPICallCall) Return(arg0 error) *MockDeployerAPIAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockDeployerAPIAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockDeployerAPIAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddCharm mocks base method. @@ -79,9 +103,33 @@ func (m *MockDeployerAPI) AddCharm(arg0 *charm.URL, arg1 charm0.Origin, arg2 boo } // AddCharm indicates an expected call of AddCharm. -func (mr *MockDeployerAPIMockRecorder) AddCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) AddCharm(arg0, arg1, arg2 any) *MockDeployerAPIAddCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockDeployerAPI)(nil).AddCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockDeployerAPI)(nil).AddCharm), arg0, arg1, arg2) + return &MockDeployerAPIAddCharmCall{Call: call} +} + +// MockDeployerAPIAddCharmCall wrap *gomock.Call +type MockDeployerAPIAddCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAddCharmCall) Return(arg0 charm0.Origin, arg1 error) *MockDeployerAPIAddCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAddCharmCall) Do(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDeployerAPIAddCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAddCharmCall) DoAndReturn(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDeployerAPIAddCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddLocalCharm mocks base method. @@ -94,9 +142,33 @@ func (m *MockDeployerAPI) AddLocalCharm(arg0 *charm.URL, arg1 charm.Charm, arg2 } // AddLocalCharm indicates an expected call of AddLocalCharm. -func (mr *MockDeployerAPIMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *MockDeployerAPIAddLocalCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockDeployerAPI)(nil).AddLocalCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockDeployerAPI)(nil).AddLocalCharm), arg0, arg1, arg2) + return &MockDeployerAPIAddLocalCharmCall{Call: call} +} + +// MockDeployerAPIAddLocalCharmCall wrap *gomock.Call +type MockDeployerAPIAddLocalCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAddLocalCharmCall) Return(arg0 *charm.URL, arg1 error) *MockDeployerAPIAddLocalCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAddLocalCharmCall) Do(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockDeployerAPIAddLocalCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAddLocalCharmCall) DoAndReturn(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockDeployerAPIAddLocalCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddMachines mocks base method. @@ -109,9 +181,33 @@ func (m *MockDeployerAPI) AddMachines(arg0 []params.AddMachineParams) ([]params. } // AddMachines indicates an expected call of AddMachines. -func (mr *MockDeployerAPIMockRecorder) AddMachines(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) AddMachines(arg0 any) *MockDeployerAPIAddMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachines", reflect.TypeOf((*MockDeployerAPI)(nil).AddMachines), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachines", reflect.TypeOf((*MockDeployerAPI)(nil).AddMachines), arg0) + return &MockDeployerAPIAddMachinesCall{Call: call} +} + +// MockDeployerAPIAddMachinesCall wrap *gomock.Call +type MockDeployerAPIAddMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAddMachinesCall) Return(arg0 []params.AddMachinesResult, arg1 error) *MockDeployerAPIAddMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAddMachinesCall) Do(f func([]params.AddMachineParams) ([]params.AddMachinesResult, error)) *MockDeployerAPIAddMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAddMachinesCall) DoAndReturn(f func([]params.AddMachineParams) ([]params.AddMachinesResult, error)) *MockDeployerAPIAddMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRelation mocks base method. @@ -124,9 +220,33 @@ func (m *MockDeployerAPI) AddRelation(arg0, arg1 []string) (*params.AddRelationR } // AddRelation indicates an expected call of AddRelation. -func (mr *MockDeployerAPIMockRecorder) AddRelation(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) AddRelation(arg0, arg1 any) *MockDeployerAPIAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockDeployerAPI)(nil).AddRelation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockDeployerAPI)(nil).AddRelation), arg0, arg1) + return &MockDeployerAPIAddRelationCall{Call: call} +} + +// MockDeployerAPIAddRelationCall wrap *gomock.Call +type MockDeployerAPIAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAddRelationCall) Return(arg0 *params.AddRelationResults, arg1 error) *MockDeployerAPIAddRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAddRelationCall) Do(f func([]string, []string) (*params.AddRelationResults, error)) *MockDeployerAPIAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAddRelationCall) DoAndReturn(f func([]string, []string) (*params.AddRelationResults, error)) *MockDeployerAPIAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUnits mocks base method. @@ -139,9 +259,33 @@ func (m *MockDeployerAPI) AddUnits(arg0 application.AddUnitsParams) ([]string, e } // AddUnits indicates an expected call of AddUnits. -func (mr *MockDeployerAPIMockRecorder) AddUnits(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) AddUnits(arg0 any) *MockDeployerAPIAddUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockDeployerAPI)(nil).AddUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockDeployerAPI)(nil).AddUnits), arg0) + return &MockDeployerAPIAddUnitsCall{Call: call} +} + +// MockDeployerAPIAddUnitsCall wrap *gomock.Call +type MockDeployerAPIAddUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIAddUnitsCall) Return(arg0 []string, arg1 error) *MockDeployerAPIAddUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIAddUnitsCall) Do(f func(application.AddUnitsParams) ([]string, error)) *MockDeployerAPIAddUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIAddUnitsCall) DoAndReturn(f func(application.AddUnitsParams) ([]string, error)) *MockDeployerAPIAddUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationsInfo mocks base method. @@ -154,9 +298,33 @@ func (m *MockDeployerAPI) ApplicationsInfo(arg0 []names.ApplicationTag) ([]param } // ApplicationsInfo indicates an expected call of ApplicationsInfo. -func (mr *MockDeployerAPIMockRecorder) ApplicationsInfo(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ApplicationsInfo(arg0 any) *MockDeployerAPIApplicationsInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsInfo", reflect.TypeOf((*MockDeployerAPI)(nil).ApplicationsInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsInfo", reflect.TypeOf((*MockDeployerAPI)(nil).ApplicationsInfo), arg0) + return &MockDeployerAPIApplicationsInfoCall{Call: call} +} + +// MockDeployerAPIApplicationsInfoCall wrap *gomock.Call +type MockDeployerAPIApplicationsInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIApplicationsInfoCall) Return(arg0 []params.ApplicationInfoResult, arg1 error) *MockDeployerAPIApplicationsInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIApplicationsInfoCall) Do(f func([]names.ApplicationTag) ([]params.ApplicationInfoResult, error)) *MockDeployerAPIApplicationsInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIApplicationsInfoCall) DoAndReturn(f func([]names.ApplicationTag) ([]params.ApplicationInfoResult, error)) *MockDeployerAPIApplicationsInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -168,9 +336,33 @@ func (m *MockDeployerAPI) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockDeployerAPIMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) BakeryClient() *MockDeployerAPIBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockDeployerAPI)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockDeployerAPI)(nil).BakeryClient)) + return &MockDeployerAPIBakeryClientCall{Call: call} +} + +// MockDeployerAPIBakeryClientCall wrap *gomock.Call +type MockDeployerAPIBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockDeployerAPIBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockDeployerAPIBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockDeployerAPIBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -182,9 +374,33 @@ func (m *MockDeployerAPI) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockDeployerAPIMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) BestFacadeVersion(arg0 any) *MockDeployerAPIBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockDeployerAPI)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockDeployerAPI)(nil).BestFacadeVersion), arg0) + return &MockDeployerAPIBestFacadeVersionCall{Call: call} +} + +// MockDeployerAPIBestFacadeVersionCall wrap *gomock.Call +type MockDeployerAPIBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIBestFacadeVersionCall) Return(arg0 int) *MockDeployerAPIBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIBestFacadeVersionCall) Do(f func(string) int) *MockDeployerAPIBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockDeployerAPIBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmInfo mocks base method. @@ -197,9 +413,33 @@ func (m *MockDeployerAPI) CharmInfo(arg0 string) (*charms.CharmInfo, error) { } // CharmInfo indicates an expected call of CharmInfo. -func (mr *MockDeployerAPIMockRecorder) CharmInfo(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) CharmInfo(arg0 any) *MockDeployerAPICharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockDeployerAPI)(nil).CharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockDeployerAPI)(nil).CharmInfo), arg0) + return &MockDeployerAPICharmInfoCall{Call: call} +} + +// MockDeployerAPICharmInfoCall wrap *gomock.Call +type MockDeployerAPICharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPICharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockDeployerAPICharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPICharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockDeployerAPICharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPICharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockDeployerAPICharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCharmPlacement mocks base method. @@ -211,9 +451,33 @@ func (m *MockDeployerAPI) CheckCharmPlacement(arg0 string, arg1 *charm.URL) erro } // CheckCharmPlacement indicates an expected call of CheckCharmPlacement. -func (mr *MockDeployerAPIMockRecorder) CheckCharmPlacement(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) CheckCharmPlacement(arg0, arg1 any) *MockDeployerAPICheckCharmPlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockDeployerAPI)(nil).CheckCharmPlacement), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockDeployerAPI)(nil).CheckCharmPlacement), arg0, arg1) + return &MockDeployerAPICheckCharmPlacementCall{Call: call} +} + +// MockDeployerAPICheckCharmPlacementCall wrap *gomock.Call +type MockDeployerAPICheckCharmPlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPICheckCharmPlacementCall) Return(arg0 error) *MockDeployerAPICheckCharmPlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPICheckCharmPlacementCall) Do(f func(string, *charm.URL) error) *MockDeployerAPICheckCharmPlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPICheckCharmPlacementCall) DoAndReturn(f func(string, *charm.URL) error) *MockDeployerAPICheckCharmPlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -225,9 +489,33 @@ func (m *MockDeployerAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockDeployerAPIMockRecorder) Close() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Close() *MockDeployerAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDeployerAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDeployerAPI)(nil).Close)) + return &MockDeployerAPICloseCall{Call: call} +} + +// MockDeployerAPICloseCall wrap *gomock.Call +type MockDeployerAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPICloseCall) Return(arg0 error) *MockDeployerAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPICloseCall) Do(f func() error) *MockDeployerAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPICloseCall) DoAndReturn(f func() error) *MockDeployerAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -240,9 +528,33 @@ func (m *MockDeployerAPI) ConnectControllerStream(arg0 context.Context, arg1 str } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockDeployerAPIMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockDeployerAPIConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockDeployerAPI)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockDeployerAPI)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockDeployerAPIConnectControllerStreamCall{Call: call} +} + +// MockDeployerAPIConnectControllerStreamCall wrap *gomock.Call +type MockDeployerAPIConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockDeployerAPIConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockDeployerAPIConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockDeployerAPIConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -255,9 +567,33 @@ func (m *MockDeployerAPI) ConnectStream(arg0 context.Context, arg1 string, arg2 } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockDeployerAPIMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockDeployerAPIConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockDeployerAPI)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockDeployerAPI)(nil).ConnectStream), arg0, arg1, arg2) + return &MockDeployerAPIConnectStreamCall{Call: call} +} + +// MockDeployerAPIConnectStreamCall wrap *gomock.Call +type MockDeployerAPIConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockDeployerAPIConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockDeployerAPIConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockDeployerAPIConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Consume mocks base method. @@ -270,9 +606,33 @@ func (m *MockDeployerAPI) Consume(arg0 crossmodel.ConsumeApplicationArgs) (strin } // Consume indicates an expected call of Consume. -func (mr *MockDeployerAPIMockRecorder) Consume(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Consume(arg0 any) *MockDeployerAPIConsumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Consume", reflect.TypeOf((*MockDeployerAPI)(nil).Consume), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Consume", reflect.TypeOf((*MockDeployerAPI)(nil).Consume), arg0) + return &MockDeployerAPIConsumeCall{Call: call} +} + +// MockDeployerAPIConsumeCall wrap *gomock.Call +type MockDeployerAPIConsumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIConsumeCall) Return(arg0 string, arg1 error) *MockDeployerAPIConsumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIConsumeCall) Do(f func(crossmodel.ConsumeApplicationArgs) (string, error)) *MockDeployerAPIConsumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIConsumeCall) DoAndReturn(f func(crossmodel.ConsumeApplicationArgs) (string, error)) *MockDeployerAPIConsumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Deploy mocks base method. @@ -284,9 +644,33 @@ func (m *MockDeployerAPI) Deploy(arg0 application.DeployArgs) error { } // Deploy indicates an expected call of Deploy. -func (mr *MockDeployerAPIMockRecorder) Deploy(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Deploy(arg0 any) *MockDeployerAPIDeployCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deploy", reflect.TypeOf((*MockDeployerAPI)(nil).Deploy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deploy", reflect.TypeOf((*MockDeployerAPI)(nil).Deploy), arg0) + return &MockDeployerAPIDeployCall{Call: call} +} + +// MockDeployerAPIDeployCall wrap *gomock.Call +type MockDeployerAPIDeployCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIDeployCall) Return(arg0 error) *MockDeployerAPIDeployCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIDeployCall) Do(f func(application.DeployArgs) error) *MockDeployerAPIDeployCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIDeployCall) DoAndReturn(f func(application.DeployArgs) error) *MockDeployerAPIDeployCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeployFromRepository mocks base method. @@ -300,9 +684,33 @@ func (m *MockDeployerAPI) DeployFromRepository(arg0 application.DeployFromReposi } // DeployFromRepository indicates an expected call of DeployFromRepository. -func (mr *MockDeployerAPIMockRecorder) DeployFromRepository(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) DeployFromRepository(arg0 any) *MockDeployerAPIDeployFromRepositoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployFromRepository", reflect.TypeOf((*MockDeployerAPI)(nil).DeployFromRepository), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployFromRepository", reflect.TypeOf((*MockDeployerAPI)(nil).DeployFromRepository), arg0) + return &MockDeployerAPIDeployFromRepositoryCall{Call: call} +} + +// MockDeployerAPIDeployFromRepositoryCall wrap *gomock.Call +type MockDeployerAPIDeployFromRepositoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIDeployFromRepositoryCall) Return(arg0 application.DeployInfo, arg1 []application.PendingResourceUpload, arg2 []error) *MockDeployerAPIDeployFromRepositoryCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIDeployFromRepositoryCall) Do(f func(application.DeployFromRepositoryArg) (application.DeployInfo, []application.PendingResourceUpload, []error)) *MockDeployerAPIDeployFromRepositoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIDeployFromRepositoryCall) DoAndReturn(f func(application.DeployFromRepositoryArg) (application.DeployInfo, []application.PendingResourceUpload, []error)) *MockDeployerAPIDeployFromRepositoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Expose mocks base method. @@ -314,9 +722,33 @@ func (m *MockDeployerAPI) Expose(arg0 string, arg1 map[string]params.ExposedEndp } // Expose indicates an expected call of Expose. -func (mr *MockDeployerAPIMockRecorder) Expose(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Expose(arg0, arg1 any) *MockDeployerAPIExposeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockDeployerAPI)(nil).Expose), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockDeployerAPI)(nil).Expose), arg0, arg1) + return &MockDeployerAPIExposeCall{Call: call} +} + +// MockDeployerAPIExposeCall wrap *gomock.Call +type MockDeployerAPIExposeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIExposeCall) Return(arg0 error) *MockDeployerAPIExposeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIExposeCall) Do(f func(string, map[string]params.ExposedEndpoint) error) *MockDeployerAPIExposeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIExposeCall) DoAndReturn(f func(string, map[string]params.ExposedEndpoint) error) *MockDeployerAPIExposeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAnnotations mocks base method. @@ -329,9 +761,33 @@ func (m *MockDeployerAPI) GetAnnotations(arg0 []string) ([]params.AnnotationsGet } // GetAnnotations indicates an expected call of GetAnnotations. -func (mr *MockDeployerAPIMockRecorder) GetAnnotations(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GetAnnotations(arg0 any) *MockDeployerAPIGetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockDeployerAPI)(nil).GetAnnotations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockDeployerAPI)(nil).GetAnnotations), arg0) + return &MockDeployerAPIGetAnnotationsCall{Call: call} +} + +// MockDeployerAPIGetAnnotationsCall wrap *gomock.Call +type MockDeployerAPIGetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGetAnnotationsCall) Return(arg0 []params.AnnotationsGetResult, arg1 error) *MockDeployerAPIGetAnnotationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGetAnnotationsCall) Do(f func([]string) ([]params.AnnotationsGetResult, error)) *MockDeployerAPIGetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGetAnnotationsCall) DoAndReturn(f func([]string) ([]params.AnnotationsGetResult, error)) *MockDeployerAPIGetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmURLOrigin mocks base method. @@ -345,9 +801,33 @@ func (m *MockDeployerAPI) GetCharmURLOrigin(arg0, arg1 string) (*charm.URL, char } // GetCharmURLOrigin indicates an expected call of GetCharmURLOrigin. -func (mr *MockDeployerAPIMockRecorder) GetCharmURLOrigin(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GetCharmURLOrigin(arg0, arg1 any) *MockDeployerAPIGetCharmURLOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockDeployerAPI)(nil).GetCharmURLOrigin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockDeployerAPI)(nil).GetCharmURLOrigin), arg0, arg1) + return &MockDeployerAPIGetCharmURLOriginCall{Call: call} +} + +// MockDeployerAPIGetCharmURLOriginCall wrap *gomock.Call +type MockDeployerAPIGetCharmURLOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGetCharmURLOriginCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 error) *MockDeployerAPIGetCharmURLOriginCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGetCharmURLOriginCall) Do(f func(string, string) (*charm.URL, charm0.Origin, error)) *MockDeployerAPIGetCharmURLOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGetCharmURLOriginCall) DoAndReturn(f func(string, string) (*charm.URL, charm0.Origin, error)) *MockDeployerAPIGetCharmURLOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConfig mocks base method. @@ -364,10 +844,34 @@ func (m *MockDeployerAPI) GetConfig(arg0 string, arg1 ...string) ([]map[string]a } // GetConfig indicates an expected call of GetConfig. -func (mr *MockDeployerAPIMockRecorder) GetConfig(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GetConfig(arg0 any, arg1 ...any) *MockDeployerAPIGetConfigCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockDeployerAPI)(nil).GetConfig), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockDeployerAPI)(nil).GetConfig), varargs...) + return &MockDeployerAPIGetConfigCall{Call: call} +} + +// MockDeployerAPIGetConfigCall wrap *gomock.Call +type MockDeployerAPIGetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGetConfigCall) Return(arg0 []map[string]any, arg1 error) *MockDeployerAPIGetConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGetConfigCall) Do(f func(string, ...string) ([]map[string]any, error)) *MockDeployerAPIGetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGetConfigCall) DoAndReturn(f func(string, ...string) ([]map[string]any, error)) *MockDeployerAPIGetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConstraints mocks base method. @@ -384,9 +888,33 @@ func (m *MockDeployerAPI) GetConstraints(arg0 ...string) ([]constraints.Value, e } // GetConstraints indicates an expected call of GetConstraints. -func (mr *MockDeployerAPIMockRecorder) GetConstraints(arg0 ...any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GetConstraints(arg0 ...any) *MockDeployerAPIGetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).GetConstraints), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).GetConstraints), arg0...) + return &MockDeployerAPIGetConstraintsCall{Call: call} +} + +// MockDeployerAPIGetConstraintsCall wrap *gomock.Call +type MockDeployerAPIGetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGetConstraintsCall) Return(arg0 []constraints.Value, arg1 error) *MockDeployerAPIGetConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGetConstraintsCall) Do(f func(...string) ([]constraints.Value, error)) *MockDeployerAPIGetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGetConstraintsCall) DoAndReturn(f func(...string) ([]constraints.Value, error)) *MockDeployerAPIGetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetModelConstraints mocks base method. @@ -399,9 +927,33 @@ func (m *MockDeployerAPI) GetModelConstraints() (constraints.Value, error) { } // GetModelConstraints indicates an expected call of GetModelConstraints. -func (mr *MockDeployerAPIMockRecorder) GetModelConstraints() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GetModelConstraints() *MockDeployerAPIGetModelConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).GetModelConstraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).GetModelConstraints)) + return &MockDeployerAPIGetModelConstraintsCall{Call: call} +} + +// MockDeployerAPIGetModelConstraintsCall wrap *gomock.Call +type MockDeployerAPIGetModelConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGetModelConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockDeployerAPIGetModelConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGetModelConstraintsCall) Do(f func() (constraints.Value, error)) *MockDeployerAPIGetModelConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGetModelConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockDeployerAPIGetModelConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantOffer mocks base method. @@ -417,10 +969,34 @@ func (m *MockDeployerAPI) GrantOffer(arg0, arg1 string, arg2 ...string) error { } // GrantOffer indicates an expected call of GrantOffer. -func (mr *MockDeployerAPIMockRecorder) GrantOffer(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) GrantOffer(arg0, arg1 any, arg2 ...any) *MockDeployerAPIGrantOfferCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantOffer", reflect.TypeOf((*MockDeployerAPI)(nil).GrantOffer), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantOffer", reflect.TypeOf((*MockDeployerAPI)(nil).GrantOffer), varargs...) + return &MockDeployerAPIGrantOfferCall{Call: call} +} + +// MockDeployerAPIGrantOfferCall wrap *gomock.Call +type MockDeployerAPIGrantOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIGrantOfferCall) Return(arg0 error) *MockDeployerAPIGrantOfferCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIGrantOfferCall) Do(f func(string, string, ...string) error) *MockDeployerAPIGrantOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIGrantOfferCall) DoAndReturn(f func(string, string, ...string) error) *MockDeployerAPIGrantOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -433,9 +1009,33 @@ func (m *MockDeployerAPI) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockDeployerAPIMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) HTTPClient() *MockDeployerAPIHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockDeployerAPI)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockDeployerAPI)(nil).HTTPClient)) + return &MockDeployerAPIHTTPClientCall{Call: call} +} + +// MockDeployerAPIHTTPClientCall wrap *gomock.Call +type MockDeployerAPIHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockDeployerAPIHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockDeployerAPIHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockDeployerAPIHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmResources mocks base method. @@ -448,9 +1048,33 @@ func (m *MockDeployerAPI) ListCharmResources(arg0 string, arg1 charm0.Origin) ([ } // ListCharmResources indicates an expected call of ListCharmResources. -func (mr *MockDeployerAPIMockRecorder) ListCharmResources(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ListCharmResources(arg0, arg1 any) *MockDeployerAPIListCharmResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmResources", reflect.TypeOf((*MockDeployerAPI)(nil).ListCharmResources), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmResources", reflect.TypeOf((*MockDeployerAPI)(nil).ListCharmResources), arg0, arg1) + return &MockDeployerAPIListCharmResourcesCall{Call: call} +} + +// MockDeployerAPIListCharmResourcesCall wrap *gomock.Call +type MockDeployerAPIListCharmResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIListCharmResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockDeployerAPIListCharmResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIListCharmResourcesCall) Do(f func(string, charm0.Origin) ([]resource.Resource, error)) *MockDeployerAPIListCharmResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIListCharmResourcesCall) DoAndReturn(f func(string, charm0.Origin) ([]resource.Resource, error)) *MockDeployerAPIListCharmResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSpaces mocks base method. @@ -463,9 +1087,33 @@ func (m *MockDeployerAPI) ListSpaces() ([]params.Space, error) { } // ListSpaces indicates an expected call of ListSpaces. -func (mr *MockDeployerAPIMockRecorder) ListSpaces() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ListSpaces() *MockDeployerAPIListSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockDeployerAPI)(nil).ListSpaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockDeployerAPI)(nil).ListSpaces)) + return &MockDeployerAPIListSpacesCall{Call: call} +} + +// MockDeployerAPIListSpacesCall wrap *gomock.Call +type MockDeployerAPIListSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIListSpacesCall) Return(arg0 []params.Space, arg1 error) *MockDeployerAPIListSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIListSpacesCall) Do(f func() ([]params.Space, error)) *MockDeployerAPIListSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIListSpacesCall) DoAndReturn(f func() ([]params.Space, error)) *MockDeployerAPIListSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelGet mocks base method. @@ -478,9 +1126,33 @@ func (m *MockDeployerAPI) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockDeployerAPIMockRecorder) ModelGet() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ModelGet() *MockDeployerAPIModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockDeployerAPI)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockDeployerAPI)(nil).ModelGet)) + return &MockDeployerAPIModelGetCall{Call: call} +} + +// MockDeployerAPIModelGetCall wrap *gomock.Call +type MockDeployerAPIModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIModelGetCall) Return(arg0 map[string]any, arg1 error) *MockDeployerAPIModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIModelGetCall) Do(f func() (map[string]any, error)) *MockDeployerAPIModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockDeployerAPIModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -493,9 +1165,33 @@ func (m *MockDeployerAPI) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockDeployerAPIMockRecorder) ModelTag() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ModelTag() *MockDeployerAPIModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockDeployerAPI)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockDeployerAPI)(nil).ModelTag)) + return &MockDeployerAPIModelTagCall{Call: call} +} + +// MockDeployerAPIModelTagCall wrap *gomock.Call +type MockDeployerAPIModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockDeployerAPIModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIModelTagCall) Do(f func() (names.ModelTag, bool)) *MockDeployerAPIModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockDeployerAPIModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -508,9 +1204,33 @@ func (m *MockDeployerAPI) ModelUUID() (string, bool) { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockDeployerAPIMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ModelUUID() *MockDeployerAPIModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockDeployerAPI)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockDeployerAPI)(nil).ModelUUID)) + return &MockDeployerAPIModelUUIDCall{Call: call} +} + +// MockDeployerAPIModelUUIDCall wrap *gomock.Call +type MockDeployerAPIModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIModelUUIDCall) Return(arg0 string, arg1 bool) *MockDeployerAPIModelUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIModelUUIDCall) Do(f func() (string, bool)) *MockDeployerAPIModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIModelUUIDCall) DoAndReturn(f func() (string, bool)) *MockDeployerAPIModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Offer mocks base method. @@ -523,9 +1243,33 @@ func (m *MockDeployerAPI) Offer(arg0, arg1 string, arg2 []string, arg3, arg4, ar } // Offer indicates an expected call of Offer. -func (mr *MockDeployerAPIMockRecorder) Offer(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Offer(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockDeployerAPIOfferCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offer", reflect.TypeOf((*MockDeployerAPI)(nil).Offer), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offer", reflect.TypeOf((*MockDeployerAPI)(nil).Offer), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockDeployerAPIOfferCall{Call: call} +} + +// MockDeployerAPIOfferCall wrap *gomock.Call +type MockDeployerAPIOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIOfferCall) Return(arg0 []params.ErrorResult, arg1 error) *MockDeployerAPIOfferCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIOfferCall) Do(f func(string, string, []string, string, string, string) ([]params.ErrorResult, error)) *MockDeployerAPIOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIOfferCall) DoAndReturn(f func(string, string, []string, string, string, string) ([]params.ErrorResult, error)) *MockDeployerAPIOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -538,9 +1282,33 @@ func (m *MockDeployerAPI) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockDeployerAPIMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) RootHTTPClient() *MockDeployerAPIRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockDeployerAPI)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockDeployerAPI)(nil).RootHTTPClient)) + return &MockDeployerAPIRootHTTPClientCall{Call: call} +} + +// MockDeployerAPIRootHTTPClientCall wrap *gomock.Call +type MockDeployerAPIRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockDeployerAPIRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockDeployerAPIRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockDeployerAPIRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ScaleApplication mocks base method. @@ -553,9 +1321,33 @@ func (m *MockDeployerAPI) ScaleApplication(arg0 application.ScaleApplicationPara } // ScaleApplication indicates an expected call of ScaleApplication. -func (mr *MockDeployerAPIMockRecorder) ScaleApplication(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) ScaleApplication(arg0 any) *MockDeployerAPIScaleApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockDeployerAPI)(nil).ScaleApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockDeployerAPI)(nil).ScaleApplication), arg0) + return &MockDeployerAPIScaleApplicationCall{Call: call} +} + +// MockDeployerAPIScaleApplicationCall wrap *gomock.Call +type MockDeployerAPIScaleApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIScaleApplicationCall) Return(arg0 params.ScaleApplicationResult, arg1 error) *MockDeployerAPIScaleApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIScaleApplicationCall) Do(f func(application.ScaleApplicationParams) (params.ScaleApplicationResult, error)) *MockDeployerAPIScaleApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIScaleApplicationCall) DoAndReturn(f func(application.ScaleApplicationParams) (params.ScaleApplicationResult, error)) *MockDeployerAPIScaleApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sequences mocks base method. @@ -568,9 +1360,33 @@ func (m *MockDeployerAPI) Sequences() (map[string]int, error) { } // Sequences indicates an expected call of Sequences. -func (mr *MockDeployerAPIMockRecorder) Sequences() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Sequences() *MockDeployerAPISequencesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockDeployerAPI)(nil).Sequences)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockDeployerAPI)(nil).Sequences)) + return &MockDeployerAPISequencesCall{Call: call} +} + +// MockDeployerAPISequencesCall wrap *gomock.Call +type MockDeployerAPISequencesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPISequencesCall) Return(arg0 map[string]int, arg1 error) *MockDeployerAPISequencesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPISequencesCall) Do(f func() (map[string]int, error)) *MockDeployerAPISequencesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPISequencesCall) DoAndReturn(f func() (map[string]int, error)) *MockDeployerAPISequencesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAnnotation mocks base method. @@ -583,9 +1399,33 @@ func (m *MockDeployerAPI) SetAnnotation(arg0 map[string]map[string]string) ([]pa } // SetAnnotation indicates an expected call of SetAnnotation. -func (mr *MockDeployerAPIMockRecorder) SetAnnotation(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) SetAnnotation(arg0 any) *MockDeployerAPISetAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotation", reflect.TypeOf((*MockDeployerAPI)(nil).SetAnnotation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotation", reflect.TypeOf((*MockDeployerAPI)(nil).SetAnnotation), arg0) + return &MockDeployerAPISetAnnotationCall{Call: call} +} + +// MockDeployerAPISetAnnotationCall wrap *gomock.Call +type MockDeployerAPISetAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPISetAnnotationCall) Return(arg0 []params.ErrorResult, arg1 error) *MockDeployerAPISetAnnotationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPISetAnnotationCall) Do(f func(map[string]map[string]string) ([]params.ErrorResult, error)) *MockDeployerAPISetAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPISetAnnotationCall) DoAndReturn(f func(map[string]map[string]string) ([]params.ErrorResult, error)) *MockDeployerAPISetAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharm mocks base method. @@ -597,9 +1437,33 @@ func (m *MockDeployerAPI) SetCharm(arg0 string, arg1 application.SetCharmConfig) } // SetCharm indicates an expected call of SetCharm. -func (mr *MockDeployerAPIMockRecorder) SetCharm(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) SetCharm(arg0, arg1 any) *MockDeployerAPISetCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockDeployerAPI)(nil).SetCharm), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockDeployerAPI)(nil).SetCharm), arg0, arg1) + return &MockDeployerAPISetCharmCall{Call: call} +} + +// MockDeployerAPISetCharmCall wrap *gomock.Call +type MockDeployerAPISetCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPISetCharmCall) Return(arg0 error) *MockDeployerAPISetCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPISetCharmCall) Do(f func(string, application.SetCharmConfig) error) *MockDeployerAPISetCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPISetCharmCall) DoAndReturn(f func(string, application.SetCharmConfig) error) *MockDeployerAPISetCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -611,9 +1475,33 @@ func (m *MockDeployerAPI) SetConfig(arg0, arg1, arg2 string, arg3 map[string]str } // SetConfig indicates an expected call of SetConfig. -func (mr *MockDeployerAPIMockRecorder) SetConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) SetConfig(arg0, arg1, arg2, arg3 any) *MockDeployerAPISetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockDeployerAPI)(nil).SetConfig), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockDeployerAPI)(nil).SetConfig), arg0, arg1, arg2, arg3) + return &MockDeployerAPISetConfigCall{Call: call} +} + +// MockDeployerAPISetConfigCall wrap *gomock.Call +type MockDeployerAPISetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPISetConfigCall) Return(arg0 error) *MockDeployerAPISetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPISetConfigCall) Do(f func(string, string, string, map[string]string) error) *MockDeployerAPISetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPISetConfigCall) DoAndReturn(f func(string, string, string, map[string]string) error) *MockDeployerAPISetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -625,9 +1513,33 @@ func (m *MockDeployerAPI) SetConstraints(arg0 string, arg1 constraints.Value) er } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockDeployerAPIMockRecorder) SetConstraints(arg0, arg1 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) SetConstraints(arg0, arg1 any) *MockDeployerAPISetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).SetConstraints), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockDeployerAPI)(nil).SetConstraints), arg0, arg1) + return &MockDeployerAPISetConstraintsCall{Call: call} +} + +// MockDeployerAPISetConstraintsCall wrap *gomock.Call +type MockDeployerAPISetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPISetConstraintsCall) Return(arg0 error) *MockDeployerAPISetConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPISetConstraintsCall) Do(f func(string, constraints.Value) error) *MockDeployerAPISetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPISetConstraintsCall) DoAndReturn(f func(string, constraints.Value) error) *MockDeployerAPISetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -640,9 +1552,33 @@ func (m *MockDeployerAPI) Status(arg0 *client.StatusArgs) (*params.FullStatus, e } // Status indicates an expected call of Status. -func (mr *MockDeployerAPIMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) Status(arg0 any) *MockDeployerAPIStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockDeployerAPI)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockDeployerAPI)(nil).Status), arg0) + return &MockDeployerAPIStatusCall{Call: call} +} + +// MockDeployerAPIStatusCall wrap *gomock.Call +type MockDeployerAPIStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIStatusCall) Return(arg0 *params.FullStatus, arg1 error) *MockDeployerAPIStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIStatusCall) Do(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockDeployerAPIStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIStatusCall) DoAndReturn(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockDeployerAPIStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchAll mocks base method. @@ -655,9 +1591,33 @@ func (m *MockDeployerAPI) WatchAll() (api.AllWatch, error) { } // WatchAll indicates an expected call of WatchAll. -func (mr *MockDeployerAPIMockRecorder) WatchAll() *gomock.Call { +func (mr *MockDeployerAPIMockRecorder) WatchAll() *MockDeployerAPIWatchAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAll", reflect.TypeOf((*MockDeployerAPI)(nil).WatchAll)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAll", reflect.TypeOf((*MockDeployerAPI)(nil).WatchAll)) + return &MockDeployerAPIWatchAllCall{Call: call} +} + +// MockDeployerAPIWatchAllCall wrap *gomock.Call +type MockDeployerAPIWatchAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerAPIWatchAllCall) Return(arg0 api.AllWatch, arg1 error) *MockDeployerAPIWatchAllCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerAPIWatchAllCall) Do(f func() (api.AllWatch, error)) *MockDeployerAPIWatchAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerAPIWatchAllCall) DoAndReturn(f func() (api.AllWatch, error)) *MockDeployerAPIWatchAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmReader is a mock of CharmReader interface. @@ -694,9 +1654,33 @@ func (m *MockCharmReader) NewCharmAtPath(arg0 string) (charm.Charm, *charm.URL, } // NewCharmAtPath indicates an expected call of NewCharmAtPath. -func (mr *MockCharmReaderMockRecorder) NewCharmAtPath(arg0 any) *gomock.Call { +func (mr *MockCharmReaderMockRecorder) NewCharmAtPath(arg0 any) *MockCharmReaderNewCharmAtPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCharmAtPath", reflect.TypeOf((*MockCharmReader)(nil).NewCharmAtPath), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCharmAtPath", reflect.TypeOf((*MockCharmReader)(nil).NewCharmAtPath), arg0) + return &MockCharmReaderNewCharmAtPathCall{Call: call} +} + +// MockCharmReaderNewCharmAtPathCall wrap *gomock.Call +type MockCharmReaderNewCharmAtPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmReaderNewCharmAtPathCall) Return(arg0 charm.Charm, arg1 *charm.URL, arg2 error) *MockCharmReaderNewCharmAtPathCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmReaderNewCharmAtPathCall) Do(f func(string) (charm.Charm, *charm.URL, error)) *MockCharmReaderNewCharmAtPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmReaderNewCharmAtPathCall) DoAndReturn(f func(string) (charm.Charm, *charm.URL, error)) *MockCharmReaderNewCharmAtPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDeployConfigFlag is a mock of DeployConfigFlag interface. @@ -732,9 +1716,33 @@ func (m *MockDeployConfigFlag) AbsoluteFileNames(arg0 *cmd.Context) ([]string, e } // AbsoluteFileNames indicates an expected call of AbsoluteFileNames. -func (mr *MockDeployConfigFlagMockRecorder) AbsoluteFileNames(arg0 any) *gomock.Call { +func (mr *MockDeployConfigFlagMockRecorder) AbsoluteFileNames(arg0 any) *MockDeployConfigFlagAbsoluteFileNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AbsoluteFileNames", reflect.TypeOf((*MockDeployConfigFlag)(nil).AbsoluteFileNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AbsoluteFileNames", reflect.TypeOf((*MockDeployConfigFlag)(nil).AbsoluteFileNames), arg0) + return &MockDeployConfigFlagAbsoluteFileNamesCall{Call: call} +} + +// MockDeployConfigFlagAbsoluteFileNamesCall wrap *gomock.Call +type MockDeployConfigFlagAbsoluteFileNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployConfigFlagAbsoluteFileNamesCall) Return(arg0 []string, arg1 error) *MockDeployConfigFlagAbsoluteFileNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployConfigFlagAbsoluteFileNamesCall) Do(f func(*cmd.Context) ([]string, error)) *MockDeployConfigFlagAbsoluteFileNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployConfigFlagAbsoluteFileNamesCall) DoAndReturn(f func(*cmd.Context) ([]string, error)) *MockDeployConfigFlagAbsoluteFileNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadConfigPairs mocks base method. @@ -747,7 +1755,31 @@ func (m *MockDeployConfigFlag) ReadConfigPairs(arg0 *cmd.Context) (map[string]an } // ReadConfigPairs indicates an expected call of ReadConfigPairs. -func (mr *MockDeployConfigFlagMockRecorder) ReadConfigPairs(arg0 any) *gomock.Call { +func (mr *MockDeployConfigFlagMockRecorder) ReadConfigPairs(arg0 any) *MockDeployConfigFlagReadConfigPairsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadConfigPairs", reflect.TypeOf((*MockDeployConfigFlag)(nil).ReadConfigPairs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadConfigPairs", reflect.TypeOf((*MockDeployConfigFlag)(nil).ReadConfigPairs), arg0) + return &MockDeployConfigFlagReadConfigPairsCall{Call: call} +} + +// MockDeployConfigFlagReadConfigPairsCall wrap *gomock.Call +type MockDeployConfigFlagReadConfigPairsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployConfigFlagReadConfigPairsCall) Return(arg0 map[string]any, arg1 error) *MockDeployConfigFlagReadConfigPairsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployConfigFlagReadConfigPairsCall) Do(f func(*cmd.Context) (map[string]any, error)) *MockDeployConfigFlagReadConfigPairsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployConfigFlagReadConfigPairsCall) DoAndReturn(f func(*cmd.Context) (map[string]any, error)) *MockDeployConfigFlagReadConfigPairsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/deployer_mock.go b/cmd/juju/application/deployer/mocks/deployer_mock.go index ac5ace60e84..2ae13271bcf 100644 --- a/cmd/juju/application/deployer/mocks/deployer_mock.go +++ b/cmd/juju/application/deployer/mocks/deployer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer ModelCommand,ConsumeDetails,ModelConfigGetter +// mockgen -typed -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer ModelCommand,ConsumeDetails,ModelConfigGetter // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockModelCommand) BakeryClient() (*httpbakery.Client, error) { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockModelCommandMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockModelCommandMockRecorder) BakeryClient() *MockModelCommandBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockModelCommand)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockModelCommand)(nil).BakeryClient)) + return &MockModelCommandBakeryClientCall{Call: call} +} + +// MockModelCommandBakeryClientCall wrap *gomock.Call +type MockModelCommandBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandBakeryClientCall) Return(arg0 *httpbakery.Client, arg1 error) *MockModelCommandBakeryClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandBakeryClientCall) Do(f func() (*httpbakery.Client, error)) *MockModelCommandBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandBakeryClientCall) DoAndReturn(f func() (*httpbakery.Client, error)) *MockModelCommandBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerName mocks base method. @@ -68,9 +92,33 @@ func (m *MockModelCommand) ControllerName() (string, error) { } // ControllerName indicates an expected call of ControllerName. -func (mr *MockModelCommandMockRecorder) ControllerName() *gomock.Call { +func (mr *MockModelCommandMockRecorder) ControllerName() *MockModelCommandControllerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerName", reflect.TypeOf((*MockModelCommand)(nil).ControllerName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerName", reflect.TypeOf((*MockModelCommand)(nil).ControllerName)) + return &MockModelCommandControllerNameCall{Call: call} +} + +// MockModelCommandControllerNameCall wrap *gomock.Call +type MockModelCommandControllerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandControllerNameCall) Return(arg0 string, arg1 error) *MockModelCommandControllerNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandControllerNameCall) Do(f func() (string, error)) *MockModelCommandControllerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandControllerNameCall) DoAndReturn(f func() (string, error)) *MockModelCommandControllerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentAccountDetails mocks base method. @@ -83,9 +131,33 @@ func (m *MockModelCommand) CurrentAccountDetails() (*jujuclient.AccountDetails, } // CurrentAccountDetails indicates an expected call of CurrentAccountDetails. -func (mr *MockModelCommandMockRecorder) CurrentAccountDetails() *gomock.Call { +func (mr *MockModelCommandMockRecorder) CurrentAccountDetails() *MockModelCommandCurrentAccountDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentAccountDetails", reflect.TypeOf((*MockModelCommand)(nil).CurrentAccountDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentAccountDetails", reflect.TypeOf((*MockModelCommand)(nil).CurrentAccountDetails)) + return &MockModelCommandCurrentAccountDetailsCall{Call: call} +} + +// MockModelCommandCurrentAccountDetailsCall wrap *gomock.Call +type MockModelCommandCurrentAccountDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandCurrentAccountDetailsCall) Return(arg0 *jujuclient.AccountDetails, arg1 error) *MockModelCommandCurrentAccountDetailsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandCurrentAccountDetailsCall) Do(f func() (*jujuclient.AccountDetails, error)) *MockModelCommandCurrentAccountDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandCurrentAccountDetailsCall) DoAndReturn(f func() (*jujuclient.AccountDetails, error)) *MockModelCommandCurrentAccountDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Filesystem mocks base method. @@ -97,9 +169,33 @@ func (m *MockModelCommand) Filesystem() modelcmd.Filesystem { } // Filesystem indicates an expected call of Filesystem. -func (mr *MockModelCommandMockRecorder) Filesystem() *gomock.Call { +func (mr *MockModelCommandMockRecorder) Filesystem() *MockModelCommandFilesystemCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filesystem", reflect.TypeOf((*MockModelCommand)(nil).Filesystem)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filesystem", reflect.TypeOf((*MockModelCommand)(nil).Filesystem)) + return &MockModelCommandFilesystemCall{Call: call} +} + +// MockModelCommandFilesystemCall wrap *gomock.Call +type MockModelCommandFilesystemCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandFilesystemCall) Return(arg0 modelcmd.Filesystem) *MockModelCommandFilesystemCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandFilesystemCall) Do(f func() modelcmd.Filesystem) *MockModelCommandFilesystemCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandFilesystemCall) DoAndReturn(f func() modelcmd.Filesystem) *MockModelCommandFilesystemCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDetails mocks base method. @@ -113,9 +209,33 @@ func (m *MockModelCommand) ModelDetails() (string, *jujuclient.ModelDetails, err } // ModelDetails indicates an expected call of ModelDetails. -func (mr *MockModelCommandMockRecorder) ModelDetails() *gomock.Call { +func (mr *MockModelCommandMockRecorder) ModelDetails() *MockModelCommandModelDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDetails", reflect.TypeOf((*MockModelCommand)(nil).ModelDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDetails", reflect.TypeOf((*MockModelCommand)(nil).ModelDetails)) + return &MockModelCommandModelDetailsCall{Call: call} +} + +// MockModelCommandModelDetailsCall wrap *gomock.Call +type MockModelCommandModelDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandModelDetailsCall) Return(arg0 string, arg1 *jujuclient.ModelDetails, arg2 error) *MockModelCommandModelDetailsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandModelDetailsCall) Do(f func() (string, *jujuclient.ModelDetails, error)) *MockModelCommandModelDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandModelDetailsCall) DoAndReturn(f func() (string, *jujuclient.ModelDetails, error)) *MockModelCommandModelDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelType mocks base method. @@ -128,9 +248,33 @@ func (m *MockModelCommand) ModelType() (model.ModelType, error) { } // ModelType indicates an expected call of ModelType. -func (mr *MockModelCommandMockRecorder) ModelType() *gomock.Call { +func (mr *MockModelCommandMockRecorder) ModelType() *MockModelCommandModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockModelCommand)(nil).ModelType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockModelCommand)(nil).ModelType)) + return &MockModelCommandModelTypeCall{Call: call} +} + +// MockModelCommandModelTypeCall wrap *gomock.Call +type MockModelCommandModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandModelTypeCall) Return(arg0 model.ModelType, arg1 error) *MockModelCommandModelTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandModelTypeCall) Do(f func() (model.ModelType, error)) *MockModelCommandModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandModelTypeCall) DoAndReturn(f func() (model.ModelType, error)) *MockModelCommandModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConsumeDetails is a mock of ConsumeDetails interface. @@ -165,9 +309,33 @@ func (m *MockConsumeDetails) Close() error { } // Close indicates an expected call of Close. -func (mr *MockConsumeDetailsMockRecorder) Close() *gomock.Call { +func (mr *MockConsumeDetailsMockRecorder) Close() *MockConsumeDetailsCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConsumeDetails)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConsumeDetails)(nil).Close)) + return &MockConsumeDetailsCloseCall{Call: call} +} + +// MockConsumeDetailsCloseCall wrap *gomock.Call +type MockConsumeDetailsCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConsumeDetailsCloseCall) Return(arg0 error) *MockConsumeDetailsCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConsumeDetailsCloseCall) Do(f func() error) *MockConsumeDetailsCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConsumeDetailsCloseCall) DoAndReturn(f func() error) *MockConsumeDetailsCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumeDetails mocks base method. @@ -180,9 +348,33 @@ func (m *MockConsumeDetails) GetConsumeDetails(arg0 string) (params.ConsumeOffer } // GetConsumeDetails indicates an expected call of GetConsumeDetails. -func (mr *MockConsumeDetailsMockRecorder) GetConsumeDetails(arg0 any) *gomock.Call { +func (mr *MockConsumeDetailsMockRecorder) GetConsumeDetails(arg0 any) *MockConsumeDetailsGetConsumeDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumeDetails", reflect.TypeOf((*MockConsumeDetails)(nil).GetConsumeDetails), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumeDetails", reflect.TypeOf((*MockConsumeDetails)(nil).GetConsumeDetails), arg0) + return &MockConsumeDetailsGetConsumeDetailsCall{Call: call} +} + +// MockConsumeDetailsGetConsumeDetailsCall wrap *gomock.Call +type MockConsumeDetailsGetConsumeDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConsumeDetailsGetConsumeDetailsCall) Return(arg0 params.ConsumeOfferDetails, arg1 error) *MockConsumeDetailsGetConsumeDetailsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConsumeDetailsGetConsumeDetailsCall) Do(f func(string) (params.ConsumeOfferDetails, error)) *MockConsumeDetailsGetConsumeDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConsumeDetailsGetConsumeDetailsCall) DoAndReturn(f func(string) (params.ConsumeOfferDetails, error)) *MockConsumeDetailsGetConsumeDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelConfigGetter is a mock of ModelConfigGetter interface. @@ -218,7 +410,31 @@ func (m *MockModelConfigGetter) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockModelConfigGetterMockRecorder) ModelGet() *gomock.Call { +func (mr *MockModelConfigGetterMockRecorder) ModelGet() *MockModelConfigGetterModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigGetter)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigGetter)(nil).ModelGet)) + return &MockModelConfigGetterModelGetCall{Call: call} +} + +// MockModelConfigGetterModelGetCall wrap *gomock.Call +type MockModelConfigGetterModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigGetterModelGetCall) Return(arg0 map[string]any, arg1 error) *MockModelConfigGetterModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigGetterModelGetCall) Do(f func() (map[string]any, error)) *MockModelConfigGetterModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigGetterModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockModelConfigGetterModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/modelcmd_mock.go b/cmd/juju/application/deployer/mocks/modelcmd_mock.go index b7ffa2e60fc..32061f5e70f 100644 --- a/cmd/juju/application/deployer/mocks/modelcmd_mock.go +++ b/cmd/juju/application/deployer/mocks/modelcmd_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelcmd_mock.go github.com/juju/juju/cmd/modelcmd Filesystem +// mockgen -typed -package mocks -destination mocks/modelcmd_mock.go github.com/juju/juju/cmd/modelcmd Filesystem // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockFilesystem) Create(arg0 string) (*os.File, error) { } // Create indicates an expected call of Create. -func (mr *MockFilesystemMockRecorder) Create(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Create(arg0 any) *MockFilesystemCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystem)(nil).Create), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystem)(nil).Create), arg0) + return &MockFilesystemCreateCall{Call: call} +} + +// MockFilesystemCreateCall wrap *gomock.Call +type MockFilesystemCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemCreateCall) Return(arg0 *os.File, arg1 error) *MockFilesystemCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemCreateCall) Do(f func(string) (*os.File, error)) *MockFilesystemCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemCreateCall) DoAndReturn(f func(string) (*os.File, error)) *MockFilesystemCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -66,9 +90,33 @@ func (m *MockFilesystem) Open(arg0 string) (modelcmd.ReadSeekCloser, error) { } // Open indicates an expected call of Open. -func (mr *MockFilesystemMockRecorder) Open(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Open(arg0 any) *MockFilesystemOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockFilesystem)(nil).Open), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockFilesystem)(nil).Open), arg0) + return &MockFilesystemOpenCall{Call: call} +} + +// MockFilesystemOpenCall wrap *gomock.Call +type MockFilesystemOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemOpenCall) Return(arg0 modelcmd.ReadSeekCloser, arg1 error) *MockFilesystemOpenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemOpenCall) Do(f func(string) (modelcmd.ReadSeekCloser, error)) *MockFilesystemOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemOpenCall) DoAndReturn(f func(string) (modelcmd.ReadSeekCloser, error)) *MockFilesystemOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenFile mocks base method. @@ -81,9 +129,33 @@ func (m *MockFilesystem) OpenFile(arg0 string, arg1 int, arg2 fs.FileMode) (*os. } // OpenFile indicates an expected call of OpenFile. -func (mr *MockFilesystemMockRecorder) OpenFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) OpenFile(arg0, arg1, arg2 any) *MockFilesystemOpenFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenFile", reflect.TypeOf((*MockFilesystem)(nil).OpenFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenFile", reflect.TypeOf((*MockFilesystem)(nil).OpenFile), arg0, arg1, arg2) + return &MockFilesystemOpenFileCall{Call: call} +} + +// MockFilesystemOpenFileCall wrap *gomock.Call +type MockFilesystemOpenFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemOpenFileCall) Return(arg0 *os.File, arg1 error) *MockFilesystemOpenFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemOpenFileCall) Do(f func(string, int, fs.FileMode) (*os.File, error)) *MockFilesystemOpenFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemOpenFileCall) DoAndReturn(f func(string, int, fs.FileMode) (*os.File, error)) *MockFilesystemOpenFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAll mocks base method. @@ -95,9 +167,33 @@ func (m *MockFilesystem) RemoveAll(arg0 string) error { } // RemoveAll indicates an expected call of RemoveAll. -func (mr *MockFilesystemMockRecorder) RemoveAll(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) RemoveAll(arg0 any) *MockFilesystemRemoveAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFilesystem)(nil).RemoveAll), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFilesystem)(nil).RemoveAll), arg0) + return &MockFilesystemRemoveAllCall{Call: call} +} + +// MockFilesystemRemoveAllCall wrap *gomock.Call +type MockFilesystemRemoveAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemRemoveAllCall) Return(arg0 error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemRemoveAllCall) Do(f func(string) error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemRemoveAllCall) DoAndReturn(f func(string) error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stat mocks base method. @@ -110,7 +206,31 @@ func (m *MockFilesystem) Stat(arg0 string) (fs.FileInfo, error) { } // Stat indicates an expected call of Stat. -func (mr *MockFilesystemMockRecorder) Stat(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Stat(arg0 any) *MockFilesystemStatCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFilesystem)(nil).Stat), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFilesystem)(nil).Stat), arg0) + return &MockFilesystemStatCall{Call: call} +} + +// MockFilesystemStatCall wrap *gomock.Call +type MockFilesystemStatCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemStatCall) Return(arg0 fs.FileInfo, arg1 error) *MockFilesystemStatCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemStatCall) Do(f func(string) (fs.FileInfo, error)) *MockFilesystemStatCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemStatCall) DoAndReturn(f func(string) (fs.FileInfo, error)) *MockFilesystemStatCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/resolver_mock.go b/cmd/juju/application/deployer/mocks/resolver_mock.go index 13db0fb1b0d..03fa8d05a37 100644 --- a/cmd/juju/application/deployer/mocks/resolver_mock.go +++ b/cmd/juju/application/deployer/mocks/resolver_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resolver_mock.go github.com/juju/juju/cmd/juju/application/deployer Resolver,Bundle +// mockgen -typed -package mocks -destination mocks/resolver_mock.go github.com/juju/juju/cmd/juju/application/deployer Resolver,Bundle // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockResolver) GetBundle(arg0 context.Context, arg1 *charm.URL, arg2 cha } // GetBundle indicates an expected call of GetBundle. -func (mr *MockResolverMockRecorder) GetBundle(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockResolverMockRecorder) GetBundle(arg0, arg1, arg2, arg3 any) *MockResolverGetBundleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBundle", reflect.TypeOf((*MockResolver)(nil).GetBundle), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBundle", reflect.TypeOf((*MockResolver)(nil).GetBundle), arg0, arg1, arg2, arg3) + return &MockResolverGetBundleCall{Call: call} +} + +// MockResolverGetBundleCall wrap *gomock.Call +type MockResolverGetBundleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResolverGetBundleCall) Return(arg0 charm.Bundle, arg1 error) *MockResolverGetBundleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResolverGetBundleCall) Do(f func(context.Context, *charm.URL, charm0.Origin, string) (charm.Bundle, error)) *MockResolverGetBundleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResolverGetBundleCall) DoAndReturn(f func(context.Context, *charm.URL, charm0.Origin, string) (charm.Bundle, error)) *MockResolverGetBundleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveBundleURL mocks base method. @@ -68,9 +92,33 @@ func (m *MockResolver) ResolveBundleURL(arg0 *charm.URL, arg1 charm0.Origin) (*c } // ResolveBundleURL indicates an expected call of ResolveBundleURL. -func (mr *MockResolverMockRecorder) ResolveBundleURL(arg0, arg1 any) *gomock.Call { +func (mr *MockResolverMockRecorder) ResolveBundleURL(arg0, arg1 any) *MockResolverResolveBundleURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveBundleURL", reflect.TypeOf((*MockResolver)(nil).ResolveBundleURL), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveBundleURL", reflect.TypeOf((*MockResolver)(nil).ResolveBundleURL), arg0, arg1) + return &MockResolverResolveBundleURLCall{Call: call} +} + +// MockResolverResolveBundleURLCall wrap *gomock.Call +type MockResolverResolveBundleURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResolverResolveBundleURLCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 error) *MockResolverResolveBundleURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResolverResolveBundleURLCall) Do(f func(*charm.URL, charm0.Origin) (*charm.URL, charm0.Origin, error)) *MockResolverResolveBundleURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResolverResolveBundleURLCall) DoAndReturn(f func(*charm.URL, charm0.Origin) (*charm.URL, charm0.Origin, error)) *MockResolverResolveBundleURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveCharm mocks base method. @@ -85,9 +133,33 @@ func (m *MockResolver) ResolveCharm(arg0 *charm.URL, arg1 charm0.Origin, arg2 bo } // ResolveCharm indicates an expected call of ResolveCharm. -func (mr *MockResolverMockRecorder) ResolveCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResolverMockRecorder) ResolveCharm(arg0, arg1, arg2 any) *MockResolverResolveCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharm", reflect.TypeOf((*MockResolver)(nil).ResolveCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharm", reflect.TypeOf((*MockResolver)(nil).ResolveCharm), arg0, arg1, arg2) + return &MockResolverResolveCharmCall{Call: call} +} + +// MockResolverResolveCharmCall wrap *gomock.Call +type MockResolverResolveCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResolverResolveCharmCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []base.Base, arg3 error) *MockResolverResolveCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResolverResolveCharmCall) Do(f func(*charm.URL, charm0.Origin, bool) (*charm.URL, charm0.Origin, []base.Base, error)) *MockResolverResolveCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResolverResolveCharmCall) DoAndReturn(f func(*charm.URL, charm0.Origin, bool) (*charm.URL, charm0.Origin, []base.Base, error)) *MockResolverResolveCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBundle is a mock of Bundle interface. @@ -122,9 +194,33 @@ func (m *MockBundle) ContainsOverlays() bool { } // ContainsOverlays indicates an expected call of ContainsOverlays. -func (mr *MockBundleMockRecorder) ContainsOverlays() *gomock.Call { +func (mr *MockBundleMockRecorder) ContainsOverlays() *MockBundleContainsOverlaysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsOverlays", reflect.TypeOf((*MockBundle)(nil).ContainsOverlays)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsOverlays", reflect.TypeOf((*MockBundle)(nil).ContainsOverlays)) + return &MockBundleContainsOverlaysCall{Call: call} +} + +// MockBundleContainsOverlaysCall wrap *gomock.Call +type MockBundleContainsOverlaysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleContainsOverlaysCall) Return(arg0 bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleContainsOverlaysCall) Do(f func() bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleContainsOverlaysCall) DoAndReturn(f func() bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Data mocks base method. @@ -136,9 +232,33 @@ func (m *MockBundle) Data() *charm.BundleData { } // Data indicates an expected call of Data. -func (mr *MockBundleMockRecorder) Data() *gomock.Call { +func (mr *MockBundleMockRecorder) Data() *MockBundleDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockBundle)(nil).Data)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockBundle)(nil).Data)) + return &MockBundleDataCall{Call: call} +} + +// MockBundleDataCall wrap *gomock.Call +type MockBundleDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleDataCall) Return(arg0 *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleDataCall) Do(f func() *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleDataCall) DoAndReturn(f func() *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadMe mocks base method. @@ -150,7 +270,31 @@ func (m *MockBundle) ReadMe() string { } // ReadMe indicates an expected call of ReadMe. -func (mr *MockBundleMockRecorder) ReadMe() *gomock.Call { +func (mr *MockBundleMockRecorder) ReadMe() *MockBundleReadMeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMe", reflect.TypeOf((*MockBundle)(nil).ReadMe)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMe", reflect.TypeOf((*MockBundle)(nil).ReadMe)) + return &MockBundleReadMeCall{Call: call} +} + +// MockBundleReadMeCall wrap *gomock.Call +type MockBundleReadMeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleReadMeCall) Return(arg0 string) *MockBundleReadMeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleReadMeCall) Do(f func() string) *MockBundleReadMeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleReadMeCall) DoAndReturn(f func() string) *MockBundleReadMeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/mocks/write_mock.go b/cmd/juju/application/deployer/mocks/write_mock.go index f246ca71db3..f4c99cba7c4 100644 --- a/cmd/juju/application/deployer/mocks/write_mock.go +++ b/cmd/juju/application/deployer/mocks/write_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/write_mock.go io Writer +// mockgen -typed -package mocks -destination mocks/write_mock.go io Writer // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockWriter) Write(arg0 []byte) (int, error) { } // Write indicates an expected call of Write. -func (mr *MockWriterMockRecorder) Write(arg0 any) *gomock.Call { +func (mr *MockWriterMockRecorder) Write(arg0 any) *MockWriterWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockWriter)(nil).Write), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockWriter)(nil).Write), arg0) + return &MockWriterWriteCall{Call: call} +} + +// MockWriterWriteCall wrap *gomock.Call +type MockWriterWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWriterWriteCall) Return(arg0 int, arg1 error) *MockWriterWriteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWriterWriteCall) Do(f func([]byte) (int, error)) *MockWriterWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWriterWriteCall) DoAndReturn(f func([]byte) (int, error)) *MockWriterWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/deployer/package_test.go b/cmd/juju/application/deployer/package_test.go index 40b68f45990..7e0f8977fba 100644 --- a/cmd/juju/application/deployer/package_test.go +++ b/cmd/juju/application/deployer/package_test.go @@ -9,13 +9,13 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/deploy_mock.go github.com/juju/juju/cmd/juju/application/deployer DeployerAPI,CharmReader,DeployConfigFlag -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer ModelCommand,ConsumeDetails,ModelConfigGetter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resolver_mock.go github.com/juju/juju/cmd/juju/application/deployer Resolver,Bundle -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/api_mock.go github.com/juju/juju/api AllWatch -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelcmd_mock.go github.com/juju/juju/cmd/modelcmd Filesystem -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/write_mock.go io Writer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charm_mock.go github.com/juju/charm/v13 Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/deploy_mock.go github.com/juju/juju/cmd/juju/application/deployer DeployerAPI,CharmReader,DeployConfigFlag +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer ModelCommand,ConsumeDetails,ModelConfigGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resolver_mock.go github.com/juju/juju/cmd/juju/application/deployer Resolver,Bundle +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/api_mock.go github.com/juju/juju/api AllWatch +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelcmd_mock.go github.com/juju/juju/cmd/modelcmd Filesystem +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/write_mock.go io Writer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charm_mock.go github.com/juju/charm/v13 Charm func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/application/mocks/applicationapi_mock.go b/cmd/juju/application/mocks/applicationapi_mock.go index 9d30fa88c49..926f49f643c 100644 --- a/cmd/juju/application/mocks/applicationapi_mock.go +++ b/cmd/juju/application/mocks/applicationapi_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/applicationapi_mock.go github.com/juju/juju/cmd/juju/application ApplicationAPI,RemoveApplicationAPI +// mockgen -typed -package mocks -destination mocks/applicationapi_mock.go github.com/juju/juju/cmd/juju/application ApplicationAPI,RemoveApplicationAPI // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockApplicationAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockApplicationAPIMockRecorder) Close() *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) Close() *MockApplicationAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + return &MockApplicationAPICloseCall{Call: call} +} + +// MockApplicationAPICloseCall wrap *gomock.Call +type MockApplicationAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPICloseCall) Return(arg0 error) *MockApplicationAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPICloseCall) Do(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPICloseCall) DoAndReturn(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -64,9 +88,33 @@ func (m *MockApplicationAPI) Get(arg0, arg1 string) (*params.ApplicationGetResul } // Get indicates an expected call of Get. -func (mr *MockApplicationAPIMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) Get(arg0, arg1 any) *MockApplicationAPIGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockApplicationAPI)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockApplicationAPI)(nil).Get), arg0, arg1) + return &MockApplicationAPIGetCall{Call: call} +} + +// MockApplicationAPIGetCall wrap *gomock.Call +type MockApplicationAPIGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPIGetCall) Return(arg0 *params.ApplicationGetResults, arg1 error) *MockApplicationAPIGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPIGetCall) Do(f func(string, string) (*params.ApplicationGetResults, error)) *MockApplicationAPIGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPIGetCall) DoAndReturn(f func(string, string) (*params.ApplicationGetResults, error)) *MockApplicationAPIGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -78,9 +126,33 @@ func (m *MockApplicationAPI) SetConfig(arg0, arg1, arg2 string, arg3 map[string] } // SetConfig indicates an expected call of SetConfig. -func (mr *MockApplicationAPIMockRecorder) SetConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) SetConfig(arg0, arg1, arg2, arg3 any) *MockApplicationAPISetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockApplicationAPI)(nil).SetConfig), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockApplicationAPI)(nil).SetConfig), arg0, arg1, arg2, arg3) + return &MockApplicationAPISetConfigCall{Call: call} +} + +// MockApplicationAPISetConfigCall wrap *gomock.Call +type MockApplicationAPISetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPISetConfigCall) Return(arg0 error) *MockApplicationAPISetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPISetConfigCall) Do(f func(string, string, string, map[string]string) error) *MockApplicationAPISetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPISetConfigCall) DoAndReturn(f func(string, string, string, map[string]string) error) *MockApplicationAPISetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnsetApplicationConfig mocks base method. @@ -92,9 +164,33 @@ func (m *MockApplicationAPI) UnsetApplicationConfig(arg0, arg1 string, arg2 []st } // UnsetApplicationConfig indicates an expected call of UnsetApplicationConfig. -func (mr *MockApplicationAPIMockRecorder) UnsetApplicationConfig(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) UnsetApplicationConfig(arg0, arg1, arg2 any) *MockApplicationAPIUnsetApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetApplicationConfig", reflect.TypeOf((*MockApplicationAPI)(nil).UnsetApplicationConfig), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetApplicationConfig", reflect.TypeOf((*MockApplicationAPI)(nil).UnsetApplicationConfig), arg0, arg1, arg2) + return &MockApplicationAPIUnsetApplicationConfigCall{Call: call} +} + +// MockApplicationAPIUnsetApplicationConfigCall wrap *gomock.Call +type MockApplicationAPIUnsetApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPIUnsetApplicationConfigCall) Return(arg0 error) *MockApplicationAPIUnsetApplicationConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPIUnsetApplicationConfigCall) Do(f func(string, string, []string) error) *MockApplicationAPIUnsetApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPIUnsetApplicationConfigCall) DoAndReturn(f func(string, string, []string) error) *MockApplicationAPIUnsetApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoveApplicationAPI is a mock of RemoveApplicationAPI interface. @@ -129,9 +225,33 @@ func (m *MockRemoveApplicationAPI) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockRemoveApplicationAPIMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) BestAPIVersion() *MockRemoveApplicationAPIBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).BestAPIVersion)) + return &MockRemoveApplicationAPIBestAPIVersionCall{Call: call} +} + +// MockRemoveApplicationAPIBestAPIVersionCall wrap *gomock.Call +type MockRemoveApplicationAPIBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPIBestAPIVersionCall) Return(arg0 int) *MockRemoveApplicationAPIBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPIBestAPIVersionCall) Do(f func() int) *MockRemoveApplicationAPIBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPIBestAPIVersionCall) DoAndReturn(f func() int) *MockRemoveApplicationAPIBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -143,9 +263,33 @@ func (m *MockRemoveApplicationAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRemoveApplicationAPIMockRecorder) Close() *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) Close() *MockRemoveApplicationAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).Close)) + return &MockRemoveApplicationAPICloseCall{Call: call} +} + +// MockRemoveApplicationAPICloseCall wrap *gomock.Call +type MockRemoveApplicationAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPICloseCall) Return(arg0 error) *MockRemoveApplicationAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPICloseCall) Do(f func() error) *MockRemoveApplicationAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPICloseCall) DoAndReturn(f func() error) *MockRemoveApplicationAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyApplications mocks base method. @@ -158,9 +302,33 @@ func (m *MockRemoveApplicationAPI) DestroyApplications(arg0 application.DestroyA } // DestroyApplications indicates an expected call of DestroyApplications. -func (mr *MockRemoveApplicationAPIMockRecorder) DestroyApplications(arg0 any) *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) DestroyApplications(arg0 any) *MockRemoveApplicationAPIDestroyApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyApplications", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).DestroyApplications), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyApplications", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).DestroyApplications), arg0) + return &MockRemoveApplicationAPIDestroyApplicationsCall{Call: call} +} + +// MockRemoveApplicationAPIDestroyApplicationsCall wrap *gomock.Call +type MockRemoveApplicationAPIDestroyApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPIDestroyApplicationsCall) Return(arg0 []params.DestroyApplicationResult, arg1 error) *MockRemoveApplicationAPIDestroyApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPIDestroyApplicationsCall) Do(f func(application.DestroyApplicationsParams) ([]params.DestroyApplicationResult, error)) *MockRemoveApplicationAPIDestroyApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPIDestroyApplicationsCall) DoAndReturn(f func(application.DestroyApplicationsParams) ([]params.DestroyApplicationResult, error)) *MockRemoveApplicationAPIDestroyApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyUnits mocks base method. @@ -173,9 +341,33 @@ func (m *MockRemoveApplicationAPI) DestroyUnits(arg0 application.DestroyUnitsPar } // DestroyUnits indicates an expected call of DestroyUnits. -func (mr *MockRemoveApplicationAPIMockRecorder) DestroyUnits(arg0 any) *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) DestroyUnits(arg0 any) *MockRemoveApplicationAPIDestroyUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).DestroyUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).DestroyUnits), arg0) + return &MockRemoveApplicationAPIDestroyUnitsCall{Call: call} +} + +// MockRemoveApplicationAPIDestroyUnitsCall wrap *gomock.Call +type MockRemoveApplicationAPIDestroyUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPIDestroyUnitsCall) Return(arg0 []params.DestroyUnitResult, arg1 error) *MockRemoveApplicationAPIDestroyUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPIDestroyUnitsCall) Do(f func(application.DestroyUnitsParams) ([]params.DestroyUnitResult, error)) *MockRemoveApplicationAPIDestroyUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPIDestroyUnitsCall) DoAndReturn(f func(application.DestroyUnitsParams) ([]params.DestroyUnitResult, error)) *MockRemoveApplicationAPIDestroyUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -187,9 +379,33 @@ func (m *MockRemoveApplicationAPI) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockRemoveApplicationAPIMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) ModelUUID() *MockRemoveApplicationAPIModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).ModelUUID)) + return &MockRemoveApplicationAPIModelUUIDCall{Call: call} +} + +// MockRemoveApplicationAPIModelUUIDCall wrap *gomock.Call +type MockRemoveApplicationAPIModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPIModelUUIDCall) Return(arg0 string) *MockRemoveApplicationAPIModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPIModelUUIDCall) Do(f func() string) *MockRemoveApplicationAPIModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPIModelUUIDCall) DoAndReturn(f func() string) *MockRemoveApplicationAPIModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ScaleApplication mocks base method. @@ -202,7 +418,31 @@ func (m *MockRemoveApplicationAPI) ScaleApplication(arg0 application.ScaleApplic } // ScaleApplication indicates an expected call of ScaleApplication. -func (mr *MockRemoveApplicationAPIMockRecorder) ScaleApplication(arg0 any) *gomock.Call { +func (mr *MockRemoveApplicationAPIMockRecorder) ScaleApplication(arg0 any) *MockRemoveApplicationAPIScaleApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).ScaleApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockRemoveApplicationAPI)(nil).ScaleApplication), arg0) + return &MockRemoveApplicationAPIScaleApplicationCall{Call: call} +} + +// MockRemoveApplicationAPIScaleApplicationCall wrap *gomock.Call +type MockRemoveApplicationAPIScaleApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveApplicationAPIScaleApplicationCall) Return(arg0 params.ScaleApplicationResult, arg1 error) *MockRemoveApplicationAPIScaleApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveApplicationAPIScaleApplicationCall) Do(f func(application.ScaleApplicationParams) (params.ScaleApplicationResult, error)) *MockRemoveApplicationAPIScaleApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveApplicationAPIScaleApplicationCall) DoAndReturn(f func(application.ScaleApplicationParams) (params.ScaleApplicationResult, error)) *MockRemoveApplicationAPIScaleApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/mocks/deployer_mock.go b/cmd/juju/application/mocks/deployer_mock.go index 681e831ec0d..78bfec707da 100644 --- a/cmd/juju/application/mocks/deployer_mock.go +++ b/cmd/juju/application/mocks/deployer_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer Deployer,DeployerFactory +// mockgen -typed -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer Deployer,DeployerFactory // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockDeployer) PrepareAndDeploy(arg0 *cmd.Context, arg1 deployer.Deploye } // PrepareAndDeploy indicates an expected call of PrepareAndDeploy. -func (mr *MockDeployerMockRecorder) PrepareAndDeploy(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDeployerMockRecorder) PrepareAndDeploy(arg0, arg1, arg2 any) *MockDeployerPrepareAndDeployCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareAndDeploy", reflect.TypeOf((*MockDeployer)(nil).PrepareAndDeploy), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareAndDeploy", reflect.TypeOf((*MockDeployer)(nil).PrepareAndDeploy), arg0, arg1, arg2) + return &MockDeployerPrepareAndDeployCall{Call: call} +} + +// MockDeployerPrepareAndDeployCall wrap *gomock.Call +type MockDeployerPrepareAndDeployCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerPrepareAndDeployCall) Return(arg0 error) *MockDeployerPrepareAndDeployCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerPrepareAndDeployCall) Do(f func(*cmd.Context, deployer.DeployerAPI, deployer.Resolver) error) *MockDeployerPrepareAndDeployCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerPrepareAndDeployCall) DoAndReturn(f func(*cmd.Context, deployer.DeployerAPI, deployer.Resolver) error) *MockDeployerPrepareAndDeployCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -64,9 +88,33 @@ func (m *MockDeployer) String() string { } // String indicates an expected call of String. -func (mr *MockDeployerMockRecorder) String() *gomock.Call { +func (mr *MockDeployerMockRecorder) String() *MockDeployerStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockDeployer)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockDeployer)(nil).String)) + return &MockDeployerStringCall{Call: call} +} + +// MockDeployerStringCall wrap *gomock.Call +type MockDeployerStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerStringCall) Return(arg0 string) *MockDeployerStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerStringCall) Do(f func() string) *MockDeployerStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerStringCall) DoAndReturn(f func() string) *MockDeployerStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDeployerFactory is a mock of DeployerFactory interface. @@ -102,7 +150,31 @@ func (m *MockDeployerFactory) GetDeployer(arg0 context.Context, arg1 deployer.De } // GetDeployer indicates an expected call of GetDeployer. -func (mr *MockDeployerFactoryMockRecorder) GetDeployer(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDeployerFactoryMockRecorder) GetDeployer(arg0, arg1, arg2, arg3 any) *MockDeployerFactoryGetDeployerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeployer", reflect.TypeOf((*MockDeployerFactory)(nil).GetDeployer), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeployer", reflect.TypeOf((*MockDeployerFactory)(nil).GetDeployer), arg0, arg1, arg2, arg3) + return &MockDeployerFactoryGetDeployerCall{Call: call} +} + +// MockDeployerFactoryGetDeployerCall wrap *gomock.Call +type MockDeployerFactoryGetDeployerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeployerFactoryGetDeployerCall) Return(arg0 deployer.Deployer, arg1 error) *MockDeployerFactoryGetDeployerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeployerFactoryGetDeployerCall) Do(f func(context.Context, deployer.DeployerConfig, deployer.ModelConfigGetter, deployer.Resolver) (deployer.Deployer, error)) *MockDeployerFactoryGetDeployerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeployerFactoryGetDeployerCall) DoAndReturn(f func(context.Context, deployer.DeployerConfig, deployer.ModelConfigGetter, deployer.Resolver) (deployer.Deployer, error)) *MockDeployerFactoryGetDeployerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/mocks/expose_mock.go b/cmd/juju/application/mocks/expose_mock.go index ccf978d7463..059290ff97b 100644 --- a/cmd/juju/application/mocks/expose_mock.go +++ b/cmd/juju/application/mocks/expose_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/expose_mock.go github.com/juju/juju/cmd/juju/application ApplicationExposeAPI +// mockgen -typed -package mocks -destination mocks/expose_mock.go github.com/juju/juju/cmd/juju/application ApplicationExposeAPI // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockApplicationExposeAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockApplicationExposeAPIMockRecorder) Close() *gomock.Call { +func (mr *MockApplicationExposeAPIMockRecorder) Close() *MockApplicationExposeAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Close)) + return &MockApplicationExposeAPICloseCall{Call: call} +} + +// MockApplicationExposeAPICloseCall wrap *gomock.Call +type MockApplicationExposeAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposeAPICloseCall) Return(arg0 error) *MockApplicationExposeAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposeAPICloseCall) Do(f func() error) *MockApplicationExposeAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposeAPICloseCall) DoAndReturn(f func() error) *MockApplicationExposeAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Expose mocks base method. @@ -62,9 +86,33 @@ func (m *MockApplicationExposeAPI) Expose(arg0 string, arg1 map[string]params.Ex } // Expose indicates an expected call of Expose. -func (mr *MockApplicationExposeAPIMockRecorder) Expose(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationExposeAPIMockRecorder) Expose(arg0, arg1 any) *MockApplicationExposeAPIExposeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Expose), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Expose), arg0, arg1) + return &MockApplicationExposeAPIExposeCall{Call: call} +} + +// MockApplicationExposeAPIExposeCall wrap *gomock.Call +type MockApplicationExposeAPIExposeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposeAPIExposeCall) Return(arg0 error) *MockApplicationExposeAPIExposeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposeAPIExposeCall) Do(f func(string, map[string]params.ExposedEndpoint) error) *MockApplicationExposeAPIExposeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposeAPIExposeCall) DoAndReturn(f func(string, map[string]params.ExposedEndpoint) error) *MockApplicationExposeAPIExposeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unexpose mocks base method. @@ -76,7 +124,31 @@ func (m *MockApplicationExposeAPI) Unexpose(arg0 string, arg1 []string) error { } // Unexpose indicates an expected call of Unexpose. -func (mr *MockApplicationExposeAPIMockRecorder) Unexpose(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationExposeAPIMockRecorder) Unexpose(arg0, arg1 any) *MockApplicationExposeAPIUnexposeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unexpose", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Unexpose), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unexpose", reflect.TypeOf((*MockApplicationExposeAPI)(nil).Unexpose), arg0, arg1) + return &MockApplicationExposeAPIUnexposeCall{Call: call} +} + +// MockApplicationExposeAPIUnexposeCall wrap *gomock.Call +type MockApplicationExposeAPIUnexposeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposeAPIUnexposeCall) Return(arg0 error) *MockApplicationExposeAPIUnexposeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposeAPIUnexposeCall) Do(f func(string, []string) error) *MockApplicationExposeAPIUnexposeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposeAPIUnexposeCall) DoAndReturn(f func(string, []string) error) *MockApplicationExposeAPIUnexposeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/mocks/modelconfigapi_mock.go b/cmd/juju/application/mocks/modelconfigapi_mock.go index 6497b441860..6e92bcdbb6d 100644 --- a/cmd/juju/application/mocks/modelconfigapi_mock.go +++ b/cmd/juju/application/mocks/modelconfigapi_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelconfigapi_mock.go github.com/juju/juju/cmd/juju/application ModelConfigClient +// mockgen -typed -package mocks -destination mocks/modelconfigapi_mock.go github.com/juju/juju/cmd/juju/application ModelConfigClient // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockModelConfigClient) Close() error { } // Close indicates an expected call of Close. -func (mr *MockModelConfigClientMockRecorder) Close() *gomock.Call { +func (mr *MockModelConfigClientMockRecorder) Close() *MockModelConfigClientCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigClient)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigClient)(nil).Close)) + return &MockModelConfigClientCloseCall{Call: call} +} + +// MockModelConfigClientCloseCall wrap *gomock.Call +type MockModelConfigClientCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigClientCloseCall) Return(arg0 error) *MockModelConfigClientCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigClientCloseCall) Do(f func() error) *MockModelConfigClientCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigClientCloseCall) DoAndReturn(f func() error) *MockModelConfigClientCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelGet mocks base method. @@ -62,7 +86,31 @@ func (m *MockModelConfigClient) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockModelConfigClientMockRecorder) ModelGet() *gomock.Call { +func (mr *MockModelConfigClientMockRecorder) ModelGet() *MockModelConfigClientModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigClient)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigClient)(nil).ModelGet)) + return &MockModelConfigClientModelGetCall{Call: call} +} + +// MockModelConfigClientModelGetCall wrap *gomock.Call +type MockModelConfigClientModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigClientModelGetCall) Return(arg0 map[string]any, arg1 error) *MockModelConfigClientModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigClientModelGetCall) Do(f func() (map[string]any, error)) *MockModelConfigClientModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigClientModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockModelConfigClientModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/package_test.go b/cmd/juju/application/package_test.go index e519d06308e..2c5431d3f5a 100644 --- a/cmd/juju/application/package_test.go +++ b/cmd/juju/application/package_test.go @@ -9,10 +9,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/applicationapi_mock.go github.com/juju/juju/cmd/juju/application ApplicationAPI,RemoveApplicationAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelconfigapi_mock.go github.com/juju/juju/cmd/juju/application ModelConfigClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer Deployer,DeployerFactory -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/expose_mock.go github.com/juju/juju/cmd/juju/application ApplicationExposeAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/applicationapi_mock.go github.com/juju/juju/cmd/juju/application ApplicationAPI,RemoveApplicationAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelconfigapi_mock.go github.com/juju/juju/cmd/juju/application ModelConfigClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/deployer_mock.go github.com/juju/juju/cmd/juju/application/deployer Deployer,DeployerFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/expose_mock.go github.com/juju/juju/cmd/juju/application ApplicationExposeAPI func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/application/refresher/charm_mock_test.go b/cmd/juju/application/refresher/charm_mock_test.go index 2394b0eed3a..63a3887a6e1 100644 --- a/cmd/juju/application/refresher/charm_mock_test.go +++ b/cmd/juju/application/refresher/charm_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package refresher -destination charm_mock_test.go github.com/juju/charm/v13 Charm +// mockgen -typed -package refresher -destination charm_mock_test.go github.com/juju/charm/v13 Charm // // Package refresher is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCharm) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmMockRecorder) Actions() *MockCharmActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharm)(nil).Actions)) + return &MockCharmActionsCall{Call: call} +} + +// MockCharmActionsCall wrap *gomock.Call +type MockCharmActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmActionsCall) Return(arg0 *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmActionsCall) Do(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -62,9 +86,33 @@ func (m *MockCharm) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmMockRecorder) Config() *gomock.Call { +func (mr *MockCharmMockRecorder) Config() *MockCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharm)(nil).Config)) + return &MockCharmConfigCall{Call: call} +} + +// MockCharmConfigCall wrap *gomock.Call +type MockCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmConfigCall) Return(arg0 *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmConfigCall) Do(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -76,9 +124,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -90,9 +162,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -104,7 +200,31 @@ func (m *MockCharm) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmMockRecorder) Revision() *MockCharmRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharm)(nil).Revision)) + return &MockCharmRevisionCall{Call: call} +} + +// MockCharmRevisionCall wrap *gomock.Call +type MockCharmRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRevisionCall) Return(arg0 int) *MockCharmRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRevisionCall) Do(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRevisionCall) DoAndReturn(f func() int) *MockCharmRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/refresher/package_test.go b/cmd/juju/application/refresher/package_test.go index 1e911d9f6fc..bbc1a31e419 100644 --- a/cmd/juju/application/refresher/package_test.go +++ b/cmd/juju/application/refresher/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package refresher -destination refresher_mock_test.go github.com/juju/juju/cmd/juju/application/refresher RefresherFactory,Refresher,CharmResolver,CharmRepository -//go:generate go run go.uber.org/mock/mockgen -package refresher -destination store_mock_test.go github.com/juju/juju/cmd/juju/application/store CharmAdder -//go:generate go run go.uber.org/mock/mockgen -package refresher -destination charm_mock_test.go github.com/juju/charm/v13 Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package refresher -destination refresher_mock_test.go github.com/juju/juju/cmd/juju/application/refresher RefresherFactory,Refresher,CharmResolver,CharmRepository +//go:generate go run go.uber.org/mock/mockgen -typed -package refresher -destination store_mock_test.go github.com/juju/juju/cmd/juju/application/store CharmAdder +//go:generate go run go.uber.org/mock/mockgen -typed -package refresher -destination charm_mock_test.go github.com/juju/charm/v13 Charm func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/application/refresher/refresher_mock_test.go b/cmd/juju/application/refresher/refresher_mock_test.go index b7a6ddf9425..ddd92e6cf8b 100644 --- a/cmd/juju/application/refresher/refresher_mock_test.go +++ b/cmd/juju/application/refresher/refresher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package refresher -destination refresher_mock_test.go github.com/juju/juju/cmd/juju/application/refresher RefresherFactory,Refresher,CharmResolver,CharmRepository +// mockgen -typed -package refresher -destination refresher_mock_test.go github.com/juju/juju/cmd/juju/application/refresher RefresherFactory,Refresher,CharmResolver,CharmRepository // // Package refresher is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockRefresherFactory) Run(arg0 RefresherConfig) (*CharmID, error) { } // Run indicates an expected call of Run. -func (mr *MockRefresherFactoryMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockRefresherFactoryMockRecorder) Run(arg0 any) *MockRefresherFactoryRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRefresherFactory)(nil).Run), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRefresherFactory)(nil).Run), arg0) + return &MockRefresherFactoryRunCall{Call: call} +} + +// MockRefresherFactoryRunCall wrap *gomock.Call +type MockRefresherFactoryRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRefresherFactoryRunCall) Return(arg0 *CharmID, arg1 error) *MockRefresherFactoryRunCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRefresherFactoryRunCall) Do(f func(RefresherConfig) (*CharmID, error)) *MockRefresherFactoryRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRefresherFactoryRunCall) DoAndReturn(f func(RefresherConfig) (*CharmID, error)) *MockRefresherFactoryRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRefresher is a mock of Refresher interface. @@ -89,9 +113,33 @@ func (m *MockRefresher) Allowed(arg0 RefresherConfig) (bool, error) { } // Allowed indicates an expected call of Allowed. -func (mr *MockRefresherMockRecorder) Allowed(arg0 any) *gomock.Call { +func (mr *MockRefresherMockRecorder) Allowed(arg0 any) *MockRefresherAllowedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Allowed", reflect.TypeOf((*MockRefresher)(nil).Allowed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Allowed", reflect.TypeOf((*MockRefresher)(nil).Allowed), arg0) + return &MockRefresherAllowedCall{Call: call} +} + +// MockRefresherAllowedCall wrap *gomock.Call +type MockRefresherAllowedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRefresherAllowedCall) Return(arg0 bool, arg1 error) *MockRefresherAllowedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRefresherAllowedCall) Do(f func(RefresherConfig) (bool, error)) *MockRefresherAllowedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRefresherAllowedCall) DoAndReturn(f func(RefresherConfig) (bool, error)) *MockRefresherAllowedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -104,9 +152,33 @@ func (m *MockRefresher) Refresh() (*CharmID, error) { } // Refresh indicates an expected call of Refresh. -func (mr *MockRefresherMockRecorder) Refresh() *gomock.Call { +func (mr *MockRefresherMockRecorder) Refresh() *MockRefresherRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockRefresher)(nil).Refresh)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockRefresher)(nil).Refresh)) + return &MockRefresherRefreshCall{Call: call} +} + +// MockRefresherRefreshCall wrap *gomock.Call +type MockRefresherRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRefresherRefreshCall) Return(arg0 *CharmID, arg1 error) *MockRefresherRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRefresherRefreshCall) Do(f func() (*CharmID, error)) *MockRefresherRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRefresherRefreshCall) DoAndReturn(f func() (*CharmID, error)) *MockRefresherRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -118,9 +190,33 @@ func (m *MockRefresher) String() string { } // String indicates an expected call of String. -func (mr *MockRefresherMockRecorder) String() *gomock.Call { +func (mr *MockRefresherMockRecorder) String() *MockRefresherStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRefresher)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRefresher)(nil).String)) + return &MockRefresherStringCall{Call: call} +} + +// MockRefresherStringCall wrap *gomock.Call +type MockRefresherStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRefresherStringCall) Return(arg0 string) *MockRefresherStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRefresherStringCall) Do(f func() string) *MockRefresherStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRefresherStringCall) DoAndReturn(f func() string) *MockRefresherStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmResolver is a mock of CharmResolver interface. @@ -158,9 +254,33 @@ func (m *MockCharmResolver) ResolveCharm(arg0 *charm.URL, arg1 charm0.Origin, ar } // ResolveCharm indicates an expected call of ResolveCharm. -func (mr *MockCharmResolverMockRecorder) ResolveCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmResolverMockRecorder) ResolveCharm(arg0, arg1, arg2 any) *MockCharmResolverResolveCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharm", reflect.TypeOf((*MockCharmResolver)(nil).ResolveCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharm", reflect.TypeOf((*MockCharmResolver)(nil).ResolveCharm), arg0, arg1, arg2) + return &MockCharmResolverResolveCharmCall{Call: call} +} + +// MockCharmResolverResolveCharmCall wrap *gomock.Call +type MockCharmResolverResolveCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmResolverResolveCharmCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []base.Base, arg3 error) *MockCharmResolverResolveCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmResolverResolveCharmCall) Do(f func(*charm.URL, charm0.Origin, bool) (*charm.URL, charm0.Origin, []base.Base, error)) *MockCharmResolverResolveCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmResolverResolveCharmCall) DoAndReturn(f func(*charm.URL, charm0.Origin, bool) (*charm.URL, charm0.Origin, []base.Base, error)) *MockCharmResolverResolveCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmRepository is a mock of CharmRepository interface. @@ -197,7 +317,31 @@ func (m *MockCharmRepository) NewCharmAtPath(arg0 string) (charm.Charm, *charm.U } // NewCharmAtPath indicates an expected call of NewCharmAtPath. -func (mr *MockCharmRepositoryMockRecorder) NewCharmAtPath(arg0 any) *gomock.Call { +func (mr *MockCharmRepositoryMockRecorder) NewCharmAtPath(arg0 any) *MockCharmRepositoryNewCharmAtPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCharmAtPath", reflect.TypeOf((*MockCharmRepository)(nil).NewCharmAtPath), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCharmAtPath", reflect.TypeOf((*MockCharmRepository)(nil).NewCharmAtPath), arg0) + return &MockCharmRepositoryNewCharmAtPathCall{Call: call} +} + +// MockCharmRepositoryNewCharmAtPathCall wrap *gomock.Call +type MockCharmRepositoryNewCharmAtPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRepositoryNewCharmAtPathCall) Return(arg0 charm.Charm, arg1 *charm.URL, arg2 error) *MockCharmRepositoryNewCharmAtPathCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRepositoryNewCharmAtPathCall) Do(f func(string) (charm.Charm, *charm.URL, error)) *MockCharmRepositoryNewCharmAtPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRepositoryNewCharmAtPathCall) DoAndReturn(f func(string) (charm.Charm, *charm.URL, error)) *MockCharmRepositoryNewCharmAtPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/refresher/store_mock_test.go b/cmd/juju/application/refresher/store_mock_test.go index 14f0447eff9..2a1f0df80d0 100644 --- a/cmd/juju/application/refresher/store_mock_test.go +++ b/cmd/juju/application/refresher/store_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package refresher -destination store_mock_test.go github.com/juju/juju/cmd/juju/application/store CharmAdder +// mockgen -typed -package refresher -destination store_mock_test.go github.com/juju/juju/cmd/juju/application/store CharmAdder // // Package refresher is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockCharmAdder) AddCharm(arg0 *charm.URL, arg1 charm0.Origin, arg2 bool } // AddCharm indicates an expected call of AddCharm. -func (mr *MockCharmAdderMockRecorder) AddCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) AddCharm(arg0, arg1, arg2 any) *MockCharmAdderAddCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddCharm), arg0, arg1, arg2) + return &MockCharmAdderAddCharmCall{Call: call} +} + +// MockCharmAdderAddCharmCall wrap *gomock.Call +type MockCharmAdderAddCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderAddCharmCall) Return(arg0 charm0.Origin, arg1 error) *MockCharmAdderAddCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderAddCharmCall) Do(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockCharmAdderAddCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderAddCharmCall) DoAndReturn(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockCharmAdderAddCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddLocalCharm mocks base method. @@ -65,9 +89,33 @@ func (m *MockCharmAdder) AddLocalCharm(arg0 *charm.URL, arg1 charm.Charm, arg2 b } // AddLocalCharm indicates an expected call of AddLocalCharm. -func (mr *MockCharmAdderMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *MockCharmAdderAddLocalCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddLocalCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddLocalCharm), arg0, arg1, arg2) + return &MockCharmAdderAddLocalCharmCall{Call: call} +} + +// MockCharmAdderAddLocalCharmCall wrap *gomock.Call +type MockCharmAdderAddLocalCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderAddLocalCharmCall) Return(arg0 *charm.URL, arg1 error) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderAddLocalCharmCall) Do(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderAddLocalCharmCall) DoAndReturn(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCharmPlacement mocks base method. @@ -79,7 +127,31 @@ func (m *MockCharmAdder) CheckCharmPlacement(arg0 string, arg1 *charm.URL) error } // CheckCharmPlacement indicates an expected call of CheckCharmPlacement. -func (mr *MockCharmAdderMockRecorder) CheckCharmPlacement(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) CheckCharmPlacement(arg0, arg1 any) *MockCharmAdderCheckCharmPlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockCharmAdder)(nil).CheckCharmPlacement), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockCharmAdder)(nil).CheckCharmPlacement), arg0, arg1) + return &MockCharmAdderCheckCharmPlacementCall{Call: call} +} + +// MockCharmAdderCheckCharmPlacementCall wrap *gomock.Call +type MockCharmAdderCheckCharmPlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderCheckCharmPlacementCall) Return(arg0 error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderCheckCharmPlacementCall) Do(f func(string, *charm.URL) error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderCheckCharmPlacementCall) DoAndReturn(f func(string, *charm.URL) error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/store/mocks/charm_mock.go b/cmd/juju/application/store/mocks/charm_mock.go index aaf46682dbc..a2da83703d2 100644 --- a/cmd/juju/application/store/mocks/charm_mock.go +++ b/cmd/juju/application/store/mocks/charm_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/charm_mock.go github.com/juju/charm/v13 Bundle +// mockgen -typed -package mocks -destination ./mocks/charm_mock.go github.com/juju/charm/v13 Bundle // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockBundle) ContainsOverlays() bool { } // ContainsOverlays indicates an expected call of ContainsOverlays. -func (mr *MockBundleMockRecorder) ContainsOverlays() *gomock.Call { +func (mr *MockBundleMockRecorder) ContainsOverlays() *MockBundleContainsOverlaysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsOverlays", reflect.TypeOf((*MockBundle)(nil).ContainsOverlays)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsOverlays", reflect.TypeOf((*MockBundle)(nil).ContainsOverlays)) + return &MockBundleContainsOverlaysCall{Call: call} +} + +// MockBundleContainsOverlaysCall wrap *gomock.Call +type MockBundleContainsOverlaysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleContainsOverlaysCall) Return(arg0 bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleContainsOverlaysCall) Do(f func() bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleContainsOverlaysCall) DoAndReturn(f func() bool) *MockBundleContainsOverlaysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Data mocks base method. @@ -62,9 +86,33 @@ func (m *MockBundle) Data() *charm.BundleData { } // Data indicates an expected call of Data. -func (mr *MockBundleMockRecorder) Data() *gomock.Call { +func (mr *MockBundleMockRecorder) Data() *MockBundleDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockBundle)(nil).Data)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockBundle)(nil).Data)) + return &MockBundleDataCall{Call: call} +} + +// MockBundleDataCall wrap *gomock.Call +type MockBundleDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleDataCall) Return(arg0 *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleDataCall) Do(f func() *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleDataCall) DoAndReturn(f func() *charm.BundleData) *MockBundleDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadMe mocks base method. @@ -76,7 +124,31 @@ func (m *MockBundle) ReadMe() string { } // ReadMe indicates an expected call of ReadMe. -func (mr *MockBundleMockRecorder) ReadMe() *gomock.Call { +func (mr *MockBundleMockRecorder) ReadMe() *MockBundleReadMeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMe", reflect.TypeOf((*MockBundle)(nil).ReadMe)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMe", reflect.TypeOf((*MockBundle)(nil).ReadMe)) + return &MockBundleReadMeCall{Call: call} +} + +// MockBundleReadMeCall wrap *gomock.Call +type MockBundleReadMeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleReadMeCall) Return(arg0 string) *MockBundleReadMeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleReadMeCall) Do(f func() string) *MockBundleReadMeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleReadMeCall) DoAndReturn(f func() string) *MockBundleReadMeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/store/mocks/store_mock.go b/cmd/juju/application/store/mocks/store_mock.go index befb6b94556..1c8ed2b01c5 100644 --- a/cmd/juju/application/store/mocks/store_mock.go +++ b/cmd/juju/application/store/mocks/store_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/store_mock.go github.com/juju/juju/cmd/juju/application/store CharmAdder,CharmsAPI,DownloadBundleClient +// mockgen -typed -package mocks -destination ./mocks/store_mock.go github.com/juju/juju/cmd/juju/application/store CharmAdder,CharmsAPI,DownloadBundleClient // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockCharmAdder) AddCharm(arg0 *charm.URL, arg1 charm0.Origin, arg2 bool } // AddCharm indicates an expected call of AddCharm. -func (mr *MockCharmAdderMockRecorder) AddCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) AddCharm(arg0, arg1, arg2 any) *MockCharmAdderAddCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddCharm), arg0, arg1, arg2) + return &MockCharmAdderAddCharmCall{Call: call} +} + +// MockCharmAdderAddCharmCall wrap *gomock.Call +type MockCharmAdderAddCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderAddCharmCall) Return(arg0 charm0.Origin, arg1 error) *MockCharmAdderAddCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderAddCharmCall) Do(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockCharmAdderAddCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderAddCharmCall) DoAndReturn(f func(*charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockCharmAdderAddCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddLocalCharm mocks base method. @@ -69,9 +93,33 @@ func (m *MockCharmAdder) AddLocalCharm(arg0 *charm.URL, arg1 charm.Charm, arg2 b } // AddLocalCharm indicates an expected call of AddLocalCharm. -func (mr *MockCharmAdderMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) AddLocalCharm(arg0, arg1, arg2 any) *MockCharmAdderAddLocalCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddLocalCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocalCharm", reflect.TypeOf((*MockCharmAdder)(nil).AddLocalCharm), arg0, arg1, arg2) + return &MockCharmAdderAddLocalCharmCall{Call: call} +} + +// MockCharmAdderAddLocalCharmCall wrap *gomock.Call +type MockCharmAdderAddLocalCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderAddLocalCharmCall) Return(arg0 *charm.URL, arg1 error) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderAddLocalCharmCall) Do(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderAddLocalCharmCall) DoAndReturn(f func(*charm.URL, charm.Charm, bool) (*charm.URL, error)) *MockCharmAdderAddLocalCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCharmPlacement mocks base method. @@ -83,9 +131,33 @@ func (m *MockCharmAdder) CheckCharmPlacement(arg0 string, arg1 *charm.URL) error } // CheckCharmPlacement indicates an expected call of CheckCharmPlacement. -func (mr *MockCharmAdderMockRecorder) CheckCharmPlacement(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmAdderMockRecorder) CheckCharmPlacement(arg0, arg1 any) *MockCharmAdderCheckCharmPlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockCharmAdder)(nil).CheckCharmPlacement), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmPlacement", reflect.TypeOf((*MockCharmAdder)(nil).CheckCharmPlacement), arg0, arg1) + return &MockCharmAdderCheckCharmPlacementCall{Call: call} +} + +// MockCharmAdderCheckCharmPlacementCall wrap *gomock.Call +type MockCharmAdderCheckCharmPlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAdderCheckCharmPlacementCall) Return(arg0 error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAdderCheckCharmPlacementCall) Do(f func(string, *charm.URL) error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAdderCheckCharmPlacementCall) DoAndReturn(f func(string, *charm.URL) error) *MockCharmAdderCheckCharmPlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmsAPI is a mock of CharmsAPI interface. @@ -121,9 +193,33 @@ func (m *MockCharmsAPI) GetDownloadInfo(arg0 *charm.URL, arg1 charm0.Origin) (ch } // GetDownloadInfo indicates an expected call of GetDownloadInfo. -func (mr *MockCharmsAPIMockRecorder) GetDownloadInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmsAPIMockRecorder) GetDownloadInfo(arg0, arg1 any) *MockCharmsAPIGetDownloadInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadInfo", reflect.TypeOf((*MockCharmsAPI)(nil).GetDownloadInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadInfo", reflect.TypeOf((*MockCharmsAPI)(nil).GetDownloadInfo), arg0, arg1) + return &MockCharmsAPIGetDownloadInfoCall{Call: call} +} + +// MockCharmsAPIGetDownloadInfoCall wrap *gomock.Call +type MockCharmsAPIGetDownloadInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmsAPIGetDownloadInfoCall) Return(arg0 charms.DownloadInfo, arg1 error) *MockCharmsAPIGetDownloadInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmsAPIGetDownloadInfoCall) Do(f func(*charm.URL, charm0.Origin) (charms.DownloadInfo, error)) *MockCharmsAPIGetDownloadInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmsAPIGetDownloadInfoCall) DoAndReturn(f func(*charm.URL, charm0.Origin) (charms.DownloadInfo, error)) *MockCharmsAPIGetDownloadInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveCharms mocks base method. @@ -136,9 +232,33 @@ func (m *MockCharmsAPI) ResolveCharms(arg0 []charms.CharmToResolve) ([]charms.Re } // ResolveCharms indicates an expected call of ResolveCharms. -func (mr *MockCharmsAPIMockRecorder) ResolveCharms(arg0 any) *gomock.Call { +func (mr *MockCharmsAPIMockRecorder) ResolveCharms(arg0 any) *MockCharmsAPIResolveCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharms", reflect.TypeOf((*MockCharmsAPI)(nil).ResolveCharms), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCharms", reflect.TypeOf((*MockCharmsAPI)(nil).ResolveCharms), arg0) + return &MockCharmsAPIResolveCharmsCall{Call: call} +} + +// MockCharmsAPIResolveCharmsCall wrap *gomock.Call +type MockCharmsAPIResolveCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmsAPIResolveCharmsCall) Return(arg0 []charms.ResolvedCharm, arg1 error) *MockCharmsAPIResolveCharmsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmsAPIResolveCharmsCall) Do(f func([]charms.CharmToResolve) ([]charms.ResolvedCharm, error)) *MockCharmsAPIResolveCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmsAPIResolveCharmsCall) DoAndReturn(f func([]charms.CharmToResolve) ([]charms.ResolvedCharm, error)) *MockCharmsAPIResolveCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDownloadBundleClient is a mock of DownloadBundleClient interface. @@ -178,8 +298,32 @@ func (m *MockDownloadBundleClient) DownloadAndReadBundle(arg0 context.Context, a } // DownloadAndReadBundle indicates an expected call of DownloadAndReadBundle. -func (mr *MockDownloadBundleClientMockRecorder) DownloadAndReadBundle(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockDownloadBundleClientMockRecorder) DownloadAndReadBundle(arg0, arg1, arg2 any, arg3 ...any) *MockDownloadBundleClientDownloadAndReadBundleCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndReadBundle", reflect.TypeOf((*MockDownloadBundleClient)(nil).DownloadAndReadBundle), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndReadBundle", reflect.TypeOf((*MockDownloadBundleClient)(nil).DownloadAndReadBundle), varargs...) + return &MockDownloadBundleClientDownloadAndReadBundleCall{Call: call} +} + +// MockDownloadBundleClientDownloadAndReadBundleCall wrap *gomock.Call +type MockDownloadBundleClientDownloadAndReadBundleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDownloadBundleClientDownloadAndReadBundleCall) Return(arg0 charm.Bundle, arg1 error) *MockDownloadBundleClientDownloadAndReadBundleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDownloadBundleClientDownloadAndReadBundleCall) Do(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) (charm.Bundle, error)) *MockDownloadBundleClientDownloadAndReadBundleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDownloadBundleClientDownloadAndReadBundleCall) DoAndReturn(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) (charm.Bundle, error)) *MockDownloadBundleClientDownloadAndReadBundleCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/store/package_test.go b/cmd/juju/application/store/package_test.go index b757933b4d0..bafbd508771 100644 --- a/cmd/juju/application/store/package_test.go +++ b/cmd/juju/application/store/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/store_mock.go github.com/juju/juju/cmd/juju/application/store CharmAdder,CharmsAPI,DownloadBundleClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/charm_mock.go github.com/juju/charm/v13 Bundle +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/store_mock.go github.com/juju/juju/cmd/juju/application/store CharmAdder,CharmsAPI,DownloadBundleClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/charm_mock.go github.com/juju/charm/v13 Bundle func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/application/utils/interface.go b/cmd/juju/application/utils/interface.go index 677d7e98d7b..64dfe6aea8e 100644 --- a/cmd/juju/application/utils/interface.go +++ b/cmd/juju/application/utils/interface.go @@ -11,8 +11,8 @@ import ( "github.com/juju/juju/core/resources" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charmresource_mock.go github.com/juju/juju/cmd/juju/application/utils CharmClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resourcefacade_mock.go github.com/juju/juju/cmd/juju/application/utils ResourceLister +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charmresource_mock.go github.com/juju/juju/cmd/juju/application/utils CharmClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resourcefacade_mock.go github.com/juju/juju/cmd/juju/application/utils ResourceLister // CharmClient defines a subset of the charms facade, as required // by the upgrade-charm command and to GetMetaResources. diff --git a/cmd/juju/application/utils/mocks/charmresource_mock.go b/cmd/juju/application/utils/mocks/charmresource_mock.go index b70dd03efba..646e05540f0 100644 --- a/cmd/juju/application/utils/mocks/charmresource_mock.go +++ b/cmd/juju/application/utils/mocks/charmresource_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charmresource_mock.go github.com/juju/juju/cmd/juju/application/utils CharmClient +// mockgen -typed -package mocks -destination mocks/charmresource_mock.go github.com/juju/juju/cmd/juju/application/utils CharmClient // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockCharmClient) CharmInfo(arg0 string) (*charms.CharmInfo, error) { } // CharmInfo indicates an expected call of CharmInfo. -func (mr *MockCharmClientMockRecorder) CharmInfo(arg0 any) *gomock.Call { +func (mr *MockCharmClientMockRecorder) CharmInfo(arg0 any) *MockCharmClientCharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCharmClient)(nil).CharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCharmClient)(nil).CharmInfo), arg0) + return &MockCharmClientCharmInfoCall{Call: call} +} + +// MockCharmClientCharmInfoCall wrap *gomock.Call +type MockCharmClientCharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmClientCharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockCharmClientCharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmClientCharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockCharmClientCharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmClientCharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockCharmClientCharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmResources mocks base method. @@ -66,7 +90,31 @@ func (m *MockCharmClient) ListCharmResources(arg0 string, arg1 charm.Origin) ([] } // ListCharmResources indicates an expected call of ListCharmResources. -func (mr *MockCharmClientMockRecorder) ListCharmResources(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmClientMockRecorder) ListCharmResources(arg0, arg1 any) *MockCharmClientListCharmResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmResources", reflect.TypeOf((*MockCharmClient)(nil).ListCharmResources), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmResources", reflect.TypeOf((*MockCharmClient)(nil).ListCharmResources), arg0, arg1) + return &MockCharmClientListCharmResourcesCall{Call: call} +} + +// MockCharmClientListCharmResourcesCall wrap *gomock.Call +type MockCharmClientListCharmResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmClientListCharmResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockCharmClientListCharmResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmClientListCharmResourcesCall) Do(f func(string, charm.Origin) ([]resource.Resource, error)) *MockCharmClientListCharmResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmClientListCharmResourcesCall) DoAndReturn(f func(string, charm.Origin) ([]resource.Resource, error)) *MockCharmClientListCharmResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/application/utils/mocks/resourcefacade_mock.go b/cmd/juju/application/utils/mocks/resourcefacade_mock.go index baa46e48496..47e598b7747 100644 --- a/cmd/juju/application/utils/mocks/resourcefacade_mock.go +++ b/cmd/juju/application/utils/mocks/resourcefacade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resourcefacade_mock.go github.com/juju/juju/cmd/juju/application/utils ResourceLister +// mockgen -typed -package mocks -destination mocks/resourcefacade_mock.go github.com/juju/juju/cmd/juju/application/utils ResourceLister // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockResourceLister) ListResources(arg0 []string) ([]resources.Applicati } // ListResources indicates an expected call of ListResources. -func (mr *MockResourceListerMockRecorder) ListResources(arg0 any) *gomock.Call { +func (mr *MockResourceListerMockRecorder) ListResources(arg0 any) *MockResourceListerListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResourceLister)(nil).ListResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResourceLister)(nil).ListResources), arg0) + return &MockResourceListerListResourcesCall{Call: call} +} + +// MockResourceListerListResourcesCall wrap *gomock.Call +type MockResourceListerListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceListerListResourcesCall) Return(arg0 []resources.ApplicationResources, arg1 error) *MockResourceListerListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceListerListResourcesCall) Do(f func([]string) ([]resources.ApplicationResources, error)) *MockResourceListerListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceListerListResourcesCall) DoAndReturn(f func([]string) ([]resources.ApplicationResources, error)) *MockResourceListerListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/caas/add.go b/cmd/juju/caas/add.go index c95be8a06d8..b5d60bc7fe1 100644 --- a/cmd/juju/caas/add.go +++ b/cmd/juju/caas/add.go @@ -47,7 +47,7 @@ type CloudMetadataStore interface { WritePersonalCloudMetadata(cloudsMap map[string]jujucloud.Cloud) error } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/storeapi_mock.go github.com/juju/juju/cmd/juju/caas CredentialStoreAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/storeapi_mock.go github.com/juju/juju/cmd/juju/caas CredentialStoreAPI type CredentialStoreAPI interface { UpdateCredential(cloudName string, details jujucloud.CloudCredential) error } diff --git a/cmd/juju/caas/cluster.go b/cmd/juju/caas/cluster.go index ce0cedbf440..5cd1474a5bc 100644 --- a/cmd/juju/caas/cluster.go +++ b/cmd/juju/caas/cluster.go @@ -17,7 +17,7 @@ import ( "github.com/juju/juju/cmd/modelcmd" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/runner_mock.go github.com/juju/juju/cmd/juju/caas CommandRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/runner_mock.go github.com/juju/juju/cmd/juju/caas CommandRunner type CommandRunner interface { RunCommands(run exec.RunParams) (*exec.ExecResponse, error) diff --git a/cmd/juju/caas/mocks/runner_mock.go b/cmd/juju/caas/mocks/runner_mock.go index 90f4be13d97..02ee03dae26 100644 --- a/cmd/juju/caas/mocks/runner_mock.go +++ b/cmd/juju/caas/mocks/runner_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/runner_mock.go github.com/juju/juju/cmd/juju/caas CommandRunner +// mockgen -typed -package mocks -destination mocks/runner_mock.go github.com/juju/juju/cmd/juju/caas CommandRunner // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockCommandRunner) RunCommands(arg0 exec.RunParams) (*exec.ExecResponse } // RunCommands indicates an expected call of RunCommands. -func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *gomock.Call { +func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *MockCommandRunnerRunCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + return &MockCommandRunnerRunCommandsCall{Call: call} +} + +// MockCommandRunnerRunCommandsCall wrap *gomock.Call +type MockCommandRunnerRunCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommandRunnerRunCommandsCall) Return(arg0 *exec.ExecResponse, arg1 error) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommandRunnerRunCommandsCall) Do(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommandRunnerRunCommandsCall) DoAndReturn(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/caas/mocks/storeapi_mock.go b/cmd/juju/caas/mocks/storeapi_mock.go index 4c3ff5c1425..95d085d9f92 100644 --- a/cmd/juju/caas/mocks/storeapi_mock.go +++ b/cmd/juju/caas/mocks/storeapi_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/storeapi_mock.go github.com/juju/juju/cmd/juju/caas CredentialStoreAPI +// mockgen -typed -package mocks -destination mocks/storeapi_mock.go github.com/juju/juju/cmd/juju/caas CredentialStoreAPI // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockCredentialStoreAPI) UpdateCredential(arg0 string, arg1 cloud.CloudC } // UpdateCredential indicates an expected call of UpdateCredential. -func (mr *MockCredentialStoreAPIMockRecorder) UpdateCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialStoreAPIMockRecorder) UpdateCredential(arg0, arg1 any) *MockCredentialStoreAPIUpdateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockCredentialStoreAPI)(nil).UpdateCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockCredentialStoreAPI)(nil).UpdateCredential), arg0, arg1) + return &MockCredentialStoreAPIUpdateCredentialCall{Call: call} +} + +// MockCredentialStoreAPIUpdateCredentialCall wrap *gomock.Call +type MockCredentialStoreAPIUpdateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialStoreAPIUpdateCredentialCall) Return(arg0 error) *MockCredentialStoreAPIUpdateCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialStoreAPIUpdateCredentialCall) Do(f func(string, cloud.CloudCredential) error) *MockCredentialStoreAPIUpdateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialStoreAPIUpdateCredentialCall) DoAndReturn(f func(string, cloud.CloudCredential) error) *MockCredentialStoreAPIUpdateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/charmhub/mocks/api_mock.go b/cmd/juju/charmhub/mocks/api_mock.go index 9227fbe5b0e..69c9b0002ca 100644 --- a/cmd/juju/charmhub/mocks/api_mock.go +++ b/cmd/juju/charmhub/mocks/api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/api_mock.go github.com/juju/juju/cmd/juju/charmhub CharmHubClient +// mockgen -typed -package mocks -destination ./mocks/api_mock.go github.com/juju/juju/cmd/juju/charmhub CharmHubClient // // Package mocks is a generated GoMock package. @@ -55,10 +55,34 @@ func (m *MockCharmHubClient) Download(arg0 context.Context, arg1 *url.URL, arg2 } // Download indicates an expected call of Download. -func (mr *MockCharmHubClientMockRecorder) Download(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) Download(arg0, arg1, arg2 any, arg3 ...any) *MockCharmHubClientDownloadCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Download", reflect.TypeOf((*MockCharmHubClient)(nil).Download), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Download", reflect.TypeOf((*MockCharmHubClient)(nil).Download), varargs...) + return &MockCharmHubClientDownloadCall{Call: call} +} + +// MockCharmHubClientDownloadCall wrap *gomock.Call +type MockCharmHubClientDownloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientDownloadCall) Return(arg0 error) *MockCharmHubClientDownloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientDownloadCall) Do(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) error) *MockCharmHubClientDownloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientDownloadCall) DoAndReturn(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) error) *MockCharmHubClientDownloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Find mocks base method. @@ -75,10 +99,34 @@ func (m *MockCharmHubClient) Find(arg0 context.Context, arg1 string, arg2 ...cha } // Find indicates an expected call of Find. -func (mr *MockCharmHubClientMockRecorder) Find(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) Find(arg0, arg1 any, arg2 ...any) *MockCharmHubClientFindCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockCharmHubClient)(nil).Find), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockCharmHubClient)(nil).Find), varargs...) + return &MockCharmHubClientFindCall{Call: call} +} + +// MockCharmHubClientFindCall wrap *gomock.Call +type MockCharmHubClientFindCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientFindCall) Return(arg0 []transport.FindResponse, arg1 error) *MockCharmHubClientFindCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientFindCall) Do(f func(context.Context, string, ...charmhub.FindOption) ([]transport.FindResponse, error)) *MockCharmHubClientFindCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientFindCall) DoAndReturn(f func(context.Context, string, ...charmhub.FindOption) ([]transport.FindResponse, error)) *MockCharmHubClientFindCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Info mocks base method. @@ -95,10 +143,34 @@ func (m *MockCharmHubClient) Info(arg0 context.Context, arg1 string, arg2 ...cha } // Info indicates an expected call of Info. -func (mr *MockCharmHubClientMockRecorder) Info(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) Info(arg0, arg1 any, arg2 ...any) *MockCharmHubClientInfoCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockCharmHubClient)(nil).Info), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockCharmHubClient)(nil).Info), varargs...) + return &MockCharmHubClientInfoCall{Call: call} +} + +// MockCharmHubClientInfoCall wrap *gomock.Call +type MockCharmHubClientInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientInfoCall) Return(arg0 transport.InfoResponse, arg1 error) *MockCharmHubClientInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientInfoCall) Do(f func(context.Context, string, ...charmhub.InfoOption) (transport.InfoResponse, error)) *MockCharmHubClientInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientInfoCall) DoAndReturn(f func(context.Context, string, ...charmhub.InfoOption) (transport.InfoResponse, error)) *MockCharmHubClientInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -111,9 +183,33 @@ func (m *MockCharmHubClient) Refresh(arg0 context.Context, arg1 charmhub.Refresh } // Refresh indicates an expected call of Refresh. -func (mr *MockCharmHubClientMockRecorder) Refresh(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) Refresh(arg0, arg1 any) *MockCharmHubClientRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHubClient)(nil).Refresh), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHubClient)(nil).Refresh), arg0, arg1) + return &MockCharmHubClientRefreshCall{Call: call} +} + +// MockCharmHubClientRefreshCall wrap *gomock.Call +type MockCharmHubClientRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientRefreshCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmHubClientRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientRefreshCall) Do(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubClientRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientRefreshCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubClientRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -125,7 +221,31 @@ func (m *MockCharmHubClient) URL() string { } // URL indicates an expected call of URL. -func (mr *MockCharmHubClientMockRecorder) URL() *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) URL() *MockCharmHubClientURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharmHubClient)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharmHubClient)(nil).URL)) + return &MockCharmHubClientURLCall{Call: call} +} + +// MockCharmHubClientURLCall wrap *gomock.Call +type MockCharmHubClientURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientURLCall) Return(arg0 string) *MockCharmHubClientURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientURLCall) Do(f func() string) *MockCharmHubClientURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientURLCall) DoAndReturn(f func() string) *MockCharmHubClientURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/charmhub/mocks/fsys_mock.go b/cmd/juju/charmhub/mocks/fsys_mock.go index 9a1752d3c0c..069c23ea686 100644 --- a/cmd/juju/charmhub/mocks/fsys_mock.go +++ b/cmd/juju/charmhub/mocks/fsys_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/fsys_mock.go github.com/juju/juju/cmd/modelcmd Filesystem,ReadSeekCloser +// mockgen -typed -package mocks -destination ./mocks/fsys_mock.go github.com/juju/juju/cmd/modelcmd Filesystem,ReadSeekCloser // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockFilesystem) Create(arg0 string) (*os.File, error) { } // Create indicates an expected call of Create. -func (mr *MockFilesystemMockRecorder) Create(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Create(arg0 any) *MockFilesystemCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystem)(nil).Create), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystem)(nil).Create), arg0) + return &MockFilesystemCreateCall{Call: call} +} + +// MockFilesystemCreateCall wrap *gomock.Call +type MockFilesystemCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemCreateCall) Return(arg0 *os.File, arg1 error) *MockFilesystemCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemCreateCall) Do(f func(string) (*os.File, error)) *MockFilesystemCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemCreateCall) DoAndReturn(f func(string) (*os.File, error)) *MockFilesystemCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -66,9 +90,33 @@ func (m *MockFilesystem) Open(arg0 string) (modelcmd.ReadSeekCloser, error) { } // Open indicates an expected call of Open. -func (mr *MockFilesystemMockRecorder) Open(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Open(arg0 any) *MockFilesystemOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockFilesystem)(nil).Open), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockFilesystem)(nil).Open), arg0) + return &MockFilesystemOpenCall{Call: call} +} + +// MockFilesystemOpenCall wrap *gomock.Call +type MockFilesystemOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemOpenCall) Return(arg0 modelcmd.ReadSeekCloser, arg1 error) *MockFilesystemOpenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemOpenCall) Do(f func(string) (modelcmd.ReadSeekCloser, error)) *MockFilesystemOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemOpenCall) DoAndReturn(f func(string) (modelcmd.ReadSeekCloser, error)) *MockFilesystemOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenFile mocks base method. @@ -81,9 +129,33 @@ func (m *MockFilesystem) OpenFile(arg0 string, arg1 int, arg2 fs.FileMode) (*os. } // OpenFile indicates an expected call of OpenFile. -func (mr *MockFilesystemMockRecorder) OpenFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) OpenFile(arg0, arg1, arg2 any) *MockFilesystemOpenFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenFile", reflect.TypeOf((*MockFilesystem)(nil).OpenFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenFile", reflect.TypeOf((*MockFilesystem)(nil).OpenFile), arg0, arg1, arg2) + return &MockFilesystemOpenFileCall{Call: call} +} + +// MockFilesystemOpenFileCall wrap *gomock.Call +type MockFilesystemOpenFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemOpenFileCall) Return(arg0 *os.File, arg1 error) *MockFilesystemOpenFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemOpenFileCall) Do(f func(string, int, fs.FileMode) (*os.File, error)) *MockFilesystemOpenFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemOpenFileCall) DoAndReturn(f func(string, int, fs.FileMode) (*os.File, error)) *MockFilesystemOpenFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAll mocks base method. @@ -95,9 +167,33 @@ func (m *MockFilesystem) RemoveAll(arg0 string) error { } // RemoveAll indicates an expected call of RemoveAll. -func (mr *MockFilesystemMockRecorder) RemoveAll(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) RemoveAll(arg0 any) *MockFilesystemRemoveAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFilesystem)(nil).RemoveAll), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFilesystem)(nil).RemoveAll), arg0) + return &MockFilesystemRemoveAllCall{Call: call} +} + +// MockFilesystemRemoveAllCall wrap *gomock.Call +type MockFilesystemRemoveAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemRemoveAllCall) Return(arg0 error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemRemoveAllCall) Do(f func(string) error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemRemoveAllCall) DoAndReturn(f func(string) error) *MockFilesystemRemoveAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stat mocks base method. @@ -110,9 +206,33 @@ func (m *MockFilesystem) Stat(arg0 string) (fs.FileInfo, error) { } // Stat indicates an expected call of Stat. -func (mr *MockFilesystemMockRecorder) Stat(arg0 any) *gomock.Call { +func (mr *MockFilesystemMockRecorder) Stat(arg0 any) *MockFilesystemStatCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFilesystem)(nil).Stat), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockFilesystem)(nil).Stat), arg0) + return &MockFilesystemStatCall{Call: call} +} + +// MockFilesystemStatCall wrap *gomock.Call +type MockFilesystemStatCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemStatCall) Return(arg0 fs.FileInfo, arg1 error) *MockFilesystemStatCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemStatCall) Do(f func(string) (fs.FileInfo, error)) *MockFilesystemStatCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemStatCall) DoAndReturn(f func(string) (fs.FileInfo, error)) *MockFilesystemStatCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockReadSeekCloser is a mock of ReadSeekCloser interface. @@ -147,9 +267,33 @@ func (m *MockReadSeekCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockReadSeekCloserMockRecorder) Close() *gomock.Call { +func (mr *MockReadSeekCloserMockRecorder) Close() *MockReadSeekCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockReadSeekCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockReadSeekCloser)(nil).Close)) + return &MockReadSeekCloserCloseCall{Call: call} +} + +// MockReadSeekCloserCloseCall wrap *gomock.Call +type MockReadSeekCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReadSeekCloserCloseCall) Return(arg0 error) *MockReadSeekCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReadSeekCloserCloseCall) Do(f func() error) *MockReadSeekCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReadSeekCloserCloseCall) DoAndReturn(f func() error) *MockReadSeekCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Read mocks base method. @@ -162,9 +306,33 @@ func (m *MockReadSeekCloser) Read(arg0 []byte) (int, error) { } // Read indicates an expected call of Read. -func (mr *MockReadSeekCloserMockRecorder) Read(arg0 any) *gomock.Call { +func (mr *MockReadSeekCloserMockRecorder) Read(arg0 any) *MockReadSeekCloserReadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReadSeekCloser)(nil).Read), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReadSeekCloser)(nil).Read), arg0) + return &MockReadSeekCloserReadCall{Call: call} +} + +// MockReadSeekCloserReadCall wrap *gomock.Call +type MockReadSeekCloserReadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReadSeekCloserReadCall) Return(arg0 int, arg1 error) *MockReadSeekCloserReadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReadSeekCloserReadCall) Do(f func([]byte) (int, error)) *MockReadSeekCloserReadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReadSeekCloserReadCall) DoAndReturn(f func([]byte) (int, error)) *MockReadSeekCloserReadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Seek mocks base method. @@ -177,7 +345,31 @@ func (m *MockReadSeekCloser) Seek(arg0 int64, arg1 int) (int64, error) { } // Seek indicates an expected call of Seek. -func (mr *MockReadSeekCloserMockRecorder) Seek(arg0, arg1 any) *gomock.Call { +func (mr *MockReadSeekCloserMockRecorder) Seek(arg0, arg1 any) *MockReadSeekCloserSeekCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seek", reflect.TypeOf((*MockReadSeekCloser)(nil).Seek), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seek", reflect.TypeOf((*MockReadSeekCloser)(nil).Seek), arg0, arg1) + return &MockReadSeekCloserSeekCall{Call: call} +} + +// MockReadSeekCloserSeekCall wrap *gomock.Call +type MockReadSeekCloserSeekCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReadSeekCloserSeekCall) Return(arg0 int64, arg1 error) *MockReadSeekCloserSeekCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReadSeekCloserSeekCall) Do(f func(int64, int) (int64, error)) *MockReadSeekCloserSeekCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReadSeekCloserSeekCall) DoAndReturn(f func(int64, int) (int64, error)) *MockReadSeekCloserSeekCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/charmhub/mocks/os_mock.go b/cmd/juju/charmhub/mocks/os_mock.go index 29a20758b4b..2951e1422b2 100644 --- a/cmd/juju/charmhub/mocks/os_mock.go +++ b/cmd/juju/charmhub/mocks/os_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/os_mock.go github.com/juju/juju/cmd/juju/charmhub OSEnviron +// mockgen -typed -package mocks -destination ./mocks/os_mock.go github.com/juju/juju/cmd/juju/charmhub OSEnviron // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockOSEnviron) Getenv(arg0 string) string { } // Getenv indicates an expected call of Getenv. -func (mr *MockOSEnvironMockRecorder) Getenv(arg0 any) *gomock.Call { +func (mr *MockOSEnvironMockRecorder) Getenv(arg0 any) *MockOSEnvironGetenvCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Getenv", reflect.TypeOf((*MockOSEnviron)(nil).Getenv), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Getenv", reflect.TypeOf((*MockOSEnviron)(nil).Getenv), arg0) + return &MockOSEnvironGetenvCall{Call: call} +} + +// MockOSEnvironGetenvCall wrap *gomock.Call +type MockOSEnvironGetenvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOSEnvironGetenvCall) Return(arg0 string) *MockOSEnvironGetenvCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOSEnvironGetenvCall) Do(f func(string) string) *MockOSEnvironGetenvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOSEnvironGetenvCall) DoAndReturn(f func(string) string) *MockOSEnvironGetenvCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTerminal mocks base method. @@ -61,7 +85,31 @@ func (m *MockOSEnviron) IsTerminal() bool { } // IsTerminal indicates an expected call of IsTerminal. -func (mr *MockOSEnvironMockRecorder) IsTerminal() *gomock.Call { +func (mr *MockOSEnvironMockRecorder) IsTerminal() *MockOSEnvironIsTerminalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTerminal", reflect.TypeOf((*MockOSEnviron)(nil).IsTerminal)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTerminal", reflect.TypeOf((*MockOSEnviron)(nil).IsTerminal)) + return &MockOSEnvironIsTerminalCall{Call: call} +} + +// MockOSEnvironIsTerminalCall wrap *gomock.Call +type MockOSEnvironIsTerminalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOSEnvironIsTerminalCall) Return(arg0 bool) *MockOSEnvironIsTerminalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOSEnvironIsTerminalCall) Do(f func() bool) *MockOSEnvironIsTerminalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOSEnvironIsTerminalCall) DoAndReturn(f func() bool) *MockOSEnvironIsTerminalCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/charmhub/package_test.go b/cmd/juju/charmhub/package_test.go index 750150788b3..f94e673ea20 100644 --- a/cmd/juju/charmhub/package_test.go +++ b/cmd/juju/charmhub/package_test.go @@ -12,9 +12,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/api_mock.go github.com/juju/juju/cmd/juju/charmhub CharmHubClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/os_mock.go github.com/juju/juju/cmd/juju/charmhub OSEnviron -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/fsys_mock.go github.com/juju/juju/cmd/modelcmd Filesystem,ReadSeekCloser +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/api_mock.go github.com/juju/juju/cmd/juju/charmhub CharmHubClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/os_mock.go github.com/juju/juju/cmd/juju/charmhub OSEnviron +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/fsys_mock.go github.com/juju/juju/cmd/modelcmd Filesystem,ReadSeekCloser func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/cloud/mocks/remove_mocks.go b/cmd/juju/cloud/mocks/remove_mocks.go index 56122806dd4..f5ac42d10fe 100644 --- a/cmd/juju/cloud/mocks/remove_mocks.go +++ b/cmd/juju/cloud/mocks/remove_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/remove_mocks.go github.com/juju/juju/cmd/juju/cloud RemoveCloudAPI +// mockgen -typed -package mocks -destination mocks/remove_mocks.go github.com/juju/juju/cmd/juju/cloud RemoveCloudAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockRemoveCloudAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRemoveCloudAPIMockRecorder) Close() *gomock.Call { +func (mr *MockRemoveCloudAPIMockRecorder) Close() *MockRemoveCloudAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveCloudAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveCloudAPI)(nil).Close)) + return &MockRemoveCloudAPICloseCall{Call: call} +} + +// MockRemoveCloudAPICloseCall wrap *gomock.Call +type MockRemoveCloudAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveCloudAPICloseCall) Return(arg0 error) *MockRemoveCloudAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveCloudAPICloseCall) Do(f func() error) *MockRemoveCloudAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveCloudAPICloseCall) DoAndReturn(f func() error) *MockRemoveCloudAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveCloud mocks base method. @@ -61,7 +85,31 @@ func (m *MockRemoveCloudAPI) RemoveCloud(arg0 string) error { } // RemoveCloud indicates an expected call of RemoveCloud. -func (mr *MockRemoveCloudAPIMockRecorder) RemoveCloud(arg0 any) *gomock.Call { +func (mr *MockRemoveCloudAPIMockRecorder) RemoveCloud(arg0 any) *MockRemoveCloudAPIRemoveCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloud", reflect.TypeOf((*MockRemoveCloudAPI)(nil).RemoveCloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloud", reflect.TypeOf((*MockRemoveCloudAPI)(nil).RemoveCloud), arg0) + return &MockRemoveCloudAPIRemoveCloudCall{Call: call} +} + +// MockRemoveCloudAPIRemoveCloudCall wrap *gomock.Call +type MockRemoveCloudAPIRemoveCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveCloudAPIRemoveCloudCall) Return(arg0 error) *MockRemoveCloudAPIRemoveCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveCloudAPIRemoveCloudCall) Do(f func(string) error) *MockRemoveCloudAPIRemoveCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveCloudAPIRemoveCloudCall) DoAndReturn(f func(string) error) *MockRemoveCloudAPIRemoveCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/cloud/package_test.go b/cmd/juju/cloud/package_test.go index db16e394701..fdbe6d25403 100644 --- a/cmd/juju/cloud/package_test.go +++ b/cmd/juju/cloud/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/remove_mocks.go github.com/juju/juju/cmd/juju/cloud RemoveCloudAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/remove_mocks.go github.com/juju/juju/cmd/juju/cloud RemoveCloudAPI func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/commands/mockenvirons_test.go b/cmd/juju/commands/mockenvirons_test.go index e7390dcee50..dd7a1791718 100644 --- a/cmd/juju/commands/mockenvirons_test.go +++ b/cmd/juju/commands/mockenvirons_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package commands -destination mockenvirons_test.go github.com/juju/juju/environs Environ,PrecheckJujuUpgradeStep +// mockgen -typed -package commands -destination mockenvirons_test.go github.com/juju/juju/environs Environ,PrecheckJujuUpgradeStep // // Package commands is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -71,9 +95,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -86,9 +134,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -101,9 +173,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -115,9 +211,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -130,9 +250,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -145,9 +289,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -159,9 +327,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -173,9 +365,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -187,9 +403,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -202,9 +442,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -217,9 +481,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -231,9 +519,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -245,9 +557,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -259,9 +595,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -273,9 +633,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -288,9 +672,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -306,10 +714,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -322,9 +754,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -337,9 +793,33 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPrecheckJujuUpgradeStep is a mock of PrecheckJujuUpgradeStep interface. @@ -374,9 +854,33 @@ func (m *MockPrecheckJujuUpgradeStep) Description() string { } // Description indicates an expected call of Description. -func (mr *MockPrecheckJujuUpgradeStepMockRecorder) Description() *gomock.Call { +func (mr *MockPrecheckJujuUpgradeStepMockRecorder) Description() *MockPrecheckJujuUpgradeStepDescriptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockPrecheckJujuUpgradeStep)(nil).Description)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockPrecheckJujuUpgradeStep)(nil).Description)) + return &MockPrecheckJujuUpgradeStepDescriptionCall{Call: call} +} + +// MockPrecheckJujuUpgradeStepDescriptionCall wrap *gomock.Call +type MockPrecheckJujuUpgradeStepDescriptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckJujuUpgradeStepDescriptionCall) Return(arg0 string) *MockPrecheckJujuUpgradeStepDescriptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckJujuUpgradeStepDescriptionCall) Do(f func() string) *MockPrecheckJujuUpgradeStepDescriptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckJujuUpgradeStepDescriptionCall) DoAndReturn(f func() string) *MockPrecheckJujuUpgradeStepDescriptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -388,7 +892,31 @@ func (m *MockPrecheckJujuUpgradeStep) Run() error { } // Run indicates an expected call of Run. -func (mr *MockPrecheckJujuUpgradeStepMockRecorder) Run() *gomock.Call { +func (mr *MockPrecheckJujuUpgradeStepMockRecorder) Run() *MockPrecheckJujuUpgradeStepRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockPrecheckJujuUpgradeStep)(nil).Run)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockPrecheckJujuUpgradeStep)(nil).Run)) + return &MockPrecheckJujuUpgradeStepRunCall{Call: call} +} + +// MockPrecheckJujuUpgradeStepRunCall wrap *gomock.Call +type MockPrecheckJujuUpgradeStepRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPrecheckJujuUpgradeStepRunCall) Return(arg0 error) *MockPrecheckJujuUpgradeStepRunCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPrecheckJujuUpgradeStepRunCall) Do(f func() error) *MockPrecheckJujuUpgradeStepRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPrecheckJujuUpgradeStepRunCall) DoAndReturn(f func() error) *MockPrecheckJujuUpgradeStepRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/mocks/controller_mock.go b/cmd/juju/commands/mocks/controller_mock.go index d11988ed5f5..148a2cb11f1 100644 --- a/cmd/juju/commands/mocks/controller_mock.go +++ b/cmd/juju/commands/mocks/controller_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/controller_mock.go github.com/juju/juju/cmd/juju/commands ControllerAPI +// mockgen -typed -package mocks -destination mocks/controller_mock.go github.com/juju/juju/cmd/juju/commands ControllerAPI // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockControllerAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockControllerAPIMockRecorder) Close() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) Close() *MockControllerAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockControllerAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockControllerAPI)(nil).Close)) + return &MockControllerAPICloseCall{Call: call} +} + +// MockControllerAPICloseCall wrap *gomock.Call +type MockControllerAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPICloseCall) Return(arg0 error) *MockControllerAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPICloseCall) Do(f func() error) *MockControllerAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPICloseCall) DoAndReturn(f func() error) *MockControllerAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -65,9 +89,33 @@ func (m *MockControllerAPI) CloudSpec(arg0 names.ModelTag) (cloudspec.CloudSpec, } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockControllerAPIMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockControllerAPIMockRecorder) CloudSpec(arg0 any) *MockControllerAPICloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockControllerAPI)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockControllerAPI)(nil).CloudSpec), arg0) + return &MockControllerAPICloudSpecCall{Call: call} +} + +// MockControllerAPICloudSpecCall wrap *gomock.Call +type MockControllerAPICloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPICloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockControllerAPICloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPICloudSpecCall) Do(f func(names.ModelTag) (cloudspec.CloudSpec, error)) *MockControllerAPICloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPICloudSpecCall) DoAndReturn(f func(names.ModelTag) (cloudspec.CloudSpec, error)) *MockControllerAPICloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -80,9 +128,33 @@ func (m *MockControllerAPI) ControllerConfig() (controller.Config, error) { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerAPIMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) ControllerConfig() *MockControllerAPIControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerAPI)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerAPI)(nil).ControllerConfig)) + return &MockControllerAPIControllerConfigCall{Call: call} +} + +// MockControllerAPIControllerConfigCall wrap *gomock.Call +type MockControllerAPIControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIControllerConfigCall) Do(f func() (controller.Config, error)) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIControllerConfigCall) DoAndReturn(f func() (controller.Config, error)) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -95,7 +167,31 @@ func (m *MockControllerAPI) ModelConfig() (map[string]any, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockControllerAPIMockRecorder) ModelConfig() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) ModelConfig() *MockControllerAPIModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockControllerAPI)(nil).ModelConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockControllerAPI)(nil).ModelConfig)) + return &MockControllerAPIModelConfigCall{Call: call} +} + +// MockControllerAPIModelConfigCall wrap *gomock.Call +type MockControllerAPIModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIModelConfigCall) Return(arg0 map[string]any, arg1 error) *MockControllerAPIModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIModelConfigCall) Do(f func() (map[string]any, error)) *MockControllerAPIModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIModelConfigCall) DoAndReturn(f func() (map[string]any, error)) *MockControllerAPIModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/mocks/jujuclient_mock.go b/cmd/juju/commands/mocks/jujuclient_mock.go index b64597fc5e4..687643ebe47 100644 --- a/cmd/juju/commands/mocks/jujuclient_mock.go +++ b/cmd/juju/commands/mocks/jujuclient_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/jujuclient_mock.go github.com/juju/juju/jujuclient ClientStore,CookieJar +// mockgen -typed -package mocks -destination mocks/jujuclient_mock.go github.com/juju/juju/jujuclient ClientStore,CookieJar // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockClientStore) AccountDetails(arg0 string) (*jujuclient.AccountDetail } // AccountDetails indicates an expected call of AccountDetails. -func (mr *MockClientStoreMockRecorder) AccountDetails(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AccountDetails(arg0 any) *MockClientStoreAccountDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDetails", reflect.TypeOf((*MockClientStore)(nil).AccountDetails), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDetails", reflect.TypeOf((*MockClientStore)(nil).AccountDetails), arg0) + return &MockClientStoreAccountDetailsCall{Call: call} +} + +// MockClientStoreAccountDetailsCall wrap *gomock.Call +type MockClientStoreAccountDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAccountDetailsCall) Return(arg0 *jujuclient.AccountDetails, arg1 error) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAccountDetailsCall) Do(f func(string) (*jujuclient.AccountDetails, error)) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAccountDetailsCall) DoAndReturn(f func(string) (*jujuclient.AccountDetails, error)) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddController mocks base method. @@ -66,9 +90,33 @@ func (m *MockClientStore) AddController(arg0 string, arg1 jujuclient.ControllerD } // AddController indicates an expected call of AddController. -func (mr *MockClientStoreMockRecorder) AddController(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AddController(arg0, arg1 any) *MockClientStoreAddControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddController", reflect.TypeOf((*MockClientStore)(nil).AddController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddController", reflect.TypeOf((*MockClientStore)(nil).AddController), arg0, arg1) + return &MockClientStoreAddControllerCall{Call: call} +} + +// MockClientStoreAddControllerCall wrap *gomock.Call +type MockClientStoreAddControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAddControllerCall) Return(arg0 error) *MockClientStoreAddControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAddControllerCall) Do(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreAddControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAddControllerCall) DoAndReturn(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreAddControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllControllers mocks base method. @@ -81,9 +129,33 @@ func (m *MockClientStore) AllControllers() (map[string]jujuclient.ControllerDeta } // AllControllers indicates an expected call of AllControllers. -func (mr *MockClientStoreMockRecorder) AllControllers() *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllControllers() *MockClientStoreAllControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllControllers", reflect.TypeOf((*MockClientStore)(nil).AllControllers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllControllers", reflect.TypeOf((*MockClientStore)(nil).AllControllers)) + return &MockClientStoreAllControllersCall{Call: call} +} + +// MockClientStoreAllControllersCall wrap *gomock.Call +type MockClientStoreAllControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllControllersCall) Return(arg0 map[string]jujuclient.ControllerDetails, arg1 error) *MockClientStoreAllControllersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllControllersCall) Do(f func() (map[string]jujuclient.ControllerDetails, error)) *MockClientStoreAllControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllControllersCall) DoAndReturn(f func() (map[string]jujuclient.ControllerDetails, error)) *MockClientStoreAllControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllCredentials mocks base method. @@ -96,9 +168,33 @@ func (m *MockClientStore) AllCredentials() (map[string]cloud.CloudCredential, er } // AllCredentials indicates an expected call of AllCredentials. -func (mr *MockClientStoreMockRecorder) AllCredentials() *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllCredentials() *MockClientStoreAllCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockClientStore)(nil).AllCredentials)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockClientStore)(nil).AllCredentials)) + return &MockClientStoreAllCredentialsCall{Call: call} +} + +// MockClientStoreAllCredentialsCall wrap *gomock.Call +type MockClientStoreAllCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllCredentialsCall) Return(arg0 map[string]cloud.CloudCredential, arg1 error) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllCredentialsCall) Do(f func() (map[string]cloud.CloudCredential, error)) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllCredentialsCall) DoAndReturn(f func() (map[string]cloud.CloudCredential, error)) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModels mocks base method. @@ -111,9 +207,33 @@ func (m *MockClientStore) AllModels(arg0 string) (map[string]jujuclient.ModelDet } // AllModels indicates an expected call of AllModels. -func (mr *MockClientStoreMockRecorder) AllModels(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllModels(arg0 any) *MockClientStoreAllModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModels", reflect.TypeOf((*MockClientStore)(nil).AllModels), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModels", reflect.TypeOf((*MockClientStore)(nil).AllModels), arg0) + return &MockClientStoreAllModelsCall{Call: call} +} + +// MockClientStoreAllModelsCall wrap *gomock.Call +type MockClientStoreAllModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllModelsCall) Return(arg0 map[string]jujuclient.ModelDetails, arg1 error) *MockClientStoreAllModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllModelsCall) Do(f func(string) (map[string]jujuclient.ModelDetails, error)) *MockClientStoreAllModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllModelsCall) DoAndReturn(f func(string) (map[string]jujuclient.ModelDetails, error)) *MockClientStoreAllModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BootstrapConfigForController mocks base method. @@ -126,9 +246,33 @@ func (m *MockClientStore) BootstrapConfigForController(arg0 string) (*jujuclient } // BootstrapConfigForController indicates an expected call of BootstrapConfigForController. -func (mr *MockClientStoreMockRecorder) BootstrapConfigForController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) BootstrapConfigForController(arg0 any) *MockClientStoreBootstrapConfigForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BootstrapConfigForController", reflect.TypeOf((*MockClientStore)(nil).BootstrapConfigForController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BootstrapConfigForController", reflect.TypeOf((*MockClientStore)(nil).BootstrapConfigForController), arg0) + return &MockClientStoreBootstrapConfigForControllerCall{Call: call} +} + +// MockClientStoreBootstrapConfigForControllerCall wrap *gomock.Call +type MockClientStoreBootstrapConfigForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreBootstrapConfigForControllerCall) Return(arg0 *jujuclient.BootstrapConfig, arg1 error) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreBootstrapConfigForControllerCall) Do(f func(string) (*jujuclient.BootstrapConfig, error)) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreBootstrapConfigForControllerCall) DoAndReturn(f func(string) (*jujuclient.BootstrapConfig, error)) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerByAPIEndpoints mocks base method. @@ -146,9 +290,33 @@ func (m *MockClientStore) ControllerByAPIEndpoints(arg0 ...string) (*jujuclient. } // ControllerByAPIEndpoints indicates an expected call of ControllerByAPIEndpoints. -func (mr *MockClientStoreMockRecorder) ControllerByAPIEndpoints(arg0 ...any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ControllerByAPIEndpoints(arg0 ...any) *MockClientStoreControllerByAPIEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByAPIEndpoints", reflect.TypeOf((*MockClientStore)(nil).ControllerByAPIEndpoints), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByAPIEndpoints", reflect.TypeOf((*MockClientStore)(nil).ControllerByAPIEndpoints), arg0...) + return &MockClientStoreControllerByAPIEndpointsCall{Call: call} +} + +// MockClientStoreControllerByAPIEndpointsCall wrap *gomock.Call +type MockClientStoreControllerByAPIEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreControllerByAPIEndpointsCall) Return(arg0 *jujuclient.ControllerDetails, arg1 string, arg2 error) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreControllerByAPIEndpointsCall) Do(f func(...string) (*jujuclient.ControllerDetails, string, error)) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreControllerByAPIEndpointsCall) DoAndReturn(f func(...string) (*jujuclient.ControllerDetails, string, error)) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerByName mocks base method. @@ -161,9 +329,33 @@ func (m *MockClientStore) ControllerByName(arg0 string) (*jujuclient.ControllerD } // ControllerByName indicates an expected call of ControllerByName. -func (mr *MockClientStoreMockRecorder) ControllerByName(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ControllerByName(arg0 any) *MockClientStoreControllerByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByName", reflect.TypeOf((*MockClientStore)(nil).ControllerByName), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByName", reflect.TypeOf((*MockClientStore)(nil).ControllerByName), arg0) + return &MockClientStoreControllerByNameCall{Call: call} +} + +// MockClientStoreControllerByNameCall wrap *gomock.Call +type MockClientStoreControllerByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreControllerByNameCall) Return(arg0 *jujuclient.ControllerDetails, arg1 error) *MockClientStoreControllerByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreControllerByNameCall) Do(f func(string) (*jujuclient.ControllerDetails, error)) *MockClientStoreControllerByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreControllerByNameCall) DoAndReturn(f func(string) (*jujuclient.ControllerDetails, error)) *MockClientStoreControllerByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CookieJar mocks base method. @@ -176,9 +368,33 @@ func (m *MockClientStore) CookieJar(arg0 string) (jujuclient.CookieJar, error) { } // CookieJar indicates an expected call of CookieJar. -func (mr *MockClientStoreMockRecorder) CookieJar(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CookieJar(arg0 any) *MockClientStoreCookieJarCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieJar", reflect.TypeOf((*MockClientStore)(nil).CookieJar), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieJar", reflect.TypeOf((*MockClientStore)(nil).CookieJar), arg0) + return &MockClientStoreCookieJarCall{Call: call} +} + +// MockClientStoreCookieJarCall wrap *gomock.Call +type MockClientStoreCookieJarCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCookieJarCall) Return(arg0 jujuclient.CookieJar, arg1 error) *MockClientStoreCookieJarCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCookieJarCall) Do(f func(string) (jujuclient.CookieJar, error)) *MockClientStoreCookieJarCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCookieJarCall) DoAndReturn(f func(string) (jujuclient.CookieJar, error)) *MockClientStoreCookieJarCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialForCloud mocks base method. @@ -191,9 +407,33 @@ func (m *MockClientStore) CredentialForCloud(arg0 string) (*cloud.CloudCredentia } // CredentialForCloud indicates an expected call of CredentialForCloud. -func (mr *MockClientStoreMockRecorder) CredentialForCloud(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CredentialForCloud(arg0 any) *MockClientStoreCredentialForCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockClientStore)(nil).CredentialForCloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockClientStore)(nil).CredentialForCloud), arg0) + return &MockClientStoreCredentialForCloudCall{Call: call} +} + +// MockClientStoreCredentialForCloudCall wrap *gomock.Call +type MockClientStoreCredentialForCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCredentialForCloudCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCredentialForCloudCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCredentialForCloudCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentController mocks base method. @@ -206,9 +446,33 @@ func (m *MockClientStore) CurrentController() (string, error) { } // CurrentController indicates an expected call of CurrentController. -func (mr *MockClientStoreMockRecorder) CurrentController() *gomock.Call { +func (mr *MockClientStoreMockRecorder) CurrentController() *MockClientStoreCurrentControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentController", reflect.TypeOf((*MockClientStore)(nil).CurrentController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentController", reflect.TypeOf((*MockClientStore)(nil).CurrentController)) + return &MockClientStoreCurrentControllerCall{Call: call} +} + +// MockClientStoreCurrentControllerCall wrap *gomock.Call +type MockClientStoreCurrentControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCurrentControllerCall) Return(arg0 string, arg1 error) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCurrentControllerCall) Do(f func() (string, error)) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCurrentControllerCall) DoAndReturn(f func() (string, error)) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentModel mocks base method. @@ -221,9 +485,33 @@ func (m *MockClientStore) CurrentModel(arg0 string) (string, error) { } // CurrentModel indicates an expected call of CurrentModel. -func (mr *MockClientStoreMockRecorder) CurrentModel(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CurrentModel(arg0 any) *MockClientStoreCurrentModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentModel", reflect.TypeOf((*MockClientStore)(nil).CurrentModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentModel", reflect.TypeOf((*MockClientStore)(nil).CurrentModel), arg0) + return &MockClientStoreCurrentModelCall{Call: call} +} + +// MockClientStoreCurrentModelCall wrap *gomock.Call +type MockClientStoreCurrentModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCurrentModelCall) Return(arg0 string, arg1 error) *MockClientStoreCurrentModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCurrentModelCall) Do(f func(string) (string, error)) *MockClientStoreCurrentModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCurrentModelCall) DoAndReturn(f func(string) (string, error)) *MockClientStoreCurrentModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelByName mocks base method. @@ -236,9 +524,33 @@ func (m *MockClientStore) ModelByName(arg0, arg1 string) (*jujuclient.ModelDetai } // ModelByName indicates an expected call of ModelByName. -func (mr *MockClientStoreMockRecorder) ModelByName(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ModelByName(arg0, arg1 any) *MockClientStoreModelByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelByName", reflect.TypeOf((*MockClientStore)(nil).ModelByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelByName", reflect.TypeOf((*MockClientStore)(nil).ModelByName), arg0, arg1) + return &MockClientStoreModelByNameCall{Call: call} +} + +// MockClientStoreModelByNameCall wrap *gomock.Call +type MockClientStoreModelByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreModelByNameCall) Return(arg0 *jujuclient.ModelDetails, arg1 error) *MockClientStoreModelByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreModelByNameCall) Do(f func(string, string) (*jujuclient.ModelDetails, error)) *MockClientStoreModelByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreModelByNameCall) DoAndReturn(f func(string, string) (*jujuclient.ModelDetails, error)) *MockClientStoreModelByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAccount mocks base method. @@ -250,9 +562,33 @@ func (m *MockClientStore) RemoveAccount(arg0 string) error { } // RemoveAccount indicates an expected call of RemoveAccount. -func (mr *MockClientStoreMockRecorder) RemoveAccount(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveAccount(arg0 any) *MockClientStoreRemoveAccountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockClientStore)(nil).RemoveAccount), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockClientStore)(nil).RemoveAccount), arg0) + return &MockClientStoreRemoveAccountCall{Call: call} +} + +// MockClientStoreRemoveAccountCall wrap *gomock.Call +type MockClientStoreRemoveAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveAccountCall) Return(arg0 error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveAccountCall) Do(f func(string) error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveAccountCall) DoAndReturn(f func(string) error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveController mocks base method. @@ -264,9 +600,33 @@ func (m *MockClientStore) RemoveController(arg0 string) error { } // RemoveController indicates an expected call of RemoveController. -func (mr *MockClientStoreMockRecorder) RemoveController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveController(arg0 any) *MockClientStoreRemoveControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveController", reflect.TypeOf((*MockClientStore)(nil).RemoveController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveController", reflect.TypeOf((*MockClientStore)(nil).RemoveController), arg0) + return &MockClientStoreRemoveControllerCall{Call: call} +} + +// MockClientStoreRemoveControllerCall wrap *gomock.Call +type MockClientStoreRemoveControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveControllerCall) Return(arg0 error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveControllerCall) Do(f func(string) error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveControllerCall) DoAndReturn(f func(string) error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveModel mocks base method. @@ -278,9 +638,33 @@ func (m *MockClientStore) RemoveModel(arg0, arg1 string) error { } // RemoveModel indicates an expected call of RemoveModel. -func (mr *MockClientStoreMockRecorder) RemoveModel(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveModel(arg0, arg1 any) *MockClientStoreRemoveModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockClientStore)(nil).RemoveModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockClientStore)(nil).RemoveModel), arg0, arg1) + return &MockClientStoreRemoveModelCall{Call: call} +} + +// MockClientStoreRemoveModelCall wrap *gomock.Call +type MockClientStoreRemoveModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveModelCall) Return(arg0 error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveModelCall) Do(f func(string, string) error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveModelCall) DoAndReturn(f func(string, string) error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCurrentController mocks base method. @@ -292,9 +676,33 @@ func (m *MockClientStore) SetCurrentController(arg0 string) error { } // SetCurrentController indicates an expected call of SetCurrentController. -func (mr *MockClientStoreMockRecorder) SetCurrentController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetCurrentController(arg0 any) *MockClientStoreSetCurrentControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentController", reflect.TypeOf((*MockClientStore)(nil).SetCurrentController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentController", reflect.TypeOf((*MockClientStore)(nil).SetCurrentController), arg0) + return &MockClientStoreSetCurrentControllerCall{Call: call} +} + +// MockClientStoreSetCurrentControllerCall wrap *gomock.Call +type MockClientStoreSetCurrentControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetCurrentControllerCall) Return(arg0 error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetCurrentControllerCall) Do(f func(string) error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetCurrentControllerCall) DoAndReturn(f func(string) error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCurrentModel mocks base method. @@ -306,9 +714,33 @@ func (m *MockClientStore) SetCurrentModel(arg0, arg1 string) error { } // SetCurrentModel indicates an expected call of SetCurrentModel. -func (mr *MockClientStoreMockRecorder) SetCurrentModel(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetCurrentModel(arg0, arg1 any) *MockClientStoreSetCurrentModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentModel", reflect.TypeOf((*MockClientStore)(nil).SetCurrentModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentModel", reflect.TypeOf((*MockClientStore)(nil).SetCurrentModel), arg0, arg1) + return &MockClientStoreSetCurrentModelCall{Call: call} +} + +// MockClientStoreSetCurrentModelCall wrap *gomock.Call +type MockClientStoreSetCurrentModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetCurrentModelCall) Return(arg0 error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetCurrentModelCall) Do(f func(string, string) error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetCurrentModelCall) DoAndReturn(f func(string, string) error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModels mocks base method. @@ -320,9 +752,33 @@ func (m *MockClientStore) SetModels(arg0 string, arg1 map[string]jujuclient.Mode } // SetModels indicates an expected call of SetModels. -func (mr *MockClientStoreMockRecorder) SetModels(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetModels(arg0, arg1 any) *MockClientStoreSetModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModels", reflect.TypeOf((*MockClientStore)(nil).SetModels), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModels", reflect.TypeOf((*MockClientStore)(nil).SetModels), arg0, arg1) + return &MockClientStoreSetModelsCall{Call: call} +} + +// MockClientStoreSetModelsCall wrap *gomock.Call +type MockClientStoreSetModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetModelsCall) Return(arg0 error) *MockClientStoreSetModelsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetModelsCall) Do(f func(string, map[string]jujuclient.ModelDetails) error) *MockClientStoreSetModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetModelsCall) DoAndReturn(f func(string, map[string]jujuclient.ModelDetails) error) *MockClientStoreSetModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateAccount mocks base method. @@ -334,9 +790,33 @@ func (m *MockClientStore) UpdateAccount(arg0 string, arg1 jujuclient.AccountDeta } // UpdateAccount indicates an expected call of UpdateAccount. -func (mr *MockClientStoreMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateAccount(arg0, arg1 any) *MockClientStoreUpdateAccountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockClientStore)(nil).UpdateAccount), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockClientStore)(nil).UpdateAccount), arg0, arg1) + return &MockClientStoreUpdateAccountCall{Call: call} +} + +// MockClientStoreUpdateAccountCall wrap *gomock.Call +type MockClientStoreUpdateAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateAccountCall) Return(arg0 error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateAccountCall) Do(f func(string, jujuclient.AccountDetails) error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateAccountCall) DoAndReturn(f func(string, jujuclient.AccountDetails) error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateBootstrapConfig mocks base method. @@ -348,9 +828,33 @@ func (m *MockClientStore) UpdateBootstrapConfig(arg0 string, arg1 jujuclient.Boo } // UpdateBootstrapConfig indicates an expected call of UpdateBootstrapConfig. -func (mr *MockClientStoreMockRecorder) UpdateBootstrapConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateBootstrapConfig(arg0, arg1 any) *MockClientStoreUpdateBootstrapConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBootstrapConfig", reflect.TypeOf((*MockClientStore)(nil).UpdateBootstrapConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBootstrapConfig", reflect.TypeOf((*MockClientStore)(nil).UpdateBootstrapConfig), arg0, arg1) + return &MockClientStoreUpdateBootstrapConfigCall{Call: call} +} + +// MockClientStoreUpdateBootstrapConfigCall wrap *gomock.Call +type MockClientStoreUpdateBootstrapConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateBootstrapConfigCall) Return(arg0 error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateBootstrapConfigCall) Do(f func(string, jujuclient.BootstrapConfig) error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateBootstrapConfigCall) DoAndReturn(f func(string, jujuclient.BootstrapConfig) error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateController mocks base method. @@ -362,9 +866,33 @@ func (m *MockClientStore) UpdateController(arg0 string, arg1 jujuclient.Controll } // UpdateController indicates an expected call of UpdateController. -func (mr *MockClientStoreMockRecorder) UpdateController(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateController(arg0, arg1 any) *MockClientStoreUpdateControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateController", reflect.TypeOf((*MockClientStore)(nil).UpdateController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateController", reflect.TypeOf((*MockClientStore)(nil).UpdateController), arg0, arg1) + return &MockClientStoreUpdateControllerCall{Call: call} +} + +// MockClientStoreUpdateControllerCall wrap *gomock.Call +type MockClientStoreUpdateControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateControllerCall) Return(arg0 error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateControllerCall) Do(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateControllerCall) DoAndReturn(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCredential mocks base method. @@ -376,9 +904,33 @@ func (m *MockClientStore) UpdateCredential(arg0 string, arg1 cloud.CloudCredenti } // UpdateCredential indicates an expected call of UpdateCredential. -func (mr *MockClientStoreMockRecorder) UpdateCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateCredential(arg0, arg1 any) *MockClientStoreUpdateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockClientStore)(nil).UpdateCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockClientStore)(nil).UpdateCredential), arg0, arg1) + return &MockClientStoreUpdateCredentialCall{Call: call} +} + +// MockClientStoreUpdateCredentialCall wrap *gomock.Call +type MockClientStoreUpdateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateCredentialCall) Return(arg0 error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateCredentialCall) Do(f func(string, cloud.CloudCredential) error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateCredentialCall) DoAndReturn(f func(string, cloud.CloudCredential) error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateModel mocks base method. @@ -390,9 +942,33 @@ func (m *MockClientStore) UpdateModel(arg0, arg1 string, arg2 jujuclient.ModelDe } // UpdateModel indicates an expected call of UpdateModel. -func (mr *MockClientStoreMockRecorder) UpdateModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateModel(arg0, arg1, arg2 any) *MockClientStoreUpdateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModel", reflect.TypeOf((*MockClientStore)(nil).UpdateModel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModel", reflect.TypeOf((*MockClientStore)(nil).UpdateModel), arg0, arg1, arg2) + return &MockClientStoreUpdateModelCall{Call: call} +} + +// MockClientStoreUpdateModelCall wrap *gomock.Call +type MockClientStoreUpdateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateModelCall) Return(arg0 error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateModelCall) Do(f func(string, string, jujuclient.ModelDetails) error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateModelCall) DoAndReturn(f func(string, string, jujuclient.ModelDetails) error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCookieJar is a mock of CookieJar interface. @@ -427,9 +1003,33 @@ func (m *MockCookieJar) Cookies(arg0 *url.URL) []*http.Cookie { } // Cookies indicates an expected call of Cookies. -func (mr *MockCookieJarMockRecorder) Cookies(arg0 any) *gomock.Call { +func (mr *MockCookieJarMockRecorder) Cookies(arg0 any) *MockCookieJarCookiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cookies", reflect.TypeOf((*MockCookieJar)(nil).Cookies), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cookies", reflect.TypeOf((*MockCookieJar)(nil).Cookies), arg0) + return &MockCookieJarCookiesCall{Call: call} +} + +// MockCookieJarCookiesCall wrap *gomock.Call +type MockCookieJarCookiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCookieJarCookiesCall) Return(arg0 []*http.Cookie) *MockCookieJarCookiesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCookieJarCookiesCall) Do(f func(*url.URL) []*http.Cookie) *MockCookieJarCookiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCookieJarCookiesCall) DoAndReturn(f func(*url.URL) []*http.Cookie) *MockCookieJarCookiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAll mocks base method. @@ -439,9 +1039,33 @@ func (m *MockCookieJar) RemoveAll() { } // RemoveAll indicates an expected call of RemoveAll. -func (mr *MockCookieJarMockRecorder) RemoveAll() *gomock.Call { +func (mr *MockCookieJarMockRecorder) RemoveAll() *MockCookieJarRemoveAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockCookieJar)(nil).RemoveAll)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockCookieJar)(nil).RemoveAll)) + return &MockCookieJarRemoveAllCall{Call: call} +} + +// MockCookieJarRemoveAllCall wrap *gomock.Call +type MockCookieJarRemoveAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCookieJarRemoveAllCall) Return() *MockCookieJarRemoveAllCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCookieJarRemoveAllCall) Do(f func()) *MockCookieJarRemoveAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCookieJarRemoveAllCall) DoAndReturn(f func()) *MockCookieJarRemoveAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Save mocks base method. @@ -453,9 +1077,33 @@ func (m *MockCookieJar) Save() error { } // Save indicates an expected call of Save. -func (mr *MockCookieJarMockRecorder) Save() *gomock.Call { +func (mr *MockCookieJarMockRecorder) Save() *MockCookieJarSaveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockCookieJar)(nil).Save)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockCookieJar)(nil).Save)) + return &MockCookieJarSaveCall{Call: call} +} + +// MockCookieJarSaveCall wrap *gomock.Call +type MockCookieJarSaveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCookieJarSaveCall) Return(arg0 error) *MockCookieJarSaveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCookieJarSaveCall) Do(f func() error) *MockCookieJarSaveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCookieJarSaveCall) DoAndReturn(f func() error) *MockCookieJarSaveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCookies mocks base method. @@ -465,7 +1113,31 @@ func (m *MockCookieJar) SetCookies(arg0 *url.URL, arg1 []*http.Cookie) { } // SetCookies indicates an expected call of SetCookies. -func (mr *MockCookieJarMockRecorder) SetCookies(arg0, arg1 any) *gomock.Call { +func (mr *MockCookieJarMockRecorder) SetCookies(arg0, arg1 any) *MockCookieJarSetCookiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCookies", reflect.TypeOf((*MockCookieJar)(nil).SetCookies), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCookies", reflect.TypeOf((*MockCookieJar)(nil).SetCookies), arg0, arg1) + return &MockCookieJarSetCookiesCall{Call: call} +} + +// MockCookieJarSetCookiesCall wrap *gomock.Call +type MockCookieJarSetCookiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCookieJarSetCookiesCall) Return() *MockCookieJarSetCookiesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCookieJarSetCookiesCall) Do(f func(*url.URL, []*http.Cookie)) *MockCookieJarSetCookiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCookieJarSetCookiesCall) DoAndReturn(f func(*url.URL, []*http.Cookie)) *MockCookieJarSetCookiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/mocks/modelconfig_mock.go b/cmd/juju/commands/mocks/modelconfig_mock.go index ff1c40c3ae2..2f670408396 100644 --- a/cmd/juju/commands/mocks/modelconfig_mock.go +++ b/cmd/juju/commands/mocks/modelconfig_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/juju/commands ModelConfigAPI +// mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/juju/commands ModelConfigAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockModelConfigAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockModelConfigAPIMockRecorder) Close() *gomock.Call { +func (mr *MockModelConfigAPIMockRecorder) Close() *MockModelConfigAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigAPI)(nil).Close)) + return &MockModelConfigAPICloseCall{Call: call} +} + +// MockModelConfigAPICloseCall wrap *gomock.Call +type MockModelConfigAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigAPICloseCall) Return(arg0 error) *MockModelConfigAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigAPICloseCall) Do(f func() error) *MockModelConfigAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigAPICloseCall) DoAndReturn(f func() error) *MockModelConfigAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelGet mocks base method. @@ -62,7 +86,31 @@ func (m *MockModelConfigAPI) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockModelConfigAPIMockRecorder) ModelGet() *gomock.Call { +func (mr *MockModelConfigAPIMockRecorder) ModelGet() *MockModelConfigAPIModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + return &MockModelConfigAPIModelGetCall{Call: call} +} + +// MockModelConfigAPIModelGetCall wrap *gomock.Call +type MockModelConfigAPIModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigAPIModelGetCall) Return(arg0 map[string]any, arg1 error) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigAPIModelGetCall) Do(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigAPIModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/mocks/modelupgrader_mock.go b/cmd/juju/commands/mocks/modelupgrader_mock.go index 93305b28e86..2ebafaab8b8 100644 --- a/cmd/juju/commands/mocks/modelupgrader_mock.go +++ b/cmd/juju/commands/mocks/modelupgrader_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelupgrader_mock.go github.com/juju/juju/cmd/juju/commands ModelUpgraderAPI +// mockgen -typed -package mocks -destination mocks/modelupgrader_mock.go github.com/juju/juju/cmd/juju/commands ModelUpgraderAPI // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockModelUpgraderAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockModelUpgraderAPIMockRecorder) Close() *gomock.Call { +func (mr *MockModelUpgraderAPIMockRecorder) Close() *MockModelUpgraderAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelUpgraderAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelUpgraderAPI)(nil).Close)) + return &MockModelUpgraderAPICloseCall{Call: call} +} + +// MockModelUpgraderAPICloseCall wrap *gomock.Call +type MockModelUpgraderAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUpgraderAPICloseCall) Return(arg0 error) *MockModelUpgraderAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUpgraderAPICloseCall) Do(f func() error) *MockModelUpgraderAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUpgraderAPICloseCall) DoAndReturn(f func() error) *MockModelUpgraderAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeModel mocks base method. @@ -66,9 +90,33 @@ func (m *MockModelUpgraderAPI) UpgradeModel(arg0 string, arg1 version.Number, ar } // UpgradeModel indicates an expected call of UpgradeModel. -func (mr *MockModelUpgraderAPIMockRecorder) UpgradeModel(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockModelUpgraderAPIMockRecorder) UpgradeModel(arg0, arg1, arg2, arg3, arg4 any) *MockModelUpgraderAPIUpgradeModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeModel", reflect.TypeOf((*MockModelUpgraderAPI)(nil).UpgradeModel), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeModel", reflect.TypeOf((*MockModelUpgraderAPI)(nil).UpgradeModel), arg0, arg1, arg2, arg3, arg4) + return &MockModelUpgraderAPIUpgradeModelCall{Call: call} +} + +// MockModelUpgraderAPIUpgradeModelCall wrap *gomock.Call +type MockModelUpgraderAPIUpgradeModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUpgraderAPIUpgradeModelCall) Return(arg0 version.Number, arg1 error) *MockModelUpgraderAPIUpgradeModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUpgraderAPIUpgradeModelCall) Do(f func(string, version.Number, string, bool, bool) (version.Number, error)) *MockModelUpgraderAPIUpgradeModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUpgraderAPIUpgradeModelCall) DoAndReturn(f func(string, version.Number, string, bool, bool) (version.Number, error)) *MockModelUpgraderAPIUpgradeModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UploadTools mocks base method. @@ -81,7 +129,31 @@ func (m *MockModelUpgraderAPI) UploadTools(arg0 context.Context, arg1 io.ReadSee } // UploadTools indicates an expected call of UploadTools. -func (mr *MockModelUpgraderAPIMockRecorder) UploadTools(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelUpgraderAPIMockRecorder) UploadTools(arg0, arg1, arg2 any) *MockModelUpgraderAPIUploadToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadTools", reflect.TypeOf((*MockModelUpgraderAPI)(nil).UploadTools), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadTools", reflect.TypeOf((*MockModelUpgraderAPI)(nil).UploadTools), arg0, arg1, arg2) + return &MockModelUpgraderAPIUploadToolsCall{Call: call} +} + +// MockModelUpgraderAPIUploadToolsCall wrap *gomock.Call +type MockModelUpgraderAPIUploadToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUpgraderAPIUploadToolsCall) Return(arg0 tools.List, arg1 error) *MockModelUpgraderAPIUploadToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUpgraderAPIUploadToolsCall) Do(f func(context.Context, io.ReadSeeker, version.Binary) (tools.List, error)) *MockModelUpgraderAPIUploadToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUpgraderAPIUploadToolsCall) DoAndReturn(f func(context.Context, io.ReadSeeker, version.Binary) (tools.List, error)) *MockModelUpgraderAPIUploadToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/mocks/synctool_mock.go b/cmd/juju/commands/mocks/synctool_mock.go index 8cac3ad3575..ee614c3bceb 100644 --- a/cmd/juju/commands/mocks/synctool_mock.go +++ b/cmd/juju/commands/mocks/synctool_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/synctool_mock.go github.com/juju/juju/cmd/juju/commands SyncToolAPI +// mockgen -typed -package mocks -destination mocks/synctool_mock.go github.com/juju/juju/cmd/juju/commands SyncToolAPI // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockSyncToolAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockSyncToolAPIMockRecorder) Close() *gomock.Call { +func (mr *MockSyncToolAPIMockRecorder) Close() *MockSyncToolAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSyncToolAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSyncToolAPI)(nil).Close)) + return &MockSyncToolAPICloseCall{Call: call} +} + +// MockSyncToolAPICloseCall wrap *gomock.Call +type MockSyncToolAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSyncToolAPICloseCall) Return(arg0 error) *MockSyncToolAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSyncToolAPICloseCall) Do(f func() error) *MockSyncToolAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSyncToolAPICloseCall) DoAndReturn(f func() error) *MockSyncToolAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UploadTools mocks base method. @@ -66,7 +90,31 @@ func (m *MockSyncToolAPI) UploadTools(arg0 context.Context, arg1 io.ReadSeeker, } // UploadTools indicates an expected call of UploadTools. -func (mr *MockSyncToolAPIMockRecorder) UploadTools(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncToolAPIMockRecorder) UploadTools(arg0, arg1, arg2 any) *MockSyncToolAPIUploadToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadTools", reflect.TypeOf((*MockSyncToolAPI)(nil).UploadTools), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadTools", reflect.TypeOf((*MockSyncToolAPI)(nil).UploadTools), arg0, arg1, arg2) + return &MockSyncToolAPIUploadToolsCall{Call: call} +} + +// MockSyncToolAPIUploadToolsCall wrap *gomock.Call +type MockSyncToolAPIUploadToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSyncToolAPIUploadToolsCall) Return(arg0 tools.List, arg1 error) *MockSyncToolAPIUploadToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSyncToolAPIUploadToolsCall) Do(f func(context.Context, io.ReadSeeker, version.Binary) (tools.List, error)) *MockSyncToolAPIUploadToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSyncToolAPIUploadToolsCall) DoAndReturn(f func(context.Context, io.ReadSeeker, version.Binary) (tools.List, error)) *MockSyncToolAPIUploadToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/commands/package_test.go b/cmd/juju/commands/package_test.go index 2e3c6bb2d34..72859fa396d 100644 --- a/cmd/juju/commands/package_test.go +++ b/cmd/juju/commands/package_test.go @@ -9,12 +9,12 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package commands -destination mockenvirons_test.go github.com/juju/juju/environs Environ,PrecheckJujuUpgradeStep -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/controller_mock.go github.com/juju/juju/cmd/juju/commands ControllerAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelupgrader_mock.go github.com/juju/juju/cmd/juju/commands ModelUpgraderAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/synctool_mock.go github.com/juju/juju/cmd/juju/commands SyncToolAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/juju/commands ModelConfigAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/jujuclient_mock.go github.com/juju/juju/jujuclient ClientStore,CookieJar +//go:generate go run go.uber.org/mock/mockgen -typed -package commands -destination mockenvirons_test.go github.com/juju/juju/environs Environ,PrecheckJujuUpgradeStep +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/controller_mock.go github.com/juju/juju/cmd/juju/commands ControllerAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelupgrader_mock.go github.com/juju/juju/cmd/juju/commands ModelUpgraderAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/synctool_mock.go github.com/juju/juju/cmd/juju/commands SyncToolAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/juju/commands ModelConfigAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/jujuclient_mock.go github.com/juju/juju/jujuclient ClientStore,CookieJar func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/common/cloudcredential.go b/cmd/juju/common/cloudcredential.go index 3b0c3935daf..a949735eea7 100644 --- a/cmd/juju/common/cloudcredential.go +++ b/cmd/juju/common/cloudcredential.go @@ -24,7 +24,7 @@ import ( // detected, meaning Juju cannot choose one automatically. var ErrMultipleDetectedCredentials = errors.New("multiple detected credentials") -//go:generate go run go.uber.org/mock/mockgen -package common -destination credentialstore_mock_test.go github.com/juju/juju/jujuclient CredentialStore +//go:generate go run go.uber.org/mock/mockgen -typed -package common -destination credentialstore_mock_test.go github.com/juju/juju/jujuclient CredentialStore // RegisterCredentials will attempt to register any credentials that a provider // has to offer. @@ -189,7 +189,7 @@ func OutputUpdateCredentialModelResult(ctx *cmd.Context, models []params.UpdateC } } -//go:generate go run go.uber.org/mock/mockgen -package common -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/juju/common TestCloudProvider +//go:generate go run go.uber.org/mock/mockgen -typed -package common -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/juju/common TestCloudProvider // TestCloudProvider is used for testing. type TestCloudProvider interface { diff --git a/cmd/juju/common/cloudprovider_mock_test.go b/cmd/juju/common/cloudprovider_mock_test.go index 9b712b69931..a1d9d9c4f00 100644 --- a/cmd/juju/common/cloudprovider_mock_test.go +++ b/cmd/juju/common/cloudprovider_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package common -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/juju/common TestCloudProvider +// mockgen -typed -package common -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/juju/common TestCloudProvider // // Package common is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockTestCloudProvider) CloudSchema() *jsonschema.Schema { } // CloudSchema indicates an expected call of CloudSchema. -func (mr *MockTestCloudProviderMockRecorder) CloudSchema() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) CloudSchema() *MockTestCloudProviderCloudSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockTestCloudProvider)(nil).CloudSchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockTestCloudProvider)(nil).CloudSchema)) + return &MockTestCloudProviderCloudSchemaCall{Call: call} +} + +// MockTestCloudProviderCloudSchemaCall wrap *gomock.Call +type MockTestCloudProviderCloudSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderCloudSchemaCall) Return(arg0 *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderCloudSchemaCall) Do(f func() *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderCloudSchemaCall) DoAndReturn(f func() *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialSchemas mocks base method. @@ -67,9 +91,33 @@ func (m *MockTestCloudProvider) CredentialSchemas() map[cloud.AuthType]cloud.Cre } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockTestCloudProviderMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) CredentialSchemas() *MockTestCloudProviderCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockTestCloudProvider)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockTestCloudProvider)(nil).CredentialSchemas)) + return &MockTestCloudProviderCredentialSchemasCall{Call: call} +} + +// MockTestCloudProviderCredentialSchemasCall wrap *gomock.Call +type MockTestCloudProviderCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -82,9 +130,33 @@ func (m *MockTestCloudProvider) DetectCredentials(arg0 string) (*cloud.CloudCred } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockTestCloudProviderMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) DetectCredentials(arg0 any) *MockTestCloudProviderDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).DetectCredentials), arg0) + return &MockTestCloudProviderDetectCredentialsCall{Call: call} +} + +// MockTestCloudProviderDetectCredentialsCall wrap *gomock.Call +type MockTestCloudProviderDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -97,9 +169,33 @@ func (m *MockTestCloudProvider) FinalizeCredential(arg0 environs.FinalizeCredent } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockTestCloudProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *MockTestCloudProviderFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockTestCloudProvider)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockTestCloudProvider)(nil).FinalizeCredential), arg0, arg1) + return &MockTestCloudProviderFinalizeCredentialCall{Call: call} +} + +// MockTestCloudProviderFinalizeCredentialCall wrap *gomock.Call +type MockTestCloudProviderFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -111,9 +207,33 @@ func (m *MockTestCloudProvider) Ping(arg0 envcontext.ProviderCallContext, arg1 s } // Ping indicates an expected call of Ping. -func (mr *MockTestCloudProviderMockRecorder) Ping(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Ping(arg0, arg1 any) *MockTestCloudProviderPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockTestCloudProvider)(nil).Ping), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockTestCloudProvider)(nil).Ping), arg0, arg1) + return &MockTestCloudProviderPingCall{Call: call} +} + +// MockTestCloudProviderPingCall wrap *gomock.Call +type MockTestCloudProviderPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderPingCall) Return(arg0 error) *MockTestCloudProviderPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderPingCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockTestCloudProviderPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderPingCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockTestCloudProviderPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareConfig mocks base method. @@ -126,9 +246,33 @@ func (m *MockTestCloudProvider) PrepareConfig(arg0 context.Context, arg1 environ } // PrepareConfig indicates an expected call of PrepareConfig. -func (mr *MockTestCloudProviderMockRecorder) PrepareConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) PrepareConfig(arg0, arg1 any) *MockTestCloudProviderPrepareConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockTestCloudProvider)(nil).PrepareConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockTestCloudProvider)(nil).PrepareConfig), arg0, arg1) + return &MockTestCloudProviderPrepareConfigCall{Call: call} +} + +// MockTestCloudProviderPrepareConfigCall wrap *gomock.Call +type MockTestCloudProviderPrepareConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderPrepareConfigCall) Return(arg0 *config.Config, arg1 error) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderPrepareConfigCall) Do(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderPrepareConfigCall) DoAndReturn(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RegisterCredentials mocks base method. @@ -141,9 +285,33 @@ func (m *MockTestCloudProvider) RegisterCredentials(arg0 cloud.Cloud) (map[strin } // RegisterCredentials indicates an expected call of RegisterCredentials. -func (mr *MockTestCloudProviderMockRecorder) RegisterCredentials(arg0 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) RegisterCredentials(arg0 any) *MockTestCloudProviderRegisterCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).RegisterCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).RegisterCredentials), arg0) + return &MockTestCloudProviderRegisterCredentialsCall{Call: call} +} + +// MockTestCloudProviderRegisterCredentialsCall wrap *gomock.Call +type MockTestCloudProviderRegisterCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderRegisterCredentialsCall) Return(arg0 map[string]*cloud.CloudCredential, arg1 error) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderRegisterCredentialsCall) Do(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderRegisterCredentialsCall) DoAndReturn(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -156,9 +324,33 @@ func (m *MockTestCloudProvider) Validate(arg0 context.Context, arg1, arg2 *confi } // Validate indicates an expected call of Validate. -func (mr *MockTestCloudProviderMockRecorder) Validate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Validate(arg0, arg1, arg2 any) *MockTestCloudProviderValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockTestCloudProvider)(nil).Validate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockTestCloudProvider)(nil).Validate), arg0, arg1, arg2) + return &MockTestCloudProviderValidateCall{Call: call} +} + +// MockTestCloudProviderValidateCall wrap *gomock.Call +type MockTestCloudProviderValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderValidateCall) Return(arg0 *config.Config, arg1 error) *MockTestCloudProviderValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderValidateCall) Do(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockTestCloudProviderValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderValidateCall) DoAndReturn(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockTestCloudProviderValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -170,7 +362,31 @@ func (m *MockTestCloudProvider) Version() int { } // Version indicates an expected call of Version. -func (mr *MockTestCloudProviderMockRecorder) Version() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Version() *MockTestCloudProviderVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockTestCloudProvider)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockTestCloudProvider)(nil).Version)) + return &MockTestCloudProviderVersionCall{Call: call} +} + +// MockTestCloudProviderVersionCall wrap *gomock.Call +type MockTestCloudProviderVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderVersionCall) Return(arg0 int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderVersionCall) Do(f func() int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderVersionCall) DoAndReturn(f func() int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/common/credentialstore_mock_test.go b/cmd/juju/common/credentialstore_mock_test.go index 09f404e774d..2b5e4998334 100644 --- a/cmd/juju/common/credentialstore_mock_test.go +++ b/cmd/juju/common/credentialstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package common -destination credentialstore_mock_test.go github.com/juju/juju/jujuclient CredentialStore +// mockgen -typed -package common -destination credentialstore_mock_test.go github.com/juju/juju/jujuclient CredentialStore // // Package common is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockCredentialStore) AllCredentials() (map[string]cloud.CloudCredential } // AllCredentials indicates an expected call of AllCredentials. -func (mr *MockCredentialStoreMockRecorder) AllCredentials() *gomock.Call { +func (mr *MockCredentialStoreMockRecorder) AllCredentials() *MockCredentialStoreAllCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockCredentialStore)(nil).AllCredentials)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockCredentialStore)(nil).AllCredentials)) + return &MockCredentialStoreAllCredentialsCall{Call: call} +} + +// MockCredentialStoreAllCredentialsCall wrap *gomock.Call +type MockCredentialStoreAllCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialStoreAllCredentialsCall) Return(arg0 map[string]cloud.CloudCredential, arg1 error) *MockCredentialStoreAllCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialStoreAllCredentialsCall) Do(f func() (map[string]cloud.CloudCredential, error)) *MockCredentialStoreAllCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialStoreAllCredentialsCall) DoAndReturn(f func() (map[string]cloud.CloudCredential, error)) *MockCredentialStoreAllCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialForCloud mocks base method. @@ -64,9 +88,33 @@ func (m *MockCredentialStore) CredentialForCloud(arg0 string) (*cloud.CloudCrede } // CredentialForCloud indicates an expected call of CredentialForCloud. -func (mr *MockCredentialStoreMockRecorder) CredentialForCloud(arg0 any) *gomock.Call { +func (mr *MockCredentialStoreMockRecorder) CredentialForCloud(arg0 any) *MockCredentialStoreCredentialForCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockCredentialStore)(nil).CredentialForCloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockCredentialStore)(nil).CredentialForCloud), arg0) + return &MockCredentialStoreCredentialForCloudCall{Call: call} +} + +// MockCredentialStoreCredentialForCloudCall wrap *gomock.Call +type MockCredentialStoreCredentialForCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialStoreCredentialForCloudCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockCredentialStoreCredentialForCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialStoreCredentialForCloudCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockCredentialStoreCredentialForCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialStoreCredentialForCloudCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockCredentialStoreCredentialForCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCredential mocks base method. @@ -78,7 +126,31 @@ func (m *MockCredentialStore) UpdateCredential(arg0 string, arg1 cloud.CloudCred } // UpdateCredential indicates an expected call of UpdateCredential. -func (mr *MockCredentialStoreMockRecorder) UpdateCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialStoreMockRecorder) UpdateCredential(arg0, arg1 any) *MockCredentialStoreUpdateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockCredentialStore)(nil).UpdateCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockCredentialStore)(nil).UpdateCredential), arg0, arg1) + return &MockCredentialStoreUpdateCredentialCall{Call: call} +} + +// MockCredentialStoreUpdateCredentialCall wrap *gomock.Call +type MockCredentialStoreUpdateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialStoreUpdateCredentialCall) Return(arg0 error) *MockCredentialStoreUpdateCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialStoreUpdateCredentialCall) Do(f func(string, cloud.CloudCredential) error) *MockCredentialStoreUpdateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialStoreUpdateCredentialCall) DoAndReturn(f func(string, cloud.CloudCredential) error) *MockCredentialStoreUpdateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/machine/mocks/modelconfig_api_mock.go b/cmd/juju/machine/mocks/modelconfig_api_mock.go index 0d74b2aac23..f6da993cdb3 100644 --- a/cmd/juju/machine/mocks/modelconfig_api_mock.go +++ b/cmd/juju/machine/mocks/modelconfig_api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelconfig_api_mock.go github.com/juju/juju/cmd/juju/machine ModelConfigAPI +// mockgen -typed -package mocks -destination mocks/modelconfig_api_mock.go github.com/juju/juju/cmd/juju/machine ModelConfigAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockModelConfigAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockModelConfigAPIMockRecorder) Close() *gomock.Call { +func (mr *MockModelConfigAPIMockRecorder) Close() *MockModelConfigAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockModelConfigAPI)(nil).Close)) + return &MockModelConfigAPICloseCall{Call: call} +} + +// MockModelConfigAPICloseCall wrap *gomock.Call +type MockModelConfigAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigAPICloseCall) Return(arg0 error) *MockModelConfigAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigAPICloseCall) Do(f func() error) *MockModelConfigAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigAPICloseCall) DoAndReturn(f func() error) *MockModelConfigAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelGet mocks base method. @@ -62,7 +86,31 @@ func (m *MockModelConfigAPI) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockModelConfigAPIMockRecorder) ModelGet() *gomock.Call { +func (mr *MockModelConfigAPIMockRecorder) ModelGet() *MockModelConfigAPIModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + return &MockModelConfigAPIModelGetCall{Call: call} +} + +// MockModelConfigAPIModelGetCall wrap *gomock.Call +type MockModelConfigAPIModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigAPIModelGetCall) Return(arg0 map[string]any, arg1 error) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigAPIModelGetCall) Do(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigAPIModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/machine/mocks/removemachine_api_mock.go b/cmd/juju/machine/mocks/removemachine_api_mock.go index 401e5d0b1e1..73b898fcb57 100644 --- a/cmd/juju/machine/mocks/removemachine_api_mock.go +++ b/cmd/juju/machine/mocks/removemachine_api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/removemachine_api_mock.go github.com/juju/juju/cmd/juju/machine RemoveMachineAPI +// mockgen -typed -package mocks -destination mocks/removemachine_api_mock.go github.com/juju/juju/cmd/juju/machine RemoveMachineAPI // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockRemoveMachineAPI) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockRemoveMachineAPIMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockRemoveMachineAPIMockRecorder) BestAPIVersion() *MockRemoveMachineAPIBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockRemoveMachineAPI)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockRemoveMachineAPI)(nil).BestAPIVersion)) + return &MockRemoveMachineAPIBestAPIVersionCall{Call: call} +} + +// MockRemoveMachineAPIBestAPIVersionCall wrap *gomock.Call +type MockRemoveMachineAPIBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveMachineAPIBestAPIVersionCall) Return(arg0 int) *MockRemoveMachineAPIBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveMachineAPIBestAPIVersionCall) Do(f func() int) *MockRemoveMachineAPIBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveMachineAPIBestAPIVersionCall) DoAndReturn(f func() int) *MockRemoveMachineAPIBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -63,9 +87,33 @@ func (m *MockRemoveMachineAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRemoveMachineAPIMockRecorder) Close() *gomock.Call { +func (mr *MockRemoveMachineAPIMockRecorder) Close() *MockRemoveMachineAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveMachineAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveMachineAPI)(nil).Close)) + return &MockRemoveMachineAPICloseCall{Call: call} +} + +// MockRemoveMachineAPICloseCall wrap *gomock.Call +type MockRemoveMachineAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveMachineAPICloseCall) Return(arg0 error) *MockRemoveMachineAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveMachineAPICloseCall) Do(f func() error) *MockRemoveMachineAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveMachineAPICloseCall) DoAndReturn(f func() error) *MockRemoveMachineAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyMachinesWithParams mocks base method. @@ -82,8 +130,32 @@ func (m *MockRemoveMachineAPI) DestroyMachinesWithParams(arg0, arg1, arg2 bool, } // DestroyMachinesWithParams indicates an expected call of DestroyMachinesWithParams. -func (mr *MockRemoveMachineAPIMockRecorder) DestroyMachinesWithParams(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { +func (mr *MockRemoveMachineAPIMockRecorder) DestroyMachinesWithParams(arg0, arg1, arg2, arg3 any, arg4 ...any) *MockRemoveMachineAPIDestroyMachinesWithParamsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyMachinesWithParams", reflect.TypeOf((*MockRemoveMachineAPI)(nil).DestroyMachinesWithParams), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyMachinesWithParams", reflect.TypeOf((*MockRemoveMachineAPI)(nil).DestroyMachinesWithParams), varargs...) + return &MockRemoveMachineAPIDestroyMachinesWithParamsCall{Call: call} +} + +// MockRemoveMachineAPIDestroyMachinesWithParamsCall wrap *gomock.Call +type MockRemoveMachineAPIDestroyMachinesWithParamsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveMachineAPIDestroyMachinesWithParamsCall) Return(arg0 []params.DestroyMachineResult, arg1 error) *MockRemoveMachineAPIDestroyMachinesWithParamsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveMachineAPIDestroyMachinesWithParamsCall) Do(f func(bool, bool, bool, *time.Duration, ...string) ([]params.DestroyMachineResult, error)) *MockRemoveMachineAPIDestroyMachinesWithParamsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveMachineAPIDestroyMachinesWithParamsCall) DoAndReturn(f func(bool, bool, bool, *time.Duration, ...string) ([]params.DestroyMachineResult, error)) *MockRemoveMachineAPIDestroyMachinesWithParamsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/machine/mocks/status_api_mock.go b/cmd/juju/machine/mocks/status_api_mock.go index f3232b00bf4..896b6a9181e 100644 --- a/cmd/juju/machine/mocks/status_api_mock.go +++ b/cmd/juju/machine/mocks/status_api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/status_api_mock.go github.com/juju/juju/cmd/juju/machine StatusAPI +// mockgen -typed -package mocks -destination mocks/status_api_mock.go github.com/juju/juju/cmd/juju/machine StatusAPI // // Package mocks is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockStatusAPI) Status(arg0 *client.StatusArgs) (*params.FullStatus, err } // Status indicates an expected call of Status. -func (mr *MockStatusAPIMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockStatusAPIMockRecorder) Status(arg0 any) *MockStatusAPIStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockStatusAPI)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockStatusAPI)(nil).Status), arg0) + return &MockStatusAPIStatusCall{Call: call} +} + +// MockStatusAPIStatusCall wrap *gomock.Call +type MockStatusAPIStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusAPIStatusCall) Return(arg0 *params.FullStatus, arg1 error) *MockStatusAPIStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusAPIStatusCall) Do(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockStatusAPIStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusAPIStatusCall) DoAndReturn(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockStatusAPIStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/machine/mocks/upgrademachine_api_mock.go b/cmd/juju/machine/mocks/upgrademachine_api_mock.go index 5a550bfa036..cacb85dcca6 100644 --- a/cmd/juju/machine/mocks/upgrademachine_api_mock.go +++ b/cmd/juju/machine/mocks/upgrademachine_api_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/upgrademachine_api_mock.go github.com/juju/juju/cmd/juju/machine UpgradeMachineAPI +// mockgen -typed -package mocks -destination mocks/upgrademachine_api_mock.go github.com/juju/juju/cmd/juju/machine UpgradeMachineAPI // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockUpgradeMachineAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockUpgradeMachineAPIMockRecorder) Close() *gomock.Call { +func (mr *MockUpgradeMachineAPIMockRecorder) Close() *MockUpgradeMachineAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).Close)) + return &MockUpgradeMachineAPICloseCall{Call: call} +} + +// MockUpgradeMachineAPICloseCall wrap *gomock.Call +type MockUpgradeMachineAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeMachineAPICloseCall) Return(arg0 error) *MockUpgradeMachineAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeMachineAPICloseCall) Do(f func() error) *MockUpgradeMachineAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeMachineAPICloseCall) DoAndReturn(f func() error) *MockUpgradeMachineAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUpgradeSeriesMessages mocks base method. @@ -63,9 +87,33 @@ func (m *MockUpgradeMachineAPI) GetUpgradeSeriesMessages(arg0, arg1 string) ([]s } // GetUpgradeSeriesMessages indicates an expected call of GetUpgradeSeriesMessages. -func (mr *MockUpgradeMachineAPIMockRecorder) GetUpgradeSeriesMessages(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeMachineAPIMockRecorder) GetUpgradeSeriesMessages(arg0, arg1 any) *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpgradeSeriesMessages", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).GetUpgradeSeriesMessages), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpgradeSeriesMessages", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).GetUpgradeSeriesMessages), arg0, arg1) + return &MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall{Call: call} +} + +// MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall wrap *gomock.Call +type MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall) Return(arg0 []string, arg1 error) *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall) Do(f func(string, string) ([]string, error)) *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall) DoAndReturn(f func(string, string) ([]string, error)) *MockUpgradeMachineAPIGetUpgradeSeriesMessagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesComplete mocks base method. @@ -77,9 +125,33 @@ func (m *MockUpgradeMachineAPI) UpgradeSeriesComplete(arg0 string) error { } // UpgradeSeriesComplete indicates an expected call of UpgradeSeriesComplete. -func (mr *MockUpgradeMachineAPIMockRecorder) UpgradeSeriesComplete(arg0 any) *gomock.Call { +func (mr *MockUpgradeMachineAPIMockRecorder) UpgradeSeriesComplete(arg0 any) *MockUpgradeMachineAPIUpgradeSeriesCompleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesComplete", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).UpgradeSeriesComplete), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesComplete", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).UpgradeSeriesComplete), arg0) + return &MockUpgradeMachineAPIUpgradeSeriesCompleteCall{Call: call} +} + +// MockUpgradeMachineAPIUpgradeSeriesCompleteCall wrap *gomock.Call +type MockUpgradeMachineAPIUpgradeSeriesCompleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeMachineAPIUpgradeSeriesCompleteCall) Return(arg0 error) *MockUpgradeMachineAPIUpgradeSeriesCompleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeMachineAPIUpgradeSeriesCompleteCall) Do(f func(string) error) *MockUpgradeMachineAPIUpgradeSeriesCompleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeMachineAPIUpgradeSeriesCompleteCall) DoAndReturn(f func(string) error) *MockUpgradeMachineAPIUpgradeSeriesCompleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesPrepare mocks base method. @@ -91,9 +163,33 @@ func (m *MockUpgradeMachineAPI) UpgradeSeriesPrepare(arg0, arg1 string, arg2 boo } // UpgradeSeriesPrepare indicates an expected call of UpgradeSeriesPrepare. -func (mr *MockUpgradeMachineAPIMockRecorder) UpgradeSeriesPrepare(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeMachineAPIMockRecorder) UpgradeSeriesPrepare(arg0, arg1, arg2 any) *MockUpgradeMachineAPIUpgradeSeriesPrepareCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesPrepare", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).UpgradeSeriesPrepare), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesPrepare", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).UpgradeSeriesPrepare), arg0, arg1, arg2) + return &MockUpgradeMachineAPIUpgradeSeriesPrepareCall{Call: call} +} + +// MockUpgradeMachineAPIUpgradeSeriesPrepareCall wrap *gomock.Call +type MockUpgradeMachineAPIUpgradeSeriesPrepareCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeMachineAPIUpgradeSeriesPrepareCall) Return(arg0 error) *MockUpgradeMachineAPIUpgradeSeriesPrepareCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeMachineAPIUpgradeSeriesPrepareCall) Do(f func(string, string, bool) error) *MockUpgradeMachineAPIUpgradeSeriesPrepareCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeMachineAPIUpgradeSeriesPrepareCall) DoAndReturn(f func(string, string, bool) error) *MockUpgradeMachineAPIUpgradeSeriesPrepareCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpgradeSeriesNotifications mocks base method. @@ -107,7 +203,31 @@ func (m *MockUpgradeMachineAPI) WatchUpgradeSeriesNotifications(arg0 string) (wa } // WatchUpgradeSeriesNotifications indicates an expected call of WatchUpgradeSeriesNotifications. -func (mr *MockUpgradeMachineAPIMockRecorder) WatchUpgradeSeriesNotifications(arg0 any) *gomock.Call { +func (mr *MockUpgradeMachineAPIMockRecorder) WatchUpgradeSeriesNotifications(arg0 any) *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).WatchUpgradeSeriesNotifications), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUpgradeMachineAPI)(nil).WatchUpgradeSeriesNotifications), arg0) + return &MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall{Call: call} +} + +// MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall wrap *gomock.Call +type MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall) Return(arg0 watcher.Watcher[struct{}], arg1 string, arg2 error) *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall) Do(f func(string) (watcher.Watcher[struct{}], string, error)) *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], string, error)) *MockUpgradeMachineAPIWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/machine/package_test.go b/cmd/juju/machine/package_test.go index 947750d5481..77b5db1da51 100644 --- a/cmd/juju/machine/package_test.go +++ b/cmd/juju/machine/package_test.go @@ -10,10 +10,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/upgrademachine_api_mock.go github.com/juju/juju/cmd/juju/machine UpgradeMachineAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/status_api_mock.go github.com/juju/juju/cmd/juju/machine StatusAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/removemachine_api_mock.go github.com/juju/juju/cmd/juju/machine RemoveMachineAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelconfig_api_mock.go github.com/juju/juju/cmd/juju/machine ModelConfigAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/upgrademachine_api_mock.go github.com/juju/juju/cmd/juju/machine UpgradeMachineAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/status_api_mock.go github.com/juju/juju/cmd/juju/machine StatusAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/removemachine_api_mock.go github.com/juju/juju/cmd/juju/machine RemoveMachineAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelconfig_api_mock.go github.com/juju/juju/cmd/juju/machine ModelConfigAPI // None of the tests in this package require mongo. diff --git a/cmd/juju/model/abort.go b/cmd/juju/model/abort.go index ed2c866270e..e89e3fca9c6 100644 --- a/cmd/juju/model/abort.go +++ b/cmd/juju/model/abort.go @@ -52,7 +52,7 @@ type abortCommand struct { // AbortCommandAPI describes API methods required // to execute the branch command. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI type AbortCommandAPI interface { Close() error diff --git a/cmd/juju/model/addbranch.go b/cmd/juju/model/addbranch.go index 3b95a5844e1..2018f6359c3 100644 --- a/cmd/juju/model/addbranch.go +++ b/cmd/juju/model/addbranch.go @@ -57,7 +57,7 @@ type addBranchCommand struct { // AddBranchCommandAPI describes API methods required // to execute the branch command. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI type AddBranchCommandAPI interface { Close() error diff --git a/cmd/juju/model/branch.go b/cmd/juju/model/branch.go index 530d415bd90..fe5c2108bba 100644 --- a/cmd/juju/model/branch.go +++ b/cmd/juju/model/branch.go @@ -66,7 +66,7 @@ type branchCommand struct { // BranchCommandAPI describes API methods required // to execute the branch command. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI type BranchCommandAPI interface { Close() error // HasActiveBranch returns true if the model has an diff --git a/cmd/juju/model/commit.go b/cmd/juju/model/commit.go index d53fa2e7afc..08cbc3ab2e8 100644 --- a/cmd/juju/model/commit.go +++ b/cmd/juju/model/commit.go @@ -52,7 +52,7 @@ type commitCommand struct { // CommitCommandAPI defines an API interface to be used during testing. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI type CommitCommandAPI interface { Close() error diff --git a/cmd/juju/model/diff.go b/cmd/juju/model/diff.go index 625e5589a19..789f9ecdb09 100644 --- a/cmd/juju/model/diff.go +++ b/cmd/juju/model/diff.go @@ -49,7 +49,7 @@ See also: // DiffCommandAPI describes API methods required to execute the diff command. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI type DiffCommandAPI interface { Close() error diff --git a/cmd/juju/model/listcommits.go b/cmd/juju/model/listcommits.go index b1095ba3757..9446f1d49f4 100644 --- a/cmd/juju/model/listcommits.go +++ b/cmd/juju/model/listcommits.go @@ -63,7 +63,7 @@ type CommitsCommand struct { // CommitsCommandAPI defines an API interface to be used during testing. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/commits_mock.go github.com/juju/juju/cmd/juju/model CommitsCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/commits_mock.go github.com/juju/juju/cmd/juju/model CommitsCommandAPI type CommitsCommandAPI interface { Close() error diff --git a/cmd/juju/model/mocks/abort_mock.go b/cmd/juju/model/mocks/abort_mock.go index f83f99a13b5..9ae1c354c0e 100644 --- a/cmd/juju/model/mocks/abort_mock.go +++ b/cmd/juju/model/mocks/abort_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI +// mockgen -typed -package mocks -destination ./mocks/abort_mock.go github.com/juju/juju/cmd/juju/model AbortCommandAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockAbortCommandAPI) AbortBranch(arg0 string) error { } // AbortBranch indicates an expected call of AbortBranch. -func (mr *MockAbortCommandAPIMockRecorder) AbortBranch(arg0 any) *gomock.Call { +func (mr *MockAbortCommandAPIMockRecorder) AbortBranch(arg0 any) *MockAbortCommandAPIAbortBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AbortBranch", reflect.TypeOf((*MockAbortCommandAPI)(nil).AbortBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AbortBranch", reflect.TypeOf((*MockAbortCommandAPI)(nil).AbortBranch), arg0) + return &MockAbortCommandAPIAbortBranchCall{Call: call} +} + +// MockAbortCommandAPIAbortBranchCall wrap *gomock.Call +type MockAbortCommandAPIAbortBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAbortCommandAPIAbortBranchCall) Return(arg0 error) *MockAbortCommandAPIAbortBranchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAbortCommandAPIAbortBranchCall) Do(f func(string) error) *MockAbortCommandAPIAbortBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAbortCommandAPIAbortBranchCall) DoAndReturn(f func(string) error) *MockAbortCommandAPIAbortBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -61,9 +85,33 @@ func (m *MockAbortCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAbortCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockAbortCommandAPIMockRecorder) Close() *MockAbortCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAbortCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAbortCommandAPI)(nil).Close)) + return &MockAbortCommandAPICloseCall{Call: call} +} + +// MockAbortCommandAPICloseCall wrap *gomock.Call +type MockAbortCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAbortCommandAPICloseCall) Return(arg0 error) *MockAbortCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAbortCommandAPICloseCall) Do(f func() error) *MockAbortCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAbortCommandAPICloseCall) DoAndReturn(f func() error) *MockAbortCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasActiveBranch mocks base method. @@ -76,7 +124,31 @@ func (m *MockAbortCommandAPI) HasActiveBranch(arg0 string) (bool, error) { } // HasActiveBranch indicates an expected call of HasActiveBranch. -func (mr *MockAbortCommandAPIMockRecorder) HasActiveBranch(arg0 any) *gomock.Call { +func (mr *MockAbortCommandAPIMockRecorder) HasActiveBranch(arg0 any) *MockAbortCommandAPIHasActiveBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockAbortCommandAPI)(nil).HasActiveBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockAbortCommandAPI)(nil).HasActiveBranch), arg0) + return &MockAbortCommandAPIHasActiveBranchCall{Call: call} +} + +// MockAbortCommandAPIHasActiveBranchCall wrap *gomock.Call +type MockAbortCommandAPIHasActiveBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAbortCommandAPIHasActiveBranchCall) Return(arg0 bool, arg1 error) *MockAbortCommandAPIHasActiveBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAbortCommandAPIHasActiveBranchCall) Do(f func(string) (bool, error)) *MockAbortCommandAPIHasActiveBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAbortCommandAPIHasActiveBranchCall) DoAndReturn(f func(string) (bool, error)) *MockAbortCommandAPIHasActiveBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/addbranch_mock.go b/cmd/juju/model/mocks/addbranch_mock.go index 118f5fc9afc..98440e68d84 100644 --- a/cmd/juju/model/mocks/addbranch_mock.go +++ b/cmd/juju/model/mocks/addbranch_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI +// mockgen -typed -package mocks -destination ./mocks/addbranch_mock.go github.com/juju/juju/cmd/juju/model AddBranchCommandAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockAddBranchCommandAPI) AddBranch(arg0 string) error { } // AddBranch indicates an expected call of AddBranch. -func (mr *MockAddBranchCommandAPIMockRecorder) AddBranch(arg0 any) *gomock.Call { +func (mr *MockAddBranchCommandAPIMockRecorder) AddBranch(arg0 any) *MockAddBranchCommandAPIAddBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBranch", reflect.TypeOf((*MockAddBranchCommandAPI)(nil).AddBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBranch", reflect.TypeOf((*MockAddBranchCommandAPI)(nil).AddBranch), arg0) + return &MockAddBranchCommandAPIAddBranchCall{Call: call} +} + +// MockAddBranchCommandAPIAddBranchCall wrap *gomock.Call +type MockAddBranchCommandAPIAddBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddBranchCommandAPIAddBranchCall) Return(arg0 error) *MockAddBranchCommandAPIAddBranchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddBranchCommandAPIAddBranchCall) Do(f func(string) error) *MockAddBranchCommandAPIAddBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddBranchCommandAPIAddBranchCall) DoAndReturn(f func(string) error) *MockAddBranchCommandAPIAddBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -61,7 +85,31 @@ func (m *MockAddBranchCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAddBranchCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockAddBranchCommandAPIMockRecorder) Close() *MockAddBranchCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddBranchCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddBranchCommandAPI)(nil).Close)) + return &MockAddBranchCommandAPICloseCall{Call: call} +} + +// MockAddBranchCommandAPICloseCall wrap *gomock.Call +type MockAddBranchCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddBranchCommandAPICloseCall) Return(arg0 error) *MockAddBranchCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddBranchCommandAPICloseCall) Do(f func() error) *MockAddBranchCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddBranchCommandAPICloseCall) DoAndReturn(f func() error) *MockAddBranchCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/branch_mock.go b/cmd/juju/model/mocks/branch_mock.go index 0f5f3cb5a16..fce11c20563 100644 --- a/cmd/juju/model/mocks/branch_mock.go +++ b/cmd/juju/model/mocks/branch_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI +// mockgen -typed -package mocks -destination ./mocks/branch_mock.go github.com/juju/juju/cmd/juju/model BranchCommandAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockBranchCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockBranchCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockBranchCommandAPIMockRecorder) Close() *MockBranchCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBranchCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBranchCommandAPI)(nil).Close)) + return &MockBranchCommandAPICloseCall{Call: call} +} + +// MockBranchCommandAPICloseCall wrap *gomock.Call +type MockBranchCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBranchCommandAPICloseCall) Return(arg0 error) *MockBranchCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBranchCommandAPICloseCall) Do(f func() error) *MockBranchCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBranchCommandAPICloseCall) DoAndReturn(f func() error) *MockBranchCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasActiveBranch mocks base method. @@ -62,7 +86,31 @@ func (m *MockBranchCommandAPI) HasActiveBranch(arg0 string) (bool, error) { } // HasActiveBranch indicates an expected call of HasActiveBranch. -func (mr *MockBranchCommandAPIMockRecorder) HasActiveBranch(arg0 any) *gomock.Call { +func (mr *MockBranchCommandAPIMockRecorder) HasActiveBranch(arg0 any) *MockBranchCommandAPIHasActiveBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockBranchCommandAPI)(nil).HasActiveBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockBranchCommandAPI)(nil).HasActiveBranch), arg0) + return &MockBranchCommandAPIHasActiveBranchCall{Call: call} +} + +// MockBranchCommandAPIHasActiveBranchCall wrap *gomock.Call +type MockBranchCommandAPIHasActiveBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBranchCommandAPIHasActiveBranchCall) Return(arg0 bool, arg1 error) *MockBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBranchCommandAPIHasActiveBranchCall) Do(f func(string) (bool, error)) *MockBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBranchCommandAPIHasActiveBranchCall) DoAndReturn(f func(string) (bool, error)) *MockBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/commit_mock.go b/cmd/juju/model/mocks/commit_mock.go index 9647c506cd1..df663018e11 100644 --- a/cmd/juju/model/mocks/commit_mock.go +++ b/cmd/juju/model/mocks/commit_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI +// mockgen -typed -package mocks -destination ./mocks/commit_mock.go github.com/juju/juju/cmd/juju/model CommitCommandAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockCommitCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCommitCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockCommitCommandAPIMockRecorder) Close() *MockCommitCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCommitCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCommitCommandAPI)(nil).Close)) + return &MockCommitCommandAPICloseCall{Call: call} +} + +// MockCommitCommandAPICloseCall wrap *gomock.Call +type MockCommitCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommitCommandAPICloseCall) Return(arg0 error) *MockCommitCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommitCommandAPICloseCall) Do(f func() error) *MockCommitCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommitCommandAPICloseCall) DoAndReturn(f func() error) *MockCommitCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CommitBranch mocks base method. @@ -62,7 +86,31 @@ func (m *MockCommitCommandAPI) CommitBranch(arg0 string) (int, error) { } // CommitBranch indicates an expected call of CommitBranch. -func (mr *MockCommitCommandAPIMockRecorder) CommitBranch(arg0 any) *gomock.Call { +func (mr *MockCommitCommandAPIMockRecorder) CommitBranch(arg0 any) *MockCommitCommandAPICommitBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBranch", reflect.TypeOf((*MockCommitCommandAPI)(nil).CommitBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBranch", reflect.TypeOf((*MockCommitCommandAPI)(nil).CommitBranch), arg0) + return &MockCommitCommandAPICommitBranchCall{Call: call} +} + +// MockCommitCommandAPICommitBranchCall wrap *gomock.Call +type MockCommitCommandAPICommitBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommitCommandAPICommitBranchCall) Return(arg0 int, arg1 error) *MockCommitCommandAPICommitBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommitCommandAPICommitBranchCall) Do(f func(string) (int, error)) *MockCommitCommandAPICommitBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommitCommandAPICommitBranchCall) DoAndReturn(f func(string) (int, error)) *MockCommitCommandAPICommitBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/commits_mock.go b/cmd/juju/model/mocks/commits_mock.go index b36a4b5a85e..66e6e9dfcf2 100644 --- a/cmd/juju/model/mocks/commits_mock.go +++ b/cmd/juju/model/mocks/commits_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/commits_mock.go github.com/juju/juju/cmd/juju/model CommitsCommandAPI +// mockgen -typed -package mocks -destination ./mocks/commits_mock.go github.com/juju/juju/cmd/juju/model CommitsCommandAPI // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCommitsCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCommitsCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockCommitsCommandAPIMockRecorder) Close() *MockCommitsCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCommitsCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCommitsCommandAPI)(nil).Close)) + return &MockCommitsCommandAPICloseCall{Call: call} +} + +// MockCommitsCommandAPICloseCall wrap *gomock.Call +type MockCommitsCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommitsCommandAPICloseCall) Return(arg0 error) *MockCommitsCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommitsCommandAPICloseCall) Do(f func() error) *MockCommitsCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommitsCommandAPICloseCall) DoAndReturn(f func() error) *MockCommitsCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCommits mocks base method. @@ -63,7 +87,31 @@ func (m *MockCommitsCommandAPI) ListCommits() ([]model.GenerationCommit, error) } // ListCommits indicates an expected call of ListCommits. -func (mr *MockCommitsCommandAPIMockRecorder) ListCommits() *gomock.Call { +func (mr *MockCommitsCommandAPIMockRecorder) ListCommits() *MockCommitsCommandAPIListCommitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommits", reflect.TypeOf((*MockCommitsCommandAPI)(nil).ListCommits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommits", reflect.TypeOf((*MockCommitsCommandAPI)(nil).ListCommits)) + return &MockCommitsCommandAPIListCommitsCall{Call: call} +} + +// MockCommitsCommandAPIListCommitsCall wrap *gomock.Call +type MockCommitsCommandAPIListCommitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommitsCommandAPIListCommitsCall) Return(arg0 []model.GenerationCommit, arg1 error) *MockCommitsCommandAPIListCommitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommitsCommandAPIListCommitsCall) Do(f func() ([]model.GenerationCommit, error)) *MockCommitsCommandAPIListCommitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommitsCommandAPIListCommitsCall) DoAndReturn(f func() ([]model.GenerationCommit, error)) *MockCommitsCommandAPIListCommitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/diff_mock.go b/cmd/juju/model/mocks/diff_mock.go index cb9969cd72e..bca3842c4fa 100644 --- a/cmd/juju/model/mocks/diff_mock.go +++ b/cmd/juju/model/mocks/diff_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI +// mockgen -typed -package mocks -destination ./mocks/diff_mock.go github.com/juju/juju/cmd/juju/model DiffCommandAPI // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockDiffCommandAPI) BranchInfo(arg0 string, arg1 bool, arg2 func(time.T } // BranchInfo indicates an expected call of BranchInfo. -func (mr *MockDiffCommandAPIMockRecorder) BranchInfo(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDiffCommandAPIMockRecorder) BranchInfo(arg0, arg1, arg2 any) *MockDiffCommandAPIBranchInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BranchInfo", reflect.TypeOf((*MockDiffCommandAPI)(nil).BranchInfo), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BranchInfo", reflect.TypeOf((*MockDiffCommandAPI)(nil).BranchInfo), arg0, arg1, arg2) + return &MockDiffCommandAPIBranchInfoCall{Call: call} +} + +// MockDiffCommandAPIBranchInfoCall wrap *gomock.Call +type MockDiffCommandAPIBranchInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiffCommandAPIBranchInfoCall) Return(arg0 map[string]model.Generation, arg1 error) *MockDiffCommandAPIBranchInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiffCommandAPIBranchInfoCall) Do(f func(string, bool, func(time.Time) string) (map[string]model.Generation, error)) *MockDiffCommandAPIBranchInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiffCommandAPIBranchInfoCall) DoAndReturn(f func(string, bool, func(time.Time) string) (map[string]model.Generation, error)) *MockDiffCommandAPIBranchInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -64,7 +88,31 @@ func (m *MockDiffCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockDiffCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockDiffCommandAPIMockRecorder) Close() *MockDiffCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDiffCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDiffCommandAPI)(nil).Close)) + return &MockDiffCommandAPICloseCall{Call: call} +} + +// MockDiffCommandAPICloseCall wrap *gomock.Call +type MockDiffCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiffCommandAPICloseCall) Return(arg0 error) *MockDiffCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiffCommandAPICloseCall) Do(f func() error) *MockDiffCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiffCommandAPICloseCall) DoAndReturn(f func() error) *MockDiffCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/showcommit_mock.go b/cmd/juju/model/mocks/showcommit_mock.go index 82f74a03561..c9f490386f8 100644 --- a/cmd/juju/model/mocks/showcommit_mock.go +++ b/cmd/juju/model/mocks/showcommit_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/showcommit_mock.go github.com/juju/juju/cmd/juju/model ShowCommitCommandAPI +// mockgen -typed -package mocks -destination ./mocks/showcommit_mock.go github.com/juju/juju/cmd/juju/model ShowCommitCommandAPI // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockShowCommitCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockShowCommitCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockShowCommitCommandAPIMockRecorder) Close() *MockShowCommitCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockShowCommitCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockShowCommitCommandAPI)(nil).Close)) + return &MockShowCommitCommandAPICloseCall{Call: call} +} + +// MockShowCommitCommandAPICloseCall wrap *gomock.Call +type MockShowCommitCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockShowCommitCommandAPICloseCall) Return(arg0 error) *MockShowCommitCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockShowCommitCommandAPICloseCall) Do(f func() error) *MockShowCommitCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockShowCommitCommandAPICloseCall) DoAndReturn(f func() error) *MockShowCommitCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ShowCommit mocks base method. @@ -63,7 +87,31 @@ func (m *MockShowCommitCommandAPI) ShowCommit(arg0 int) (model.GenerationCommit, } // ShowCommit indicates an expected call of ShowCommit. -func (mr *MockShowCommitCommandAPIMockRecorder) ShowCommit(arg0 any) *gomock.Call { +func (mr *MockShowCommitCommandAPIMockRecorder) ShowCommit(arg0 any) *MockShowCommitCommandAPIShowCommitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowCommit", reflect.TypeOf((*MockShowCommitCommandAPI)(nil).ShowCommit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowCommit", reflect.TypeOf((*MockShowCommitCommandAPI)(nil).ShowCommit), arg0) + return &MockShowCommitCommandAPIShowCommitCall{Call: call} +} + +// MockShowCommitCommandAPIShowCommitCall wrap *gomock.Call +type MockShowCommitCommandAPIShowCommitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockShowCommitCommandAPIShowCommitCall) Return(arg0 model.GenerationCommit, arg1 error) *MockShowCommitCommandAPIShowCommitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockShowCommitCommandAPIShowCommitCall) Do(f func(int) (model.GenerationCommit, error)) *MockShowCommitCommandAPIShowCommitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockShowCommitCommandAPIShowCommitCall) DoAndReturn(f func(int) (model.GenerationCommit, error)) *MockShowCommitCommandAPIShowCommitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/mocks/trackbranch_mock.go b/cmd/juju/model/mocks/trackbranch_mock.go index 0e578ff781a..5b8f829cfb5 100644 --- a/cmd/juju/model/mocks/trackbranch_mock.go +++ b/cmd/juju/model/mocks/trackbranch_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI +// mockgen -typed -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockTrackBranchCommandAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockTrackBranchCommandAPIMockRecorder) Close() *gomock.Call { +func (mr *MockTrackBranchCommandAPIMockRecorder) Close() *MockTrackBranchCommandAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).Close)) + return &MockTrackBranchCommandAPICloseCall{Call: call} +} + +// MockTrackBranchCommandAPICloseCall wrap *gomock.Call +type MockTrackBranchCommandAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackBranchCommandAPICloseCall) Return(arg0 error) *MockTrackBranchCommandAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackBranchCommandAPICloseCall) Do(f func() error) *MockTrackBranchCommandAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackBranchCommandAPICloseCall) DoAndReturn(f func() error) *MockTrackBranchCommandAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasActiveBranch mocks base method. @@ -62,9 +86,33 @@ func (m *MockTrackBranchCommandAPI) HasActiveBranch(arg0 string) (bool, error) { } // HasActiveBranch indicates an expected call of HasActiveBranch. -func (mr *MockTrackBranchCommandAPIMockRecorder) HasActiveBranch(arg0 any) *gomock.Call { +func (mr *MockTrackBranchCommandAPIMockRecorder) HasActiveBranch(arg0 any) *MockTrackBranchCommandAPIHasActiveBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).HasActiveBranch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasActiveBranch", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).HasActiveBranch), arg0) + return &MockTrackBranchCommandAPIHasActiveBranchCall{Call: call} +} + +// MockTrackBranchCommandAPIHasActiveBranchCall wrap *gomock.Call +type MockTrackBranchCommandAPIHasActiveBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackBranchCommandAPIHasActiveBranchCall) Return(arg0 bool, arg1 error) *MockTrackBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackBranchCommandAPIHasActiveBranchCall) Do(f func(string) (bool, error)) *MockTrackBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackBranchCommandAPIHasActiveBranchCall) DoAndReturn(f func(string) (bool, error)) *MockTrackBranchCommandAPIHasActiveBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TrackBranch mocks base method. @@ -76,7 +124,31 @@ func (m *MockTrackBranchCommandAPI) TrackBranch(arg0 string, arg1 []string, arg2 } // TrackBranch indicates an expected call of TrackBranch. -func (mr *MockTrackBranchCommandAPIMockRecorder) TrackBranch(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTrackBranchCommandAPIMockRecorder) TrackBranch(arg0, arg1, arg2 any) *MockTrackBranchCommandAPITrackBranchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackBranch", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).TrackBranch), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackBranch", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).TrackBranch), arg0, arg1, arg2) + return &MockTrackBranchCommandAPITrackBranchCall{Call: call} +} + +// MockTrackBranchCommandAPITrackBranchCall wrap *gomock.Call +type MockTrackBranchCommandAPITrackBranchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackBranchCommandAPITrackBranchCall) Return(arg0 error) *MockTrackBranchCommandAPITrackBranchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackBranchCommandAPITrackBranchCall) Do(f func(string, []string, int) error) *MockTrackBranchCommandAPITrackBranchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackBranchCommandAPITrackBranchCall) DoAndReturn(f func(string, []string, int) error) *MockTrackBranchCommandAPITrackBranchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/model/showcommit.go b/cmd/juju/model/showcommit.go index 488dc4d5965..b1b6f40ae69 100644 --- a/cmd/juju/model/showcommit.go +++ b/cmd/juju/model/showcommit.go @@ -59,7 +59,7 @@ type ShowCommitCommand struct { // ShowCommitCommandAPI defines an API interface to be used during testing. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/showcommit_mock.go github.com/juju/juju/cmd/juju/model ShowCommitCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/showcommit_mock.go github.com/juju/juju/cmd/juju/model ShowCommitCommandAPI type ShowCommitCommandAPI interface { Close() error diff --git a/cmd/juju/model/trackbranch.go b/cmd/juju/model/trackbranch.go index f92373c8524..f6f07590d46 100644 --- a/cmd/juju/model/trackbranch.go +++ b/cmd/juju/model/trackbranch.go @@ -63,7 +63,7 @@ type trackBranchCommand struct { // TrackBranchCommandAPI describes API methods required // to execute the track command. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/trackbranch_mock.go github.com/juju/juju/cmd/juju/model TrackBranchCommandAPI type TrackBranchCommandAPI interface { Close() error diff --git a/cmd/juju/secretbackends/mocks/secretbackendsapi.go b/cmd/juju/secretbackends/mocks/secretbackendsapi.go index a3166abe34d..221e59c8794 100644 --- a/cmd/juju/secretbackends/mocks/secretbackendsapi.go +++ b/cmd/juju/secretbackends/mocks/secretbackendsapi.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretbackendsapi.go github.com/juju/juju/cmd/juju/secretbackends ListSecretBackendsAPI,AddSecretBackendsAPI,RemoveSecretBackendsAPI,UpdateSecretBackendsAPI +// mockgen -typed -package mocks -destination mocks/secretbackendsapi.go github.com/juju/juju/cmd/juju/secretbackends ListSecretBackendsAPI,AddSecretBackendsAPI,RemoveSecretBackendsAPI,UpdateSecretBackendsAPI // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockListSecretBackendsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockListSecretBackendsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockListSecretBackendsAPIMockRecorder) Close() *MockListSecretBackendsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockListSecretBackendsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockListSecretBackendsAPI)(nil).Close)) + return &MockListSecretBackendsAPICloseCall{Call: call} +} + +// MockListSecretBackendsAPICloseCall wrap *gomock.Call +type MockListSecretBackendsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockListSecretBackendsAPICloseCall) Return(arg0 error) *MockListSecretBackendsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockListSecretBackendsAPICloseCall) Do(f func() error) *MockListSecretBackendsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockListSecretBackendsAPICloseCall) DoAndReturn(f func() error) *MockListSecretBackendsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecretBackends mocks base method. @@ -63,9 +87,33 @@ func (m *MockListSecretBackendsAPI) ListSecretBackends(arg0 []string, arg1 bool) } // ListSecretBackends indicates an expected call of ListSecretBackends. -func (mr *MockListSecretBackendsAPIMockRecorder) ListSecretBackends(arg0, arg1 any) *gomock.Call { +func (mr *MockListSecretBackendsAPIMockRecorder) ListSecretBackends(arg0, arg1 any) *MockListSecretBackendsAPIListSecretBackendsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackends", reflect.TypeOf((*MockListSecretBackendsAPI)(nil).ListSecretBackends), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackends", reflect.TypeOf((*MockListSecretBackendsAPI)(nil).ListSecretBackends), arg0, arg1) + return &MockListSecretBackendsAPIListSecretBackendsCall{Call: call} +} + +// MockListSecretBackendsAPIListSecretBackendsCall wrap *gomock.Call +type MockListSecretBackendsAPIListSecretBackendsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockListSecretBackendsAPIListSecretBackendsCall) Return(arg0 []secretbackends.SecretBackend, arg1 error) *MockListSecretBackendsAPIListSecretBackendsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockListSecretBackendsAPIListSecretBackendsCall) Do(f func([]string, bool) ([]secretbackends.SecretBackend, error)) *MockListSecretBackendsAPIListSecretBackendsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockListSecretBackendsAPIListSecretBackendsCall) DoAndReturn(f func([]string, bool) ([]secretbackends.SecretBackend, error)) *MockListSecretBackendsAPIListSecretBackendsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAddSecretBackendsAPI is a mock of AddSecretBackendsAPI interface. @@ -100,9 +148,33 @@ func (m *MockAddSecretBackendsAPI) AddSecretBackend(arg0 secretbackends.CreateSe } // AddSecretBackend indicates an expected call of AddSecretBackend. -func (mr *MockAddSecretBackendsAPIMockRecorder) AddSecretBackend(arg0 any) *gomock.Call { +func (mr *MockAddSecretBackendsAPIMockRecorder) AddSecretBackend(arg0 any) *MockAddSecretBackendsAPIAddSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSecretBackend", reflect.TypeOf((*MockAddSecretBackendsAPI)(nil).AddSecretBackend), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSecretBackend", reflect.TypeOf((*MockAddSecretBackendsAPI)(nil).AddSecretBackend), arg0) + return &MockAddSecretBackendsAPIAddSecretBackendCall{Call: call} +} + +// MockAddSecretBackendsAPIAddSecretBackendCall wrap *gomock.Call +type MockAddSecretBackendsAPIAddSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddSecretBackendsAPIAddSecretBackendCall) Return(arg0 error) *MockAddSecretBackendsAPIAddSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddSecretBackendsAPIAddSecretBackendCall) Do(f func(secretbackends.CreateSecretBackend) error) *MockAddSecretBackendsAPIAddSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddSecretBackendsAPIAddSecretBackendCall) DoAndReturn(f func(secretbackends.CreateSecretBackend) error) *MockAddSecretBackendsAPIAddSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -114,9 +186,33 @@ func (m *MockAddSecretBackendsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAddSecretBackendsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockAddSecretBackendsAPIMockRecorder) Close() *MockAddSecretBackendsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddSecretBackendsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddSecretBackendsAPI)(nil).Close)) + return &MockAddSecretBackendsAPICloseCall{Call: call} +} + +// MockAddSecretBackendsAPICloseCall wrap *gomock.Call +type MockAddSecretBackendsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddSecretBackendsAPICloseCall) Return(arg0 error) *MockAddSecretBackendsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddSecretBackendsAPICloseCall) Do(f func() error) *MockAddSecretBackendsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddSecretBackendsAPICloseCall) DoAndReturn(f func() error) *MockAddSecretBackendsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoveSecretBackendsAPI is a mock of RemoveSecretBackendsAPI interface. @@ -151,9 +247,33 @@ func (m *MockRemoveSecretBackendsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRemoveSecretBackendsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockRemoveSecretBackendsAPIMockRecorder) Close() *MockRemoveSecretBackendsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveSecretBackendsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveSecretBackendsAPI)(nil).Close)) + return &MockRemoveSecretBackendsAPICloseCall{Call: call} +} + +// MockRemoveSecretBackendsAPICloseCall wrap *gomock.Call +type MockRemoveSecretBackendsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveSecretBackendsAPICloseCall) Return(arg0 error) *MockRemoveSecretBackendsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveSecretBackendsAPICloseCall) Do(f func() error) *MockRemoveSecretBackendsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveSecretBackendsAPICloseCall) DoAndReturn(f func() error) *MockRemoveSecretBackendsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSecretBackend mocks base method. @@ -165,9 +285,33 @@ func (m *MockRemoveSecretBackendsAPI) RemoveSecretBackend(arg0 string, arg1 bool } // RemoveSecretBackend indicates an expected call of RemoveSecretBackend. -func (mr *MockRemoveSecretBackendsAPIMockRecorder) RemoveSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoveSecretBackendsAPIMockRecorder) RemoveSecretBackend(arg0, arg1 any) *MockRemoveSecretBackendsAPIRemoveSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecretBackend", reflect.TypeOf((*MockRemoveSecretBackendsAPI)(nil).RemoveSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecretBackend", reflect.TypeOf((*MockRemoveSecretBackendsAPI)(nil).RemoveSecretBackend), arg0, arg1) + return &MockRemoveSecretBackendsAPIRemoveSecretBackendCall{Call: call} +} + +// MockRemoveSecretBackendsAPIRemoveSecretBackendCall wrap *gomock.Call +type MockRemoveSecretBackendsAPIRemoveSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveSecretBackendsAPIRemoveSecretBackendCall) Return(arg0 error) *MockRemoveSecretBackendsAPIRemoveSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveSecretBackendsAPIRemoveSecretBackendCall) Do(f func(string, bool) error) *MockRemoveSecretBackendsAPIRemoveSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveSecretBackendsAPIRemoveSecretBackendCall) DoAndReturn(f func(string, bool) error) *MockRemoveSecretBackendsAPIRemoveSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpdateSecretBackendsAPI is a mock of UpdateSecretBackendsAPI interface. @@ -202,9 +346,33 @@ func (m *MockUpdateSecretBackendsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockUpdateSecretBackendsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockUpdateSecretBackendsAPIMockRecorder) Close() *MockUpdateSecretBackendsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpdateSecretBackendsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpdateSecretBackendsAPI)(nil).Close)) + return &MockUpdateSecretBackendsAPICloseCall{Call: call} +} + +// MockUpdateSecretBackendsAPICloseCall wrap *gomock.Call +type MockUpdateSecretBackendsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateSecretBackendsAPICloseCall) Return(arg0 error) *MockUpdateSecretBackendsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateSecretBackendsAPICloseCall) Do(f func() error) *MockUpdateSecretBackendsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateSecretBackendsAPICloseCall) DoAndReturn(f func() error) *MockUpdateSecretBackendsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecretBackend mocks base method. @@ -216,7 +384,31 @@ func (m *MockUpdateSecretBackendsAPI) UpdateSecretBackend(arg0 secretbackends.Up } // UpdateSecretBackend indicates an expected call of UpdateSecretBackend. -func (mr *MockUpdateSecretBackendsAPIMockRecorder) UpdateSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockUpdateSecretBackendsAPIMockRecorder) UpdateSecretBackend(arg0, arg1 any) *MockUpdateSecretBackendsAPIUpdateSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockUpdateSecretBackendsAPI)(nil).UpdateSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockUpdateSecretBackendsAPI)(nil).UpdateSecretBackend), arg0, arg1) + return &MockUpdateSecretBackendsAPIUpdateSecretBackendCall{Call: call} +} + +// MockUpdateSecretBackendsAPIUpdateSecretBackendCall wrap *gomock.Call +type MockUpdateSecretBackendsAPIUpdateSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateSecretBackendsAPIUpdateSecretBackendCall) Return(arg0 error) *MockUpdateSecretBackendsAPIUpdateSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateSecretBackendsAPIUpdateSecretBackendCall) Do(f func(secretbackends.UpdateSecretBackend, bool) error) *MockUpdateSecretBackendsAPIUpdateSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateSecretBackendsAPIUpdateSecretBackendCall) DoAndReturn(f func(secretbackends.UpdateSecretBackend, bool) error) *MockUpdateSecretBackendsAPIUpdateSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/secretbackends/package_test.go b/cmd/juju/secretbackends/package_test.go index adf61f80e39..0651883c4df 100644 --- a/cmd/juju/secretbackends/package_test.go +++ b/cmd/juju/secretbackends/package_test.go @@ -11,7 +11,7 @@ import ( "github.com/juju/juju/jujuclient" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretbackendsapi.go github.com/juju/juju/cmd/juju/secretbackends ListSecretBackendsAPI,AddSecretBackendsAPI,RemoveSecretBackendsAPI,UpdateSecretBackendsAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretbackendsapi.go github.com/juju/juju/cmd/juju/secretbackends ListSecretBackendsAPI,AddSecretBackendsAPI,RemoveSecretBackendsAPI,UpdateSecretBackendsAPI func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/secrets/mocks/secretsapi.go b/cmd/juju/secrets/mocks/secretsapi.go index 229165a0013..e02864a730f 100644 --- a/cmd/juju/secrets/mocks/secretsapi.go +++ b/cmd/juju/secrets/mocks/secretsapi.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretsapi.go github.com/juju/juju/cmd/juju/secrets ListSecretsAPI,AddSecretsAPI,GrantRevokeSecretsAPI,UpdateSecretsAPI,RemoveSecretsAPI +// mockgen -typed -package mocks -destination mocks/secretsapi.go github.com/juju/juju/cmd/juju/secrets ListSecretsAPI,AddSecretsAPI,GrantRevokeSecretsAPI,UpdateSecretsAPI,RemoveSecretsAPI // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockListSecretsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockListSecretsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockListSecretsAPIMockRecorder) Close() *MockListSecretsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockListSecretsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockListSecretsAPI)(nil).Close)) + return &MockListSecretsAPICloseCall{Call: call} +} + +// MockListSecretsAPICloseCall wrap *gomock.Call +type MockListSecretsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockListSecretsAPICloseCall) Return(arg0 error) *MockListSecretsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockListSecretsAPICloseCall) Do(f func() error) *MockListSecretsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockListSecretsAPICloseCall) DoAndReturn(f func() error) *MockListSecretsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecrets mocks base method. @@ -64,9 +88,33 @@ func (m *MockListSecretsAPI) ListSecrets(arg0 bool, arg1 secrets0.Filter) ([]sec } // ListSecrets indicates an expected call of ListSecrets. -func (mr *MockListSecretsAPIMockRecorder) ListSecrets(arg0, arg1 any) *gomock.Call { +func (mr *MockListSecretsAPIMockRecorder) ListSecrets(arg0, arg1 any) *MockListSecretsAPIListSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockListSecretsAPI)(nil).ListSecrets), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockListSecretsAPI)(nil).ListSecrets), arg0, arg1) + return &MockListSecretsAPIListSecretsCall{Call: call} +} + +// MockListSecretsAPIListSecretsCall wrap *gomock.Call +type MockListSecretsAPIListSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockListSecretsAPIListSecretsCall) Return(arg0 []secrets.SecretDetails, arg1 error) *MockListSecretsAPIListSecretsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockListSecretsAPIListSecretsCall) Do(f func(bool, secrets0.Filter) ([]secrets.SecretDetails, error)) *MockListSecretsAPIListSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockListSecretsAPIListSecretsCall) DoAndReturn(f func(bool, secrets0.Filter) ([]secrets.SecretDetails, error)) *MockListSecretsAPIListSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAddSecretsAPI is a mock of AddSecretsAPI interface. @@ -101,9 +149,33 @@ func (m *MockAddSecretsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAddSecretsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockAddSecretsAPIMockRecorder) Close() *MockAddSecretsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddSecretsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAddSecretsAPI)(nil).Close)) + return &MockAddSecretsAPICloseCall{Call: call} +} + +// MockAddSecretsAPICloseCall wrap *gomock.Call +type MockAddSecretsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddSecretsAPICloseCall) Return(arg0 error) *MockAddSecretsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddSecretsAPICloseCall) Do(f func() error) *MockAddSecretsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddSecretsAPICloseCall) DoAndReturn(f func() error) *MockAddSecretsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecret mocks base method. @@ -116,9 +188,33 @@ func (m *MockAddSecretsAPI) CreateSecret(arg0, arg1 string, arg2 map[string]stri } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockAddSecretsAPIMockRecorder) CreateSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAddSecretsAPIMockRecorder) CreateSecret(arg0, arg1, arg2 any) *MockAddSecretsAPICreateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockAddSecretsAPI)(nil).CreateSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockAddSecretsAPI)(nil).CreateSecret), arg0, arg1, arg2) + return &MockAddSecretsAPICreateSecretCall{Call: call} +} + +// MockAddSecretsAPICreateSecretCall wrap *gomock.Call +type MockAddSecretsAPICreateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddSecretsAPICreateSecretCall) Return(arg0 string, arg1 error) *MockAddSecretsAPICreateSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddSecretsAPICreateSecretCall) Do(f func(string, string, map[string]string) (string, error)) *MockAddSecretsAPICreateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddSecretsAPICreateSecretCall) DoAndReturn(f func(string, string, map[string]string) (string, error)) *MockAddSecretsAPICreateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockGrantRevokeSecretsAPI is a mock of GrantRevokeSecretsAPI interface. @@ -153,9 +249,33 @@ func (m *MockGrantRevokeSecretsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockGrantRevokeSecretsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockGrantRevokeSecretsAPIMockRecorder) Close() *MockGrantRevokeSecretsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).Close)) + return &MockGrantRevokeSecretsAPICloseCall{Call: call} +} + +// MockGrantRevokeSecretsAPICloseCall wrap *gomock.Call +type MockGrantRevokeSecretsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGrantRevokeSecretsAPICloseCall) Return(arg0 error) *MockGrantRevokeSecretsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGrantRevokeSecretsAPICloseCall) Do(f func() error) *MockGrantRevokeSecretsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGrantRevokeSecretsAPICloseCall) DoAndReturn(f func() error) *MockGrantRevokeSecretsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecret mocks base method. @@ -168,9 +288,33 @@ func (m *MockGrantRevokeSecretsAPI) GrantSecret(arg0 *secrets0.URI, arg1 string, } // GrantSecret indicates an expected call of GrantSecret. -func (mr *MockGrantRevokeSecretsAPIMockRecorder) GrantSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockGrantRevokeSecretsAPIMockRecorder) GrantSecret(arg0, arg1, arg2 any) *MockGrantRevokeSecretsAPIGrantSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).GrantSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).GrantSecret), arg0, arg1, arg2) + return &MockGrantRevokeSecretsAPIGrantSecretCall{Call: call} +} + +// MockGrantRevokeSecretsAPIGrantSecretCall wrap *gomock.Call +type MockGrantRevokeSecretsAPIGrantSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGrantRevokeSecretsAPIGrantSecretCall) Return(arg0 []error, arg1 error) *MockGrantRevokeSecretsAPIGrantSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGrantRevokeSecretsAPIGrantSecretCall) Do(f func(*secrets0.URI, string, []string) ([]error, error)) *MockGrantRevokeSecretsAPIGrantSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGrantRevokeSecretsAPIGrantSecretCall) DoAndReturn(f func(*secrets0.URI, string, []string) ([]error, error)) *MockGrantRevokeSecretsAPIGrantSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecret mocks base method. @@ -183,9 +327,33 @@ func (m *MockGrantRevokeSecretsAPI) RevokeSecret(arg0 *secrets0.URI, arg1 string } // RevokeSecret indicates an expected call of RevokeSecret. -func (mr *MockGrantRevokeSecretsAPIMockRecorder) RevokeSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockGrantRevokeSecretsAPIMockRecorder) RevokeSecret(arg0, arg1, arg2 any) *MockGrantRevokeSecretsAPIRevokeSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).RevokeSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockGrantRevokeSecretsAPI)(nil).RevokeSecret), arg0, arg1, arg2) + return &MockGrantRevokeSecretsAPIRevokeSecretCall{Call: call} +} + +// MockGrantRevokeSecretsAPIRevokeSecretCall wrap *gomock.Call +type MockGrantRevokeSecretsAPIRevokeSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGrantRevokeSecretsAPIRevokeSecretCall) Return(arg0 []error, arg1 error) *MockGrantRevokeSecretsAPIRevokeSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGrantRevokeSecretsAPIRevokeSecretCall) Do(f func(*secrets0.URI, string, []string) ([]error, error)) *MockGrantRevokeSecretsAPIRevokeSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGrantRevokeSecretsAPIRevokeSecretCall) DoAndReturn(f func(*secrets0.URI, string, []string) ([]error, error)) *MockGrantRevokeSecretsAPIRevokeSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpdateSecretsAPI is a mock of UpdateSecretsAPI interface. @@ -220,9 +388,33 @@ func (m *MockUpdateSecretsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockUpdateSecretsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockUpdateSecretsAPIMockRecorder) Close() *MockUpdateSecretsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpdateSecretsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUpdateSecretsAPI)(nil).Close)) + return &MockUpdateSecretsAPICloseCall{Call: call} +} + +// MockUpdateSecretsAPICloseCall wrap *gomock.Call +type MockUpdateSecretsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateSecretsAPICloseCall) Return(arg0 error) *MockUpdateSecretsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateSecretsAPICloseCall) Do(f func() error) *MockUpdateSecretsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateSecretsAPICloseCall) DoAndReturn(f func() error) *MockUpdateSecretsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecret mocks base method. @@ -234,9 +426,33 @@ func (m *MockUpdateSecretsAPI) UpdateSecret(arg0 *secrets0.URI, arg1 string, arg } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockUpdateSecretsAPIMockRecorder) UpdateSecret(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockUpdateSecretsAPIMockRecorder) UpdateSecret(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockUpdateSecretsAPIUpdateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockUpdateSecretsAPI)(nil).UpdateSecret), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockUpdateSecretsAPI)(nil).UpdateSecret), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockUpdateSecretsAPIUpdateSecretCall{Call: call} +} + +// MockUpdateSecretsAPIUpdateSecretCall wrap *gomock.Call +type MockUpdateSecretsAPIUpdateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpdateSecretsAPIUpdateSecretCall) Return(arg0 error) *MockUpdateSecretsAPIUpdateSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpdateSecretsAPIUpdateSecretCall) Do(f func(*secrets0.URI, string, *bool, string, string, map[string]string) error) *MockUpdateSecretsAPIUpdateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpdateSecretsAPIUpdateSecretCall) DoAndReturn(f func(*secrets0.URI, string, *bool, string, string, map[string]string) error) *MockUpdateSecretsAPIUpdateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoveSecretsAPI is a mock of RemoveSecretsAPI interface. @@ -271,9 +487,33 @@ func (m *MockRemoveSecretsAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRemoveSecretsAPIMockRecorder) Close() *gomock.Call { +func (mr *MockRemoveSecretsAPIMockRecorder) Close() *MockRemoveSecretsAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveSecretsAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRemoveSecretsAPI)(nil).Close)) + return &MockRemoveSecretsAPICloseCall{Call: call} +} + +// MockRemoveSecretsAPICloseCall wrap *gomock.Call +type MockRemoveSecretsAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveSecretsAPICloseCall) Return(arg0 error) *MockRemoveSecretsAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveSecretsAPICloseCall) Do(f func() error) *MockRemoveSecretsAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveSecretsAPICloseCall) DoAndReturn(f func() error) *MockRemoveSecretsAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSecret mocks base method. @@ -285,7 +525,31 @@ func (m *MockRemoveSecretsAPI) RemoveSecret(arg0 *secrets0.URI, arg1 string, arg } // RemoveSecret indicates an expected call of RemoveSecret. -func (mr *MockRemoveSecretsAPIMockRecorder) RemoveSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRemoveSecretsAPIMockRecorder) RemoveSecret(arg0, arg1, arg2 any) *MockRemoveSecretsAPIRemoveSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockRemoveSecretsAPI)(nil).RemoveSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockRemoveSecretsAPI)(nil).RemoveSecret), arg0, arg1, arg2) + return &MockRemoveSecretsAPIRemoveSecretCall{Call: call} +} + +// MockRemoveSecretsAPIRemoveSecretCall wrap *gomock.Call +type MockRemoveSecretsAPIRemoveSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoveSecretsAPIRemoveSecretCall) Return(arg0 error) *MockRemoveSecretsAPIRemoveSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoveSecretsAPIRemoveSecretCall) Do(f func(*secrets0.URI, string, *int) error) *MockRemoveSecretsAPIRemoveSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoveSecretsAPIRemoveSecretCall) DoAndReturn(f func(*secrets0.URI, string, *int) error) *MockRemoveSecretsAPIRemoveSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/secrets/package_test.go b/cmd/juju/secrets/package_test.go index a9292e6ecb0..1f6e948a868 100644 --- a/cmd/juju/secrets/package_test.go +++ b/cmd/juju/secrets/package_test.go @@ -11,7 +11,7 @@ import ( "github.com/juju/juju/jujuclient" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretsapi.go github.com/juju/juju/cmd/juju/secrets ListSecretsAPI,AddSecretsAPI,GrantRevokeSecretsAPI,UpdateSecretsAPI,RemoveSecretsAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretsapi.go github.com/juju/juju/cmd/juju/secrets ListSecretsAPI,AddSecretsAPI,GrantRevokeSecretsAPI,UpdateSecretsAPI,RemoveSecretsAPI func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/space/mocks/spacesapi_mock.go b/cmd/juju/space/mocks/spacesapi_mock.go index 8de6e202c86..01343c7c891 100644 --- a/cmd/juju/space/mocks/spacesapi_mock.go +++ b/cmd/juju/space/mocks/spacesapi_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/spacesapi_mock.go github.com/juju/juju/cmd/juju/space SpaceAPI,SubnetAPI,API +// mockgen -typed -package mocks -destination mocks/spacesapi_mock.go github.com/juju/juju/cmd/juju/space SpaceAPI,SubnetAPI,API // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSpaceAPI) AddSpace(arg0 string, arg1 []string, arg2 bool) error { } // AddSpace indicates an expected call of AddSpace. -func (mr *MockSpaceAPIMockRecorder) AddSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) AddSpace(arg0, arg1, arg2 any) *MockSpaceAPIAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockSpaceAPI)(nil).AddSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockSpaceAPI)(nil).AddSpace), arg0, arg1, arg2) + return &MockSpaceAPIAddSpaceCall{Call: call} +} + +// MockSpaceAPIAddSpaceCall wrap *gomock.Call +type MockSpaceAPIAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIAddSpaceCall) Return(arg0 error) *MockSpaceAPIAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIAddSpaceCall) Do(f func(string, []string, bool) error) *MockSpaceAPIAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIAddSpaceCall) DoAndReturn(f func(string, []string, bool) error) *MockSpaceAPIAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSpaces mocks base method. @@ -64,9 +88,33 @@ func (m *MockSpaceAPI) ListSpaces() ([]params.Space, error) { } // ListSpaces indicates an expected call of ListSpaces. -func (mr *MockSpaceAPIMockRecorder) ListSpaces() *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) ListSpaces() *MockSpaceAPIListSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockSpaceAPI)(nil).ListSpaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockSpaceAPI)(nil).ListSpaces)) + return &MockSpaceAPIListSpacesCall{Call: call} +} + +// MockSpaceAPIListSpacesCall wrap *gomock.Call +type MockSpaceAPIListSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIListSpacesCall) Return(arg0 []params.Space, arg1 error) *MockSpaceAPIListSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIListSpacesCall) Do(f func() ([]params.Space, error)) *MockSpaceAPIListSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIListSpacesCall) DoAndReturn(f func() ([]params.Space, error)) *MockSpaceAPIListSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MoveSubnets mocks base method. @@ -79,9 +127,33 @@ func (m *MockSpaceAPI) MoveSubnets(arg0 names.SpaceTag, arg1 []names.SubnetTag, } // MoveSubnets indicates an expected call of MoveSubnets. -func (mr *MockSpaceAPIMockRecorder) MoveSubnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) MoveSubnets(arg0, arg1, arg2 any) *MockSpaceAPIMoveSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveSubnets", reflect.TypeOf((*MockSpaceAPI)(nil).MoveSubnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveSubnets", reflect.TypeOf((*MockSpaceAPI)(nil).MoveSubnets), arg0, arg1, arg2) + return &MockSpaceAPIMoveSubnetsCall{Call: call} +} + +// MockSpaceAPIMoveSubnetsCall wrap *gomock.Call +type MockSpaceAPIMoveSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIMoveSubnetsCall) Return(arg0 params.MoveSubnetsResult, arg1 error) *MockSpaceAPIMoveSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIMoveSubnetsCall) Do(f func(names.SpaceTag, []names.SubnetTag, bool) (params.MoveSubnetsResult, error)) *MockSpaceAPIMoveSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIMoveSubnetsCall) DoAndReturn(f func(names.SpaceTag, []names.SubnetTag, bool) (params.MoveSubnetsResult, error)) *MockSpaceAPIMoveSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReloadSpaces mocks base method. @@ -93,9 +165,33 @@ func (m *MockSpaceAPI) ReloadSpaces() error { } // ReloadSpaces indicates an expected call of ReloadSpaces. -func (mr *MockSpaceAPIMockRecorder) ReloadSpaces() *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) ReloadSpaces() *MockSpaceAPIReloadSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockSpaceAPI)(nil).ReloadSpaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockSpaceAPI)(nil).ReloadSpaces)) + return &MockSpaceAPIReloadSpacesCall{Call: call} +} + +// MockSpaceAPIReloadSpacesCall wrap *gomock.Call +type MockSpaceAPIReloadSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIReloadSpacesCall) Return(arg0 error) *MockSpaceAPIReloadSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIReloadSpacesCall) Do(f func() error) *MockSpaceAPIReloadSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIReloadSpacesCall) DoAndReturn(f func() error) *MockSpaceAPIReloadSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSpace mocks base method. @@ -108,9 +204,33 @@ func (m *MockSpaceAPI) RemoveSpace(arg0 string, arg1, arg2 bool) (params.RemoveS } // RemoveSpace indicates an expected call of RemoveSpace. -func (mr *MockSpaceAPIMockRecorder) RemoveSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) RemoveSpace(arg0, arg1, arg2 any) *MockSpaceAPIRemoveSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockSpaceAPI)(nil).RemoveSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockSpaceAPI)(nil).RemoveSpace), arg0, arg1, arg2) + return &MockSpaceAPIRemoveSpaceCall{Call: call} +} + +// MockSpaceAPIRemoveSpaceCall wrap *gomock.Call +type MockSpaceAPIRemoveSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIRemoveSpaceCall) Return(arg0 params.RemoveSpaceResult, arg1 error) *MockSpaceAPIRemoveSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIRemoveSpaceCall) Do(f func(string, bool, bool) (params.RemoveSpaceResult, error)) *MockSpaceAPIRemoveSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIRemoveSpaceCall) DoAndReturn(f func(string, bool, bool) (params.RemoveSpaceResult, error)) *MockSpaceAPIRemoveSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameSpace mocks base method. @@ -122,9 +242,33 @@ func (m *MockSpaceAPI) RenameSpace(arg0, arg1 string) error { } // RenameSpace indicates an expected call of RenameSpace. -func (mr *MockSpaceAPIMockRecorder) RenameSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) RenameSpace(arg0, arg1 any) *MockSpaceAPIRenameSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameSpace", reflect.TypeOf((*MockSpaceAPI)(nil).RenameSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameSpace", reflect.TypeOf((*MockSpaceAPI)(nil).RenameSpace), arg0, arg1) + return &MockSpaceAPIRenameSpaceCall{Call: call} +} + +// MockSpaceAPIRenameSpaceCall wrap *gomock.Call +type MockSpaceAPIRenameSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIRenameSpaceCall) Return(arg0 error) *MockSpaceAPIRenameSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIRenameSpaceCall) Do(f func(string, string) error) *MockSpaceAPIRenameSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIRenameSpaceCall) DoAndReturn(f func(string, string) error) *MockSpaceAPIRenameSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ShowSpace mocks base method. @@ -137,9 +281,33 @@ func (m *MockSpaceAPI) ShowSpace(arg0 string) (params.ShowSpaceResult, error) { } // ShowSpace indicates an expected call of ShowSpace. -func (mr *MockSpaceAPIMockRecorder) ShowSpace(arg0 any) *gomock.Call { +func (mr *MockSpaceAPIMockRecorder) ShowSpace(arg0 any) *MockSpaceAPIShowSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowSpace", reflect.TypeOf((*MockSpaceAPI)(nil).ShowSpace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowSpace", reflect.TypeOf((*MockSpaceAPI)(nil).ShowSpace), arg0) + return &MockSpaceAPIShowSpaceCall{Call: call} +} + +// MockSpaceAPIShowSpaceCall wrap *gomock.Call +type MockSpaceAPIShowSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpaceAPIShowSpaceCall) Return(arg0 params.ShowSpaceResult, arg1 error) *MockSpaceAPIShowSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpaceAPIShowSpaceCall) Do(f func(string) (params.ShowSpaceResult, error)) *MockSpaceAPIShowSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpaceAPIShowSpaceCall) DoAndReturn(f func(string) (params.ShowSpaceResult, error)) *MockSpaceAPIShowSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSubnetAPI is a mock of SubnetAPI interface. @@ -175,9 +343,33 @@ func (m *MockSubnetAPI) SubnetsByCIDR(arg0 []string) ([]params.SubnetsResult, er } // SubnetsByCIDR indicates an expected call of SubnetsByCIDR. -func (mr *MockSubnetAPIMockRecorder) SubnetsByCIDR(arg0 any) *gomock.Call { +func (mr *MockSubnetAPIMockRecorder) SubnetsByCIDR(arg0 any) *MockSubnetAPISubnetsByCIDRCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockSubnetAPI)(nil).SubnetsByCIDR), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockSubnetAPI)(nil).SubnetsByCIDR), arg0) + return &MockSubnetAPISubnetsByCIDRCall{Call: call} +} + +// MockSubnetAPISubnetsByCIDRCall wrap *gomock.Call +type MockSubnetAPISubnetsByCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetAPISubnetsByCIDRCall) Return(arg0 []params.SubnetsResult, arg1 error) *MockSubnetAPISubnetsByCIDRCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetAPISubnetsByCIDRCall) Do(f func([]string) ([]params.SubnetsResult, error)) *MockSubnetAPISubnetsByCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetAPISubnetsByCIDRCall) DoAndReturn(f func([]string) ([]params.SubnetsResult, error)) *MockSubnetAPISubnetsByCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAPI is a mock of API interface. @@ -212,9 +404,33 @@ func (m *MockAPI) AddSpace(arg0 string, arg1 []string, arg2 bool) error { } // AddSpace indicates an expected call of AddSpace. -func (mr *MockAPIMockRecorder) AddSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPIMockRecorder) AddSpace(arg0, arg1, arg2 any) *MockAPIAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockAPI)(nil).AddSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockAPI)(nil).AddSpace), arg0, arg1, arg2) + return &MockAPIAddSpaceCall{Call: call} +} + +// MockAPIAddSpaceCall wrap *gomock.Call +type MockAPIAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIAddSpaceCall) Return(arg0 error) *MockAPIAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIAddSpaceCall) Do(f func(string, []string, bool) error) *MockAPIAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIAddSpaceCall) DoAndReturn(f func(string, []string, bool) error) *MockAPIAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -226,9 +442,33 @@ func (m *MockAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockAPIMockRecorder) Close() *gomock.Call { +func (mr *MockAPIMockRecorder) Close() *MockAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAPI)(nil).Close)) + return &MockAPICloseCall{Call: call} +} + +// MockAPICloseCall wrap *gomock.Call +type MockAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICloseCall) Return(arg0 error) *MockAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICloseCall) Do(f func() error) *MockAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICloseCall) DoAndReturn(f func() error) *MockAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSpaces mocks base method. @@ -241,9 +481,33 @@ func (m *MockAPI) ListSpaces() ([]params.Space, error) { } // ListSpaces indicates an expected call of ListSpaces. -func (mr *MockAPIMockRecorder) ListSpaces() *gomock.Call { +func (mr *MockAPIMockRecorder) ListSpaces() *MockAPIListSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockAPI)(nil).ListSpaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSpaces", reflect.TypeOf((*MockAPI)(nil).ListSpaces)) + return &MockAPIListSpacesCall{Call: call} +} + +// MockAPIListSpacesCall wrap *gomock.Call +type MockAPIListSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIListSpacesCall) Return(arg0 []params.Space, arg1 error) *MockAPIListSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIListSpacesCall) Do(f func() ([]params.Space, error)) *MockAPIListSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIListSpacesCall) DoAndReturn(f func() ([]params.Space, error)) *MockAPIListSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MoveSubnets mocks base method. @@ -256,9 +520,33 @@ func (m *MockAPI) MoveSubnets(arg0 names.SpaceTag, arg1 []names.SubnetTag, arg2 } // MoveSubnets indicates an expected call of MoveSubnets. -func (mr *MockAPIMockRecorder) MoveSubnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPIMockRecorder) MoveSubnets(arg0, arg1, arg2 any) *MockAPIMoveSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveSubnets", reflect.TypeOf((*MockAPI)(nil).MoveSubnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveSubnets", reflect.TypeOf((*MockAPI)(nil).MoveSubnets), arg0, arg1, arg2) + return &MockAPIMoveSubnetsCall{Call: call} +} + +// MockAPIMoveSubnetsCall wrap *gomock.Call +type MockAPIMoveSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIMoveSubnetsCall) Return(arg0 params.MoveSubnetsResult, arg1 error) *MockAPIMoveSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIMoveSubnetsCall) Do(f func(names.SpaceTag, []names.SubnetTag, bool) (params.MoveSubnetsResult, error)) *MockAPIMoveSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIMoveSubnetsCall) DoAndReturn(f func(names.SpaceTag, []names.SubnetTag, bool) (params.MoveSubnetsResult, error)) *MockAPIMoveSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReloadSpaces mocks base method. @@ -270,9 +558,33 @@ func (m *MockAPI) ReloadSpaces() error { } // ReloadSpaces indicates an expected call of ReloadSpaces. -func (mr *MockAPIMockRecorder) ReloadSpaces() *gomock.Call { +func (mr *MockAPIMockRecorder) ReloadSpaces() *MockAPIReloadSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockAPI)(nil).ReloadSpaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockAPI)(nil).ReloadSpaces)) + return &MockAPIReloadSpacesCall{Call: call} +} + +// MockAPIReloadSpacesCall wrap *gomock.Call +type MockAPIReloadSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIReloadSpacesCall) Return(arg0 error) *MockAPIReloadSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIReloadSpacesCall) Do(f func() error) *MockAPIReloadSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIReloadSpacesCall) DoAndReturn(f func() error) *MockAPIReloadSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSpace mocks base method. @@ -285,9 +597,33 @@ func (m *MockAPI) RemoveSpace(arg0 string, arg1, arg2 bool) (params.RemoveSpaceR } // RemoveSpace indicates an expected call of RemoveSpace. -func (mr *MockAPIMockRecorder) RemoveSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPIMockRecorder) RemoveSpace(arg0, arg1, arg2 any) *MockAPIRemoveSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockAPI)(nil).RemoveSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSpace", reflect.TypeOf((*MockAPI)(nil).RemoveSpace), arg0, arg1, arg2) + return &MockAPIRemoveSpaceCall{Call: call} +} + +// MockAPIRemoveSpaceCall wrap *gomock.Call +type MockAPIRemoveSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIRemoveSpaceCall) Return(arg0 params.RemoveSpaceResult, arg1 error) *MockAPIRemoveSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIRemoveSpaceCall) Do(f func(string, bool, bool) (params.RemoveSpaceResult, error)) *MockAPIRemoveSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIRemoveSpaceCall) DoAndReturn(f func(string, bool, bool) (params.RemoveSpaceResult, error)) *MockAPIRemoveSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameSpace mocks base method. @@ -299,9 +635,33 @@ func (m *MockAPI) RenameSpace(arg0, arg1 string) error { } // RenameSpace indicates an expected call of RenameSpace. -func (mr *MockAPIMockRecorder) RenameSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockAPIMockRecorder) RenameSpace(arg0, arg1 any) *MockAPIRenameSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameSpace", reflect.TypeOf((*MockAPI)(nil).RenameSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameSpace", reflect.TypeOf((*MockAPI)(nil).RenameSpace), arg0, arg1) + return &MockAPIRenameSpaceCall{Call: call} +} + +// MockAPIRenameSpaceCall wrap *gomock.Call +type MockAPIRenameSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIRenameSpaceCall) Return(arg0 error) *MockAPIRenameSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIRenameSpaceCall) Do(f func(string, string) error) *MockAPIRenameSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIRenameSpaceCall) DoAndReturn(f func(string, string) error) *MockAPIRenameSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ShowSpace mocks base method. @@ -314,9 +674,33 @@ func (m *MockAPI) ShowSpace(arg0 string) (params.ShowSpaceResult, error) { } // ShowSpace indicates an expected call of ShowSpace. -func (mr *MockAPIMockRecorder) ShowSpace(arg0 any) *gomock.Call { +func (mr *MockAPIMockRecorder) ShowSpace(arg0 any) *MockAPIShowSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowSpace", reflect.TypeOf((*MockAPI)(nil).ShowSpace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowSpace", reflect.TypeOf((*MockAPI)(nil).ShowSpace), arg0) + return &MockAPIShowSpaceCall{Call: call} +} + +// MockAPIShowSpaceCall wrap *gomock.Call +type MockAPIShowSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIShowSpaceCall) Return(arg0 params.ShowSpaceResult, arg1 error) *MockAPIShowSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIShowSpaceCall) Do(f func(string) (params.ShowSpaceResult, error)) *MockAPIShowSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIShowSpaceCall) DoAndReturn(f func(string) (params.ShowSpaceResult, error)) *MockAPIShowSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubnetsByCIDR mocks base method. @@ -329,7 +713,31 @@ func (m *MockAPI) SubnetsByCIDR(arg0 []string) ([]params.SubnetsResult, error) { } // SubnetsByCIDR indicates an expected call of SubnetsByCIDR. -func (mr *MockAPIMockRecorder) SubnetsByCIDR(arg0 any) *gomock.Call { +func (mr *MockAPIMockRecorder) SubnetsByCIDR(arg0 any) *MockAPISubnetsByCIDRCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockAPI)(nil).SubnetsByCIDR), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetsByCIDR", reflect.TypeOf((*MockAPI)(nil).SubnetsByCIDR), arg0) + return &MockAPISubnetsByCIDRCall{Call: call} +} + +// MockAPISubnetsByCIDRCall wrap *gomock.Call +type MockAPISubnetsByCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPISubnetsByCIDRCall) Return(arg0 []params.SubnetsResult, arg1 error) *MockAPISubnetsByCIDRCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPISubnetsByCIDRCall) Do(f func([]string) ([]params.SubnetsResult, error)) *MockAPISubnetsByCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPISubnetsByCIDRCall) DoAndReturn(f func([]string) ([]params.SubnetsResult, error)) *MockAPISubnetsByCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/space/package_test.go b/cmd/juju/space/package_test.go index 4fa1fe29801..4d2890e971a 100644 --- a/cmd/juju/space/package_test.go +++ b/cmd/juju/space/package_test.go @@ -23,7 +23,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/spacesapi_mock.go github.com/juju/juju/cmd/juju/space SpaceAPI,SubnetAPI,API +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/spacesapi_mock.go github.com/juju/juju/cmd/juju/space SpaceAPI,SubnetAPI,API func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/ssh/mocks/k8s_exec_mock.go b/cmd/juju/ssh/mocks/k8s_exec_mock.go index 65c77197369..be41f59b996 100644 --- a/cmd/juju/ssh/mocks/k8s_exec_mock.go +++ b/cmd/juju/ssh/mocks/k8s_exec_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/k8s_exec_mock.go github.com/juju/juju/caas/kubernetes/provider/exec Executor +// mockgen -typed -package mocks -destination mocks/k8s_exec_mock.go github.com/juju/juju/caas/kubernetes/provider/exec Executor // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockExecutor) Copy(arg0 context.Context, arg1 exec.CopyParams, arg2 <-c } // Copy indicates an expected call of Copy. -func (mr *MockExecutorMockRecorder) Copy(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockExecutorMockRecorder) Copy(arg0, arg1, arg2 any) *MockExecutorCopyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockExecutor)(nil).Copy), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockExecutor)(nil).Copy), arg0, arg1, arg2) + return &MockExecutorCopyCall{Call: call} +} + +// MockExecutorCopyCall wrap *gomock.Call +type MockExecutorCopyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorCopyCall) Return(arg0 error) *MockExecutorCopyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorCopyCall) Do(f func(context.Context, exec.CopyParams, <-chan struct{}) error) *MockExecutorCopyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorCopyCall) DoAndReturn(f func(context.Context, exec.CopyParams, <-chan struct{}) error) *MockExecutorCopyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Exec mocks base method. @@ -64,9 +88,33 @@ func (m *MockExecutor) Exec(arg0 context.Context, arg1 exec.ExecParams, arg2 <-c } // Exec indicates an expected call of Exec. -func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *MockExecutorExecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), arg0, arg1, arg2) + return &MockExecutorExecCall{Call: call} +} + +// MockExecutorExecCall wrap *gomock.Call +type MockExecutorExecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorExecCall) Return(arg0 error) *MockExecutorExecCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorExecCall) Do(f func(context.Context, exec.ExecParams, <-chan struct{}) error) *MockExecutorExecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorExecCall) DoAndReturn(f func(context.Context, exec.ExecParams, <-chan struct{}) error) *MockExecutorExecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NameSpace mocks base method. @@ -78,9 +126,33 @@ func (m *MockExecutor) NameSpace() string { } // NameSpace indicates an expected call of NameSpace. -func (mr *MockExecutorMockRecorder) NameSpace() *gomock.Call { +func (mr *MockExecutorMockRecorder) NameSpace() *MockExecutorNameSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NameSpace", reflect.TypeOf((*MockExecutor)(nil).NameSpace)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NameSpace", reflect.TypeOf((*MockExecutor)(nil).NameSpace)) + return &MockExecutorNameSpaceCall{Call: call} +} + +// MockExecutorNameSpaceCall wrap *gomock.Call +type MockExecutorNameSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorNameSpaceCall) Return(arg0 string) *MockExecutorNameSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorNameSpaceCall) Do(f func() string) *MockExecutorNameSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorNameSpaceCall) DoAndReturn(f func() string) *MockExecutorNameSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawClient mocks base method. @@ -92,9 +164,33 @@ func (m *MockExecutor) RawClient() kubernetes.Interface { } // RawClient indicates an expected call of RawClient. -func (mr *MockExecutorMockRecorder) RawClient() *gomock.Call { +func (mr *MockExecutorMockRecorder) RawClient() *MockExecutorRawClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawClient", reflect.TypeOf((*MockExecutor)(nil).RawClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawClient", reflect.TypeOf((*MockExecutor)(nil).RawClient)) + return &MockExecutorRawClientCall{Call: call} +} + +// MockExecutorRawClientCall wrap *gomock.Call +type MockExecutorRawClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorRawClientCall) Return(arg0 kubernetes.Interface) *MockExecutorRawClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorRawClientCall) Do(f func() kubernetes.Interface) *MockExecutorRawClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorRawClientCall) DoAndReturn(f func() kubernetes.Interface) *MockExecutorRawClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -107,7 +203,31 @@ func (m *MockExecutor) Status(arg0 context.Context, arg1 exec.StatusParams) (*ex } // Status indicates an expected call of Status. -func (mr *MockExecutorMockRecorder) Status(arg0, arg1 any) *gomock.Call { +func (mr *MockExecutorMockRecorder) Status(arg0, arg1 any) *MockExecutorStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockExecutor)(nil).Status), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockExecutor)(nil).Status), arg0, arg1) + return &MockExecutorStatusCall{Call: call} +} + +// MockExecutorStatusCall wrap *gomock.Call +type MockExecutorStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExecutorStatusCall) Return(arg0 *exec.Status, arg1 error) *MockExecutorStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExecutorStatusCall) Do(f func(context.Context, exec.StatusParams) (*exec.Status, error)) *MockExecutorStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExecutorStatusCall) DoAndReturn(f func(context.Context, exec.StatusParams) (*exec.Status, error)) *MockExecutorStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/ssh/mocks/package_mock.go b/cmd/juju/ssh/mocks/package_mock.go index 81d77f50960..5f16607ea71 100644 --- a/cmd/juju/ssh/mocks/package_mock.go +++ b/cmd/juju/ssh/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/cmd/juju/ssh Context,LeaderAPI,SSHClientAPI,SSHControllerAPI,StatusClientAPI,CloudCredentialAPI,ApplicationAPI,CharmAPI,ModelCommand +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/cmd/juju/ssh Context,LeaderAPI,SSHClientAPI,SSHControllerAPI,StatusClientAPI,CloudCredentialAPI,ApplicationAPI,CharmAPI,ModelCommand // // Package mocks is a generated GoMock package. @@ -63,9 +63,33 @@ func (m *MockContext) Deadline() (time.Time, bool) { } // Deadline indicates an expected call of Deadline. -func (mr *MockContextMockRecorder) Deadline() *gomock.Call { +func (mr *MockContextMockRecorder) Deadline() *MockContextDeadlineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline)) + return &MockContextDeadlineCall{Call: call} +} + +// MockContextDeadlineCall wrap *gomock.Call +type MockContextDeadlineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDeadlineCall) Return(arg0 time.Time, arg1 bool) *MockContextDeadlineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDeadlineCall) Do(f func() (time.Time, bool)) *MockContextDeadlineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDeadlineCall) DoAndReturn(f func() (time.Time, bool)) *MockContextDeadlineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -77,9 +101,33 @@ func (m *MockContext) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockContextMockRecorder) Done() *gomock.Call { +func (mr *MockContextMockRecorder) Done() *MockContextDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done)) + return &MockContextDoneCall{Call: call} +} + +// MockContextDoneCall wrap *gomock.Call +type MockContextDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDoneCall) Return(arg0 <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDoneCall) Do(f func() <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDoneCall) DoAndReturn(f func() <-chan struct{}) *MockContextDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -91,9 +139,33 @@ func (m *MockContext) Err() error { } // Err indicates an expected call of Err. -func (mr *MockContextMockRecorder) Err() *gomock.Call { +func (mr *MockContextMockRecorder) Err() *MockContextErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err)) + return &MockContextErrCall{Call: call} +} + +// MockContextErrCall wrap *gomock.Call +type MockContextErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextErrCall) Return(arg0 error) *MockContextErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextErrCall) Do(f func() error) *MockContextErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextErrCall) DoAndReturn(f func() error) *MockContextErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStderr mocks base method. @@ -105,9 +177,33 @@ func (m *MockContext) GetStderr() io.Writer { } // GetStderr indicates an expected call of GetStderr. -func (mr *MockContextMockRecorder) GetStderr() *gomock.Call { +func (mr *MockContextMockRecorder) GetStderr() *MockContextGetStderrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStderr", reflect.TypeOf((*MockContext)(nil).GetStderr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStderr", reflect.TypeOf((*MockContext)(nil).GetStderr)) + return &MockContextGetStderrCall{Call: call} +} + +// MockContextGetStderrCall wrap *gomock.Call +type MockContextGetStderrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetStderrCall) Return(arg0 io.Writer) *MockContextGetStderrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetStderrCall) Do(f func() io.Writer) *MockContextGetStderrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetStderrCall) DoAndReturn(f func() io.Writer) *MockContextGetStderrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStdin mocks base method. @@ -119,9 +215,33 @@ func (m *MockContext) GetStdin() io.Reader { } // GetStdin indicates an expected call of GetStdin. -func (mr *MockContextMockRecorder) GetStdin() *gomock.Call { +func (mr *MockContextMockRecorder) GetStdin() *MockContextGetStdinCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStdin", reflect.TypeOf((*MockContext)(nil).GetStdin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStdin", reflect.TypeOf((*MockContext)(nil).GetStdin)) + return &MockContextGetStdinCall{Call: call} +} + +// MockContextGetStdinCall wrap *gomock.Call +type MockContextGetStdinCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetStdinCall) Return(arg0 io.Reader) *MockContextGetStdinCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetStdinCall) Do(f func() io.Reader) *MockContextGetStdinCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetStdinCall) DoAndReturn(f func() io.Reader) *MockContextGetStdinCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStdout mocks base method. @@ -133,9 +253,33 @@ func (m *MockContext) GetStdout() io.Writer { } // GetStdout indicates an expected call of GetStdout. -func (mr *MockContextMockRecorder) GetStdout() *gomock.Call { +func (mr *MockContextMockRecorder) GetStdout() *MockContextGetStdoutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStdout", reflect.TypeOf((*MockContext)(nil).GetStdout)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStdout", reflect.TypeOf((*MockContext)(nil).GetStdout)) + return &MockContextGetStdoutCall{Call: call} +} + +// MockContextGetStdoutCall wrap *gomock.Call +type MockContextGetStdoutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetStdoutCall) Return(arg0 io.Writer) *MockContextGetStdoutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetStdoutCall) Do(f func() io.Writer) *MockContextGetStdoutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetStdoutCall) DoAndReturn(f func() io.Writer) *MockContextGetStdoutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InterruptNotify mocks base method. @@ -145,9 +289,33 @@ func (m *MockContext) InterruptNotify(arg0 chan<- os.Signal) { } // InterruptNotify indicates an expected call of InterruptNotify. -func (mr *MockContextMockRecorder) InterruptNotify(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) InterruptNotify(arg0 any) *MockContextInterruptNotifyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterruptNotify", reflect.TypeOf((*MockContext)(nil).InterruptNotify), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterruptNotify", reflect.TypeOf((*MockContext)(nil).InterruptNotify), arg0) + return &MockContextInterruptNotifyCall{Call: call} +} + +// MockContextInterruptNotifyCall wrap *gomock.Call +type MockContextInterruptNotifyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextInterruptNotifyCall) Return() *MockContextInterruptNotifyCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextInterruptNotifyCall) Do(f func(chan<- os.Signal)) *MockContextInterruptNotifyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextInterruptNotifyCall) DoAndReturn(f func(chan<- os.Signal)) *MockContextInterruptNotifyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInterruptNotify mocks base method. @@ -157,9 +325,33 @@ func (m *MockContext) StopInterruptNotify(arg0 chan<- os.Signal) { } // StopInterruptNotify indicates an expected call of StopInterruptNotify. -func (mr *MockContextMockRecorder) StopInterruptNotify(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) StopInterruptNotify(arg0 any) *MockContextStopInterruptNotifyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInterruptNotify", reflect.TypeOf((*MockContext)(nil).StopInterruptNotify), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInterruptNotify", reflect.TypeOf((*MockContext)(nil).StopInterruptNotify), arg0) + return &MockContextStopInterruptNotifyCall{Call: call} +} + +// MockContextStopInterruptNotifyCall wrap *gomock.Call +type MockContextStopInterruptNotifyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextStopInterruptNotifyCall) Return() *MockContextStopInterruptNotifyCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextStopInterruptNotifyCall) Do(f func(chan<- os.Signal)) *MockContextStopInterruptNotifyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextStopInterruptNotifyCall) DoAndReturn(f func(chan<- os.Signal)) *MockContextStopInterruptNotifyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -171,9 +363,33 @@ func (m *MockContext) Value(arg0 any) any { } // Value indicates an expected call of Value. -func (mr *MockContextMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Value(arg0 any) *MockContextValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0) + return &MockContextValueCall{Call: call} +} + +// MockContextValueCall wrap *gomock.Call +type MockContextValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextValueCall) Return(arg0 any) *MockContextValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextValueCall) Do(f func(any) any) *MockContextValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextValueCall) DoAndReturn(f func(any) any) *MockContextValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLeaderAPI is a mock of LeaderAPI interface. @@ -208,9 +424,33 @@ func (m *MockLeaderAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockLeaderAPIMockRecorder) Close() *gomock.Call { +func (mr *MockLeaderAPIMockRecorder) Close() *MockLeaderAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLeaderAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLeaderAPI)(nil).Close)) + return &MockLeaderAPICloseCall{Call: call} +} + +// MockLeaderAPICloseCall wrap *gomock.Call +type MockLeaderAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeaderAPICloseCall) Return(arg0 error) *MockLeaderAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeaderAPICloseCall) Do(f func() error) *MockLeaderAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeaderAPICloseCall) DoAndReturn(f func() error) *MockLeaderAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Leader mocks base method. @@ -223,9 +463,33 @@ func (m *MockLeaderAPI) Leader(arg0 string) (string, error) { } // Leader indicates an expected call of Leader. -func (mr *MockLeaderAPIMockRecorder) Leader(arg0 any) *gomock.Call { +func (mr *MockLeaderAPIMockRecorder) Leader(arg0 any) *MockLeaderAPILeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockLeaderAPI)(nil).Leader), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockLeaderAPI)(nil).Leader), arg0) + return &MockLeaderAPILeaderCall{Call: call} +} + +// MockLeaderAPILeaderCall wrap *gomock.Call +type MockLeaderAPILeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeaderAPILeaderCall) Return(arg0 string, arg1 error) *MockLeaderAPILeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeaderAPILeaderCall) Do(f func(string) (string, error)) *MockLeaderAPILeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeaderAPILeaderCall) DoAndReturn(f func(string) (string, error)) *MockLeaderAPILeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSSHClientAPI is a mock of SSHClientAPI interface. @@ -261,9 +525,33 @@ func (m *MockSSHClientAPI) AllAddresses(arg0 string) ([]string, error) { } // AllAddresses indicates an expected call of AllAddresses. -func (mr *MockSSHClientAPIMockRecorder) AllAddresses(arg0 any) *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) AllAddresses(arg0 any) *MockSSHClientAPIAllAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAddresses", reflect.TypeOf((*MockSSHClientAPI)(nil).AllAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAddresses", reflect.TypeOf((*MockSSHClientAPI)(nil).AllAddresses), arg0) + return &MockSSHClientAPIAllAddressesCall{Call: call} +} + +// MockSSHClientAPIAllAddressesCall wrap *gomock.Call +type MockSSHClientAPIAllAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIAllAddressesCall) Return(arg0 []string, arg1 error) *MockSSHClientAPIAllAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIAllAddressesCall) Do(f func(string) ([]string, error)) *MockSSHClientAPIAllAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIAllAddressesCall) DoAndReturn(f func(string) ([]string, error)) *MockSSHClientAPIAllAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -275,9 +563,33 @@ func (m *MockSSHClientAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockSSHClientAPIMockRecorder) Close() *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) Close() *MockSSHClientAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSSHClientAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSSHClientAPI)(nil).Close)) + return &MockSSHClientAPICloseCall{Call: call} +} + +// MockSSHClientAPICloseCall wrap *gomock.Call +type MockSSHClientAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPICloseCall) Return(arg0 error) *MockSSHClientAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPICloseCall) Do(f func() error) *MockSSHClientAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPICloseCall) DoAndReturn(f func() error) *MockSSHClientAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelCredentialForSSH mocks base method. @@ -290,9 +602,33 @@ func (m *MockSSHClientAPI) ModelCredentialForSSH() (cloudspec.CloudSpec, error) } // ModelCredentialForSSH indicates an expected call of ModelCredentialForSSH. -func (mr *MockSSHClientAPIMockRecorder) ModelCredentialForSSH() *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) ModelCredentialForSSH() *MockSSHClientAPIModelCredentialForSSHCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelCredentialForSSH", reflect.TypeOf((*MockSSHClientAPI)(nil).ModelCredentialForSSH)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelCredentialForSSH", reflect.TypeOf((*MockSSHClientAPI)(nil).ModelCredentialForSSH)) + return &MockSSHClientAPIModelCredentialForSSHCall{Call: call} +} + +// MockSSHClientAPIModelCredentialForSSHCall wrap *gomock.Call +type MockSSHClientAPIModelCredentialForSSHCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIModelCredentialForSSHCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockSSHClientAPIModelCredentialForSSHCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIModelCredentialForSSHCall) Do(f func() (cloudspec.CloudSpec, error)) *MockSSHClientAPIModelCredentialForSSHCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIModelCredentialForSSHCall) DoAndReturn(f func() (cloudspec.CloudSpec, error)) *MockSSHClientAPIModelCredentialForSSHCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrivateAddress mocks base method. @@ -305,9 +641,33 @@ func (m *MockSSHClientAPI) PrivateAddress(arg0 string) (string, error) { } // PrivateAddress indicates an expected call of PrivateAddress. -func (mr *MockSSHClientAPIMockRecorder) PrivateAddress(arg0 any) *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) PrivateAddress(arg0 any) *MockSSHClientAPIPrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockSSHClientAPI)(nil).PrivateAddress), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockSSHClientAPI)(nil).PrivateAddress), arg0) + return &MockSSHClientAPIPrivateAddressCall{Call: call} +} + +// MockSSHClientAPIPrivateAddressCall wrap *gomock.Call +type MockSSHClientAPIPrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIPrivateAddressCall) Return(arg0 string, arg1 error) *MockSSHClientAPIPrivateAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIPrivateAddressCall) Do(f func(string) (string, error)) *MockSSHClientAPIPrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIPrivateAddressCall) DoAndReturn(f func(string) (string, error)) *MockSSHClientAPIPrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Proxy mocks base method. @@ -320,9 +680,33 @@ func (m *MockSSHClientAPI) Proxy() (bool, error) { } // Proxy indicates an expected call of Proxy. -func (mr *MockSSHClientAPIMockRecorder) Proxy() *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) Proxy() *MockSSHClientAPIProxyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proxy", reflect.TypeOf((*MockSSHClientAPI)(nil).Proxy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proxy", reflect.TypeOf((*MockSSHClientAPI)(nil).Proxy)) + return &MockSSHClientAPIProxyCall{Call: call} +} + +// MockSSHClientAPIProxyCall wrap *gomock.Call +type MockSSHClientAPIProxyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIProxyCall) Return(arg0 bool, arg1 error) *MockSSHClientAPIProxyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIProxyCall) Do(f func() (bool, error)) *MockSSHClientAPIProxyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIProxyCall) DoAndReturn(f func() (bool, error)) *MockSSHClientAPIProxyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -335,9 +719,33 @@ func (m *MockSSHClientAPI) PublicAddress(arg0 string) (string, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockSSHClientAPIMockRecorder) PublicAddress(arg0 any) *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) PublicAddress(arg0 any) *MockSSHClientAPIPublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockSSHClientAPI)(nil).PublicAddress), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockSSHClientAPI)(nil).PublicAddress), arg0) + return &MockSSHClientAPIPublicAddressCall{Call: call} +} + +// MockSSHClientAPIPublicAddressCall wrap *gomock.Call +type MockSSHClientAPIPublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIPublicAddressCall) Return(arg0 string, arg1 error) *MockSSHClientAPIPublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIPublicAddressCall) Do(f func(string) (string, error)) *MockSSHClientAPIPublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIPublicAddressCall) DoAndReturn(f func(string) (string, error)) *MockSSHClientAPIPublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicKeys mocks base method. @@ -350,9 +758,33 @@ func (m *MockSSHClientAPI) PublicKeys(arg0 string) ([]string, error) { } // PublicKeys indicates an expected call of PublicKeys. -func (mr *MockSSHClientAPIMockRecorder) PublicKeys(arg0 any) *gomock.Call { +func (mr *MockSSHClientAPIMockRecorder) PublicKeys(arg0 any) *MockSSHClientAPIPublicKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicKeys", reflect.TypeOf((*MockSSHClientAPI)(nil).PublicKeys), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicKeys", reflect.TypeOf((*MockSSHClientAPI)(nil).PublicKeys), arg0) + return &MockSSHClientAPIPublicKeysCall{Call: call} +} + +// MockSSHClientAPIPublicKeysCall wrap *gomock.Call +type MockSSHClientAPIPublicKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHClientAPIPublicKeysCall) Return(arg0 []string, arg1 error) *MockSSHClientAPIPublicKeysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHClientAPIPublicKeysCall) Do(f func(string) ([]string, error)) *MockSSHClientAPIPublicKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHClientAPIPublicKeysCall) DoAndReturn(f func(string) ([]string, error)) *MockSSHClientAPIPublicKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSSHControllerAPI is a mock of SSHControllerAPI interface. @@ -388,9 +820,33 @@ func (m *MockSSHControllerAPI) ControllerConfig() (controller.Config, error) { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockSSHControllerAPIMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockSSHControllerAPIMockRecorder) ControllerConfig() *MockSSHControllerAPIControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockSSHControllerAPI)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockSSHControllerAPI)(nil).ControllerConfig)) + return &MockSSHControllerAPIControllerConfigCall{Call: call} +} + +// MockSSHControllerAPIControllerConfigCall wrap *gomock.Call +type MockSSHControllerAPIControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSHControllerAPIControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockSSHControllerAPIControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSHControllerAPIControllerConfigCall) Do(f func() (controller.Config, error)) *MockSSHControllerAPIControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSHControllerAPIControllerConfigCall) DoAndReturn(f func() (controller.Config, error)) *MockSSHControllerAPIControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStatusClientAPI is a mock of StatusClientAPI interface. @@ -425,9 +881,33 @@ func (m *MockStatusClientAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockStatusClientAPIMockRecorder) Close() *gomock.Call { +func (mr *MockStatusClientAPIMockRecorder) Close() *MockStatusClientAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStatusClientAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStatusClientAPI)(nil).Close)) + return &MockStatusClientAPICloseCall{Call: call} +} + +// MockStatusClientAPICloseCall wrap *gomock.Call +type MockStatusClientAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusClientAPICloseCall) Return(arg0 error) *MockStatusClientAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusClientAPICloseCall) Do(f func() error) *MockStatusClientAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusClientAPICloseCall) DoAndReturn(f func() error) *MockStatusClientAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -440,9 +920,33 @@ func (m *MockStatusClientAPI) Status(arg0 *client.StatusArgs) (*params.FullStatu } // Status indicates an expected call of Status. -func (mr *MockStatusClientAPIMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockStatusClientAPIMockRecorder) Status(arg0 any) *MockStatusClientAPIStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockStatusClientAPI)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockStatusClientAPI)(nil).Status), arg0) + return &MockStatusClientAPIStatusCall{Call: call} +} + +// MockStatusClientAPIStatusCall wrap *gomock.Call +type MockStatusClientAPIStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusClientAPIStatusCall) Return(arg0 *params.FullStatus, arg1 error) *MockStatusClientAPIStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusClientAPIStatusCall) Do(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockStatusClientAPIStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusClientAPIStatusCall) DoAndReturn(f func(*client.StatusArgs) (*params.FullStatus, error)) *MockStatusClientAPIStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudCredentialAPI is a mock of CloudCredentialAPI interface. @@ -477,9 +981,33 @@ func (m *MockCloudCredentialAPI) BestAPIVersion() int { } // BestAPIVersion indicates an expected call of BestAPIVersion. -func (mr *MockCloudCredentialAPIMockRecorder) BestAPIVersion() *gomock.Call { +func (mr *MockCloudCredentialAPIMockRecorder) BestAPIVersion() *MockCloudCredentialAPIBestAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockCloudCredentialAPI)(nil).BestAPIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockCloudCredentialAPI)(nil).BestAPIVersion)) + return &MockCloudCredentialAPIBestAPIVersionCall{Call: call} +} + +// MockCloudCredentialAPIBestAPIVersionCall wrap *gomock.Call +type MockCloudCredentialAPIBestAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudCredentialAPIBestAPIVersionCall) Return(arg0 int) *MockCloudCredentialAPIBestAPIVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudCredentialAPIBestAPIVersionCall) Do(f func() int) *MockCloudCredentialAPIBestAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudCredentialAPIBestAPIVersionCall) DoAndReturn(f func() int) *MockCloudCredentialAPIBestAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -491,9 +1019,33 @@ func (m *MockCloudCredentialAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCloudCredentialAPIMockRecorder) Close() *gomock.Call { +func (mr *MockCloudCredentialAPIMockRecorder) Close() *MockCloudCredentialAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCloudCredentialAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCloudCredentialAPI)(nil).Close)) + return &MockCloudCredentialAPICloseCall{Call: call} +} + +// MockCloudCredentialAPICloseCall wrap *gomock.Call +type MockCloudCredentialAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudCredentialAPICloseCall) Return(arg0 error) *MockCloudCredentialAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudCredentialAPICloseCall) Do(f func() error) *MockCloudCredentialAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudCredentialAPICloseCall) DoAndReturn(f func() error) *MockCloudCredentialAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -506,9 +1058,33 @@ func (m *MockCloudCredentialAPI) Cloud(arg0 names.CloudTag) (cloud.Cloud, error) } // Cloud indicates an expected call of Cloud. -func (mr *MockCloudCredentialAPIMockRecorder) Cloud(arg0 any) *gomock.Call { +func (mr *MockCloudCredentialAPIMockRecorder) Cloud(arg0 any) *MockCloudCredentialAPICloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudCredentialAPI)(nil).Cloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudCredentialAPI)(nil).Cloud), arg0) + return &MockCloudCredentialAPICloudCall{Call: call} +} + +// MockCloudCredentialAPICloudCall wrap *gomock.Call +type MockCloudCredentialAPICloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudCredentialAPICloudCall) Return(arg0 cloud.Cloud, arg1 error) *MockCloudCredentialAPICloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudCredentialAPICloudCall) Do(f func(names.CloudTag) (cloud.Cloud, error)) *MockCloudCredentialAPICloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudCredentialAPICloudCall) DoAndReturn(f func(names.CloudTag) (cloud.Cloud, error)) *MockCloudCredentialAPICloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialContents mocks base method. @@ -521,9 +1097,33 @@ func (m *MockCloudCredentialAPI) CredentialContents(arg0, arg1 string, arg2 bool } // CredentialContents indicates an expected call of CredentialContents. -func (mr *MockCloudCredentialAPIMockRecorder) CredentialContents(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudCredentialAPIMockRecorder) CredentialContents(arg0, arg1, arg2 any) *MockCloudCredentialAPICredentialContentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialContents", reflect.TypeOf((*MockCloudCredentialAPI)(nil).CredentialContents), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialContents", reflect.TypeOf((*MockCloudCredentialAPI)(nil).CredentialContents), arg0, arg1, arg2) + return &MockCloudCredentialAPICredentialContentsCall{Call: call} +} + +// MockCloudCredentialAPICredentialContentsCall wrap *gomock.Call +type MockCloudCredentialAPICredentialContentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudCredentialAPICredentialContentsCall) Return(arg0 []params.CredentialContentResult, arg1 error) *MockCloudCredentialAPICredentialContentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudCredentialAPICredentialContentsCall) Do(f func(string, string, bool) ([]params.CredentialContentResult, error)) *MockCloudCredentialAPICredentialContentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudCredentialAPICredentialContentsCall) DoAndReturn(f func(string, string, bool) ([]params.CredentialContentResult, error)) *MockCloudCredentialAPICredentialContentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationAPI is a mock of ApplicationAPI interface. @@ -558,9 +1158,33 @@ func (m *MockApplicationAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockApplicationAPIMockRecorder) Close() *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) Close() *MockApplicationAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockApplicationAPI)(nil).Close)) + return &MockApplicationAPICloseCall{Call: call} +} + +// MockApplicationAPICloseCall wrap *gomock.Call +type MockApplicationAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPICloseCall) Return(arg0 error) *MockApplicationAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPICloseCall) Do(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPICloseCall) DoAndReturn(f func() error) *MockApplicationAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmURLOrigin mocks base method. @@ -574,9 +1198,33 @@ func (m *MockApplicationAPI) GetCharmURLOrigin(arg0, arg1 string) (*charm.URL, c } // GetCharmURLOrigin indicates an expected call of GetCharmURLOrigin. -func (mr *MockApplicationAPIMockRecorder) GetCharmURLOrigin(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) GetCharmURLOrigin(arg0, arg1 any) *MockApplicationAPIGetCharmURLOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockApplicationAPI)(nil).GetCharmURLOrigin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockApplicationAPI)(nil).GetCharmURLOrigin), arg0, arg1) + return &MockApplicationAPIGetCharmURLOriginCall{Call: call} +} + +// MockApplicationAPIGetCharmURLOriginCall wrap *gomock.Call +type MockApplicationAPIGetCharmURLOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPIGetCharmURLOriginCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 error) *MockApplicationAPIGetCharmURLOriginCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPIGetCharmURLOriginCall) Do(f func(string, string) (*charm.URL, charm0.Origin, error)) *MockApplicationAPIGetCharmURLOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPIGetCharmURLOriginCall) DoAndReturn(f func(string, string) (*charm.URL, charm0.Origin, error)) *MockApplicationAPIGetCharmURLOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Leader mocks base method. @@ -589,9 +1237,33 @@ func (m *MockApplicationAPI) Leader(arg0 string) (string, error) { } // Leader indicates an expected call of Leader. -func (mr *MockApplicationAPIMockRecorder) Leader(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) Leader(arg0 any) *MockApplicationAPILeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockApplicationAPI)(nil).Leader), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockApplicationAPI)(nil).Leader), arg0) + return &MockApplicationAPILeaderCall{Call: call} +} + +// MockApplicationAPILeaderCall wrap *gomock.Call +type MockApplicationAPILeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPILeaderCall) Return(arg0 string, arg1 error) *MockApplicationAPILeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPILeaderCall) Do(f func(string) (string, error)) *MockApplicationAPILeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPILeaderCall) DoAndReturn(f func(string) (string, error)) *MockApplicationAPILeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitsInfo mocks base method. @@ -604,9 +1276,33 @@ func (m *MockApplicationAPI) UnitsInfo(arg0 []names.UnitTag) ([]application.Unit } // UnitsInfo indicates an expected call of UnitsInfo. -func (mr *MockApplicationAPIMockRecorder) UnitsInfo(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIMockRecorder) UnitsInfo(arg0 any) *MockApplicationAPIUnitsInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsInfo", reflect.TypeOf((*MockApplicationAPI)(nil).UnitsInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsInfo", reflect.TypeOf((*MockApplicationAPI)(nil).UnitsInfo), arg0) + return &MockApplicationAPIUnitsInfoCall{Call: call} +} + +// MockApplicationAPIUnitsInfoCall wrap *gomock.Call +type MockApplicationAPIUnitsInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAPIUnitsInfoCall) Return(arg0 []application.UnitInfo, arg1 error) *MockApplicationAPIUnitsInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAPIUnitsInfoCall) Do(f func([]names.UnitTag) ([]application.UnitInfo, error)) *MockApplicationAPIUnitsInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAPIUnitsInfoCall) DoAndReturn(f func([]names.UnitTag) ([]application.UnitInfo, error)) *MockApplicationAPIUnitsInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmAPI is a mock of CharmAPI interface. @@ -642,9 +1338,33 @@ func (m *MockCharmAPI) CharmInfo(arg0 string) (*charms.CharmInfo, error) { } // CharmInfo indicates an expected call of CharmInfo. -func (mr *MockCharmAPIMockRecorder) CharmInfo(arg0 any) *gomock.Call { +func (mr *MockCharmAPIMockRecorder) CharmInfo(arg0 any) *MockCharmAPICharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCharmAPI)(nil).CharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCharmAPI)(nil).CharmInfo), arg0) + return &MockCharmAPICharmInfoCall{Call: call} +} + +// MockCharmAPICharmInfoCall wrap *gomock.Call +type MockCharmAPICharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAPICharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockCharmAPICharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAPICharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockCharmAPICharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAPICharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockCharmAPICharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -656,9 +1376,33 @@ func (m *MockCharmAPI) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCharmAPIMockRecorder) Close() *gomock.Call { +func (mr *MockCharmAPIMockRecorder) Close() *MockCharmAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCharmAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCharmAPI)(nil).Close)) + return &MockCharmAPICloseCall{Call: call} +} + +// MockCharmAPICloseCall wrap *gomock.Call +type MockCharmAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmAPICloseCall) Return(arg0 error) *MockCharmAPICloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmAPICloseCall) Do(f func() error) *MockCharmAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmAPICloseCall) DoAndReturn(f func() error) *MockCharmAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelCommand is a mock of ModelCommand interface. @@ -695,9 +1439,33 @@ func (m *MockModelCommand) ModelDetails() (string, *jujuclient.ModelDetails, err } // ModelDetails indicates an expected call of ModelDetails. -func (mr *MockModelCommandMockRecorder) ModelDetails() *gomock.Call { +func (mr *MockModelCommandMockRecorder) ModelDetails() *MockModelCommandModelDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDetails", reflect.TypeOf((*MockModelCommand)(nil).ModelDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDetails", reflect.TypeOf((*MockModelCommand)(nil).ModelDetails)) + return &MockModelCommandModelDetailsCall{Call: call} +} + +// MockModelCommandModelDetailsCall wrap *gomock.Call +type MockModelCommandModelDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandModelDetailsCall) Return(arg0 string, arg1 *jujuclient.ModelDetails, arg2 error) *MockModelCommandModelDetailsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandModelDetailsCall) Do(f func() (string, *jujuclient.ModelDetails, error)) *MockModelCommandModelDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandModelDetailsCall) DoAndReturn(f func() (string, *jujuclient.ModelDetails, error)) *MockModelCommandModelDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelIdentifier mocks base method. @@ -710,9 +1478,33 @@ func (m *MockModelCommand) ModelIdentifier() (string, error) { } // ModelIdentifier indicates an expected call of ModelIdentifier. -func (mr *MockModelCommandMockRecorder) ModelIdentifier() *gomock.Call { +func (mr *MockModelCommandMockRecorder) ModelIdentifier() *MockModelCommandModelIdentifierCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelIdentifier", reflect.TypeOf((*MockModelCommand)(nil).ModelIdentifier)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelIdentifier", reflect.TypeOf((*MockModelCommand)(nil).ModelIdentifier)) + return &MockModelCommandModelIdentifierCall{Call: call} +} + +// MockModelCommandModelIdentifierCall wrap *gomock.Call +type MockModelCommandModelIdentifierCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandModelIdentifierCall) Return(arg0 string, arg1 error) *MockModelCommandModelIdentifierCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandModelIdentifierCall) Do(f func() (string, error)) *MockModelCommandModelIdentifierCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandModelIdentifierCall) DoAndReturn(f func() (string, error)) *MockModelCommandModelIdentifierCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewAPIClient mocks base method. @@ -725,9 +1517,33 @@ func (m *MockModelCommand) NewAPIClient() (*client.Client, error) { } // NewAPIClient indicates an expected call of NewAPIClient. -func (mr *MockModelCommandMockRecorder) NewAPIClient() *gomock.Call { +func (mr *MockModelCommandMockRecorder) NewAPIClient() *MockModelCommandNewAPIClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAPIClient", reflect.TypeOf((*MockModelCommand)(nil).NewAPIClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAPIClient", reflect.TypeOf((*MockModelCommand)(nil).NewAPIClient)) + return &MockModelCommandNewAPIClientCall{Call: call} +} + +// MockModelCommandNewAPIClientCall wrap *gomock.Call +type MockModelCommandNewAPIClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandNewAPIClientCall) Return(arg0 *client.Client, arg1 error) *MockModelCommandNewAPIClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandNewAPIClientCall) Do(f func() (*client.Client, error)) *MockModelCommandNewAPIClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandNewAPIClientCall) DoAndReturn(f func() (*client.Client, error)) *MockModelCommandNewAPIClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewAPIRoot mocks base method. @@ -740,9 +1556,33 @@ func (m *MockModelCommand) NewAPIRoot() (api.Connection, error) { } // NewAPIRoot indicates an expected call of NewAPIRoot. -func (mr *MockModelCommandMockRecorder) NewAPIRoot() *gomock.Call { +func (mr *MockModelCommandMockRecorder) NewAPIRoot() *MockModelCommandNewAPIRootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAPIRoot", reflect.TypeOf((*MockModelCommand)(nil).NewAPIRoot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAPIRoot", reflect.TypeOf((*MockModelCommand)(nil).NewAPIRoot)) + return &MockModelCommandNewAPIRootCall{Call: call} +} + +// MockModelCommandNewAPIRootCall wrap *gomock.Call +type MockModelCommandNewAPIRootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandNewAPIRootCall) Return(arg0 api.Connection, arg1 error) *MockModelCommandNewAPIRootCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandNewAPIRootCall) Do(f func() (api.Connection, error)) *MockModelCommandNewAPIRootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandNewAPIRootCall) DoAndReturn(f func() (api.Connection, error)) *MockModelCommandNewAPIRootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewControllerAPIRoot mocks base method. @@ -755,7 +1595,31 @@ func (m *MockModelCommand) NewControllerAPIRoot() (api.Connection, error) { } // NewControllerAPIRoot indicates an expected call of NewControllerAPIRoot. -func (mr *MockModelCommandMockRecorder) NewControllerAPIRoot() *gomock.Call { +func (mr *MockModelCommandMockRecorder) NewControllerAPIRoot() *MockModelCommandNewControllerAPIRootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewControllerAPIRoot", reflect.TypeOf((*MockModelCommand)(nil).NewControllerAPIRoot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewControllerAPIRoot", reflect.TypeOf((*MockModelCommand)(nil).NewControllerAPIRoot)) + return &MockModelCommandNewControllerAPIRootCall{Call: call} +} + +// MockModelCommandNewControllerAPIRootCall wrap *gomock.Call +type MockModelCommandNewControllerAPIRootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCommandNewControllerAPIRootCall) Return(arg0 api.Connection, arg1 error) *MockModelCommandNewControllerAPIRootCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCommandNewControllerAPIRootCall) Do(f func() (api.Connection, error)) *MockModelCommandNewControllerAPIRootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCommandNewControllerAPIRootCall) DoAndReturn(f func() (api.Connection, error)) *MockModelCommandNewControllerAPIRootCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/ssh/package_test.go b/cmd/juju/ssh/package_test.go index e2ce76638a0..28d835cc676 100644 --- a/cmd/juju/ssh/package_test.go +++ b/cmd/juju/ssh/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/cmd/juju/ssh Context,LeaderAPI,SSHClientAPI,SSHControllerAPI,StatusClientAPI,CloudCredentialAPI,ApplicationAPI,CharmAPI,ModelCommand -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/k8s_exec_mock.go github.com/juju/juju/caas/kubernetes/provider/exec Executor +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/cmd/juju/ssh Context,LeaderAPI,SSHClientAPI,SSHControllerAPI,StatusClientAPI,CloudCredentialAPI,ApplicationAPI,CharmAPI,ModelCommand +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/k8s_exec_mock.go github.com/juju/juju/caas/kubernetes/provider/exec Executor func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/cmd/juju/user/package_test.go b/cmd/juju/user/package_test.go index f939bb8c3c6..a1d1b8ccad8 100644 --- a/cmd/juju/user/package_test.go +++ b/cmd/juju/user/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package user_test -destination utils_controllercommand_mock_test.go github.com/juju/juju/cmd/juju/user ControllerCommand -//go:generate go run go.uber.org/mock/mockgen -package user_test -destination utils_clientstore_mock_test.go github.com/juju/juju/jujuclient ClientStore +//go:generate go run go.uber.org/mock/mockgen -typed -package user_test -destination utils_controllercommand_mock_test.go github.com/juju/juju/cmd/juju/user ControllerCommand +//go:generate go run go.uber.org/mock/mockgen -typed -package user_test -destination utils_clientstore_mock_test.go github.com/juju/juju/jujuclient ClientStore // None of the tests in this package require mongo. // Full command integration tests are found in cmd/juju/user_test.go diff --git a/cmd/juju/user/utils_clientstore_mock_test.go b/cmd/juju/user/utils_clientstore_mock_test.go index f7f2fc23897..0401841990d 100644 --- a/cmd/juju/user/utils_clientstore_mock_test.go +++ b/cmd/juju/user/utils_clientstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package user_test -destination utils_clientstore_mock_test.go github.com/juju/juju/jujuclient ClientStore +// mockgen -typed -package user_test -destination utils_clientstore_mock_test.go github.com/juju/juju/jujuclient ClientStore // // Package user_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockClientStore) AccountDetails(arg0 string) (*jujuclient.AccountDetail } // AccountDetails indicates an expected call of AccountDetails. -func (mr *MockClientStoreMockRecorder) AccountDetails(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AccountDetails(arg0 any) *MockClientStoreAccountDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDetails", reflect.TypeOf((*MockClientStore)(nil).AccountDetails), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDetails", reflect.TypeOf((*MockClientStore)(nil).AccountDetails), arg0) + return &MockClientStoreAccountDetailsCall{Call: call} +} + +// MockClientStoreAccountDetailsCall wrap *gomock.Call +type MockClientStoreAccountDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAccountDetailsCall) Return(arg0 *jujuclient.AccountDetails, arg1 error) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAccountDetailsCall) Do(f func(string) (*jujuclient.AccountDetails, error)) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAccountDetailsCall) DoAndReturn(f func(string) (*jujuclient.AccountDetails, error)) *MockClientStoreAccountDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddController mocks base method. @@ -64,9 +88,33 @@ func (m *MockClientStore) AddController(arg0 string, arg1 jujuclient.ControllerD } // AddController indicates an expected call of AddController. -func (mr *MockClientStoreMockRecorder) AddController(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AddController(arg0, arg1 any) *MockClientStoreAddControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddController", reflect.TypeOf((*MockClientStore)(nil).AddController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddController", reflect.TypeOf((*MockClientStore)(nil).AddController), arg0, arg1) + return &MockClientStoreAddControllerCall{Call: call} +} + +// MockClientStoreAddControllerCall wrap *gomock.Call +type MockClientStoreAddControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAddControllerCall) Return(arg0 error) *MockClientStoreAddControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAddControllerCall) Do(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreAddControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAddControllerCall) DoAndReturn(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreAddControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllControllers mocks base method. @@ -79,9 +127,33 @@ func (m *MockClientStore) AllControllers() (map[string]jujuclient.ControllerDeta } // AllControllers indicates an expected call of AllControllers. -func (mr *MockClientStoreMockRecorder) AllControllers() *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllControllers() *MockClientStoreAllControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllControllers", reflect.TypeOf((*MockClientStore)(nil).AllControllers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllControllers", reflect.TypeOf((*MockClientStore)(nil).AllControllers)) + return &MockClientStoreAllControllersCall{Call: call} +} + +// MockClientStoreAllControllersCall wrap *gomock.Call +type MockClientStoreAllControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllControllersCall) Return(arg0 map[string]jujuclient.ControllerDetails, arg1 error) *MockClientStoreAllControllersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllControllersCall) Do(f func() (map[string]jujuclient.ControllerDetails, error)) *MockClientStoreAllControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllControllersCall) DoAndReturn(f func() (map[string]jujuclient.ControllerDetails, error)) *MockClientStoreAllControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllCredentials mocks base method. @@ -94,9 +166,33 @@ func (m *MockClientStore) AllCredentials() (map[string]cloud.CloudCredential, er } // AllCredentials indicates an expected call of AllCredentials. -func (mr *MockClientStoreMockRecorder) AllCredentials() *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllCredentials() *MockClientStoreAllCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockClientStore)(nil).AllCredentials)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCredentials", reflect.TypeOf((*MockClientStore)(nil).AllCredentials)) + return &MockClientStoreAllCredentialsCall{Call: call} +} + +// MockClientStoreAllCredentialsCall wrap *gomock.Call +type MockClientStoreAllCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllCredentialsCall) Return(arg0 map[string]cloud.CloudCredential, arg1 error) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllCredentialsCall) Do(f func() (map[string]cloud.CloudCredential, error)) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllCredentialsCall) DoAndReturn(f func() (map[string]cloud.CloudCredential, error)) *MockClientStoreAllCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModels mocks base method. @@ -109,9 +205,33 @@ func (m *MockClientStore) AllModels(arg0 string) (map[string]jujuclient.ModelDet } // AllModels indicates an expected call of AllModels. -func (mr *MockClientStoreMockRecorder) AllModels(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) AllModels(arg0 any) *MockClientStoreAllModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModels", reflect.TypeOf((*MockClientStore)(nil).AllModels), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModels", reflect.TypeOf((*MockClientStore)(nil).AllModels), arg0) + return &MockClientStoreAllModelsCall{Call: call} +} + +// MockClientStoreAllModelsCall wrap *gomock.Call +type MockClientStoreAllModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreAllModelsCall) Return(arg0 map[string]jujuclient.ModelDetails, arg1 error) *MockClientStoreAllModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreAllModelsCall) Do(f func(string) (map[string]jujuclient.ModelDetails, error)) *MockClientStoreAllModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreAllModelsCall) DoAndReturn(f func(string) (map[string]jujuclient.ModelDetails, error)) *MockClientStoreAllModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BootstrapConfigForController mocks base method. @@ -124,9 +244,33 @@ func (m *MockClientStore) BootstrapConfigForController(arg0 string) (*jujuclient } // BootstrapConfigForController indicates an expected call of BootstrapConfigForController. -func (mr *MockClientStoreMockRecorder) BootstrapConfigForController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) BootstrapConfigForController(arg0 any) *MockClientStoreBootstrapConfigForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BootstrapConfigForController", reflect.TypeOf((*MockClientStore)(nil).BootstrapConfigForController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BootstrapConfigForController", reflect.TypeOf((*MockClientStore)(nil).BootstrapConfigForController), arg0) + return &MockClientStoreBootstrapConfigForControllerCall{Call: call} +} + +// MockClientStoreBootstrapConfigForControllerCall wrap *gomock.Call +type MockClientStoreBootstrapConfigForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreBootstrapConfigForControllerCall) Return(arg0 *jujuclient.BootstrapConfig, arg1 error) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreBootstrapConfigForControllerCall) Do(f func(string) (*jujuclient.BootstrapConfig, error)) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreBootstrapConfigForControllerCall) DoAndReturn(f func(string) (*jujuclient.BootstrapConfig, error)) *MockClientStoreBootstrapConfigForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerByAPIEndpoints mocks base method. @@ -144,9 +288,33 @@ func (m *MockClientStore) ControllerByAPIEndpoints(arg0 ...string) (*jujuclient. } // ControllerByAPIEndpoints indicates an expected call of ControllerByAPIEndpoints. -func (mr *MockClientStoreMockRecorder) ControllerByAPIEndpoints(arg0 ...any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ControllerByAPIEndpoints(arg0 ...any) *MockClientStoreControllerByAPIEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByAPIEndpoints", reflect.TypeOf((*MockClientStore)(nil).ControllerByAPIEndpoints), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByAPIEndpoints", reflect.TypeOf((*MockClientStore)(nil).ControllerByAPIEndpoints), arg0...) + return &MockClientStoreControllerByAPIEndpointsCall{Call: call} +} + +// MockClientStoreControllerByAPIEndpointsCall wrap *gomock.Call +type MockClientStoreControllerByAPIEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreControllerByAPIEndpointsCall) Return(arg0 *jujuclient.ControllerDetails, arg1 string, arg2 error) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreControllerByAPIEndpointsCall) Do(f func(...string) (*jujuclient.ControllerDetails, string, error)) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreControllerByAPIEndpointsCall) DoAndReturn(f func(...string) (*jujuclient.ControllerDetails, string, error)) *MockClientStoreControllerByAPIEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerByName mocks base method. @@ -159,9 +327,33 @@ func (m *MockClientStore) ControllerByName(arg0 string) (*jujuclient.ControllerD } // ControllerByName indicates an expected call of ControllerByName. -func (mr *MockClientStoreMockRecorder) ControllerByName(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ControllerByName(arg0 any) *MockClientStoreControllerByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByName", reflect.TypeOf((*MockClientStore)(nil).ControllerByName), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerByName", reflect.TypeOf((*MockClientStore)(nil).ControllerByName), arg0) + return &MockClientStoreControllerByNameCall{Call: call} +} + +// MockClientStoreControllerByNameCall wrap *gomock.Call +type MockClientStoreControllerByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreControllerByNameCall) Return(arg0 *jujuclient.ControllerDetails, arg1 error) *MockClientStoreControllerByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreControllerByNameCall) Do(f func(string) (*jujuclient.ControllerDetails, error)) *MockClientStoreControllerByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreControllerByNameCall) DoAndReturn(f func(string) (*jujuclient.ControllerDetails, error)) *MockClientStoreControllerByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CookieJar mocks base method. @@ -174,9 +366,33 @@ func (m *MockClientStore) CookieJar(arg0 string) (jujuclient.CookieJar, error) { } // CookieJar indicates an expected call of CookieJar. -func (mr *MockClientStoreMockRecorder) CookieJar(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CookieJar(arg0 any) *MockClientStoreCookieJarCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieJar", reflect.TypeOf((*MockClientStore)(nil).CookieJar), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieJar", reflect.TypeOf((*MockClientStore)(nil).CookieJar), arg0) + return &MockClientStoreCookieJarCall{Call: call} +} + +// MockClientStoreCookieJarCall wrap *gomock.Call +type MockClientStoreCookieJarCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCookieJarCall) Return(arg0 jujuclient.CookieJar, arg1 error) *MockClientStoreCookieJarCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCookieJarCall) Do(f func(string) (jujuclient.CookieJar, error)) *MockClientStoreCookieJarCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCookieJarCall) DoAndReturn(f func(string) (jujuclient.CookieJar, error)) *MockClientStoreCookieJarCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialForCloud mocks base method. @@ -189,9 +405,33 @@ func (m *MockClientStore) CredentialForCloud(arg0 string) (*cloud.CloudCredentia } // CredentialForCloud indicates an expected call of CredentialForCloud. -func (mr *MockClientStoreMockRecorder) CredentialForCloud(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CredentialForCloud(arg0 any) *MockClientStoreCredentialForCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockClientStore)(nil).CredentialForCloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialForCloud", reflect.TypeOf((*MockClientStore)(nil).CredentialForCloud), arg0) + return &MockClientStoreCredentialForCloudCall{Call: call} +} + +// MockClientStoreCredentialForCloudCall wrap *gomock.Call +type MockClientStoreCredentialForCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCredentialForCloudCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCredentialForCloudCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCredentialForCloudCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockClientStoreCredentialForCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentController mocks base method. @@ -204,9 +444,33 @@ func (m *MockClientStore) CurrentController() (string, error) { } // CurrentController indicates an expected call of CurrentController. -func (mr *MockClientStoreMockRecorder) CurrentController() *gomock.Call { +func (mr *MockClientStoreMockRecorder) CurrentController() *MockClientStoreCurrentControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentController", reflect.TypeOf((*MockClientStore)(nil).CurrentController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentController", reflect.TypeOf((*MockClientStore)(nil).CurrentController)) + return &MockClientStoreCurrentControllerCall{Call: call} +} + +// MockClientStoreCurrentControllerCall wrap *gomock.Call +type MockClientStoreCurrentControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCurrentControllerCall) Return(arg0 string, arg1 error) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCurrentControllerCall) Do(f func() (string, error)) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCurrentControllerCall) DoAndReturn(f func() (string, error)) *MockClientStoreCurrentControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentModel mocks base method. @@ -219,9 +483,33 @@ func (m *MockClientStore) CurrentModel(arg0 string) (string, error) { } // CurrentModel indicates an expected call of CurrentModel. -func (mr *MockClientStoreMockRecorder) CurrentModel(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) CurrentModel(arg0 any) *MockClientStoreCurrentModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentModel", reflect.TypeOf((*MockClientStore)(nil).CurrentModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentModel", reflect.TypeOf((*MockClientStore)(nil).CurrentModel), arg0) + return &MockClientStoreCurrentModelCall{Call: call} +} + +// MockClientStoreCurrentModelCall wrap *gomock.Call +type MockClientStoreCurrentModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreCurrentModelCall) Return(arg0 string, arg1 error) *MockClientStoreCurrentModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreCurrentModelCall) Do(f func(string) (string, error)) *MockClientStoreCurrentModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreCurrentModelCall) DoAndReturn(f func(string) (string, error)) *MockClientStoreCurrentModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelByName mocks base method. @@ -234,9 +522,33 @@ func (m *MockClientStore) ModelByName(arg0, arg1 string) (*jujuclient.ModelDetai } // ModelByName indicates an expected call of ModelByName. -func (mr *MockClientStoreMockRecorder) ModelByName(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) ModelByName(arg0, arg1 any) *MockClientStoreModelByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelByName", reflect.TypeOf((*MockClientStore)(nil).ModelByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelByName", reflect.TypeOf((*MockClientStore)(nil).ModelByName), arg0, arg1) + return &MockClientStoreModelByNameCall{Call: call} +} + +// MockClientStoreModelByNameCall wrap *gomock.Call +type MockClientStoreModelByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreModelByNameCall) Return(arg0 *jujuclient.ModelDetails, arg1 error) *MockClientStoreModelByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreModelByNameCall) Do(f func(string, string) (*jujuclient.ModelDetails, error)) *MockClientStoreModelByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreModelByNameCall) DoAndReturn(f func(string, string) (*jujuclient.ModelDetails, error)) *MockClientStoreModelByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAccount mocks base method. @@ -248,9 +560,33 @@ func (m *MockClientStore) RemoveAccount(arg0 string) error { } // RemoveAccount indicates an expected call of RemoveAccount. -func (mr *MockClientStoreMockRecorder) RemoveAccount(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveAccount(arg0 any) *MockClientStoreRemoveAccountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockClientStore)(nil).RemoveAccount), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockClientStore)(nil).RemoveAccount), arg0) + return &MockClientStoreRemoveAccountCall{Call: call} +} + +// MockClientStoreRemoveAccountCall wrap *gomock.Call +type MockClientStoreRemoveAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveAccountCall) Return(arg0 error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveAccountCall) Do(f func(string) error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveAccountCall) DoAndReturn(f func(string) error) *MockClientStoreRemoveAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveController mocks base method. @@ -262,9 +598,33 @@ func (m *MockClientStore) RemoveController(arg0 string) error { } // RemoveController indicates an expected call of RemoveController. -func (mr *MockClientStoreMockRecorder) RemoveController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveController(arg0 any) *MockClientStoreRemoveControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveController", reflect.TypeOf((*MockClientStore)(nil).RemoveController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveController", reflect.TypeOf((*MockClientStore)(nil).RemoveController), arg0) + return &MockClientStoreRemoveControllerCall{Call: call} +} + +// MockClientStoreRemoveControllerCall wrap *gomock.Call +type MockClientStoreRemoveControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveControllerCall) Return(arg0 error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveControllerCall) Do(f func(string) error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveControllerCall) DoAndReturn(f func(string) error) *MockClientStoreRemoveControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveModel mocks base method. @@ -276,9 +636,33 @@ func (m *MockClientStore) RemoveModel(arg0, arg1 string) error { } // RemoveModel indicates an expected call of RemoveModel. -func (mr *MockClientStoreMockRecorder) RemoveModel(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) RemoveModel(arg0, arg1 any) *MockClientStoreRemoveModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockClientStore)(nil).RemoveModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockClientStore)(nil).RemoveModel), arg0, arg1) + return &MockClientStoreRemoveModelCall{Call: call} +} + +// MockClientStoreRemoveModelCall wrap *gomock.Call +type MockClientStoreRemoveModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreRemoveModelCall) Return(arg0 error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreRemoveModelCall) Do(f func(string, string) error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreRemoveModelCall) DoAndReturn(f func(string, string) error) *MockClientStoreRemoveModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCurrentController mocks base method. @@ -290,9 +674,33 @@ func (m *MockClientStore) SetCurrentController(arg0 string) error { } // SetCurrentController indicates an expected call of SetCurrentController. -func (mr *MockClientStoreMockRecorder) SetCurrentController(arg0 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetCurrentController(arg0 any) *MockClientStoreSetCurrentControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentController", reflect.TypeOf((*MockClientStore)(nil).SetCurrentController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentController", reflect.TypeOf((*MockClientStore)(nil).SetCurrentController), arg0) + return &MockClientStoreSetCurrentControllerCall{Call: call} +} + +// MockClientStoreSetCurrentControllerCall wrap *gomock.Call +type MockClientStoreSetCurrentControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetCurrentControllerCall) Return(arg0 error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetCurrentControllerCall) Do(f func(string) error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetCurrentControllerCall) DoAndReturn(f func(string) error) *MockClientStoreSetCurrentControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCurrentModel mocks base method. @@ -304,9 +712,33 @@ func (m *MockClientStore) SetCurrentModel(arg0, arg1 string) error { } // SetCurrentModel indicates an expected call of SetCurrentModel. -func (mr *MockClientStoreMockRecorder) SetCurrentModel(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetCurrentModel(arg0, arg1 any) *MockClientStoreSetCurrentModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentModel", reflect.TypeOf((*MockClientStore)(nil).SetCurrentModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentModel", reflect.TypeOf((*MockClientStore)(nil).SetCurrentModel), arg0, arg1) + return &MockClientStoreSetCurrentModelCall{Call: call} +} + +// MockClientStoreSetCurrentModelCall wrap *gomock.Call +type MockClientStoreSetCurrentModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetCurrentModelCall) Return(arg0 error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetCurrentModelCall) Do(f func(string, string) error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetCurrentModelCall) DoAndReturn(f func(string, string) error) *MockClientStoreSetCurrentModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModels mocks base method. @@ -318,9 +750,33 @@ func (m *MockClientStore) SetModels(arg0 string, arg1 map[string]jujuclient.Mode } // SetModels indicates an expected call of SetModels. -func (mr *MockClientStoreMockRecorder) SetModels(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) SetModels(arg0, arg1 any) *MockClientStoreSetModelsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModels", reflect.TypeOf((*MockClientStore)(nil).SetModels), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModels", reflect.TypeOf((*MockClientStore)(nil).SetModels), arg0, arg1) + return &MockClientStoreSetModelsCall{Call: call} +} + +// MockClientStoreSetModelsCall wrap *gomock.Call +type MockClientStoreSetModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreSetModelsCall) Return(arg0 error) *MockClientStoreSetModelsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreSetModelsCall) Do(f func(string, map[string]jujuclient.ModelDetails) error) *MockClientStoreSetModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreSetModelsCall) DoAndReturn(f func(string, map[string]jujuclient.ModelDetails) error) *MockClientStoreSetModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateAccount mocks base method. @@ -332,9 +788,33 @@ func (m *MockClientStore) UpdateAccount(arg0 string, arg1 jujuclient.AccountDeta } // UpdateAccount indicates an expected call of UpdateAccount. -func (mr *MockClientStoreMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateAccount(arg0, arg1 any) *MockClientStoreUpdateAccountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockClientStore)(nil).UpdateAccount), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockClientStore)(nil).UpdateAccount), arg0, arg1) + return &MockClientStoreUpdateAccountCall{Call: call} +} + +// MockClientStoreUpdateAccountCall wrap *gomock.Call +type MockClientStoreUpdateAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateAccountCall) Return(arg0 error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateAccountCall) Do(f func(string, jujuclient.AccountDetails) error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateAccountCall) DoAndReturn(f func(string, jujuclient.AccountDetails) error) *MockClientStoreUpdateAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateBootstrapConfig mocks base method. @@ -346,9 +826,33 @@ func (m *MockClientStore) UpdateBootstrapConfig(arg0 string, arg1 jujuclient.Boo } // UpdateBootstrapConfig indicates an expected call of UpdateBootstrapConfig. -func (mr *MockClientStoreMockRecorder) UpdateBootstrapConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateBootstrapConfig(arg0, arg1 any) *MockClientStoreUpdateBootstrapConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBootstrapConfig", reflect.TypeOf((*MockClientStore)(nil).UpdateBootstrapConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBootstrapConfig", reflect.TypeOf((*MockClientStore)(nil).UpdateBootstrapConfig), arg0, arg1) + return &MockClientStoreUpdateBootstrapConfigCall{Call: call} +} + +// MockClientStoreUpdateBootstrapConfigCall wrap *gomock.Call +type MockClientStoreUpdateBootstrapConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateBootstrapConfigCall) Return(arg0 error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateBootstrapConfigCall) Do(f func(string, jujuclient.BootstrapConfig) error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateBootstrapConfigCall) DoAndReturn(f func(string, jujuclient.BootstrapConfig) error) *MockClientStoreUpdateBootstrapConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateController mocks base method. @@ -360,9 +864,33 @@ func (m *MockClientStore) UpdateController(arg0 string, arg1 jujuclient.Controll } // UpdateController indicates an expected call of UpdateController. -func (mr *MockClientStoreMockRecorder) UpdateController(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateController(arg0, arg1 any) *MockClientStoreUpdateControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateController", reflect.TypeOf((*MockClientStore)(nil).UpdateController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateController", reflect.TypeOf((*MockClientStore)(nil).UpdateController), arg0, arg1) + return &MockClientStoreUpdateControllerCall{Call: call} +} + +// MockClientStoreUpdateControllerCall wrap *gomock.Call +type MockClientStoreUpdateControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateControllerCall) Return(arg0 error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateControllerCall) Do(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateControllerCall) DoAndReturn(f func(string, jujuclient.ControllerDetails) error) *MockClientStoreUpdateControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCredential mocks base method. @@ -374,9 +902,33 @@ func (m *MockClientStore) UpdateCredential(arg0 string, arg1 cloud.CloudCredenti } // UpdateCredential indicates an expected call of UpdateCredential. -func (mr *MockClientStoreMockRecorder) UpdateCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateCredential(arg0, arg1 any) *MockClientStoreUpdateCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockClientStore)(nil).UpdateCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCredential", reflect.TypeOf((*MockClientStore)(nil).UpdateCredential), arg0, arg1) + return &MockClientStoreUpdateCredentialCall{Call: call} +} + +// MockClientStoreUpdateCredentialCall wrap *gomock.Call +type MockClientStoreUpdateCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateCredentialCall) Return(arg0 error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateCredentialCall) Do(f func(string, cloud.CloudCredential) error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateCredentialCall) DoAndReturn(f func(string, cloud.CloudCredential) error) *MockClientStoreUpdateCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateModel mocks base method. @@ -388,7 +940,31 @@ func (m *MockClientStore) UpdateModel(arg0, arg1 string, arg2 jujuclient.ModelDe } // UpdateModel indicates an expected call of UpdateModel. -func (mr *MockClientStoreMockRecorder) UpdateModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientStoreMockRecorder) UpdateModel(arg0, arg1, arg2 any) *MockClientStoreUpdateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModel", reflect.TypeOf((*MockClientStore)(nil).UpdateModel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModel", reflect.TypeOf((*MockClientStore)(nil).UpdateModel), arg0, arg1, arg2) + return &MockClientStoreUpdateModelCall{Call: call} +} + +// MockClientStoreUpdateModelCall wrap *gomock.Call +type MockClientStoreUpdateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStoreUpdateModelCall) Return(arg0 error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStoreUpdateModelCall) Do(f func(string, string, jujuclient.ModelDetails) error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStoreUpdateModelCall) DoAndReturn(f func(string, string, jujuclient.ModelDetails) error) *MockClientStoreUpdateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/user/utils_controllercommand_mock_test.go b/cmd/juju/user/utils_controllercommand_mock_test.go index 7708793977a..d2c065c4753 100644 --- a/cmd/juju/user/utils_controllercommand_mock_test.go +++ b/cmd/juju/user/utils_controllercommand_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package user_test -destination utils_controllercommand_mock_test.go github.com/juju/juju/cmd/juju/user ControllerCommand +// mockgen -typed -package user_test -destination utils_controllercommand_mock_test.go github.com/juju/juju/cmd/juju/user ControllerCommand // // Package user_test is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockControllerCommand) ClientStore() jujuclient.ClientStore { } // ClientStore indicates an expected call of ClientStore. -func (mr *MockControllerCommandMockRecorder) ClientStore() *gomock.Call { +func (mr *MockControllerCommandMockRecorder) ClientStore() *MockControllerCommandClientStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientStore", reflect.TypeOf((*MockControllerCommand)(nil).ClientStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientStore", reflect.TypeOf((*MockControllerCommand)(nil).ClientStore)) + return &MockControllerCommandClientStoreCall{Call: call} +} + +// MockControllerCommandClientStoreCall wrap *gomock.Call +type MockControllerCommandClientStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCommandClientStoreCall) Return(arg0 jujuclient.ClientStore) *MockControllerCommandClientStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCommandClientStoreCall) Do(f func() jujuclient.ClientStore) *MockControllerCommandClientStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCommandClientStoreCall) DoAndReturn(f func() jujuclient.ClientStore) *MockControllerCommandClientStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerName mocks base method. @@ -63,7 +87,31 @@ func (m *MockControllerCommand) ControllerName() (string, error) { } // ControllerName indicates an expected call of ControllerName. -func (mr *MockControllerCommandMockRecorder) ControllerName() *gomock.Call { +func (mr *MockControllerCommandMockRecorder) ControllerName() *MockControllerCommandControllerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerName", reflect.TypeOf((*MockControllerCommand)(nil).ControllerName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerName", reflect.TypeOf((*MockControllerCommand)(nil).ControllerName)) + return &MockControllerCommandControllerNameCall{Call: call} +} + +// MockControllerCommandControllerNameCall wrap *gomock.Call +type MockControllerCommandControllerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCommandControllerNameCall) Return(arg0 string, arg1 error) *MockControllerCommandControllerNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCommandControllerNameCall) Do(f func() (string, error)) *MockControllerCommandControllerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCommandControllerNameCall) DoAndReturn(f func() (string, error)) *MockControllerCommandControllerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/waitfor/api/mocks/watcher_mock.go b/cmd/juju/waitfor/api/mocks/watcher_mock.go index e95c78af42e..3fdef19df79 100644 --- a/cmd/juju/waitfor/api/mocks/watcher_mock.go +++ b/cmd/juju/waitfor/api/mocks/watcher_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/cmd/juju/waitfor/api WatchAllAPI,AllWatcher +// mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/cmd/juju/waitfor/api WatchAllAPI,AllWatcher // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockWatchAllAPI) WatchAll() (api.AllWatcher, error) { } // WatchAll indicates an expected call of WatchAll. -func (mr *MockWatchAllAPIMockRecorder) WatchAll() *gomock.Call { +func (mr *MockWatchAllAPIMockRecorder) WatchAll() *MockWatchAllAPIWatchAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAll", reflect.TypeOf((*MockWatchAllAPI)(nil).WatchAll)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAll", reflect.TypeOf((*MockWatchAllAPI)(nil).WatchAll)) + return &MockWatchAllAPIWatchAllCall{Call: call} +} + +// MockWatchAllAPIWatchAllCall wrap *gomock.Call +type MockWatchAllAPIWatchAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchAllAPIWatchAllCall) Return(arg0 api.AllWatcher, arg1 error) *MockWatchAllAPIWatchAllCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchAllAPIWatchAllCall) Do(f func() (api.AllWatcher, error)) *MockWatchAllAPIWatchAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchAllAPIWatchAllCall) DoAndReturn(f func() (api.AllWatcher, error)) *MockWatchAllAPIWatchAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAllWatcher is a mock of AllWatcher interface. @@ -88,9 +112,33 @@ func (m *MockAllWatcher) Next() ([]params.Delta, error) { } // Next indicates an expected call of Next. -func (mr *MockAllWatcherMockRecorder) Next() *gomock.Call { +func (mr *MockAllWatcherMockRecorder) Next() *MockAllWatcherNextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockAllWatcher)(nil).Next)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockAllWatcher)(nil).Next)) + return &MockAllWatcherNextCall{Call: call} +} + +// MockAllWatcherNextCall wrap *gomock.Call +type MockAllWatcherNextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllWatcherNextCall) Return(arg0 []params.Delta, arg1 error) *MockAllWatcherNextCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllWatcherNextCall) Do(f func() ([]params.Delta, error)) *MockAllWatcherNextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllWatcherNextCall) DoAndReturn(f func() ([]params.Delta, error)) *MockAllWatcherNextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -102,7 +150,31 @@ func (m *MockAllWatcher) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockAllWatcherMockRecorder) Stop() *gomock.Call { +func (mr *MockAllWatcherMockRecorder) Stop() *MockAllWatcherStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockAllWatcher)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockAllWatcher)(nil).Stop)) + return &MockAllWatcherStopCall{Call: call} +} + +// MockAllWatcherStopCall wrap *gomock.Call +type MockAllWatcherStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllWatcherStopCall) Return(arg0 error) *MockAllWatcherStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllWatcherStopCall) Do(f func() error) *MockAllWatcherStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllWatcherStopCall) DoAndReturn(f func() error) *MockAllWatcherStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/juju/waitfor/api/package_test.go b/cmd/juju/waitfor/api/package_test.go index ed2194b791b..fea2018f7ff 100644 --- a/cmd/juju/waitfor/api/package_test.go +++ b/cmd/juju/waitfor/api/package_test.go @@ -10,7 +10,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/cmd/juju/waitfor/api WatchAllAPI,AllWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/cmd/juju/waitfor/api WatchAllAPI,AllWatcher func Test(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/waitfor/query/package_test.go b/cmd/juju/waitfor/query/package_test.go index 507bd195887..e7ee9e48a51 100644 --- a/cmd/juju/waitfor/query/package_test.go +++ b/cmd/juju/waitfor/query/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package query -destination scope_mock_test.go github.com/juju/juju/cmd/juju/waitfor/query FuncScope,Scope +//go:generate go run go.uber.org/mock/mockgen -typed -package query -destination scope_mock_test.go github.com/juju/juju/cmd/juju/waitfor/query FuncScope,Scope func Test(t *testing.T) { gc.TestingT(t) diff --git a/cmd/juju/waitfor/query/scope_mock_test.go b/cmd/juju/waitfor/query/scope_mock_test.go index dd41b3cac8d..536be878c29 100644 --- a/cmd/juju/waitfor/query/scope_mock_test.go +++ b/cmd/juju/waitfor/query/scope_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package query -destination scope_mock_test.go github.com/juju/juju/cmd/juju/waitfor/query FuncScope,Scope +// mockgen -typed -package query -destination scope_mock_test.go github.com/juju/juju/cmd/juju/waitfor/query FuncScope,Scope // // Package query is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockFuncScope) Add(arg0 string, arg1 any) { } // Add indicates an expected call of Add. -func (mr *MockFuncScopeMockRecorder) Add(arg0, arg1 any) *gomock.Call { +func (mr *MockFuncScopeMockRecorder) Add(arg0, arg1 any) *MockFuncScopeAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockFuncScope)(nil).Add), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockFuncScope)(nil).Add), arg0, arg1) + return &MockFuncScopeAddCall{Call: call} +} + +// MockFuncScopeAddCall wrap *gomock.Call +type MockFuncScopeAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFuncScopeAddCall) Return() *MockFuncScopeAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFuncScopeAddCall) Do(f func(string, any)) *MockFuncScopeAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFuncScopeAddCall) DoAndReturn(f func(string, any)) *MockFuncScopeAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Call mocks base method. @@ -60,9 +84,33 @@ func (m *MockFuncScope) Call(arg0 *Identifier, arg1 []Box) (any, error) { } // Call indicates an expected call of Call. -func (mr *MockFuncScopeMockRecorder) Call(arg0, arg1 any) *gomock.Call { +func (mr *MockFuncScopeMockRecorder) Call(arg0, arg1 any) *MockFuncScopeCallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockFuncScope)(nil).Call), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockFuncScope)(nil).Call), arg0, arg1) + return &MockFuncScopeCallCall{Call: call} +} + +// MockFuncScopeCallCall wrap *gomock.Call +type MockFuncScopeCallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFuncScopeCallCall) Return(arg0 any, arg1 error) *MockFuncScopeCallCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFuncScopeCallCall) Do(f func(*Identifier, []Box) (any, error)) *MockFuncScopeCallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFuncScopeCallCall) DoAndReturn(f func(*Identifier, []Box) (any, error)) *MockFuncScopeCallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockScope is a mock of Scope interface. @@ -98,9 +146,33 @@ func (m *MockScope) GetIdentValue(arg0 string) (Box, error) { } // GetIdentValue indicates an expected call of GetIdentValue. -func (mr *MockScopeMockRecorder) GetIdentValue(arg0 any) *gomock.Call { +func (mr *MockScopeMockRecorder) GetIdentValue(arg0 any) *MockScopeGetIdentValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIdentValue", reflect.TypeOf((*MockScope)(nil).GetIdentValue), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIdentValue", reflect.TypeOf((*MockScope)(nil).GetIdentValue), arg0) + return &MockScopeGetIdentValueCall{Call: call} +} + +// MockScopeGetIdentValueCall wrap *gomock.Call +type MockScopeGetIdentValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeGetIdentValueCall) Return(arg0 Box, arg1 error) *MockScopeGetIdentValueCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeGetIdentValueCall) Do(f func(string) (Box, error)) *MockScopeGetIdentValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeGetIdentValueCall) DoAndReturn(f func(string) (Box, error)) *MockScopeGetIdentValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetIdents mocks base method. @@ -112,7 +184,31 @@ func (m *MockScope) GetIdents() []string { } // GetIdents indicates an expected call of GetIdents. -func (mr *MockScopeMockRecorder) GetIdents() *gomock.Call { +func (mr *MockScopeMockRecorder) GetIdents() *MockScopeGetIdentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIdents", reflect.TypeOf((*MockScope)(nil).GetIdents)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIdents", reflect.TypeOf((*MockScope)(nil).GetIdents)) + return &MockScopeGetIdentsCall{Call: call} +} + +// MockScopeGetIdentsCall wrap *gomock.Call +type MockScopeGetIdentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeGetIdentsCall) Return(arg0 []string) *MockScopeGetIdentsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeGetIdentsCall) Do(f func() []string) *MockScopeGetIdentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeGetIdentsCall) DoAndReturn(f func() []string) *MockScopeGetIdentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud-controller/agent/machine_test.go b/cmd/jujud-controller/agent/machine_test.go index b6c0a00eaea..1f822a7bee3 100644 --- a/cmd/jujud-controller/agent/machine_test.go +++ b/cmd/jujud-controller/agent/machine_test.go @@ -437,6 +437,7 @@ func (s *MachineSuite) TestMachineAgentRunsMachineStorageWorker(c *gc.C) { } func (s *MachineSuite) TestCertificateDNSUpdated(c *gc.C) { + c.Skip("this should be an integration test and a unit test not this flaky thing") m, _, _ := s.primeAgent(c, state.JobManageModel) ctrl, a := s.newAgent(c, m) defer ctrl.Finish() @@ -444,6 +445,7 @@ func (s *MachineSuite) TestCertificateDNSUpdated(c *gc.C) { } func (s *MachineSuite) TestCertificateDNSUpdatedInvalidPrivateKey(c *gc.C) { + c.Skip("this should be an integration test and a unit test not this flaky thing") m, agentConfig, _ := s.primeAgent(c, state.JobManageModel) // Write out config with an invalid private key. This should diff --git a/cmd/jujud-controller/agent/mocks/machine_mock.go b/cmd/jujud-controller/agent/mocks/machine_mock.go index 312d18975fa..bcdd280fa73 100644 --- a/cmd/jujud-controller/agent/mocks/machine_mock.go +++ b/cmd/jujud-controller/agent/mocks/machine_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud-controller/agent CommandRunner +// mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud-controller/agent CommandRunner // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockCommandRunner) RunCommands(arg0 exec.RunParams) (*exec.ExecResponse } // RunCommands indicates an expected call of RunCommands. -func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *gomock.Call { +func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *MockCommandRunnerRunCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + return &MockCommandRunnerRunCommandsCall{Call: call} +} + +// MockCommandRunnerRunCommandsCall wrap *gomock.Call +type MockCommandRunnerRunCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommandRunnerRunCommandsCall) Return(arg0 *exec.ExecResponse, arg1 error) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommandRunnerRunCommandsCall) Do(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommandRunnerRunCommandsCall) DoAndReturn(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud-controller/agent/package_test.go b/cmd/jujud-controller/agent/package_test.go index fb22d9769d6..a22d906e32f 100644 --- a/cmd/jujud-controller/agent/package_test.go +++ b/cmd/jujud-controller/agent/package_test.go @@ -20,7 +20,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud-controller/agent CommandRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud-controller/agent CommandRunner func TestPackage(t *stdtesting.T) { // TODO(waigani) 2014-03-19 bug 1294458 diff --git a/cmd/jujud/agent/mocks/machine_mock.go b/cmd/jujud/agent/mocks/machine_mock.go index e435c65e203..badf1fe18ec 100644 --- a/cmd/jujud/agent/mocks/machine_mock.go +++ b/cmd/jujud/agent/mocks/machine_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud/agent CommandRunner +// mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud/agent CommandRunner // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockCommandRunner) RunCommands(arg0 exec.RunParams) (*exec.ExecResponse } // RunCommands indicates an expected call of RunCommands. -func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *gomock.Call { +func (mr *MockCommandRunnerMockRecorder) RunCommands(arg0 any) *MockCommandRunnerRunCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockCommandRunner)(nil).RunCommands), arg0) + return &MockCommandRunnerRunCommandsCall{Call: call} +} + +// MockCommandRunnerRunCommandsCall wrap *gomock.Call +type MockCommandRunnerRunCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCommandRunnerRunCommandsCall) Return(arg0 *exec.ExecResponse, arg1 error) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCommandRunnerRunCommandsCall) Do(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCommandRunnerRunCommandsCall) DoAndReturn(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockCommandRunnerRunCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud/agent/package_test.go b/cmd/jujud/agent/package_test.go index 7bf49e6f6be..c4b366006df 100644 --- a/cmd/jujud/agent/package_test.go +++ b/cmd/jujud/agent/package_test.go @@ -9,7 +9,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud/agent CommandRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/cmd/jujud/agent CommandRunner func TestPackage(t *stdtesting.T) { // TODO(waigani) 2014-03-19 bug 1294458 diff --git a/cmd/jujud/reboot/mocks/clock_mock.go b/cmd/jujud/reboot/mocks/clock_mock.go index d7c49f0a5e2..8133ac86112 100644 --- a/cmd/jujud/reboot/mocks/clock_mock.go +++ b/cmd/jujud/reboot/mocks/clock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +// mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud/reboot/mocks/instance_mock.go b/cmd/jujud/reboot/mocks/instance_mock.go index 68570bf3d77..d1f08f79cfb 100644 --- a/cmd/jujud/reboot/mocks/instance_mock.go +++ b/cmd/jujud/reboot/mocks/instance_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/instance_mock.go github.com/juju/juju/environs/instances Instance +// mockgen -typed -package mocks -destination mocks/instance_mock.go github.com/juju/juju/environs/instances Instance // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockInstance) Addresses(arg0 envcontext.ProviderCallContext) (network.P } // Addresses indicates an expected call of Addresses. -func (mr *MockInstanceMockRecorder) Addresses(arg0 any) *gomock.Call { +func (mr *MockInstanceMockRecorder) Addresses(arg0 any) *MockInstanceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockInstance)(nil).Addresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockInstance)(nil).Addresses), arg0) + return &MockInstanceAddressesCall{Call: call} +} + +// MockInstanceAddressesCall wrap *gomock.Call +type MockInstanceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceAddressesCall) Return(arg0 network.ProviderAddresses, arg1 error) *MockInstanceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceAddressesCall) Do(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockInstanceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockInstanceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -65,9 +89,33 @@ func (m *MockInstance) Id() instance.Id { } // Id indicates an expected call of Id. -func (mr *MockInstanceMockRecorder) Id() *gomock.Call { +func (mr *MockInstanceMockRecorder) Id() *MockInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockInstance)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockInstance)(nil).Id)) + return &MockInstanceIdCall{Call: call} +} + +// MockInstanceIdCall wrap *gomock.Call +type MockInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceIdCall) Return(arg0 instance.Id) *MockInstanceIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceIdCall) Do(f func() instance.Id) *MockInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceIdCall) DoAndReturn(f func() instance.Id) *MockInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -79,7 +127,31 @@ func (m *MockInstance) Status(arg0 envcontext.ProviderCallContext) instance.Stat } // Status indicates an expected call of Status. -func (mr *MockInstanceMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockInstanceMockRecorder) Status(arg0 any) *MockInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockInstance)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockInstance)(nil).Status), arg0) + return &MockInstanceStatusCall{Call: call} +} + +// MockInstanceStatusCall wrap *gomock.Call +type MockInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceStatusCall) Return(arg0 instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceStatusCall) Do(f func(envcontext.ProviderCallContext) instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceStatusCall) DoAndReturn(f func(envcontext.ProviderCallContext) instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud/reboot/mocks/service_mock.go b/cmd/jujud/reboot/mocks/service_mock.go index 7f32cb52e31..89cdf32ad66 100644 --- a/cmd/jujud/reboot/mocks/service_mock.go +++ b/cmd/jujud/reboot/mocks/service_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/cmd/jujud/reboot AgentConfig,Manager,Model,RebootWaiter,Service +// mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/cmd/jujud/reboot AgentConfig,Manager,Model,RebootWaiter,Service // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockAgentConfig) Model() reboot.Model { } // Model indicates an expected call of Model. -func (mr *MockAgentConfigMockRecorder) Model() *gomock.Call { +func (mr *MockAgentConfigMockRecorder) Model() *MockAgentConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockAgentConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockAgentConfig)(nil).Model)) + return &MockAgentConfigModelCall{Call: call} +} + +// MockAgentConfigModelCall wrap *gomock.Call +type MockAgentConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentConfigModelCall) Return(arg0 reboot.Model) *MockAgentConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentConfigModelCall) Do(f func() reboot.Model) *MockAgentConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentConfigModelCall) DoAndReturn(f func() reboot.Model) *MockAgentConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockManager is a mock of Manager interface. @@ -89,9 +113,33 @@ func (m *MockManager) IsInitialized() bool { } // IsInitialized indicates an expected call of IsInitialized. -func (mr *MockManagerMockRecorder) IsInitialized() *gomock.Call { +func (mr *MockManagerMockRecorder) IsInitialized() *MockManagerIsInitializedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockManager)(nil).IsInitialized)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockManager)(nil).IsInitialized)) + return &MockManagerIsInitializedCall{Call: call} +} + +// MockManagerIsInitializedCall wrap *gomock.Call +type MockManagerIsInitializedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerIsInitializedCall) Return(arg0 bool) *MockManagerIsInitializedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerIsInitializedCall) Do(f func() bool) *MockManagerIsInitializedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerIsInitializedCall) DoAndReturn(f func() bool) *MockManagerIsInitializedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListContainers mocks base method. @@ -104,9 +152,33 @@ func (m *MockManager) ListContainers() ([]instances.Instance, error) { } // ListContainers indicates an expected call of ListContainers. -func (mr *MockManagerMockRecorder) ListContainers() *gomock.Call { +func (mr *MockManagerMockRecorder) ListContainers() *MockManagerListContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockManager)(nil).ListContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockManager)(nil).ListContainers)) + return &MockManagerListContainersCall{Call: call} +} + +// MockManagerListContainersCall wrap *gomock.Call +type MockManagerListContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerListContainersCall) Return(arg0 []instances.Instance, arg1 error) *MockManagerListContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerListContainersCall) Do(f func() ([]instances.Instance, error)) *MockManagerListContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerListContainersCall) DoAndReturn(f func() ([]instances.Instance, error)) *MockManagerListContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -141,9 +213,33 @@ func (m *MockModel) Id() string { } // Id indicates an expected call of Id. -func (mr *MockModelMockRecorder) Id() *gomock.Call { +func (mr *MockModelMockRecorder) Id() *MockModelIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockModel)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockModel)(nil).Id)) + return &MockModelIdCall{Call: call} +} + +// MockModelIdCall wrap *gomock.Call +type MockModelIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelIdCall) Return(arg0 string) *MockModelIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelIdCall) Do(f func() string) *MockModelIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelIdCall) DoAndReturn(f func() string) *MockModelIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRebootWaiter is a mock of RebootWaiter interface. @@ -179,9 +275,33 @@ func (m *MockRebootWaiter) ListServices() ([]string, error) { } // ListServices indicates an expected call of ListServices. -func (mr *MockRebootWaiterMockRecorder) ListServices() *gomock.Call { +func (mr *MockRebootWaiterMockRecorder) ListServices() *MockRebootWaiterListServicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListServices", reflect.TypeOf((*MockRebootWaiter)(nil).ListServices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListServices", reflect.TypeOf((*MockRebootWaiter)(nil).ListServices)) + return &MockRebootWaiterListServicesCall{Call: call} +} + +// MockRebootWaiterListServicesCall wrap *gomock.Call +type MockRebootWaiterListServicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRebootWaiterListServicesCall) Return(arg0 []string, arg1 error) *MockRebootWaiterListServicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRebootWaiterListServicesCall) Do(f func() ([]string, error)) *MockRebootWaiterListServicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRebootWaiterListServicesCall) DoAndReturn(f func() ([]string, error)) *MockRebootWaiterListServicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewContainerManager mocks base method. @@ -194,9 +314,33 @@ func (m *MockRebootWaiter) NewContainerManager(arg0 instance.ContainerType, arg1 } // NewContainerManager indicates an expected call of NewContainerManager. -func (mr *MockRebootWaiterMockRecorder) NewContainerManager(arg0, arg1 any) *gomock.Call { +func (mr *MockRebootWaiterMockRecorder) NewContainerManager(arg0, arg1 any) *MockRebootWaiterNewContainerManagerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewContainerManager", reflect.TypeOf((*MockRebootWaiter)(nil).NewContainerManager), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewContainerManager", reflect.TypeOf((*MockRebootWaiter)(nil).NewContainerManager), arg0, arg1) + return &MockRebootWaiterNewContainerManagerCall{Call: call} +} + +// MockRebootWaiterNewContainerManagerCall wrap *gomock.Call +type MockRebootWaiterNewContainerManagerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRebootWaiterNewContainerManagerCall) Return(arg0 reboot.Manager, arg1 error) *MockRebootWaiterNewContainerManagerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRebootWaiterNewContainerManagerCall) Do(f func(instance.ContainerType, container.ManagerConfig) (reboot.Manager, error)) *MockRebootWaiterNewContainerManagerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRebootWaiterNewContainerManagerCall) DoAndReturn(f func(instance.ContainerType, container.ManagerConfig) (reboot.Manager, error)) *MockRebootWaiterNewContainerManagerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewServiceReference mocks base method. @@ -209,9 +353,33 @@ func (m *MockRebootWaiter) NewServiceReference(arg0 string) (reboot.Service, err } // NewServiceReference indicates an expected call of NewServiceReference. -func (mr *MockRebootWaiterMockRecorder) NewServiceReference(arg0 any) *gomock.Call { +func (mr *MockRebootWaiterMockRecorder) NewServiceReference(arg0 any) *MockRebootWaiterNewServiceReferenceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewServiceReference", reflect.TypeOf((*MockRebootWaiter)(nil).NewServiceReference), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewServiceReference", reflect.TypeOf((*MockRebootWaiter)(nil).NewServiceReference), arg0) + return &MockRebootWaiterNewServiceReferenceCall{Call: call} +} + +// MockRebootWaiterNewServiceReferenceCall wrap *gomock.Call +type MockRebootWaiterNewServiceReferenceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRebootWaiterNewServiceReferenceCall) Return(arg0 reboot.Service, arg1 error) *MockRebootWaiterNewServiceReferenceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRebootWaiterNewServiceReferenceCall) Do(f func(string) (reboot.Service, error)) *MockRebootWaiterNewServiceReferenceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRebootWaiterNewServiceReferenceCall) DoAndReturn(f func(string) (reboot.Service, error)) *MockRebootWaiterNewServiceReferenceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ScheduleAction mocks base method. @@ -223,9 +391,33 @@ func (m *MockRebootWaiter) ScheduleAction(arg0 params.RebootAction, arg1 int) er } // ScheduleAction indicates an expected call of ScheduleAction. -func (mr *MockRebootWaiterMockRecorder) ScheduleAction(arg0, arg1 any) *gomock.Call { +func (mr *MockRebootWaiterMockRecorder) ScheduleAction(arg0, arg1 any) *MockRebootWaiterScheduleActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScheduleAction", reflect.TypeOf((*MockRebootWaiter)(nil).ScheduleAction), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScheduleAction", reflect.TypeOf((*MockRebootWaiter)(nil).ScheduleAction), arg0, arg1) + return &MockRebootWaiterScheduleActionCall{Call: call} +} + +// MockRebootWaiterScheduleActionCall wrap *gomock.Call +type MockRebootWaiterScheduleActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRebootWaiterScheduleActionCall) Return(arg0 error) *MockRebootWaiterScheduleActionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRebootWaiterScheduleActionCall) Do(f func(params.RebootAction, int) error) *MockRebootWaiterScheduleActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRebootWaiterScheduleActionCall) DoAndReturn(f func(params.RebootAction, int) error) *MockRebootWaiterScheduleActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockService is a mock of Service interface. @@ -260,7 +452,31 @@ func (m *MockService) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockServiceMockRecorder) Stop() *gomock.Call { +func (mr *MockServiceMockRecorder) Stop() *MockServiceStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockService)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockService)(nil).Stop)) + return &MockServiceStopCall{Call: call} +} + +// MockServiceStopCall wrap *gomock.Call +type MockServiceStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceStopCall) Return(arg0 error) *MockServiceStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceStopCall) Do(f func() error) *MockServiceStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceStopCall) DoAndReturn(f func() error) *MockServiceStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/jujud/reboot/package_test.go b/cmd/jujud/reboot/package_test.go index bae51315a20..9e7d5e11941 100644 --- a/cmd/jujud/reboot/package_test.go +++ b/cmd/jujud/reboot/package_test.go @@ -10,9 +10,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service_mock.go github.com/juju/juju/cmd/jujud/reboot AgentConfig,Manager,Model,RebootWaiter,Service -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/instance_mock.go github.com/juju/juju/environs/instances Instance -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service_mock.go github.com/juju/juju/cmd/jujud/reboot AgentConfig,Manager,Model,RebootWaiter,Service +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/instance_mock.go github.com/juju/juju/environs/instances Instance +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/cmd/modelcmd/cloudprovider_mock_test.go b/cmd/modelcmd/cloudprovider_mock_test.go index 217e750fe46..dfae0486e1f 100644 --- a/cmd/modelcmd/cloudprovider_mock_test.go +++ b/cmd/modelcmd/cloudprovider_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelcmd -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/modelcmd TestCloudProvider +// mockgen -typed -package modelcmd -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/modelcmd TestCloudProvider // // Package modelcmd is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockTestCloudProvider) CloudSchema() *jsonschema.Schema { } // CloudSchema indicates an expected call of CloudSchema. -func (mr *MockTestCloudProviderMockRecorder) CloudSchema() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) CloudSchema() *MockTestCloudProviderCloudSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockTestCloudProvider)(nil).CloudSchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockTestCloudProvider)(nil).CloudSchema)) + return &MockTestCloudProviderCloudSchemaCall{Call: call} +} + +// MockTestCloudProviderCloudSchemaCall wrap *gomock.Call +type MockTestCloudProviderCloudSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderCloudSchemaCall) Return(arg0 *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderCloudSchemaCall) Do(f func() *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderCloudSchemaCall) DoAndReturn(f func() *jsonschema.Schema) *MockTestCloudProviderCloudSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialSchemas mocks base method. @@ -67,9 +91,33 @@ func (m *MockTestCloudProvider) CredentialSchemas() map[cloud.AuthType]cloud.Cre } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockTestCloudProviderMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) CredentialSchemas() *MockTestCloudProviderCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockTestCloudProvider)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockTestCloudProvider)(nil).CredentialSchemas)) + return &MockTestCloudProviderCredentialSchemasCall{Call: call} +} + +// MockTestCloudProviderCredentialSchemasCall wrap *gomock.Call +type MockTestCloudProviderCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockTestCloudProviderCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -82,9 +130,33 @@ func (m *MockTestCloudProvider) DetectCredentials(arg0 string) (*cloud.CloudCred } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockTestCloudProviderMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) DetectCredentials(arg0 any) *MockTestCloudProviderDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).DetectCredentials), arg0) + return &MockTestCloudProviderDetectCredentialsCall{Call: call} +} + +// MockTestCloudProviderDetectCredentialsCall wrap *gomock.Call +type MockTestCloudProviderDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockTestCloudProviderDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -97,9 +169,33 @@ func (m *MockTestCloudProvider) FinalizeCredential(arg0 environs.FinalizeCredent } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockTestCloudProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *MockTestCloudProviderFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockTestCloudProvider)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockTestCloudProvider)(nil).FinalizeCredential), arg0, arg1) + return &MockTestCloudProviderFinalizeCredentialCall{Call: call} +} + +// MockTestCloudProviderFinalizeCredentialCall wrap *gomock.Call +type MockTestCloudProviderFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockTestCloudProviderFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -111,9 +207,33 @@ func (m *MockTestCloudProvider) Ping(arg0 envcontext.ProviderCallContext, arg1 s } // Ping indicates an expected call of Ping. -func (mr *MockTestCloudProviderMockRecorder) Ping(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Ping(arg0, arg1 any) *MockTestCloudProviderPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockTestCloudProvider)(nil).Ping), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockTestCloudProvider)(nil).Ping), arg0, arg1) + return &MockTestCloudProviderPingCall{Call: call} +} + +// MockTestCloudProviderPingCall wrap *gomock.Call +type MockTestCloudProviderPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderPingCall) Return(arg0 error) *MockTestCloudProviderPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderPingCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockTestCloudProviderPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderPingCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockTestCloudProviderPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareConfig mocks base method. @@ -126,9 +246,33 @@ func (m *MockTestCloudProvider) PrepareConfig(arg0 context.Context, arg1 environ } // PrepareConfig indicates an expected call of PrepareConfig. -func (mr *MockTestCloudProviderMockRecorder) PrepareConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) PrepareConfig(arg0, arg1 any) *MockTestCloudProviderPrepareConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockTestCloudProvider)(nil).PrepareConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockTestCloudProvider)(nil).PrepareConfig), arg0, arg1) + return &MockTestCloudProviderPrepareConfigCall{Call: call} +} + +// MockTestCloudProviderPrepareConfigCall wrap *gomock.Call +type MockTestCloudProviderPrepareConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderPrepareConfigCall) Return(arg0 *config.Config, arg1 error) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderPrepareConfigCall) Do(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderPrepareConfigCall) DoAndReturn(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockTestCloudProviderPrepareConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RegisterCredentials mocks base method. @@ -141,9 +285,33 @@ func (m *MockTestCloudProvider) RegisterCredentials(arg0 cloud.Cloud) (map[strin } // RegisterCredentials indicates an expected call of RegisterCredentials. -func (mr *MockTestCloudProviderMockRecorder) RegisterCredentials(arg0 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) RegisterCredentials(arg0 any) *MockTestCloudProviderRegisterCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).RegisterCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockTestCloudProvider)(nil).RegisterCredentials), arg0) + return &MockTestCloudProviderRegisterCredentialsCall{Call: call} +} + +// MockTestCloudProviderRegisterCredentialsCall wrap *gomock.Call +type MockTestCloudProviderRegisterCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderRegisterCredentialsCall) Return(arg0 map[string]*cloud.CloudCredential, arg1 error) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderRegisterCredentialsCall) Do(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderRegisterCredentialsCall) DoAndReturn(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockTestCloudProviderRegisterCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -156,9 +324,33 @@ func (m *MockTestCloudProvider) Validate(arg0 context.Context, arg1, arg2 *confi } // Validate indicates an expected call of Validate. -func (mr *MockTestCloudProviderMockRecorder) Validate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Validate(arg0, arg1, arg2 any) *MockTestCloudProviderValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockTestCloudProvider)(nil).Validate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockTestCloudProvider)(nil).Validate), arg0, arg1, arg2) + return &MockTestCloudProviderValidateCall{Call: call} +} + +// MockTestCloudProviderValidateCall wrap *gomock.Call +type MockTestCloudProviderValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderValidateCall) Return(arg0 *config.Config, arg1 error) *MockTestCloudProviderValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderValidateCall) Do(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockTestCloudProviderValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderValidateCall) DoAndReturn(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockTestCloudProviderValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -170,7 +362,31 @@ func (m *MockTestCloudProvider) Version() int { } // Version indicates an expected call of Version. -func (mr *MockTestCloudProviderMockRecorder) Version() *gomock.Call { +func (mr *MockTestCloudProviderMockRecorder) Version() *MockTestCloudProviderVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockTestCloudProvider)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockTestCloudProvider)(nil).Version)) + return &MockTestCloudProviderVersionCall{Call: call} +} + +// MockTestCloudProviderVersionCall wrap *gomock.Call +type MockTestCloudProviderVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestCloudProviderVersionCall) Return(arg0 int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestCloudProviderVersionCall) Do(f func() int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestCloudProviderVersionCall) DoAndReturn(f func() int) *MockTestCloudProviderVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/modelcmd/credentials.go b/cmd/modelcmd/credentials.go index 053304f258b..1af98e2acc6 100644 --- a/cmd/modelcmd/credentials.go +++ b/cmd/modelcmd/credentials.go @@ -221,7 +221,7 @@ func RegisterCredentials(provider environs.EnvironProvider, args RegisterCredent return nil, nil } -//go:generate go run go.uber.org/mock/mockgen -package modelcmd -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/modelcmd TestCloudProvider +//go:generate go run go.uber.org/mock/mockgen -typed -package modelcmd -destination cloudprovider_mock_test.go github.com/juju/juju/cmd/modelcmd TestCloudProvider // TestCloudProvider is used for testing. type TestCloudProvider interface { diff --git a/cmd/modelcmd/mocks/modelconfig_mock.go b/cmd/modelcmd/mocks/modelconfig_mock.go index eaa67a0e0e5..7acbe988f3b 100644 --- a/cmd/modelcmd/mocks/modelconfig_mock.go +++ b/cmd/modelcmd/mocks/modelconfig_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/modelcmd ModelConfigAPI +// mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/modelcmd ModelConfigAPI // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockModelConfigAPI) ModelGet() (map[string]any, error) { } // ModelGet indicates an expected call of ModelGet. -func (mr *MockModelConfigAPIMockRecorder) ModelGet() *gomock.Call { +func (mr *MockModelConfigAPIMockRecorder) ModelGet() *MockModelConfigAPIModelGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelGet", reflect.TypeOf((*MockModelConfigAPI)(nil).ModelGet)) + return &MockModelConfigAPIModelGetCall{Call: call} +} + +// MockModelConfigAPIModelGetCall wrap *gomock.Call +type MockModelConfigAPIModelGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigAPIModelGetCall) Return(arg0 map[string]any, arg1 error) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigAPIModelGetCall) Do(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigAPIModelGetCall) DoAndReturn(f func() (map[string]any, error)) *MockModelConfigAPIModelGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/cmd/modelcmd/package_test.go b/cmd/modelcmd/package_test.go index 76f3b1244f8..e4debb93df3 100644 --- a/cmd/modelcmd/package_test.go +++ b/cmd/modelcmd/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/modelcmd ModelConfigAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/modelconfig_mock.go github.com/juju/juju/cmd/modelcmd ModelConfigAPI func Test(t *testing.T) { gc.TestingT(t) diff --git a/core/base/distrosource_mock_test.go b/core/base/distrosource_mock_test.go index cab0bedec6c..39fc67d0a4e 100644 --- a/core/base/distrosource_mock_test.go +++ b/core/base/distrosource_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package base -destination distrosource_mock_test.go github.com/juju/juju/core/base DistroSource +// mockgen -typed -package base -destination distrosource_mock_test.go github.com/juju/juju/core/base DistroSource // // Package base is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockDistroSource) Refresh() error { } // Refresh indicates an expected call of Refresh. -func (mr *MockDistroSourceMockRecorder) Refresh() *gomock.Call { +func (mr *MockDistroSourceMockRecorder) Refresh() *MockDistroSourceRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockDistroSource)(nil).Refresh)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockDistroSource)(nil).Refresh)) + return &MockDistroSourceRefreshCall{Call: call} +} + +// MockDistroSourceRefreshCall wrap *gomock.Call +type MockDistroSourceRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDistroSourceRefreshCall) Return(arg0 error) *MockDistroSourceRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDistroSourceRefreshCall) Do(f func() error) *MockDistroSourceRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDistroSourceRefreshCall) DoAndReturn(f func() error) *MockDistroSourceRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SeriesInfo mocks base method. @@ -63,7 +87,31 @@ func (m *MockDistroSource) SeriesInfo(arg0 string) (series.DistroInfoSerie, bool } // SeriesInfo indicates an expected call of SeriesInfo. -func (mr *MockDistroSourceMockRecorder) SeriesInfo(arg0 any) *gomock.Call { +func (mr *MockDistroSourceMockRecorder) SeriesInfo(arg0 any) *MockDistroSourceSeriesInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SeriesInfo", reflect.TypeOf((*MockDistroSource)(nil).SeriesInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SeriesInfo", reflect.TypeOf((*MockDistroSource)(nil).SeriesInfo), arg0) + return &MockDistroSourceSeriesInfoCall{Call: call} +} + +// MockDistroSourceSeriesInfoCall wrap *gomock.Call +type MockDistroSourceSeriesInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDistroSourceSeriesInfoCall) Return(arg0 series.DistroInfoSerie, arg1 bool) *MockDistroSourceSeriesInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDistroSourceSeriesInfoCall) Do(f func(string) (series.DistroInfoSerie, bool)) *MockDistroSourceSeriesInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDistroSourceSeriesInfoCall) DoAndReturn(f func(string) (series.DistroInfoSerie, bool)) *MockDistroSourceSeriesInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/base/package_test.go b/core/base/package_test.go index b810cda6c46..4251f867cfa 100644 --- a/core/base/package_test.go +++ b/core/base/package_test.go @@ -12,7 +12,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package base -destination distrosource_mock_test.go github.com/juju/juju/core/base DistroSource +//go:generate go run go.uber.org/mock/mockgen -typed -package base -destination distrosource_mock_test.go github.com/juju/juju/core/base DistroSource func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/changestream/database_mock_test.go b/core/changestream/database_mock_test.go index 3a88cb9a90d..a0c69143a12 100644 --- a/core/changestream/database_mock_test.go +++ b/core/changestream/database_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestream -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +// mockgen -typed -package changestream -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner // // Package changestream is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockTxnRunner) StdTxn(arg0 context.Context, arg1 func(context.Context, } // StdTxn indicates an expected call of StdTxn. -func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *MockTxnRunnerStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + return &MockTxnRunnerStdTxnCall{Call: call} +} + +// MockTxnRunnerStdTxnCall wrap *gomock.Call +type MockTxnRunnerStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerStdTxnCall) Return(arg0 error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -64,7 +88,31 @@ func (m *MockTxnRunner) Txn(arg0 context.Context, arg1 func(context.Context, *sq } // Txn indicates an expected call of Txn. -func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *MockTxnRunnerTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + return &MockTxnRunnerTxnCall{Call: call} +} + +// MockTxnRunnerTxnCall wrap *gomock.Call +type MockTxnRunnerTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerTxnCall) Return(arg0 error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/changestream/package_test.go b/core/changestream/package_test.go index 5df6f8a8c37..0b64c169271 100644 --- a/core/changestream/package_test.go +++ b/core/changestream/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package changestream -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package changestream -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/charm/charm_mock_test.go b/core/charm/charm_mock_test.go index 3b7b83da7e3..644c602cfde 100644 --- a/core/charm/charm_mock_test.go +++ b/core/charm/charm_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package charm -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta +// mockgen -typed -package charm -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta // // Package charm is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCharmMeta) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMetaMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMetaMockRecorder) Manifest() *MockCharmMetaManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmMeta)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmMeta)(nil).Manifest)) + return &MockCharmMetaManifestCall{Call: call} +} + +// MockCharmMetaManifestCall wrap *gomock.Call +type MockCharmMetaManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaManifestCall) Return(arg0 *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaManifestCall) Do(f func() *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -62,7 +86,31 @@ func (m *MockCharmMeta) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMetaMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMetaMockRecorder) Meta() *MockCharmMetaMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmMeta)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmMeta)(nil).Meta)) + return &MockCharmMetaMetaCall{Call: call} +} + +// MockCharmMetaMetaCall wrap *gomock.Call +type MockCharmMetaMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaMetaCall) Do(f func() *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/charm/core_charm_mock_test.go b/core/charm/core_charm_mock_test.go index 8006a6913a4..db717708159 100644 --- a/core/charm/core_charm_mock_test.go +++ b/core/charm/core_charm_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package charm -destination core_charm_mock_test.go github.com/juju/juju/core/charm SelectorLogger,SelectorModelConfig +// mockgen -typed -package charm -destination core_charm_mock_test.go github.com/juju/juju/core/charm SelectorLogger,SelectorModelConfig // // Package charm is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockSelectorLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockSelectorLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSelectorLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockSelectorLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockSelectorLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockSelectorLogger)(nil).Infof), varargs...) + return &MockSelectorLoggerInfofCall{Call: call} +} + +// MockSelectorLoggerInfofCall wrap *gomock.Call +type MockSelectorLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSelectorLoggerInfofCall) Return() *MockSelectorLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSelectorLoggerInfofCall) Do(f func(string, ...any)) *MockSelectorLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSelectorLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockSelectorLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -66,10 +90,34 @@ func (m *MockSelectorLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockSelectorLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSelectorLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockSelectorLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockSelectorLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockSelectorLogger)(nil).Tracef), varargs...) + return &MockSelectorLoggerTracefCall{Call: call} +} + +// MockSelectorLoggerTracefCall wrap *gomock.Call +type MockSelectorLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSelectorLoggerTracefCall) Return() *MockSelectorLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSelectorLoggerTracefCall) Do(f func(string, ...any)) *MockSelectorLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSelectorLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockSelectorLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSelectorModelConfig is a mock of SelectorModelConfig interface. @@ -105,7 +153,31 @@ func (m *MockSelectorModelConfig) DefaultBase() (string, bool) { } // DefaultBase indicates an expected call of DefaultBase. -func (mr *MockSelectorModelConfigMockRecorder) DefaultBase() *gomock.Call { +func (mr *MockSelectorModelConfigMockRecorder) DefaultBase() *MockSelectorModelConfigDefaultBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultBase", reflect.TypeOf((*MockSelectorModelConfig)(nil).DefaultBase)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultBase", reflect.TypeOf((*MockSelectorModelConfig)(nil).DefaultBase)) + return &MockSelectorModelConfigDefaultBaseCall{Call: call} +} + +// MockSelectorModelConfigDefaultBaseCall wrap *gomock.Call +type MockSelectorModelConfigDefaultBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSelectorModelConfigDefaultBaseCall) Return(arg0 string, arg1 bool) *MockSelectorModelConfigDefaultBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSelectorModelConfigDefaultBaseCall) Do(f func() (string, bool)) *MockSelectorModelConfigDefaultBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSelectorModelConfigDefaultBaseCall) DoAndReturn(f func() (string, bool)) *MockSelectorModelConfigDefaultBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/charm/package_test.go b/core/charm/package_test.go index fb53090ff48..7c474a49566 100644 --- a/core/charm/package_test.go +++ b/core/charm/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package charm -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta -//go:generate go run go.uber.org/mock/mockgen -package charm -destination core_charm_mock_test.go github.com/juju/juju/core/charm SelectorLogger,SelectorModelConfig +//go:generate go run go.uber.org/mock/mockgen -typed -package charm -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta +//go:generate go run go.uber.org/mock/mockgen -typed -package charm -destination core_charm_mock_test.go github.com/juju/juju/core/charm SelectorLogger,SelectorModelConfig func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/database/schema/package_test.go b/core/database/schema/package_test.go index ca47831ee51..82f270cb20f 100644 --- a/core/database/schema/package_test.go +++ b/core/database/schema/package_test.go @@ -12,7 +12,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package schema -destination tx_mock_test.go github.com/juju/juju/core/database/schema Tx +//go:generate go run go.uber.org/mock/mockgen -typed -package schema -destination tx_mock_test.go github.com/juju/juju/core/database/schema Tx func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/database/schema/tx_mock_test.go b/core/database/schema/tx_mock_test.go index a0a330e2543..90a6c926b73 100644 --- a/core/database/schema/tx_mock_test.go +++ b/core/database/schema/tx_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package schema -destination tx_mock_test.go github.com/juju/juju/core/database/schema Tx +// mockgen -typed -package schema -destination tx_mock_test.go github.com/juju/juju/core/database/schema Tx // // Package schema is a generated GoMock package. @@ -54,8 +54,32 @@ func (m *MockTx) ExecContext(arg0 context.Context, arg1 string, arg2 ...any) (sq } // ExecContext indicates an expected call of ExecContext. -func (mr *MockTxMockRecorder) ExecContext(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockTxMockRecorder) ExecContext(arg0, arg1 any, arg2 ...any) *MockTxExecContextCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecContext", reflect.TypeOf((*MockTx)(nil).ExecContext), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecContext", reflect.TypeOf((*MockTx)(nil).ExecContext), varargs...) + return &MockTxExecContextCall{Call: call} +} + +// MockTxExecContextCall wrap *gomock.Call +type MockTxExecContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxExecContextCall) Return(arg0 sql.Result, arg1 error) *MockTxExecContextCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxExecContextCall) Do(f func(context.Context, string, ...any) (sql.Result, error)) *MockTxExecContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxExecContextCall) DoAndReturn(f func(context.Context, string, ...any) (sql.Result, error)) *MockTxExecContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/leadership/interface.go b/core/leadership/interface.go index afd23ed2303..0a898db5580 100644 --- a/core/leadership/interface.go +++ b/core/leadership/interface.go @@ -13,7 +13,7 @@ import ( // TODO (manadart 2018-10-05) Add interfaces to the end of this line, // separated by commas, as they become required for mocking in tests. -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Pinner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Pinner const ( // ErrClaimDenied is the error which will be returned when a diff --git a/core/leadership/mocks/leadership_mock.go b/core/leadership/mocks/leadership_mock.go index fc200085048..7edc6d392cc 100644 --- a/core/leadership/mocks/leadership_mock.go +++ b/core/leadership/mocks/leadership_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Pinner +// mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/core/leadership Pinner // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockPinner) PinLeadership(arg0, arg1 string) error { } // PinLeadership indicates an expected call of PinLeadership. -func (mr *MockPinnerMockRecorder) PinLeadership(arg0, arg1 any) *gomock.Call { +func (mr *MockPinnerMockRecorder) PinLeadership(arg0, arg1 any) *MockPinnerPinLeadershipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinLeadership", reflect.TypeOf((*MockPinner)(nil).PinLeadership), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinLeadership", reflect.TypeOf((*MockPinner)(nil).PinLeadership), arg0, arg1) + return &MockPinnerPinLeadershipCall{Call: call} +} + +// MockPinnerPinLeadershipCall wrap *gomock.Call +type MockPinnerPinLeadershipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPinnerPinLeadershipCall) Return(arg0 error) *MockPinnerPinLeadershipCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPinnerPinLeadershipCall) Do(f func(string, string) error) *MockPinnerPinLeadershipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPinnerPinLeadershipCall) DoAndReturn(f func(string, string) error) *MockPinnerPinLeadershipCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PinnedLeadership mocks base method. @@ -62,9 +86,33 @@ func (m *MockPinner) PinnedLeadership() (map[string][]string, error) { } // PinnedLeadership indicates an expected call of PinnedLeadership. -func (mr *MockPinnerMockRecorder) PinnedLeadership() *gomock.Call { +func (mr *MockPinnerMockRecorder) PinnedLeadership() *MockPinnerPinnedLeadershipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinnedLeadership", reflect.TypeOf((*MockPinner)(nil).PinnedLeadership)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinnedLeadership", reflect.TypeOf((*MockPinner)(nil).PinnedLeadership)) + return &MockPinnerPinnedLeadershipCall{Call: call} +} + +// MockPinnerPinnedLeadershipCall wrap *gomock.Call +type MockPinnerPinnedLeadershipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPinnerPinnedLeadershipCall) Return(arg0 map[string][]string, arg1 error) *MockPinnerPinnedLeadershipCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPinnerPinnedLeadershipCall) Do(f func() (map[string][]string, error)) *MockPinnerPinnedLeadershipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPinnerPinnedLeadershipCall) DoAndReturn(f func() (map[string][]string, error)) *MockPinnerPinnedLeadershipCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnpinLeadership mocks base method. @@ -76,7 +124,31 @@ func (m *MockPinner) UnpinLeadership(arg0, arg1 string) error { } // UnpinLeadership indicates an expected call of UnpinLeadership. -func (mr *MockPinnerMockRecorder) UnpinLeadership(arg0, arg1 any) *gomock.Call { +func (mr *MockPinnerMockRecorder) UnpinLeadership(arg0, arg1 any) *MockPinnerUnpinLeadershipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinLeadership", reflect.TypeOf((*MockPinner)(nil).UnpinLeadership), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinLeadership", reflect.TypeOf((*MockPinner)(nil).UnpinLeadership), arg0, arg1) + return &MockPinnerUnpinLeadershipCall{Call: call} +} + +// MockPinnerUnpinLeadershipCall wrap *gomock.Call +type MockPinnerUnpinLeadershipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPinnerUnpinLeadershipCall) Return(arg0 error) *MockPinnerUnpinLeadershipCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPinnerUnpinLeadershipCall) Do(f func(string, string) error) *MockPinnerUnpinLeadershipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPinnerUnpinLeadershipCall) DoAndReturn(f func(string, string) error) *MockPinnerUnpinLeadershipCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/lxdprofile/mocks/lxdprofile_mock.go b/core/lxdprofile/mocks/lxdprofile_mock.go index 59c74105fd3..7188aff7033 100644 --- a/core/lxdprofile/mocks/lxdprofile_mock.go +++ b/core/lxdprofile/mocks/lxdprofile_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/juju/core/lxdprofile LXDProfiler,LXDProfile +// mockgen -typed -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/juju/core/lxdprofile LXDProfiler,LXDProfile // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockLXDProfiler) LXDProfile() lxdprofile.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockLXDProfilerMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) LXDProfile() *MockLXDProfilerLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfile)) + return &MockLXDProfilerLXDProfileCall{Call: call} +} + +// MockLXDProfilerLXDProfileCall wrap *gomock.Call +type MockLXDProfilerLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerLXDProfileCall) Return(arg0 lxdprofile.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerLXDProfileCall) Do(f func() lxdprofile.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerLXDProfileCall) DoAndReturn(f func() lxdprofile.LXDProfile) *MockLXDProfilerLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfile is a mock of LXDProfile interface. @@ -85,9 +109,33 @@ func (m *MockLXDProfile) Empty() bool { } // Empty indicates an expected call of Empty. -func (mr *MockLXDProfileMockRecorder) Empty() *gomock.Call { +func (mr *MockLXDProfileMockRecorder) Empty() *MockLXDProfileEmptyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Empty", reflect.TypeOf((*MockLXDProfile)(nil).Empty)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Empty", reflect.TypeOf((*MockLXDProfile)(nil).Empty)) + return &MockLXDProfileEmptyCall{Call: call} +} + +// MockLXDProfileEmptyCall wrap *gomock.Call +type MockLXDProfileEmptyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileEmptyCall) Return(arg0 bool) *MockLXDProfileEmptyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileEmptyCall) Do(f func() bool) *MockLXDProfileEmptyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileEmptyCall) DoAndReturn(f func() bool) *MockLXDProfileEmptyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateConfigDevices mocks base method. @@ -99,7 +147,31 @@ func (m *MockLXDProfile) ValidateConfigDevices() error { } // ValidateConfigDevices indicates an expected call of ValidateConfigDevices. -func (mr *MockLXDProfileMockRecorder) ValidateConfigDevices() *gomock.Call { +func (mr *MockLXDProfileMockRecorder) ValidateConfigDevices() *MockLXDProfileValidateConfigDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateConfigDevices", reflect.TypeOf((*MockLXDProfile)(nil).ValidateConfigDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateConfigDevices", reflect.TypeOf((*MockLXDProfile)(nil).ValidateConfigDevices)) + return &MockLXDProfileValidateConfigDevicesCall{Call: call} +} + +// MockLXDProfileValidateConfigDevicesCall wrap *gomock.Call +type MockLXDProfileValidateConfigDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfileValidateConfigDevicesCall) Return(arg0 error) *MockLXDProfileValidateConfigDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfileValidateConfigDevicesCall) Do(f func() error) *MockLXDProfileValidateConfigDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfileValidateConfigDevicesCall) DoAndReturn(f func() error) *MockLXDProfileValidateConfigDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/lxdprofile/validate.go b/core/lxdprofile/validate.go index 597fb6d172c..0dee694aa82 100644 --- a/core/lxdprofile/validate.go +++ b/core/lxdprofile/validate.go @@ -7,7 +7,7 @@ import ( "github.com/juju/errors" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/juju/core/lxdprofile LXDProfiler,LXDProfile +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/lxdprofile_mock.go github.com/juju/juju/core/lxdprofile LXDProfiler,LXDProfile // LXDProfiler represents a local implementation of a charm profile. // This point of use interface normalises a LXDProfiler, so that we can diff --git a/core/model/charm_mock_test.go b/core/model/charm_mock_test.go index e5b26ad1236..e1b0d217219 100644 --- a/core/model/charm_mock_test.go +++ b/core/model/charm_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package model_test -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta +// mockgen -typed -package model_test -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta // // Package model_test is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCharmMeta) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMetaMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMetaMockRecorder) Manifest() *MockCharmMetaManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmMeta)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmMeta)(nil).Manifest)) + return &MockCharmMetaManifestCall{Call: call} +} + +// MockCharmMetaManifestCall wrap *gomock.Call +type MockCharmMetaManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaManifestCall) Return(arg0 *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaManifestCall) Do(f func() *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmMetaManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -62,7 +86,31 @@ func (m *MockCharmMeta) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMetaMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMetaMockRecorder) Meta() *MockCharmMetaMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmMeta)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmMeta)(nil).Meta)) + return &MockCharmMetaMetaCall{Call: call} +} + +// MockCharmMetaMetaCall wrap *gomock.Call +type MockCharmMetaMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaMetaCall) Do(f func() *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/model/package_test.go b/core/model/package_test.go index 8869d039a57..db0f02623bf 100644 --- a/core/model/package_test.go +++ b/core/model/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package model_test -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta +//go:generate go run go.uber.org/mock/mockgen -typed -package model_test -destination charm_mock_test.go github.com/juju/charm/v13 CharmMeta func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/modelmigration/description_mock_test.go b/core/modelmigration/description_mock_test.go index 76aeaac6cfc..2f18242283b 100644 --- a/core/modelmigration/description_mock_test.go +++ b/core/modelmigration/description_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination description_mock_test.go github.com/juju/description/v6 Model +// mockgen -typed -package modelmigration -destination description_mock_test.go github.com/juju/description/v6 Model // // Package modelmigration is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockModel) Actions() []description.Action { } // Actions indicates an expected call of Actions. -func (mr *MockModelMockRecorder) Actions() *gomock.Call { +func (mr *MockModelMockRecorder) Actions() *MockModelActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockModel)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockModel)(nil).Actions)) + return &MockModelActionsCall{Call: call} +} + +// MockModelActionsCall wrap *gomock.Call +type MockModelActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelActionsCall) Return(arg0 []description.Action) *MockModelActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelActionsCall) Do(f func() []description.Action) *MockModelActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelActionsCall) DoAndReturn(f func() []description.Action) *MockModelActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddAction mocks base method. @@ -64,9 +88,33 @@ func (m *MockModel) AddAction(arg0 description.ActionArgs) description.Action { } // AddAction indicates an expected call of AddAction. -func (mr *MockModelMockRecorder) AddAction(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddAction(arg0 any) *MockModelAddActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAction", reflect.TypeOf((*MockModel)(nil).AddAction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAction", reflect.TypeOf((*MockModel)(nil).AddAction), arg0) + return &MockModelAddActionCall{Call: call} +} + +// MockModelAddActionCall wrap *gomock.Call +type MockModelAddActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddActionCall) Return(arg0 description.Action) *MockModelAddActionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddActionCall) Do(f func(description.ActionArgs) description.Action) *MockModelAddActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddActionCall) DoAndReturn(f func(description.ActionArgs) description.Action) *MockModelAddActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddApplication mocks base method. @@ -78,9 +126,33 @@ func (m *MockModel) AddApplication(arg0 description.ApplicationArgs) description } // AddApplication indicates an expected call of AddApplication. -func (mr *MockModelMockRecorder) AddApplication(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddApplication(arg0 any) *MockModelAddApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockModel)(nil).AddApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockModel)(nil).AddApplication), arg0) + return &MockModelAddApplicationCall{Call: call} +} + +// MockModelAddApplicationCall wrap *gomock.Call +type MockModelAddApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddApplicationCall) Return(arg0 description.Application) *MockModelAddApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddApplicationCall) Do(f func(description.ApplicationArgs) description.Application) *MockModelAddApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddApplicationCall) DoAndReturn(f func(description.ApplicationArgs) description.Application) *MockModelAddApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddBlockDevice mocks base method. @@ -92,9 +164,33 @@ func (m *MockModel) AddBlockDevice(arg0 string, arg1 description.BlockDeviceArgs } // AddBlockDevice indicates an expected call of AddBlockDevice. -func (mr *MockModelMockRecorder) AddBlockDevice(arg0, arg1 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddBlockDevice(arg0, arg1 any) *MockModelAddBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlockDevice", reflect.TypeOf((*MockModel)(nil).AddBlockDevice), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlockDevice", reflect.TypeOf((*MockModel)(nil).AddBlockDevice), arg0, arg1) + return &MockModelAddBlockDeviceCall{Call: call} +} + +// MockModelAddBlockDeviceCall wrap *gomock.Call +type MockModelAddBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddBlockDeviceCall) Return(arg0 error) *MockModelAddBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddBlockDeviceCall) Do(f func(string, description.BlockDeviceArgs) error) *MockModelAddBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddBlockDeviceCall) DoAndReturn(f func(string, description.BlockDeviceArgs) error) *MockModelAddBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddCloudImageMetadata mocks base method. @@ -106,9 +202,33 @@ func (m *MockModel) AddCloudImageMetadata(arg0 description.CloudImageMetadataArg } // AddCloudImageMetadata indicates an expected call of AddCloudImageMetadata. -func (mr *MockModelMockRecorder) AddCloudImageMetadata(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddCloudImageMetadata(arg0 any) *MockModelAddCloudImageMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCloudImageMetadata", reflect.TypeOf((*MockModel)(nil).AddCloudImageMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCloudImageMetadata", reflect.TypeOf((*MockModel)(nil).AddCloudImageMetadata), arg0) + return &MockModelAddCloudImageMetadataCall{Call: call} +} + +// MockModelAddCloudImageMetadataCall wrap *gomock.Call +type MockModelAddCloudImageMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddCloudImageMetadataCall) Return(arg0 description.CloudImageMetadata) *MockModelAddCloudImageMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddCloudImageMetadataCall) Do(f func(description.CloudImageMetadataArgs) description.CloudImageMetadata) *MockModelAddCloudImageMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddCloudImageMetadataCall) DoAndReturn(f func(description.CloudImageMetadataArgs) description.CloudImageMetadata) *MockModelAddCloudImageMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddExternalController mocks base method. @@ -120,9 +240,33 @@ func (m *MockModel) AddExternalController(arg0 description.ExternalControllerArg } // AddExternalController indicates an expected call of AddExternalController. -func (mr *MockModelMockRecorder) AddExternalController(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddExternalController(arg0 any) *MockModelAddExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddExternalController", reflect.TypeOf((*MockModel)(nil).AddExternalController), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddExternalController", reflect.TypeOf((*MockModel)(nil).AddExternalController), arg0) + return &MockModelAddExternalControllerCall{Call: call} +} + +// MockModelAddExternalControllerCall wrap *gomock.Call +type MockModelAddExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddExternalControllerCall) Return(arg0 description.ExternalController) *MockModelAddExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddExternalControllerCall) Do(f func(description.ExternalControllerArgs) description.ExternalController) *MockModelAddExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddExternalControllerCall) DoAndReturn(f func(description.ExternalControllerArgs) description.ExternalController) *MockModelAddExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddFilesystem mocks base method. @@ -134,9 +278,33 @@ func (m *MockModel) AddFilesystem(arg0 description.FilesystemArgs) description.F } // AddFilesystem indicates an expected call of AddFilesystem. -func (mr *MockModelMockRecorder) AddFilesystem(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddFilesystem(arg0 any) *MockModelAddFilesystemCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFilesystem", reflect.TypeOf((*MockModel)(nil).AddFilesystem), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFilesystem", reflect.TypeOf((*MockModel)(nil).AddFilesystem), arg0) + return &MockModelAddFilesystemCall{Call: call} +} + +// MockModelAddFilesystemCall wrap *gomock.Call +type MockModelAddFilesystemCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddFilesystemCall) Return(arg0 description.Filesystem) *MockModelAddFilesystemCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddFilesystemCall) Do(f func(description.FilesystemArgs) description.Filesystem) *MockModelAddFilesystemCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddFilesystemCall) DoAndReturn(f func(description.FilesystemArgs) description.Filesystem) *MockModelAddFilesystemCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddFirewallRule mocks base method. @@ -148,9 +316,33 @@ func (m *MockModel) AddFirewallRule(arg0 description.FirewallRuleArgs) descripti } // AddFirewallRule indicates an expected call of AddFirewallRule. -func (mr *MockModelMockRecorder) AddFirewallRule(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddFirewallRule(arg0 any) *MockModelAddFirewallRuleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFirewallRule", reflect.TypeOf((*MockModel)(nil).AddFirewallRule), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFirewallRule", reflect.TypeOf((*MockModel)(nil).AddFirewallRule), arg0) + return &MockModelAddFirewallRuleCall{Call: call} +} + +// MockModelAddFirewallRuleCall wrap *gomock.Call +type MockModelAddFirewallRuleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddFirewallRuleCall) Return(arg0 description.FirewallRule) *MockModelAddFirewallRuleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddFirewallRuleCall) Do(f func(description.FirewallRuleArgs) description.FirewallRule) *MockModelAddFirewallRuleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddFirewallRuleCall) DoAndReturn(f func(description.FirewallRuleArgs) description.FirewallRule) *MockModelAddFirewallRuleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddIPAddress mocks base method. @@ -162,9 +354,33 @@ func (m *MockModel) AddIPAddress(arg0 description.IPAddressArgs) description.IPA } // AddIPAddress indicates an expected call of AddIPAddress. -func (mr *MockModelMockRecorder) AddIPAddress(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddIPAddress(arg0 any) *MockModelAddIPAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIPAddress", reflect.TypeOf((*MockModel)(nil).AddIPAddress), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIPAddress", reflect.TypeOf((*MockModel)(nil).AddIPAddress), arg0) + return &MockModelAddIPAddressCall{Call: call} +} + +// MockModelAddIPAddressCall wrap *gomock.Call +type MockModelAddIPAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddIPAddressCall) Return(arg0 description.IPAddress) *MockModelAddIPAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddIPAddressCall) Do(f func(description.IPAddressArgs) description.IPAddress) *MockModelAddIPAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddIPAddressCall) DoAndReturn(f func(description.IPAddressArgs) description.IPAddress) *MockModelAddIPAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddLinkLayerDevice mocks base method. @@ -176,9 +392,33 @@ func (m *MockModel) AddLinkLayerDevice(arg0 description.LinkLayerDeviceArgs) des } // AddLinkLayerDevice indicates an expected call of AddLinkLayerDevice. -func (mr *MockModelMockRecorder) AddLinkLayerDevice(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddLinkLayerDevice(arg0 any) *MockModelAddLinkLayerDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLinkLayerDevice", reflect.TypeOf((*MockModel)(nil).AddLinkLayerDevice), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLinkLayerDevice", reflect.TypeOf((*MockModel)(nil).AddLinkLayerDevice), arg0) + return &MockModelAddLinkLayerDeviceCall{Call: call} +} + +// MockModelAddLinkLayerDeviceCall wrap *gomock.Call +type MockModelAddLinkLayerDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddLinkLayerDeviceCall) Return(arg0 description.LinkLayerDevice) *MockModelAddLinkLayerDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddLinkLayerDeviceCall) Do(f func(description.LinkLayerDeviceArgs) description.LinkLayerDevice) *MockModelAddLinkLayerDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddLinkLayerDeviceCall) DoAndReturn(f func(description.LinkLayerDeviceArgs) description.LinkLayerDevice) *MockModelAddLinkLayerDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddMachine mocks base method. @@ -190,9 +430,33 @@ func (m *MockModel) AddMachine(arg0 description.MachineArgs) description.Machine } // AddMachine indicates an expected call of AddMachine. -func (mr *MockModelMockRecorder) AddMachine(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddMachine(arg0 any) *MockModelAddMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachine", reflect.TypeOf((*MockModel)(nil).AddMachine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMachine", reflect.TypeOf((*MockModel)(nil).AddMachine), arg0) + return &MockModelAddMachineCall{Call: call} +} + +// MockModelAddMachineCall wrap *gomock.Call +type MockModelAddMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddMachineCall) Return(arg0 description.Machine) *MockModelAddMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddMachineCall) Do(f func(description.MachineArgs) description.Machine) *MockModelAddMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddMachineCall) DoAndReturn(f func(description.MachineArgs) description.Machine) *MockModelAddMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddOfferConnection mocks base method. @@ -204,9 +468,33 @@ func (m *MockModel) AddOfferConnection(arg0 description.OfferConnectionArgs) des } // AddOfferConnection indicates an expected call of AddOfferConnection. -func (mr *MockModelMockRecorder) AddOfferConnection(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddOfferConnection(arg0 any) *MockModelAddOfferConnectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOfferConnection", reflect.TypeOf((*MockModel)(nil).AddOfferConnection), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOfferConnection", reflect.TypeOf((*MockModel)(nil).AddOfferConnection), arg0) + return &MockModelAddOfferConnectionCall{Call: call} +} + +// MockModelAddOfferConnectionCall wrap *gomock.Call +type MockModelAddOfferConnectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddOfferConnectionCall) Return(arg0 description.OfferConnection) *MockModelAddOfferConnectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddOfferConnectionCall) Do(f func(description.OfferConnectionArgs) description.OfferConnection) *MockModelAddOfferConnectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddOfferConnectionCall) DoAndReturn(f func(description.OfferConnectionArgs) description.OfferConnection) *MockModelAddOfferConnectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddOperation mocks base method. @@ -218,9 +506,33 @@ func (m *MockModel) AddOperation(arg0 description.OperationArgs) description.Ope } // AddOperation indicates an expected call of AddOperation. -func (mr *MockModelMockRecorder) AddOperation(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddOperation(arg0 any) *MockModelAddOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOperation", reflect.TypeOf((*MockModel)(nil).AddOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOperation", reflect.TypeOf((*MockModel)(nil).AddOperation), arg0) + return &MockModelAddOperationCall{Call: call} +} + +// MockModelAddOperationCall wrap *gomock.Call +type MockModelAddOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddOperationCall) Return(arg0 description.Operation) *MockModelAddOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddOperationCall) Do(f func(description.OperationArgs) description.Operation) *MockModelAddOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddOperationCall) DoAndReturn(f func(description.OperationArgs) description.Operation) *MockModelAddOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRelation mocks base method. @@ -232,9 +544,33 @@ func (m *MockModel) AddRelation(arg0 description.RelationArgs) description.Relat } // AddRelation indicates an expected call of AddRelation. -func (mr *MockModelMockRecorder) AddRelation(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddRelation(arg0 any) *MockModelAddRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockModel)(nil).AddRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockModel)(nil).AddRelation), arg0) + return &MockModelAddRelationCall{Call: call} +} + +// MockModelAddRelationCall wrap *gomock.Call +type MockModelAddRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddRelationCall) Return(arg0 description.Relation) *MockModelAddRelationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddRelationCall) Do(f func(description.RelationArgs) description.Relation) *MockModelAddRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddRelationCall) DoAndReturn(f func(description.RelationArgs) description.Relation) *MockModelAddRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRelationNetwork mocks base method. @@ -246,9 +582,33 @@ func (m *MockModel) AddRelationNetwork(arg0 description.RelationNetworkArgs) des } // AddRelationNetwork indicates an expected call of AddRelationNetwork. -func (mr *MockModelMockRecorder) AddRelationNetwork(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddRelationNetwork(arg0 any) *MockModelAddRelationNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelationNetwork", reflect.TypeOf((*MockModel)(nil).AddRelationNetwork), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelationNetwork", reflect.TypeOf((*MockModel)(nil).AddRelationNetwork), arg0) + return &MockModelAddRelationNetworkCall{Call: call} +} + +// MockModelAddRelationNetworkCall wrap *gomock.Call +type MockModelAddRelationNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddRelationNetworkCall) Return(arg0 description.RelationNetwork) *MockModelAddRelationNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddRelationNetworkCall) Do(f func(description.RelationNetworkArgs) description.RelationNetwork) *MockModelAddRelationNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddRelationNetworkCall) DoAndReturn(f func(description.RelationNetworkArgs) description.RelationNetwork) *MockModelAddRelationNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteApplication mocks base method. @@ -260,9 +620,33 @@ func (m *MockModel) AddRemoteApplication(arg0 description.RemoteApplicationArgs) } // AddRemoteApplication indicates an expected call of AddRemoteApplication. -func (mr *MockModelMockRecorder) AddRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddRemoteApplication(arg0 any) *MockModelAddRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockModel)(nil).AddRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockModel)(nil).AddRemoteApplication), arg0) + return &MockModelAddRemoteApplicationCall{Call: call} +} + +// MockModelAddRemoteApplicationCall wrap *gomock.Call +type MockModelAddRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddRemoteApplicationCall) Return(arg0 description.RemoteApplication) *MockModelAddRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddRemoteApplicationCall) Do(f func(description.RemoteApplicationArgs) description.RemoteApplication) *MockModelAddRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddRemoteApplicationCall) DoAndReturn(f func(description.RemoteApplicationArgs) description.RemoteApplication) *MockModelAddRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteEntity mocks base method. @@ -274,9 +658,33 @@ func (m *MockModel) AddRemoteEntity(arg0 description.RemoteEntityArgs) descripti } // AddRemoteEntity indicates an expected call of AddRemoteEntity. -func (mr *MockModelMockRecorder) AddRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddRemoteEntity(arg0 any) *MockModelAddRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteEntity", reflect.TypeOf((*MockModel)(nil).AddRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteEntity", reflect.TypeOf((*MockModel)(nil).AddRemoteEntity), arg0) + return &MockModelAddRemoteEntityCall{Call: call} +} + +// MockModelAddRemoteEntityCall wrap *gomock.Call +type MockModelAddRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddRemoteEntityCall) Return(arg0 description.RemoteEntity) *MockModelAddRemoteEntityCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddRemoteEntityCall) Do(f func(description.RemoteEntityArgs) description.RemoteEntity) *MockModelAddRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddRemoteEntityCall) DoAndReturn(f func(description.RemoteEntityArgs) description.RemoteEntity) *MockModelAddRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddRemoteSecret mocks base method. @@ -288,9 +696,33 @@ func (m *MockModel) AddRemoteSecret(arg0 description.RemoteSecretArgs) descripti } // AddRemoteSecret indicates an expected call of AddRemoteSecret. -func (mr *MockModelMockRecorder) AddRemoteSecret(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddRemoteSecret(arg0 any) *MockModelAddRemoteSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteSecret", reflect.TypeOf((*MockModel)(nil).AddRemoteSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteSecret", reflect.TypeOf((*MockModel)(nil).AddRemoteSecret), arg0) + return &MockModelAddRemoteSecretCall{Call: call} +} + +// MockModelAddRemoteSecretCall wrap *gomock.Call +type MockModelAddRemoteSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddRemoteSecretCall) Return(arg0 description.RemoteSecret) *MockModelAddRemoteSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddRemoteSecretCall) Do(f func(description.RemoteSecretArgs) description.RemoteSecret) *MockModelAddRemoteSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddRemoteSecretCall) DoAndReturn(f func(description.RemoteSecretArgs) description.RemoteSecret) *MockModelAddRemoteSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSSHHostKey mocks base method. @@ -302,9 +734,33 @@ func (m *MockModel) AddSSHHostKey(arg0 description.SSHHostKeyArgs) description.S } // AddSSHHostKey indicates an expected call of AddSSHHostKey. -func (mr *MockModelMockRecorder) AddSSHHostKey(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddSSHHostKey(arg0 any) *MockModelAddSSHHostKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHHostKey", reflect.TypeOf((*MockModel)(nil).AddSSHHostKey), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHHostKey", reflect.TypeOf((*MockModel)(nil).AddSSHHostKey), arg0) + return &MockModelAddSSHHostKeyCall{Call: call} +} + +// MockModelAddSSHHostKeyCall wrap *gomock.Call +type MockModelAddSSHHostKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddSSHHostKeyCall) Return(arg0 description.SSHHostKey) *MockModelAddSSHHostKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddSSHHostKeyCall) Do(f func(description.SSHHostKeyArgs) description.SSHHostKey) *MockModelAddSSHHostKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddSSHHostKeyCall) DoAndReturn(f func(description.SSHHostKeyArgs) description.SSHHostKey) *MockModelAddSSHHostKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSecret mocks base method. @@ -316,9 +772,33 @@ func (m *MockModel) AddSecret(arg0 description.SecretArgs) description.Secret { } // AddSecret indicates an expected call of AddSecret. -func (mr *MockModelMockRecorder) AddSecret(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddSecret(arg0 any) *MockModelAddSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSecret", reflect.TypeOf((*MockModel)(nil).AddSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSecret", reflect.TypeOf((*MockModel)(nil).AddSecret), arg0) + return &MockModelAddSecretCall{Call: call} +} + +// MockModelAddSecretCall wrap *gomock.Call +type MockModelAddSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddSecretCall) Return(arg0 description.Secret) *MockModelAddSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddSecretCall) Do(f func(description.SecretArgs) description.Secret) *MockModelAddSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddSecretCall) DoAndReturn(f func(description.SecretArgs) description.Secret) *MockModelAddSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSpace mocks base method. @@ -330,9 +810,33 @@ func (m *MockModel) AddSpace(arg0 description.SpaceArgs) description.Space { } // AddSpace indicates an expected call of AddSpace. -func (mr *MockModelMockRecorder) AddSpace(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddSpace(arg0 any) *MockModelAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockModel)(nil).AddSpace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockModel)(nil).AddSpace), arg0) + return &MockModelAddSpaceCall{Call: call} +} + +// MockModelAddSpaceCall wrap *gomock.Call +type MockModelAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddSpaceCall) Return(arg0 description.Space) *MockModelAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddSpaceCall) Do(f func(description.SpaceArgs) description.Space) *MockModelAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddSpaceCall) DoAndReturn(f func(description.SpaceArgs) description.Space) *MockModelAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddStorage mocks base method. @@ -344,9 +848,33 @@ func (m *MockModel) AddStorage(arg0 description.StorageArgs) description.Storage } // AddStorage indicates an expected call of AddStorage. -func (mr *MockModelMockRecorder) AddStorage(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddStorage(arg0 any) *MockModelAddStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddStorage", reflect.TypeOf((*MockModel)(nil).AddStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddStorage", reflect.TypeOf((*MockModel)(nil).AddStorage), arg0) + return &MockModelAddStorageCall{Call: call} +} + +// MockModelAddStorageCall wrap *gomock.Call +type MockModelAddStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddStorageCall) Return(arg0 description.Storage) *MockModelAddStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddStorageCall) Do(f func(description.StorageArgs) description.Storage) *MockModelAddStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddStorageCall) DoAndReturn(f func(description.StorageArgs) description.Storage) *MockModelAddStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddStoragePool mocks base method. @@ -358,9 +886,33 @@ func (m *MockModel) AddStoragePool(arg0 description.StoragePoolArgs) description } // AddStoragePool indicates an expected call of AddStoragePool. -func (mr *MockModelMockRecorder) AddStoragePool(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddStoragePool(arg0 any) *MockModelAddStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddStoragePool", reflect.TypeOf((*MockModel)(nil).AddStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddStoragePool", reflect.TypeOf((*MockModel)(nil).AddStoragePool), arg0) + return &MockModelAddStoragePoolCall{Call: call} +} + +// MockModelAddStoragePoolCall wrap *gomock.Call +type MockModelAddStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddStoragePoolCall) Return(arg0 description.StoragePool) *MockModelAddStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddStoragePoolCall) Do(f func(description.StoragePoolArgs) description.StoragePool) *MockModelAddStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddStoragePoolCall) DoAndReturn(f func(description.StoragePoolArgs) description.StoragePool) *MockModelAddStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSubnet mocks base method. @@ -372,9 +924,33 @@ func (m *MockModel) AddSubnet(arg0 description.SubnetArgs) description.Subnet { } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockModelMockRecorder) AddSubnet(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddSubnet(arg0 any) *MockModelAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockModel)(nil).AddSubnet), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockModel)(nil).AddSubnet), arg0) + return &MockModelAddSubnetCall{Call: call} +} + +// MockModelAddSubnetCall wrap *gomock.Call +type MockModelAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddSubnetCall) Return(arg0 description.Subnet) *MockModelAddSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddSubnetCall) Do(f func(description.SubnetArgs) description.Subnet) *MockModelAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddSubnetCall) DoAndReturn(f func(description.SubnetArgs) description.Subnet) *MockModelAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUser mocks base method. @@ -384,9 +960,33 @@ func (m *MockModel) AddUser(arg0 description.UserArgs) { } // AddUser indicates an expected call of AddUser. -func (mr *MockModelMockRecorder) AddUser(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddUser(arg0 any) *MockModelAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockModel)(nil).AddUser), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockModel)(nil).AddUser), arg0) + return &MockModelAddUserCall{Call: call} +} + +// MockModelAddUserCall wrap *gomock.Call +type MockModelAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddUserCall) Return() *MockModelAddUserCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddUserCall) Do(f func(description.UserArgs)) *MockModelAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddUserCall) DoAndReturn(f func(description.UserArgs)) *MockModelAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddVolume mocks base method. @@ -398,9 +998,33 @@ func (m *MockModel) AddVolume(arg0 description.VolumeArgs) description.Volume { } // AddVolume indicates an expected call of AddVolume. -func (mr *MockModelMockRecorder) AddVolume(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) AddVolume(arg0 any) *MockModelAddVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddVolume", reflect.TypeOf((*MockModel)(nil).AddVolume), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddVolume", reflect.TypeOf((*MockModel)(nil).AddVolume), arg0) + return &MockModelAddVolumeCall{Call: call} +} + +// MockModelAddVolumeCall wrap *gomock.Call +type MockModelAddVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAddVolumeCall) Return(arg0 description.Volume) *MockModelAddVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAddVolumeCall) Do(f func(description.VolumeArgs) description.Volume) *MockModelAddVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAddVolumeCall) DoAndReturn(f func(description.VolumeArgs) description.Volume) *MockModelAddVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotations mocks base method. @@ -412,9 +1036,33 @@ func (m *MockModel) Annotations() map[string]string { } // Annotations indicates an expected call of Annotations. -func (mr *MockModelMockRecorder) Annotations() *gomock.Call { +func (mr *MockModelMockRecorder) Annotations() *MockModelAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockModel)(nil).Annotations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockModel)(nil).Annotations)) + return &MockModelAnnotationsCall{Call: call} +} + +// MockModelAnnotationsCall wrap *gomock.Call +type MockModelAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAnnotationsCall) Return(arg0 map[string]string) *MockModelAnnotationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAnnotationsCall) Do(f func() map[string]string) *MockModelAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAnnotationsCall) DoAndReturn(f func() map[string]string) *MockModelAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Applications mocks base method. @@ -426,9 +1074,33 @@ func (m *MockModel) Applications() []description.Application { } // Applications indicates an expected call of Applications. -func (mr *MockModelMockRecorder) Applications() *gomock.Call { +func (mr *MockModelMockRecorder) Applications() *MockModelApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Applications", reflect.TypeOf((*MockModel)(nil).Applications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Applications", reflect.TypeOf((*MockModel)(nil).Applications)) + return &MockModelApplicationsCall{Call: call} +} + +// MockModelApplicationsCall wrap *gomock.Call +type MockModelApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelApplicationsCall) Return(arg0 []description.Application) *MockModelApplicationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelApplicationsCall) Do(f func() []description.Application) *MockModelApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelApplicationsCall) DoAndReturn(f func() []description.Application) *MockModelApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Blocks mocks base method. @@ -440,9 +1112,33 @@ func (m *MockModel) Blocks() map[string]string { } // Blocks indicates an expected call of Blocks. -func (mr *MockModelMockRecorder) Blocks() *gomock.Call { +func (mr *MockModelMockRecorder) Blocks() *MockModelBlocksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Blocks", reflect.TypeOf((*MockModel)(nil).Blocks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Blocks", reflect.TypeOf((*MockModel)(nil).Blocks)) + return &MockModelBlocksCall{Call: call} +} + +// MockModelBlocksCall wrap *gomock.Call +type MockModelBlocksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelBlocksCall) Return(arg0 map[string]string) *MockModelBlocksCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelBlocksCall) Do(f func() map[string]string) *MockModelBlocksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelBlocksCall) DoAndReturn(f func() map[string]string) *MockModelBlocksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -454,9 +1150,33 @@ func (m *MockModel) Cloud() string { } // Cloud indicates an expected call of Cloud. -func (mr *MockModelMockRecorder) Cloud() *gomock.Call { +func (mr *MockModelMockRecorder) Cloud() *MockModelCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockModel)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockModel)(nil).Cloud)) + return &MockModelCloudCall{Call: call} +} + +// MockModelCloudCall wrap *gomock.Call +type MockModelCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCall) Return(arg0 string) *MockModelCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCall) Do(f func() string) *MockModelCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCall) DoAndReturn(f func() string) *MockModelCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredential mocks base method. @@ -468,9 +1188,33 @@ func (m *MockModel) CloudCredential() description.CloudCredential { } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockModelMockRecorder) CloudCredential() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredential() *MockModelCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockModel)(nil).CloudCredential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockModel)(nil).CloudCredential)) + return &MockModelCloudCredentialCall{Call: call} +} + +// MockModelCloudCredentialCall wrap *gomock.Call +type MockModelCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialCall) Return(arg0 description.CloudCredential) *MockModelCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialCall) Do(f func() description.CloudCredential) *MockModelCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialCall) DoAndReturn(f func() description.CloudCredential) *MockModelCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudImageMetadata mocks base method. @@ -482,9 +1226,33 @@ func (m *MockModel) CloudImageMetadata() []description.CloudImageMetadata { } // CloudImageMetadata indicates an expected call of CloudImageMetadata. -func (mr *MockModelMockRecorder) CloudImageMetadata() *gomock.Call { +func (mr *MockModelMockRecorder) CloudImageMetadata() *MockModelCloudImageMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudImageMetadata", reflect.TypeOf((*MockModel)(nil).CloudImageMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudImageMetadata", reflect.TypeOf((*MockModel)(nil).CloudImageMetadata)) + return &MockModelCloudImageMetadataCall{Call: call} +} + +// MockModelCloudImageMetadataCall wrap *gomock.Call +type MockModelCloudImageMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudImageMetadataCall) Return(arg0 []description.CloudImageMetadata) *MockModelCloudImageMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudImageMetadataCall) Do(f func() []description.CloudImageMetadata) *MockModelCloudImageMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudImageMetadataCall) DoAndReturn(f func() []description.CloudImageMetadata) *MockModelCloudImageMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -496,9 +1264,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -510,9 +1302,33 @@ func (m *MockModel) Config() map[string]any { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 map[string]any) *MockModelConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() map[string]any) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() map[string]any) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -524,9 +1340,33 @@ func (m *MockModel) Constraints() description.Constraints { } // Constraints indicates an expected call of Constraints. -func (mr *MockModelMockRecorder) Constraints() *gomock.Call { +func (mr *MockModelMockRecorder) Constraints() *MockModelConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockModel)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockModel)(nil).Constraints)) + return &MockModelConstraintsCall{Call: call} +} + +// MockModelConstraintsCall wrap *gomock.Call +type MockModelConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConstraintsCall) Return(arg0 description.Constraints) *MockModelConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConstraintsCall) Do(f func() description.Constraints) *MockModelConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConstraintsCall) DoAndReturn(f func() description.Constraints) *MockModelConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnvironVersion mocks base method. @@ -538,9 +1378,33 @@ func (m *MockModel) EnvironVersion() int { } // EnvironVersion indicates an expected call of EnvironVersion. -func (mr *MockModelMockRecorder) EnvironVersion() *gomock.Call { +func (mr *MockModelMockRecorder) EnvironVersion() *MockModelEnvironVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironVersion", reflect.TypeOf((*MockModel)(nil).EnvironVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironVersion", reflect.TypeOf((*MockModel)(nil).EnvironVersion)) + return &MockModelEnvironVersionCall{Call: call} +} + +// MockModelEnvironVersionCall wrap *gomock.Call +type MockModelEnvironVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelEnvironVersionCall) Return(arg0 int) *MockModelEnvironVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelEnvironVersionCall) Do(f func() int) *MockModelEnvironVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelEnvironVersionCall) DoAndReturn(f func() int) *MockModelEnvironVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalControllers mocks base method. @@ -552,9 +1416,33 @@ func (m *MockModel) ExternalControllers() []description.ExternalController { } // ExternalControllers indicates an expected call of ExternalControllers. -func (mr *MockModelMockRecorder) ExternalControllers() *gomock.Call { +func (mr *MockModelMockRecorder) ExternalControllers() *MockModelExternalControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalControllers", reflect.TypeOf((*MockModel)(nil).ExternalControllers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalControllers", reflect.TypeOf((*MockModel)(nil).ExternalControllers)) + return &MockModelExternalControllersCall{Call: call} +} + +// MockModelExternalControllersCall wrap *gomock.Call +type MockModelExternalControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelExternalControllersCall) Return(arg0 []description.ExternalController) *MockModelExternalControllersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelExternalControllersCall) Do(f func() []description.ExternalController) *MockModelExternalControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelExternalControllersCall) DoAndReturn(f func() []description.ExternalController) *MockModelExternalControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Filesystems mocks base method. @@ -566,9 +1454,33 @@ func (m *MockModel) Filesystems() []description.Filesystem { } // Filesystems indicates an expected call of Filesystems. -func (mr *MockModelMockRecorder) Filesystems() *gomock.Call { +func (mr *MockModelMockRecorder) Filesystems() *MockModelFilesystemsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filesystems", reflect.TypeOf((*MockModel)(nil).Filesystems)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filesystems", reflect.TypeOf((*MockModel)(nil).Filesystems)) + return &MockModelFilesystemsCall{Call: call} +} + +// MockModelFilesystemsCall wrap *gomock.Call +type MockModelFilesystemsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelFilesystemsCall) Return(arg0 []description.Filesystem) *MockModelFilesystemsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelFilesystemsCall) Do(f func() []description.Filesystem) *MockModelFilesystemsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelFilesystemsCall) DoAndReturn(f func() []description.Filesystem) *MockModelFilesystemsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FirewallRules mocks base method. @@ -580,9 +1492,33 @@ func (m *MockModel) FirewallRules() []description.FirewallRule { } // FirewallRules indicates an expected call of FirewallRules. -func (mr *MockModelMockRecorder) FirewallRules() *gomock.Call { +func (mr *MockModelMockRecorder) FirewallRules() *MockModelFirewallRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirewallRules", reflect.TypeOf((*MockModel)(nil).FirewallRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirewallRules", reflect.TypeOf((*MockModel)(nil).FirewallRules)) + return &MockModelFirewallRulesCall{Call: call} +} + +// MockModelFirewallRulesCall wrap *gomock.Call +type MockModelFirewallRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelFirewallRulesCall) Return(arg0 []description.FirewallRule) *MockModelFirewallRulesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelFirewallRulesCall) Do(f func() []description.FirewallRule) *MockModelFirewallRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelFirewallRulesCall) DoAndReturn(f func() []description.FirewallRule) *MockModelFirewallRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IPAddresses mocks base method. @@ -594,9 +1530,33 @@ func (m *MockModel) IPAddresses() []description.IPAddress { } // IPAddresses indicates an expected call of IPAddresses. -func (mr *MockModelMockRecorder) IPAddresses() *gomock.Call { +func (mr *MockModelMockRecorder) IPAddresses() *MockModelIPAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPAddresses", reflect.TypeOf((*MockModel)(nil).IPAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPAddresses", reflect.TypeOf((*MockModel)(nil).IPAddresses)) + return &MockModelIPAddressesCall{Call: call} +} + +// MockModelIPAddressesCall wrap *gomock.Call +type MockModelIPAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelIPAddressesCall) Return(arg0 []description.IPAddress) *MockModelIPAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelIPAddressesCall) Do(f func() []description.IPAddress) *MockModelIPAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelIPAddressesCall) DoAndReturn(f func() []description.IPAddress) *MockModelIPAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LatestToolsVersion mocks base method. @@ -608,9 +1568,33 @@ func (m *MockModel) LatestToolsVersion() version.Number { } // LatestToolsVersion indicates an expected call of LatestToolsVersion. -func (mr *MockModelMockRecorder) LatestToolsVersion() *gomock.Call { +func (mr *MockModelMockRecorder) LatestToolsVersion() *MockModelLatestToolsVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestToolsVersion", reflect.TypeOf((*MockModel)(nil).LatestToolsVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestToolsVersion", reflect.TypeOf((*MockModel)(nil).LatestToolsVersion)) + return &MockModelLatestToolsVersionCall{Call: call} +} + +// MockModelLatestToolsVersionCall wrap *gomock.Call +type MockModelLatestToolsVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelLatestToolsVersionCall) Return(arg0 version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelLatestToolsVersionCall) Do(f func() version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelLatestToolsVersionCall) DoAndReturn(f func() version.Number) *MockModelLatestToolsVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LinkLayerDevices mocks base method. @@ -622,9 +1606,33 @@ func (m *MockModel) LinkLayerDevices() []description.LinkLayerDevice { } // LinkLayerDevices indicates an expected call of LinkLayerDevices. -func (mr *MockModelMockRecorder) LinkLayerDevices() *gomock.Call { +func (mr *MockModelMockRecorder) LinkLayerDevices() *MockModelLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkLayerDevices", reflect.TypeOf((*MockModel)(nil).LinkLayerDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkLayerDevices", reflect.TypeOf((*MockModel)(nil).LinkLayerDevices)) + return &MockModelLinkLayerDevicesCall{Call: call} +} + +// MockModelLinkLayerDevicesCall wrap *gomock.Call +type MockModelLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelLinkLayerDevicesCall) Return(arg0 []description.LinkLayerDevice) *MockModelLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelLinkLayerDevicesCall) Do(f func() []description.LinkLayerDevice) *MockModelLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelLinkLayerDevicesCall) DoAndReturn(f func() []description.LinkLayerDevice) *MockModelLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machines mocks base method. @@ -636,9 +1644,33 @@ func (m *MockModel) Machines() []description.Machine { } // Machines indicates an expected call of Machines. -func (mr *MockModelMockRecorder) Machines() *gomock.Call { +func (mr *MockModelMockRecorder) Machines() *MockModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockModel)(nil).Machines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockModel)(nil).Machines)) + return &MockModelMachinesCall{Call: call} +} + +// MockModelMachinesCall wrap *gomock.Call +type MockModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMachinesCall) Return(arg0 []description.Machine) *MockModelMachinesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMachinesCall) Do(f func() []description.Machine) *MockModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMachinesCall) DoAndReturn(f func() []description.Machine) *MockModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MeterStatus mocks base method. @@ -650,9 +1682,33 @@ func (m *MockModel) MeterStatus() description.MeterStatus { } // MeterStatus indicates an expected call of MeterStatus. -func (mr *MockModelMockRecorder) MeterStatus() *gomock.Call { +func (mr *MockModelMockRecorder) MeterStatus() *MockModelMeterStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MeterStatus", reflect.TypeOf((*MockModel)(nil).MeterStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MeterStatus", reflect.TypeOf((*MockModel)(nil).MeterStatus)) + return &MockModelMeterStatusCall{Call: call} +} + +// MockModelMeterStatusCall wrap *gomock.Call +type MockModelMeterStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMeterStatusCall) Return(arg0 description.MeterStatus) *MockModelMeterStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMeterStatusCall) Do(f func() description.MeterStatus) *MockModelMeterStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMeterStatusCall) DoAndReturn(f func() description.MeterStatus) *MockModelMeterStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferConnections mocks base method. @@ -664,9 +1720,33 @@ func (m *MockModel) OfferConnections() []description.OfferConnection { } // OfferConnections indicates an expected call of OfferConnections. -func (mr *MockModelMockRecorder) OfferConnections() *gomock.Call { +func (mr *MockModelMockRecorder) OfferConnections() *MockModelOfferConnectionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnections", reflect.TypeOf((*MockModel)(nil).OfferConnections)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferConnections", reflect.TypeOf((*MockModel)(nil).OfferConnections)) + return &MockModelOfferConnectionsCall{Call: call} +} + +// MockModelOfferConnectionsCall wrap *gomock.Call +type MockModelOfferConnectionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOfferConnectionsCall) Return(arg0 []description.OfferConnection) *MockModelOfferConnectionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOfferConnectionsCall) Do(f func() []description.OfferConnection) *MockModelOfferConnectionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOfferConnectionsCall) DoAndReturn(f func() []description.OfferConnection) *MockModelOfferConnectionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Operations mocks base method. @@ -678,9 +1758,33 @@ func (m *MockModel) Operations() []description.Operation { } // Operations indicates an expected call of Operations. -func (mr *MockModelMockRecorder) Operations() *gomock.Call { +func (mr *MockModelMockRecorder) Operations() *MockModelOperationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Operations", reflect.TypeOf((*MockModel)(nil).Operations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Operations", reflect.TypeOf((*MockModel)(nil).Operations)) + return &MockModelOperationsCall{Call: call} +} + +// MockModelOperationsCall wrap *gomock.Call +type MockModelOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationsCall) Return(arg0 []description.Operation) *MockModelOperationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationsCall) Do(f func() []description.Operation) *MockModelOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationsCall) DoAndReturn(f func() []description.Operation) *MockModelOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -692,9 +1796,33 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PasswordHash mocks base method. @@ -706,9 +1834,33 @@ func (m *MockModel) PasswordHash() string { } // PasswordHash indicates an expected call of PasswordHash. -func (mr *MockModelMockRecorder) PasswordHash() *gomock.Call { +func (mr *MockModelMockRecorder) PasswordHash() *MockModelPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockModel)(nil).PasswordHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockModel)(nil).PasswordHash)) + return &MockModelPasswordHashCall{Call: call} +} + +// MockModelPasswordHashCall wrap *gomock.Call +type MockModelPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelPasswordHashCall) Return(arg0 string) *MockModelPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelPasswordHashCall) Do(f func() string) *MockModelPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelPasswordHashCall) DoAndReturn(f func() string) *MockModelPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationNetworks mocks base method. @@ -720,9 +1872,33 @@ func (m *MockModel) RelationNetworks() []description.RelationNetwork { } // RelationNetworks indicates an expected call of RelationNetworks. -func (mr *MockModelMockRecorder) RelationNetworks() *gomock.Call { +func (mr *MockModelMockRecorder) RelationNetworks() *MockModelRelationNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationNetworks", reflect.TypeOf((*MockModel)(nil).RelationNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationNetworks", reflect.TypeOf((*MockModel)(nil).RelationNetworks)) + return &MockModelRelationNetworksCall{Call: call} +} + +// MockModelRelationNetworksCall wrap *gomock.Call +type MockModelRelationNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelRelationNetworksCall) Return(arg0 []description.RelationNetwork) *MockModelRelationNetworksCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelRelationNetworksCall) Do(f func() []description.RelationNetwork) *MockModelRelationNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelRelationNetworksCall) DoAndReturn(f func() []description.RelationNetwork) *MockModelRelationNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relations mocks base method. @@ -734,9 +1910,33 @@ func (m *MockModel) Relations() []description.Relation { } // Relations indicates an expected call of Relations. -func (mr *MockModelMockRecorder) Relations() *gomock.Call { +func (mr *MockModelMockRecorder) Relations() *MockModelRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockModel)(nil).Relations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockModel)(nil).Relations)) + return &MockModelRelationsCall{Call: call} +} + +// MockModelRelationsCall wrap *gomock.Call +type MockModelRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelRelationsCall) Return(arg0 []description.Relation) *MockModelRelationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelRelationsCall) Do(f func() []description.Relation) *MockModelRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelRelationsCall) DoAndReturn(f func() []description.Relation) *MockModelRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplications mocks base method. @@ -748,9 +1948,33 @@ func (m *MockModel) RemoteApplications() []description.RemoteApplication { } // RemoteApplications indicates an expected call of RemoteApplications. -func (mr *MockModelMockRecorder) RemoteApplications() *gomock.Call { +func (mr *MockModelMockRecorder) RemoteApplications() *MockModelRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockModel)(nil).RemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockModel)(nil).RemoteApplications)) + return &MockModelRemoteApplicationsCall{Call: call} +} + +// MockModelRemoteApplicationsCall wrap *gomock.Call +type MockModelRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelRemoteApplicationsCall) Return(arg0 []description.RemoteApplication) *MockModelRemoteApplicationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelRemoteApplicationsCall) Do(f func() []description.RemoteApplication) *MockModelRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelRemoteApplicationsCall) DoAndReturn(f func() []description.RemoteApplication) *MockModelRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteEntities mocks base method. @@ -762,9 +1986,33 @@ func (m *MockModel) RemoteEntities() []description.RemoteEntity { } // RemoteEntities indicates an expected call of RemoteEntities. -func (mr *MockModelMockRecorder) RemoteEntities() *gomock.Call { +func (mr *MockModelMockRecorder) RemoteEntities() *MockModelRemoteEntitiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteEntities", reflect.TypeOf((*MockModel)(nil).RemoteEntities)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteEntities", reflect.TypeOf((*MockModel)(nil).RemoteEntities)) + return &MockModelRemoteEntitiesCall{Call: call} +} + +// MockModelRemoteEntitiesCall wrap *gomock.Call +type MockModelRemoteEntitiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelRemoteEntitiesCall) Return(arg0 []description.RemoteEntity) *MockModelRemoteEntitiesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelRemoteEntitiesCall) Do(f func() []description.RemoteEntity) *MockModelRemoteEntitiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelRemoteEntitiesCall) DoAndReturn(f func() []description.RemoteEntity) *MockModelRemoteEntitiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteSecrets mocks base method. @@ -776,9 +2024,33 @@ func (m *MockModel) RemoteSecrets() []description.RemoteSecret { } // RemoteSecrets indicates an expected call of RemoteSecrets. -func (mr *MockModelMockRecorder) RemoteSecrets() *gomock.Call { +func (mr *MockModelMockRecorder) RemoteSecrets() *MockModelRemoteSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteSecrets", reflect.TypeOf((*MockModel)(nil).RemoteSecrets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteSecrets", reflect.TypeOf((*MockModel)(nil).RemoteSecrets)) + return &MockModelRemoteSecretsCall{Call: call} +} + +// MockModelRemoteSecretsCall wrap *gomock.Call +type MockModelRemoteSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelRemoteSecretsCall) Return(arg0 []description.RemoteSecret) *MockModelRemoteSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelRemoteSecretsCall) Do(f func() []description.RemoteSecret) *MockModelRemoteSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelRemoteSecretsCall) DoAndReturn(f func() []description.RemoteSecret) *MockModelRemoteSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SLA mocks base method. @@ -790,9 +2062,33 @@ func (m *MockModel) SLA() description.SLA { } // SLA indicates an expected call of SLA. -func (mr *MockModelMockRecorder) SLA() *gomock.Call { +func (mr *MockModelMockRecorder) SLA() *MockModelSLACall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SLA", reflect.TypeOf((*MockModel)(nil).SLA)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SLA", reflect.TypeOf((*MockModel)(nil).SLA)) + return &MockModelSLACall{Call: call} +} + +// MockModelSLACall wrap *gomock.Call +type MockModelSLACall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSLACall) Return(arg0 description.SLA) *MockModelSLACall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSLACall) Do(f func() description.SLA) *MockModelSLACall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSLACall) DoAndReturn(f func() description.SLA) *MockModelSLACall { + c.Call = c.Call.DoAndReturn(f) + return c } // SSHHostKeys mocks base method. @@ -804,9 +2100,33 @@ func (m *MockModel) SSHHostKeys() []description.SSHHostKey { } // SSHHostKeys indicates an expected call of SSHHostKeys. -func (mr *MockModelMockRecorder) SSHHostKeys() *gomock.Call { +func (mr *MockModelMockRecorder) SSHHostKeys() *MockModelSSHHostKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SSHHostKeys", reflect.TypeOf((*MockModel)(nil).SSHHostKeys)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SSHHostKeys", reflect.TypeOf((*MockModel)(nil).SSHHostKeys)) + return &MockModelSSHHostKeysCall{Call: call} +} + +// MockModelSSHHostKeysCall wrap *gomock.Call +type MockModelSSHHostKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSSHHostKeysCall) Return(arg0 []description.SSHHostKey) *MockModelSSHHostKeysCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSSHHostKeysCall) Do(f func() []description.SSHHostKey) *MockModelSSHHostKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSSHHostKeysCall) DoAndReturn(f func() []description.SSHHostKey) *MockModelSSHHostKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackendID mocks base method. @@ -818,9 +2138,33 @@ func (m *MockModel) SecretBackendID() string { } // SecretBackendID indicates an expected call of SecretBackendID. -func (mr *MockModelMockRecorder) SecretBackendID() *gomock.Call { +func (mr *MockModelMockRecorder) SecretBackendID() *MockModelSecretBackendIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackendID", reflect.TypeOf((*MockModel)(nil).SecretBackendID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackendID", reflect.TypeOf((*MockModel)(nil).SecretBackendID)) + return &MockModelSecretBackendIDCall{Call: call} +} + +// MockModelSecretBackendIDCall wrap *gomock.Call +type MockModelSecretBackendIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSecretBackendIDCall) Return(arg0 string) *MockModelSecretBackendIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSecretBackendIDCall) Do(f func() string) *MockModelSecretBackendIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSecretBackendIDCall) DoAndReturn(f func() string) *MockModelSecretBackendIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secrets mocks base method. @@ -832,9 +2176,33 @@ func (m *MockModel) Secrets() []description.Secret { } // Secrets indicates an expected call of Secrets. -func (mr *MockModelMockRecorder) Secrets() *gomock.Call { +func (mr *MockModelMockRecorder) Secrets() *MockModelSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockModel)(nil).Secrets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockModel)(nil).Secrets)) + return &MockModelSecretsCall{Call: call} +} + +// MockModelSecretsCall wrap *gomock.Call +type MockModelSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSecretsCall) Return(arg0 []description.Secret) *MockModelSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSecretsCall) Do(f func() []description.Secret) *MockModelSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSecretsCall) DoAndReturn(f func() []description.Secret) *MockModelSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sequences mocks base method. @@ -846,9 +2214,33 @@ func (m *MockModel) Sequences() map[string]int { } // Sequences indicates an expected call of Sequences. -func (mr *MockModelMockRecorder) Sequences() *gomock.Call { +func (mr *MockModelMockRecorder) Sequences() *MockModelSequencesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockModel)(nil).Sequences)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sequences", reflect.TypeOf((*MockModel)(nil).Sequences)) + return &MockModelSequencesCall{Call: call} +} + +// MockModelSequencesCall wrap *gomock.Call +type MockModelSequencesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSequencesCall) Return(arg0 map[string]int) *MockModelSequencesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSequencesCall) Do(f func() map[string]int) *MockModelSequencesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSequencesCall) DoAndReturn(f func() map[string]int) *MockModelSequencesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAnnotations mocks base method. @@ -858,9 +2250,33 @@ func (m *MockModel) SetAnnotations(arg0 map[string]string) { } // SetAnnotations indicates an expected call of SetAnnotations. -func (mr *MockModelMockRecorder) SetAnnotations(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetAnnotations(arg0 any) *MockModelSetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockModel)(nil).SetAnnotations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockModel)(nil).SetAnnotations), arg0) + return &MockModelSetAnnotationsCall{Call: call} +} + +// MockModelSetAnnotationsCall wrap *gomock.Call +type MockModelSetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetAnnotationsCall) Return() *MockModelSetAnnotationsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetAnnotationsCall) Do(f func(map[string]string)) *MockModelSetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetAnnotationsCall) DoAndReturn(f func(map[string]string)) *MockModelSetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCloudCredential mocks base method. @@ -870,9 +2286,33 @@ func (m *MockModel) SetCloudCredential(arg0 description.CloudCredentialArgs) { } // SetCloudCredential indicates an expected call of SetCloudCredential. -func (mr *MockModelMockRecorder) SetCloudCredential(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetCloudCredential(arg0 any) *MockModelSetCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudCredential", reflect.TypeOf((*MockModel)(nil).SetCloudCredential), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudCredential", reflect.TypeOf((*MockModel)(nil).SetCloudCredential), arg0) + return &MockModelSetCloudCredentialCall{Call: call} +} + +// MockModelSetCloudCredentialCall wrap *gomock.Call +type MockModelSetCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetCloudCredentialCall) Return() *MockModelSetCloudCredentialCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetCloudCredentialCall) Do(f func(description.CloudCredentialArgs)) *MockModelSetCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetCloudCredentialCall) DoAndReturn(f func(description.CloudCredentialArgs)) *MockModelSetCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -882,9 +2322,33 @@ func (m *MockModel) SetConstraints(arg0 description.ConstraintsArgs) { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockModelMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetConstraints(arg0 any) *MockModelSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockModel)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockModel)(nil).SetConstraints), arg0) + return &MockModelSetConstraintsCall{Call: call} +} + +// MockModelSetConstraintsCall wrap *gomock.Call +type MockModelSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetConstraintsCall) Return() *MockModelSetConstraintsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetConstraintsCall) Do(f func(description.ConstraintsArgs)) *MockModelSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetConstraintsCall) DoAndReturn(f func(description.ConstraintsArgs)) *MockModelSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMeterStatus mocks base method. @@ -896,9 +2360,33 @@ func (m *MockModel) SetMeterStatus(arg0, arg1 string) description.MeterStatus { } // SetMeterStatus indicates an expected call of SetMeterStatus. -func (mr *MockModelMockRecorder) SetMeterStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetMeterStatus(arg0, arg1 any) *MockModelSetMeterStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMeterStatus", reflect.TypeOf((*MockModel)(nil).SetMeterStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMeterStatus", reflect.TypeOf((*MockModel)(nil).SetMeterStatus), arg0, arg1) + return &MockModelSetMeterStatusCall{Call: call} +} + +// MockModelSetMeterStatusCall wrap *gomock.Call +type MockModelSetMeterStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetMeterStatusCall) Return(arg0 description.MeterStatus) *MockModelSetMeterStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetMeterStatusCall) Do(f func(string, string) description.MeterStatus) *MockModelSetMeterStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetMeterStatusCall) DoAndReturn(f func(string, string) description.MeterStatus) *MockModelSetMeterStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSLA mocks base method. @@ -910,9 +2398,33 @@ func (m *MockModel) SetSLA(arg0, arg1, arg2 string) description.SLA { } // SetSLA indicates an expected call of SetSLA. -func (mr *MockModelMockRecorder) SetSLA(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetSLA(arg0, arg1, arg2 any) *MockModelSetSLACall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSLA", reflect.TypeOf((*MockModel)(nil).SetSLA), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSLA", reflect.TypeOf((*MockModel)(nil).SetSLA), arg0, arg1, arg2) + return &MockModelSetSLACall{Call: call} +} + +// MockModelSetSLACall wrap *gomock.Call +type MockModelSetSLACall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetSLACall) Return(arg0 description.SLA) *MockModelSetSLACall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetSLACall) Do(f func(string, string, string) description.SLA) *MockModelSetSLACall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetSLACall) DoAndReturn(f func(string, string, string) description.SLA) *MockModelSetSLACall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSequence mocks base method. @@ -922,9 +2434,33 @@ func (m *MockModel) SetSequence(arg0 string, arg1 int) { } // SetSequence indicates an expected call of SetSequence. -func (mr *MockModelMockRecorder) SetSequence(arg0, arg1 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetSequence(arg0, arg1 any) *MockModelSetSequenceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSequence", reflect.TypeOf((*MockModel)(nil).SetSequence), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSequence", reflect.TypeOf((*MockModel)(nil).SetSequence), arg0, arg1) + return &MockModelSetSequenceCall{Call: call} +} + +// MockModelSetSequenceCall wrap *gomock.Call +type MockModelSetSequenceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetSequenceCall) Return() *MockModelSetSequenceCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetSequenceCall) Do(f func(string, int)) *MockModelSetSequenceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetSequenceCall) DoAndReturn(f func(string, int)) *MockModelSetSequenceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -934,9 +2470,33 @@ func (m *MockModel) SetStatus(arg0 description.StatusArgs) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockModelMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetStatus(arg0 any) *MockModelSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockModel)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockModel)(nil).SetStatus), arg0) + return &MockModelSetStatusCall{Call: call} +} + +// MockModelSetStatusCall wrap *gomock.Call +type MockModelSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetStatusCall) Return() *MockModelSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetStatusCall) Do(f func(description.StatusArgs)) *MockModelSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockModelSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatusHistory mocks base method. @@ -946,9 +2506,33 @@ func (m *MockModel) SetStatusHistory(arg0 []description.StatusArgs) { } // SetStatusHistory indicates an expected call of SetStatusHistory. -func (mr *MockModelMockRecorder) SetStatusHistory(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) SetStatusHistory(arg0 any) *MockModelSetStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockModel)(nil).SetStatusHistory), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockModel)(nil).SetStatusHistory), arg0) + return &MockModelSetStatusHistoryCall{Call: call} +} + +// MockModelSetStatusHistoryCall wrap *gomock.Call +type MockModelSetStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSetStatusHistoryCall) Return() *MockModelSetStatusHistoryCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSetStatusHistoryCall) Do(f func([]description.StatusArgs)) *MockModelSetStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSetStatusHistoryCall) DoAndReturn(f func([]description.StatusArgs)) *MockModelSetStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -960,9 +2544,33 @@ func (m *MockModel) Spaces() []description.Space { } // Spaces indicates an expected call of Spaces. -func (mr *MockModelMockRecorder) Spaces() *gomock.Call { +func (mr *MockModelMockRecorder) Spaces() *MockModelSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockModel)(nil).Spaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockModel)(nil).Spaces)) + return &MockModelSpacesCall{Call: call} +} + +// MockModelSpacesCall wrap *gomock.Call +type MockModelSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSpacesCall) Return(arg0 []description.Space) *MockModelSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSpacesCall) Do(f func() []description.Space) *MockModelSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSpacesCall) DoAndReturn(f func() []description.Space) *MockModelSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -974,9 +2582,33 @@ func (m *MockModel) Status() description.Status { } // Status indicates an expected call of Status. -func (mr *MockModelMockRecorder) Status() *gomock.Call { +func (mr *MockModelMockRecorder) Status() *MockModelStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockModel)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockModel)(nil).Status)) + return &MockModelStatusCall{Call: call} +} + +// MockModelStatusCall wrap *gomock.Call +type MockModelStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStatusCall) Return(arg0 description.Status) *MockModelStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStatusCall) Do(f func() description.Status) *MockModelStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStatusCall) DoAndReturn(f func() description.Status) *MockModelStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusHistory mocks base method. @@ -988,9 +2620,33 @@ func (m *MockModel) StatusHistory() []description.Status { } // StatusHistory indicates an expected call of StatusHistory. -func (mr *MockModelMockRecorder) StatusHistory() *gomock.Call { +func (mr *MockModelMockRecorder) StatusHistory() *MockModelStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockModel)(nil).StatusHistory)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockModel)(nil).StatusHistory)) + return &MockModelStatusHistoryCall{Call: call} +} + +// MockModelStatusHistoryCall wrap *gomock.Call +type MockModelStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStatusHistoryCall) Return(arg0 []description.Status) *MockModelStatusHistoryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStatusHistoryCall) Do(f func() []description.Status) *MockModelStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStatusHistoryCall) DoAndReturn(f func() []description.Status) *MockModelStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StoragePools mocks base method. @@ -1002,9 +2658,33 @@ func (m *MockModel) StoragePools() []description.StoragePool { } // StoragePools indicates an expected call of StoragePools. -func (mr *MockModelMockRecorder) StoragePools() *gomock.Call { +func (mr *MockModelMockRecorder) StoragePools() *MockModelStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoragePools", reflect.TypeOf((*MockModel)(nil).StoragePools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoragePools", reflect.TypeOf((*MockModel)(nil).StoragePools)) + return &MockModelStoragePoolsCall{Call: call} +} + +// MockModelStoragePoolsCall wrap *gomock.Call +type MockModelStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStoragePoolsCall) Return(arg0 []description.StoragePool) *MockModelStoragePoolsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStoragePoolsCall) Do(f func() []description.StoragePool) *MockModelStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStoragePoolsCall) DoAndReturn(f func() []description.StoragePool) *MockModelStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storages mocks base method. @@ -1016,9 +2696,33 @@ func (m *MockModel) Storages() []description.Storage { } // Storages indicates an expected call of Storages. -func (mr *MockModelMockRecorder) Storages() *gomock.Call { +func (mr *MockModelMockRecorder) Storages() *MockModelStoragesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storages", reflect.TypeOf((*MockModel)(nil).Storages)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storages", reflect.TypeOf((*MockModel)(nil).Storages)) + return &MockModelStoragesCall{Call: call} +} + +// MockModelStoragesCall wrap *gomock.Call +type MockModelStoragesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelStoragesCall) Return(arg0 []description.Storage) *MockModelStoragesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelStoragesCall) Do(f func() []description.Storage) *MockModelStoragesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelStoragesCall) DoAndReturn(f func() []description.Storage) *MockModelStoragesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -1030,9 +2734,33 @@ func (m *MockModel) Subnets() []description.Subnet { } // Subnets indicates an expected call of Subnets. -func (mr *MockModelMockRecorder) Subnets() *gomock.Call { +func (mr *MockModelMockRecorder) Subnets() *MockModelSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockModel)(nil).Subnets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockModel)(nil).Subnets)) + return &MockModelSubnetsCall{Call: call} +} + +// MockModelSubnetsCall wrap *gomock.Call +type MockModelSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelSubnetsCall) Return(arg0 []description.Subnet) *MockModelSubnetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelSubnetsCall) Do(f func() []description.Subnet) *MockModelSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelSubnetsCall) DoAndReturn(f func() []description.Subnet) *MockModelSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1044,9 +2772,33 @@ func (m *MockModel) Tag() names.ModelTag { } // Tag indicates an expected call of Tag. -func (mr *MockModelMockRecorder) Tag() *gomock.Call { +func (mr *MockModelMockRecorder) Tag() *MockModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockModel)(nil).Tag)) + return &MockModelTagCall{Call: call} +} + +// MockModelTagCall wrap *gomock.Call +type MockModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTagCall) Return(arg0 names.ModelTag) *MockModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTagCall) Do(f func() names.ModelTag) *MockModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTagCall) DoAndReturn(f func() names.ModelTag) *MockModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -1058,9 +2810,33 @@ func (m *MockModel) Type() string { } // Type indicates an expected call of Type. -func (mr *MockModelMockRecorder) Type() *gomock.Call { +func (mr *MockModelMockRecorder) Type() *MockModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockModel)(nil).Type)) + return &MockModelTypeCall{Call: call} +} + +// MockModelTypeCall wrap *gomock.Call +type MockModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelTypeCall) Return(arg0 string) *MockModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelTypeCall) Do(f func() string) *MockModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelTypeCall) DoAndReturn(f func() string) *MockModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateConfig mocks base method. @@ -1070,9 +2846,33 @@ func (m *MockModel) UpdateConfig(arg0 map[string]any) { } // UpdateConfig indicates an expected call of UpdateConfig. -func (mr *MockModelMockRecorder) UpdateConfig(arg0 any) *gomock.Call { +func (mr *MockModelMockRecorder) UpdateConfig(arg0 any) *MockModelUpdateConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfig", reflect.TypeOf((*MockModel)(nil).UpdateConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfig", reflect.TypeOf((*MockModel)(nil).UpdateConfig), arg0) + return &MockModelUpdateConfigCall{Call: call} +} + +// MockModelUpdateConfigCall wrap *gomock.Call +type MockModelUpdateConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUpdateConfigCall) Return() *MockModelUpdateConfigCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUpdateConfigCall) Do(f func(map[string]any)) *MockModelUpdateConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUpdateConfigCall) DoAndReturn(f func(map[string]any)) *MockModelUpdateConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Users mocks base method. @@ -1084,9 +2884,33 @@ func (m *MockModel) Users() []description.User { } // Users indicates an expected call of Users. -func (mr *MockModelMockRecorder) Users() *gomock.Call { +func (mr *MockModelMockRecorder) Users() *MockModelUsersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Users", reflect.TypeOf((*MockModel)(nil).Users)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Users", reflect.TypeOf((*MockModel)(nil).Users)) + return &MockModelUsersCall{Call: call} +} + +// MockModelUsersCall wrap *gomock.Call +type MockModelUsersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelUsersCall) Return(arg0 []description.User) *MockModelUsersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelUsersCall) Do(f func() []description.User) *MockModelUsersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelUsersCall) DoAndReturn(f func() []description.User) *MockModelUsersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -1098,9 +2922,33 @@ func (m *MockModel) Validate() error { } // Validate indicates an expected call of Validate. -func (mr *MockModelMockRecorder) Validate() *gomock.Call { +func (mr *MockModelMockRecorder) Validate() *MockModelValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockModel)(nil).Validate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockModel)(nil).Validate)) + return &MockModelValidateCall{Call: call} +} + +// MockModelValidateCall wrap *gomock.Call +type MockModelValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelValidateCall) Return(arg0 error) *MockModelValidateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelValidateCall) Do(f func() error) *MockModelValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelValidateCall) DoAndReturn(f func() error) *MockModelValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Volumes mocks base method. @@ -1112,7 +2960,31 @@ func (m *MockModel) Volumes() []description.Volume { } // Volumes indicates an expected call of Volumes. -func (mr *MockModelMockRecorder) Volumes() *gomock.Call { +func (mr *MockModelMockRecorder) Volumes() *MockModelVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Volumes", reflect.TypeOf((*MockModel)(nil).Volumes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Volumes", reflect.TypeOf((*MockModel)(nil).Volumes)) + return &MockModelVolumesCall{Call: call} +} + +// MockModelVolumesCall wrap *gomock.Call +type MockModelVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelVolumesCall) Return(arg0 []description.Volume) *MockModelVolumesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelVolumesCall) Do(f func() []description.Volume) *MockModelVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelVolumesCall) DoAndReturn(f func() []description.Volume) *MockModelVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/modelmigration/getter_mock_test.go b/core/modelmigration/getter_mock_test.go index c9c7834e70e..b2b31f3ccdf 100644 --- a/core/modelmigration/getter_mock_test.go +++ b/core/modelmigration/getter_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination getter_mock_test.go github.com/juju/juju/core/database DBGetter,TxnRunner +// mockgen -typed -package modelmigration -destination getter_mock_test.go github.com/juju/juju/core/database DBGetter,TxnRunner // // Package modelmigration is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockDBGetter) GetDB(arg0 string) (database.TxnRunner, error) { } // GetDB indicates an expected call of GetDB. -func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *gomock.Call { +func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *MockDBGetterGetDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + return &MockDBGetterGetDBCall{Call: call} +} + +// MockDBGetterGetDBCall wrap *gomock.Call +type MockDBGetterGetDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBGetterGetDBCall) Return(arg0 database.TxnRunner, arg1 error) *MockDBGetterGetDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBGetterGetDBCall) Do(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBGetterGetDBCall) DoAndReturn(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTxnRunner is a mock of TxnRunner interface. @@ -89,9 +113,33 @@ func (m *MockTxnRunner) StdTxn(arg0 context.Context, arg1 func(context.Context, } // StdTxn indicates an expected call of StdTxn. -func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *MockTxnRunnerStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + return &MockTxnRunnerStdTxnCall{Call: call} +} + +// MockTxnRunnerStdTxnCall wrap *gomock.Call +type MockTxnRunnerStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerStdTxnCall) Return(arg0 error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -103,7 +151,31 @@ func (m *MockTxnRunner) Txn(arg0 context.Context, arg1 func(context.Context, *sq } // Txn indicates an expected call of Txn. -func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *MockTxnRunnerTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + return &MockTxnRunnerTxnCall{Call: call} +} + +// MockTxnRunnerTxnCall wrap *gomock.Call +type MockTxnRunnerTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerTxnCall) Return(arg0 error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/modelmigration/op_mock_test.go b/core/modelmigration/op_mock_test.go index 3d34821f4ed..59b44b14e49 100644 --- a/core/modelmigration/op_mock_test.go +++ b/core/modelmigration/op_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination op_mock_test.go github.com/juju/juju/core/modelmigration Operation +// mockgen -typed -package modelmigration -destination op_mock_test.go github.com/juju/juju/core/modelmigration Operation // // Package modelmigration is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockOperation) Execute(arg0 context.Context, arg1 description.Model) er } // Execute indicates an expected call of Execute. -func (mr *MockOperationMockRecorder) Execute(arg0, arg1 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Execute(arg0, arg1 any) *MockOperationExecuteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockOperation)(nil).Execute), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockOperation)(nil).Execute), arg0, arg1) + return &MockOperationExecuteCall{Call: call} +} + +// MockOperationExecuteCall wrap *gomock.Call +type MockOperationExecuteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationExecuteCall) Return(arg0 error) *MockOperationExecuteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationExecuteCall) Do(f func(context.Context, description.Model) error) *MockOperationExecuteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationExecuteCall) DoAndReturn(f func(context.Context, description.Model) error) *MockOperationExecuteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Rollback mocks base method. @@ -63,9 +87,33 @@ func (m *MockOperation) Rollback(arg0 context.Context, arg1 description.Model) e } // Rollback indicates an expected call of Rollback. -func (mr *MockOperationMockRecorder) Rollback(arg0, arg1 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Rollback(arg0, arg1 any) *MockOperationRollbackCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockOperation)(nil).Rollback), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockOperation)(nil).Rollback), arg0, arg1) + return &MockOperationRollbackCall{Call: call} +} + +// MockOperationRollbackCall wrap *gomock.Call +type MockOperationRollbackCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRollbackCall) Return(arg0 error) *MockOperationRollbackCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRollbackCall) Do(f func(context.Context, description.Model) error) *MockOperationRollbackCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRollbackCall) DoAndReturn(f func(context.Context, description.Model) error) *MockOperationRollbackCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Setup mocks base method. @@ -77,7 +125,31 @@ func (m *MockOperation) Setup(arg0 Scope) error { } // Setup indicates an expected call of Setup. -func (mr *MockOperationMockRecorder) Setup(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Setup(arg0 any) *MockOperationSetupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setup", reflect.TypeOf((*MockOperation)(nil).Setup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setup", reflect.TypeOf((*MockOperation)(nil).Setup), arg0) + return &MockOperationSetupCall{Call: call} +} + +// MockOperationSetupCall wrap *gomock.Call +type MockOperationSetupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationSetupCall) Return(arg0 error) *MockOperationSetupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationSetupCall) Do(f func(Scope) error) *MockOperationSetupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationSetupCall) DoAndReturn(f func(Scope) error) *MockOperationSetupCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/modelmigration/package_test.go b/core/modelmigration/package_test.go index ee7fb0abe79..572f06c1b21 100644 --- a/core/modelmigration/package_test.go +++ b/core/modelmigration/package_test.go @@ -12,9 +12,9 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination getter_mock_test.go github.com/juju/juju/core/database DBGetter,TxnRunner -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination op_mock_test.go github.com/juju/juju/core/modelmigration Operation -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination description_mock_test.go github.com/juju/description/v6 Model +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination getter_mock_test.go github.com/juju/juju/core/database DBGetter,TxnRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination op_mock_test.go github.com/juju/juju/core/modelmigration Operation +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination description_mock_test.go github.com/juju/description/v6 Model func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/network/discovery_mock_test.go b/core/network/discovery_mock_test.go index 6bc284d552b..b4060e60f87 100644 --- a/core/network/discovery_mock_test.go +++ b/core/network/discovery_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package network_test -destination discovery_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr +// mockgen -typed -package network_test -destination discovery_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr // // Package network_test is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockConfigSource) DefaultRoute() (net.IP, string, error) { } // DefaultRoute indicates an expected call of DefaultRoute. -func (mr *MockConfigSourceMockRecorder) DefaultRoute() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) DefaultRoute() *MockConfigSourceDefaultRouteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultRoute", reflect.TypeOf((*MockConfigSource)(nil).DefaultRoute)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultRoute", reflect.TypeOf((*MockConfigSource)(nil).DefaultRoute)) + return &MockConfigSourceDefaultRouteCall{Call: call} +} + +// MockConfigSourceDefaultRouteCall wrap *gomock.Call +type MockConfigSourceDefaultRouteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceDefaultRouteCall) Return(arg0 net.IP, arg1 string, arg2 error) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceDefaultRouteCall) Do(f func() (net.IP, string, error)) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceDefaultRouteCall) DoAndReturn(f func() (net.IP, string, error)) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBridgePorts mocks base method. @@ -66,9 +90,33 @@ func (m *MockConfigSource) GetBridgePorts(arg0 string) []string { } // GetBridgePorts indicates an expected call of GetBridgePorts. -func (mr *MockConfigSourceMockRecorder) GetBridgePorts(arg0 any) *gomock.Call { +func (mr *MockConfigSourceMockRecorder) GetBridgePorts(arg0 any) *MockConfigSourceGetBridgePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBridgePorts", reflect.TypeOf((*MockConfigSource)(nil).GetBridgePorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBridgePorts", reflect.TypeOf((*MockConfigSource)(nil).GetBridgePorts), arg0) + return &MockConfigSourceGetBridgePortsCall{Call: call} +} + +// MockConfigSourceGetBridgePortsCall wrap *gomock.Call +type MockConfigSourceGetBridgePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceGetBridgePortsCall) Return(arg0 []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceGetBridgePortsCall) Do(f func(string) []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceGetBridgePortsCall) DoAndReturn(f func(string) []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Interfaces mocks base method. @@ -81,9 +129,33 @@ func (m *MockConfigSource) Interfaces() ([]network.ConfigSourceNIC, error) { } // Interfaces indicates an expected call of Interfaces. -func (mr *MockConfigSourceMockRecorder) Interfaces() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) Interfaces() *MockConfigSourceInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Interfaces", reflect.TypeOf((*MockConfigSource)(nil).Interfaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Interfaces", reflect.TypeOf((*MockConfigSource)(nil).Interfaces)) + return &MockConfigSourceInterfacesCall{Call: call} +} + +// MockConfigSourceInterfacesCall wrap *gomock.Call +type MockConfigSourceInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceInterfacesCall) Return(arg0 []network.ConfigSourceNIC, arg1 error) *MockConfigSourceInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceInterfacesCall) Do(f func() ([]network.ConfigSourceNIC, error)) *MockConfigSourceInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceInterfacesCall) DoAndReturn(f func() ([]network.ConfigSourceNIC, error)) *MockConfigSourceInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OvsManagedBridges mocks base method. @@ -96,9 +168,33 @@ func (m *MockConfigSource) OvsManagedBridges() (set.Strings, error) { } // OvsManagedBridges indicates an expected call of OvsManagedBridges. -func (mr *MockConfigSourceMockRecorder) OvsManagedBridges() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) OvsManagedBridges() *MockConfigSourceOvsManagedBridgesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OvsManagedBridges", reflect.TypeOf((*MockConfigSource)(nil).OvsManagedBridges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OvsManagedBridges", reflect.TypeOf((*MockConfigSource)(nil).OvsManagedBridges)) + return &MockConfigSourceOvsManagedBridgesCall{Call: call} +} + +// MockConfigSourceOvsManagedBridgesCall wrap *gomock.Call +type MockConfigSourceOvsManagedBridgesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceOvsManagedBridgesCall) Return(arg0 set.Strings, arg1 error) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceOvsManagedBridgesCall) Do(f func() (set.Strings, error)) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceOvsManagedBridgesCall) DoAndReturn(f func() (set.Strings, error)) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSourceNIC is a mock of ConfigSourceNIC interface. @@ -134,9 +230,33 @@ func (m *MockConfigSourceNIC) Addresses() ([]network.ConfigSourceAddr, error) { } // Addresses indicates an expected call of Addresses. -func (mr *MockConfigSourceNICMockRecorder) Addresses() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Addresses() *MockConfigSourceNICAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockConfigSourceNIC)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockConfigSourceNIC)(nil).Addresses)) + return &MockConfigSourceNICAddressesCall{Call: call} +} + +// MockConfigSourceNICAddressesCall wrap *gomock.Call +type MockConfigSourceNICAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICAddressesCall) Return(arg0 []network.ConfigSourceAddr, arg1 error) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICAddressesCall) Do(f func() ([]network.ConfigSourceAddr, error)) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICAddressesCall) DoAndReturn(f func() ([]network.ConfigSourceAddr, error)) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareAddr mocks base method. @@ -148,9 +268,33 @@ func (m *MockConfigSourceNIC) HardwareAddr() net.HardwareAddr { } // HardwareAddr indicates an expected call of HardwareAddr. -func (mr *MockConfigSourceNICMockRecorder) HardwareAddr() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) HardwareAddr() *MockConfigSourceNICHardwareAddrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareAddr", reflect.TypeOf((*MockConfigSourceNIC)(nil).HardwareAddr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareAddr", reflect.TypeOf((*MockConfigSourceNIC)(nil).HardwareAddr)) + return &MockConfigSourceNICHardwareAddrCall{Call: call} +} + +// MockConfigSourceNICHardwareAddrCall wrap *gomock.Call +type MockConfigSourceNICHardwareAddrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICHardwareAddrCall) Return(arg0 net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICHardwareAddrCall) Do(f func() net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICHardwareAddrCall) DoAndReturn(f func() net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Index mocks base method. @@ -162,9 +306,33 @@ func (m *MockConfigSourceNIC) Index() int { } // Index indicates an expected call of Index. -func (mr *MockConfigSourceNICMockRecorder) Index() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Index() *MockConfigSourceNICIndexCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index", reflect.TypeOf((*MockConfigSourceNIC)(nil).Index)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index", reflect.TypeOf((*MockConfigSourceNIC)(nil).Index)) + return &MockConfigSourceNICIndexCall{Call: call} +} + +// MockConfigSourceNICIndexCall wrap *gomock.Call +type MockConfigSourceNICIndexCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICIndexCall) Return(arg0 int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICIndexCall) Do(f func() int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICIndexCall) DoAndReturn(f func() int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUp mocks base method. @@ -176,9 +344,33 @@ func (m *MockConfigSourceNIC) IsUp() bool { } // IsUp indicates an expected call of IsUp. -func (mr *MockConfigSourceNICMockRecorder) IsUp() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) IsUp() *MockConfigSourceNICIsUpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockConfigSourceNIC)(nil).IsUp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockConfigSourceNIC)(nil).IsUp)) + return &MockConfigSourceNICIsUpCall{Call: call} +} + +// MockConfigSourceNICIsUpCall wrap *gomock.Call +type MockConfigSourceNICIsUpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICIsUpCall) Return(arg0 bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICIsUpCall) Do(f func() bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICIsUpCall) DoAndReturn(f func() bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MTU mocks base method. @@ -190,9 +382,33 @@ func (m *MockConfigSourceNIC) MTU() int { } // MTU indicates an expected call of MTU. -func (mr *MockConfigSourceNICMockRecorder) MTU() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) MTU() *MockConfigSourceNICMTUCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockConfigSourceNIC)(nil).MTU)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockConfigSourceNIC)(nil).MTU)) + return &MockConfigSourceNICMTUCall{Call: call} +} + +// MockConfigSourceNICMTUCall wrap *gomock.Call +type MockConfigSourceNICMTUCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICMTUCall) Return(arg0 int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICMTUCall) Do(f func() int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICMTUCall) DoAndReturn(f func() int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -204,9 +420,33 @@ func (m *MockConfigSourceNIC) Name() string { } // Name indicates an expected call of Name. -func (mr *MockConfigSourceNICMockRecorder) Name() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Name() *MockConfigSourceNICNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockConfigSourceNIC)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockConfigSourceNIC)(nil).Name)) + return &MockConfigSourceNICNameCall{Call: call} +} + +// MockConfigSourceNICNameCall wrap *gomock.Call +type MockConfigSourceNICNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICNameCall) Return(arg0 string) *MockConfigSourceNICNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICNameCall) Do(f func() string) *MockConfigSourceNICNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICNameCall) DoAndReturn(f func() string) *MockConfigSourceNICNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -218,9 +458,33 @@ func (m *MockConfigSourceNIC) Type() network.LinkLayerDeviceType { } // Type indicates an expected call of Type. -func (mr *MockConfigSourceNICMockRecorder) Type() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Type() *MockConfigSourceNICTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockConfigSourceNIC)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockConfigSourceNIC)(nil).Type)) + return &MockConfigSourceNICTypeCall{Call: call} +} + +// MockConfigSourceNICTypeCall wrap *gomock.Call +type MockConfigSourceNICTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICTypeCall) Return(arg0 network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICTypeCall) Do(f func() network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICTypeCall) DoAndReturn(f func() network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSourceAddr is a mock of ConfigSourceAddr interface. @@ -255,9 +519,33 @@ func (m *MockConfigSourceAddr) IP() net.IP { } // IP indicates an expected call of IP. -func (mr *MockConfigSourceAddrMockRecorder) IP() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IP() *MockConfigSourceAddrIPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IP", reflect.TypeOf((*MockConfigSourceAddr)(nil).IP)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IP", reflect.TypeOf((*MockConfigSourceAddr)(nil).IP)) + return &MockConfigSourceAddrIPCall{Call: call} +} + +// MockConfigSourceAddrIPCall wrap *gomock.Call +type MockConfigSourceAddrIPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIPCall) Return(arg0 net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIPCall) Do(f func() net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIPCall) DoAndReturn(f func() net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IPNet mocks base method. @@ -269,9 +557,33 @@ func (m *MockConfigSourceAddr) IPNet() *net.IPNet { } // IPNet indicates an expected call of IPNet. -func (mr *MockConfigSourceAddrMockRecorder) IPNet() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IPNet() *MockConfigSourceAddrIPNetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPNet", reflect.TypeOf((*MockConfigSourceAddr)(nil).IPNet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPNet", reflect.TypeOf((*MockConfigSourceAddr)(nil).IPNet)) + return &MockConfigSourceAddrIPNetCall{Call: call} +} + +// MockConfigSourceAddrIPNetCall wrap *gomock.Call +type MockConfigSourceAddrIPNetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIPNetCall) Return(arg0 *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIPNetCall) Do(f func() *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIPNetCall) DoAndReturn(f func() *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsSecondary mocks base method. @@ -283,9 +595,33 @@ func (m *MockConfigSourceAddr) IsSecondary() bool { } // IsSecondary indicates an expected call of IsSecondary. -func (mr *MockConfigSourceAddrMockRecorder) IsSecondary() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IsSecondary() *MockConfigSourceAddrIsSecondaryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSecondary", reflect.TypeOf((*MockConfigSourceAddr)(nil).IsSecondary)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSecondary", reflect.TypeOf((*MockConfigSourceAddr)(nil).IsSecondary)) + return &MockConfigSourceAddrIsSecondaryCall{Call: call} +} + +// MockConfigSourceAddrIsSecondaryCall wrap *gomock.Call +type MockConfigSourceAddrIsSecondaryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIsSecondaryCall) Return(arg0 bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIsSecondaryCall) Do(f func() bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIsSecondaryCall) DoAndReturn(f func() bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -297,7 +633,31 @@ func (m *MockConfigSourceAddr) String() string { } // String indicates an expected call of String. -func (mr *MockConfigSourceAddrMockRecorder) String() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) String() *MockConfigSourceAddrStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockConfigSourceAddr)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockConfigSourceAddr)(nil).String)) + return &MockConfigSourceAddrStringCall{Call: call} +} + +// MockConfigSourceAddrStringCall wrap *gomock.Call +type MockConfigSourceAddrStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrStringCall) Return(arg0 string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrStringCall) Do(f func() string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrStringCall) DoAndReturn(f func() string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/network/package_test.go b/core/network/package_test.go index 6d7c91281aa..c277f44aedc 100644 --- a/core/network/package_test.go +++ b/core/network/package_test.go @@ -10,7 +10,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package network_test -destination discovery_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr +//go:generate go run go.uber.org/mock/mockgen -typed -package network_test -destination discovery_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/output/progress/mocks/clock_mock.go b/core/output/progress/mocks/clock_mock.go index ed358ce8281..a8f4ce125d9 100644 --- a/core/output/progress/mocks/clock_mock.go +++ b/core/output/progress/mocks/clock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/clock_mock.go github.com/juju/clock Clock +// mockgen -typed -package mocks -destination ./mocks/clock_mock.go github.com/juju/clock Clock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/output/progress/mocks/term_mock.go b/core/output/progress/mocks/term_mock.go index f460ad5f1cb..aa528963fe6 100644 --- a/core/output/progress/mocks/term_mock.go +++ b/core/output/progress/mocks/term_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ./mocks/term_mock.go github.com/juju/juju/core/output/progress Terminal +// mockgen -typed -package mocks -destination ./mocks/term_mock.go github.com/juju/juju/core/output/progress Terminal // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockTerminal) Width() int { } // Width indicates an expected call of Width. -func (mr *MockTerminalMockRecorder) Width() *gomock.Call { +func (mr *MockTerminalMockRecorder) Width() *MockTerminalWidthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Width", reflect.TypeOf((*MockTerminal)(nil).Width)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Width", reflect.TypeOf((*MockTerminal)(nil).Width)) + return &MockTerminalWidthCall{Call: call} +} + +// MockTerminalWidthCall wrap *gomock.Call +type MockTerminalWidthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTerminalWidthCall) Return(arg0 int) *MockTerminalWidthCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTerminalWidthCall) Do(f func() int) *MockTerminalWidthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTerminalWidthCall) DoAndReturn(f func() int) *MockTerminalWidthCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/output/progress/package_test.go b/core/output/progress/package_test.go index 55b51cc9af0..4666bb505fb 100644 --- a/core/output/progress/package_test.go +++ b/core/output/progress/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/term_mock.go github.com/juju/juju/core/output/progress Terminal -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ./mocks/clock_mock.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/term_mock.go github.com/juju/juju/core/output/progress Terminal +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ./mocks/clock_mock.go github.com/juju/clock Clock func Test(t *testing.T) { gc.TestingT(t) diff --git a/core/pinger/clock_mock_test.go b/core/pinger/clock_mock_test.go index 314d018b720..9f749998529 100644 --- a/core/pinger/clock_mock_test.go +++ b/core/pinger/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package pinger -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package pinger -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package pinger is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/pinger/package_test.go b/core/pinger/package_test.go index 0146c908daf..6d9fac63004 100644 --- a/core/pinger/package_test.go +++ b/core/pinger/package_test.go @@ -11,7 +11,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package pinger -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package pinger -destination clock_mock_test.go github.com/juju/clock Clock,Timer func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/providertracker/package_test.go b/core/providertracker/package_test.go index 57fd1d54b34..56fe4bab908 100644 --- a/core/providertracker/package_test.go +++ b/core/providertracker/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package providertracker -destination provider_mock_test.go github.com/juju/juju/core/providertracker ProviderFactory,Provider +//go:generate go run go.uber.org/mock/mockgen -typed -package providertracker -destination provider_mock_test.go github.com/juju/juju/core/providertracker ProviderFactory,Provider func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/providertracker/provider_mock_test.go b/core/providertracker/provider_mock_test.go index b25d3641e1a..5510f6209a9 100644 --- a/core/providertracker/provider_mock_test.go +++ b/core/providertracker/provider_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providertracker -destination provider_mock_test.go github.com/juju/juju/core/providertracker ProviderFactory,Provider +// mockgen -typed -package providertracker -destination provider_mock_test.go github.com/juju/juju/core/providertracker ProviderFactory,Provider // // Package providertracker is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockProviderFactory) ProviderForModel(arg0 context.Context, arg1 string } // ProviderForModel indicates an expected call of ProviderForModel. -func (mr *MockProviderFactoryMockRecorder) ProviderForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderFactoryMockRecorder) ProviderForModel(arg0, arg1 any) *MockProviderFactoryProviderForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderForModel", reflect.TypeOf((*MockProviderFactory)(nil).ProviderForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderForModel", reflect.TypeOf((*MockProviderFactory)(nil).ProviderForModel), arg0, arg1) + return &MockProviderFactoryProviderForModelCall{Call: call} +} + +// MockProviderFactoryProviderForModelCall wrap *gomock.Call +type MockProviderFactoryProviderForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderFactoryProviderForModelCall) Return(arg0 Provider, arg1 error) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderFactoryProviderForModelCall) Do(f func(context.Context, string) (Provider, error)) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderFactoryProviderForModelCall) DoAndReturn(f func(context.Context, string) (Provider, error)) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProvider is a mock of Provider interface. @@ -92,9 +116,33 @@ func (m *MockProvider) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockProviderMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProviderMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockProviderAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockProvider)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockProvider)(nil).AdoptResources), arg0, arg1, arg2) + return &MockProviderAdoptResourcesCall{Call: call} +} + +// MockProviderAdoptResourcesCall wrap *gomock.Call +type MockProviderAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderAdoptResourcesCall) Return(arg0 error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -107,9 +155,33 @@ func (m *MockProvider) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockProviderMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockProviderBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockProvider)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockProvider)(nil).Bootstrap), arg0, arg1, arg2) + return &MockProviderBootstrapCall{Call: call} +} + +// MockProviderBootstrapCall wrap *gomock.Call +type MockProviderBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockProviderBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockProviderBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockProviderBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -121,9 +193,33 @@ func (m *MockProvider) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockProviderMockRecorder) Config() *gomock.Call { +func (mr *MockProviderMockRecorder) Config() *MockProviderConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProvider)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProvider)(nil).Config)) + return &MockProviderConfigCall{Call: call} +} + +// MockProviderConfigCall wrap *gomock.Call +type MockProviderConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderConfigCall) Return(arg0 *config.Config) *MockProviderConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderConfigCall) Do(f func() *config.Config) *MockProviderConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderConfigCall) DoAndReturn(f func() *config.Config) *MockProviderConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -136,9 +232,33 @@ func (m *MockProvider) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockProviderMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) ConstraintsValidator(arg0 any) *MockProviderConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockProvider)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockProvider)(nil).ConstraintsValidator), arg0) + return &MockProviderConstraintsValidatorCall{Call: call} +} + +// MockProviderConstraintsValidatorCall wrap *gomock.Call +type MockProviderConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -150,9 +270,33 @@ func (m *MockProvider) Create(arg0 envcontext.ProviderCallContext, arg1 environs } // Create indicates an expected call of Create. -func (mr *MockProviderMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Create(arg0, arg1 any) *MockProviderCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProvider)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProvider)(nil).Create), arg0, arg1) + return &MockProviderCreateCall{Call: call} +} + +// MockProviderCreateCall wrap *gomock.Call +type MockProviderCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCreateCall) Return(arg0 error) *MockProviderCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockProviderCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockProviderCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -164,9 +308,33 @@ func (m *MockProvider) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockProviderMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Destroy(arg0 any) *MockProviderDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockProvider)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockProvider)(nil).Destroy), arg0) + return &MockProviderDestroyCall{Call: call} +} + +// MockProviderDestroyCall wrap *gomock.Call +type MockProviderDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderDestroyCall) Return(arg0 error) *MockProviderDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockProviderDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockProviderDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -178,9 +346,33 @@ func (m *MockProvider) DestroyController(arg0 envcontext.ProviderCallContext, ar } // DestroyController indicates an expected call of DestroyController. -func (mr *MockProviderMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) DestroyController(arg0, arg1 any) *MockProviderDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockProvider)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockProvider)(nil).DestroyController), arg0, arg1) + return &MockProviderDestroyControllerCall{Call: call} +} + +// MockProviderDestroyControllerCall wrap *gomock.Call +type MockProviderDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderDestroyControllerCall) Return(arg0 error) *MockProviderDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockProviderDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockProviderDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -192,9 +384,33 @@ func (m *MockProvider) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockProviderMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) PrecheckInstance(arg0, arg1 any) *MockProviderPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockProvider)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockProvider)(nil).PrecheckInstance), arg0, arg1) + return &MockProviderPrecheckInstanceCall{Call: call} +} + +// MockProviderPrecheckInstanceCall wrap *gomock.Call +type MockProviderPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderPrecheckInstanceCall) Return(arg0 error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -206,9 +422,33 @@ func (m *MockProvider) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockProviderMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockProviderPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockProvider)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockProvider)(nil).PrepareForBootstrap), arg0, arg1) + return &MockProviderPrepareForBootstrapCall{Call: call} +} + +// MockProviderPrepareForBootstrapCall wrap *gomock.Call +type MockProviderPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderPrepareForBootstrapCall) Return(arg0 error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -220,9 +460,33 @@ func (m *MockProvider) SetConfig(arg0 context.Context, arg1 *config.Config) erro } // SetConfig indicates an expected call of SetConfig. -func (mr *MockProviderMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SetConfig(arg0, arg1 any) *MockProviderSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockProvider)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockProvider)(nil).SetConfig), arg0, arg1) + return &MockProviderSetConfigCall{Call: call} +} + +// MockProviderSetConfigCall wrap *gomock.Call +type MockProviderSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSetConfigCall) Return(arg0 error) *MockProviderSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockProviderSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockProviderSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -235,9 +499,33 @@ func (m *MockProvider) StorageProvider(arg0 storage.ProviderType) (storage.Provi } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockProviderMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) StorageProvider(arg0 any) *MockProviderStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProvider)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProvider)(nil).StorageProvider), arg0) + return &MockProviderStorageProviderCall{Call: call} +} + +// MockProviderStorageProviderCall wrap *gomock.Call +type MockProviderStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockProviderStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -250,7 +538,31 @@ func (m *MockProvider) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockProviderMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockProviderMockRecorder) StorageProviderTypes() *MockProviderStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProvider)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProvider)(nil).StorageProviderTypes)) + return &MockProviderStorageProviderTypesCall{Call: call} +} + +// MockProviderStorageProviderTypesCall wrap *gomock.Call +type MockProviderStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/eventsource/changestream_mock_test.go b/core/watcher/eventsource/changestream_mock_test.go index 0978c8c7a53..7de946e0ab7 100644 --- a/core/watcher/eventsource/changestream_mock_test.go +++ b/core/watcher/eventsource/changestream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventsource -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,WatchableDB,EventSource +// mockgen -typed -package eventsource -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,WatchableDB,EventSource // // Package eventsource is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockSubscription) Changes() <-chan []changestream.ChangeEvent { } // Changes indicates an expected call of Changes. -func (mr *MockSubscriptionMockRecorder) Changes() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Changes() *MockSubscriptionChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSubscription)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSubscription)(nil).Changes)) + return &MockSubscriptionChangesCall{Call: call} +} + +// MockSubscriptionChangesCall wrap *gomock.Call +type MockSubscriptionChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionChangesCall) Return(arg0 <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionChangesCall) Do(f func() <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionChangesCall) DoAndReturn(f func() <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -65,9 +89,33 @@ func (m *MockSubscription) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockSubscriptionMockRecorder) Done() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Done() *MockSubscriptionDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockSubscription)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockSubscription)(nil).Done)) + return &MockSubscriptionDoneCall{Call: call} +} + +// MockSubscriptionDoneCall wrap *gomock.Call +type MockSubscriptionDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionDoneCall) Return(arg0 <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionDoneCall) Do(f func() <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionDoneCall) DoAndReturn(f func() <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unsubscribe mocks base method. @@ -77,9 +125,33 @@ func (m *MockSubscription) Unsubscribe() { } // Unsubscribe indicates an expected call of Unsubscribe. -func (mr *MockSubscriptionMockRecorder) Unsubscribe() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Unsubscribe() *MockSubscriptionUnsubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockSubscription)(nil).Unsubscribe)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockSubscription)(nil).Unsubscribe)) + return &MockSubscriptionUnsubscribeCall{Call: call} +} + +// MockSubscriptionUnsubscribeCall wrap *gomock.Call +type MockSubscriptionUnsubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionUnsubscribeCall) Return() *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionUnsubscribeCall) Do(f func()) *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionUnsubscribeCall) DoAndReturn(f func()) *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatchableDB is a mock of WatchableDB interface. @@ -114,9 +186,33 @@ func (m *MockWatchableDB) StdTxn(arg0 context.Context, arg1 func(context.Context } // StdTxn indicates an expected call of StdTxn. -func (mr *MockWatchableDBMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockWatchableDBMockRecorder) StdTxn(arg0, arg1 any) *MockWatchableDBStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockWatchableDB)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockWatchableDB)(nil).StdTxn), arg0, arg1) + return &MockWatchableDBStdTxnCall{Call: call} +} + +// MockWatchableDBStdTxnCall wrap *gomock.Call +type MockWatchableDBStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBStdTxnCall) Return(arg0 error) *MockWatchableDBStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockWatchableDBStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockWatchableDBStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subscribe mocks base method. @@ -133,9 +229,33 @@ func (m *MockWatchableDB) Subscribe(arg0 ...changestream.SubscriptionOption) (ch } // Subscribe indicates an expected call of Subscribe. -func (mr *MockWatchableDBMockRecorder) Subscribe(arg0 ...any) *gomock.Call { +func (mr *MockWatchableDBMockRecorder) Subscribe(arg0 ...any) *MockWatchableDBSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockWatchableDB)(nil).Subscribe), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockWatchableDB)(nil).Subscribe), arg0...) + return &MockWatchableDBSubscribeCall{Call: call} +} + +// MockWatchableDBSubscribeCall wrap *gomock.Call +type MockWatchableDBSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBSubscribeCall) Return(arg0 changestream.Subscription, arg1 error) *MockWatchableDBSubscribeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBSubscribeCall) Do(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockWatchableDBSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBSubscribeCall) DoAndReturn(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockWatchableDBSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -147,9 +267,33 @@ func (m *MockWatchableDB) Txn(arg0 context.Context, arg1 func(context.Context, * } // Txn indicates an expected call of Txn. -func (mr *MockWatchableDBMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockWatchableDBMockRecorder) Txn(arg0, arg1 any) *MockWatchableDBTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockWatchableDB)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockWatchableDB)(nil).Txn), arg0, arg1) + return &MockWatchableDBTxnCall{Call: call} +} + +// MockWatchableDBTxnCall wrap *gomock.Call +type MockWatchableDBTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBTxnCall) Return(arg0 error) *MockWatchableDBTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockWatchableDBTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockWatchableDBTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEventSource is a mock of EventSource interface. @@ -189,7 +333,31 @@ func (m *MockEventSource) Subscribe(arg0 ...changestream.SubscriptionOption) (ch } // Subscribe indicates an expected call of Subscribe. -func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *gomock.Call { +func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *MockEventSourceSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + return &MockEventSourceSubscribeCall{Call: call} +} + +// MockEventSourceSubscribeCall wrap *gomock.Call +type MockEventSourceSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventSourceSubscribeCall) Return(arg0 changestream.Subscription, arg1 error) *MockEventSourceSubscribeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventSourceSubscribeCall) Do(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventSourceSubscribeCall) DoAndReturn(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/eventsource/package_mock_test.go b/core/watcher/eventsource/package_mock_test.go index 56c68e31d09..ccfe673a89e 100644 --- a/core/watcher/eventsource/package_mock_test.go +++ b/core/watcher/eventsource/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventsource -destination package_mock_test.go github.com/juju/juju/core/watcher/eventsource Logger +// mockgen -typed -package eventsource -destination package_mock_test.go github.com/juju/juju/core/watcher/eventsource Logger // // Package eventsource is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -66,8 +90,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/eventsource/package_test.go b/core/watcher/eventsource/package_test.go index 7130dd75dc8..576be7417c7 100644 --- a/core/watcher/eventsource/package_test.go +++ b/core/watcher/eventsource/package_test.go @@ -17,9 +17,9 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package eventsource -destination package_mock_test.go github.com/juju/juju/core/watcher/eventsource Logger -//go:generate go run go.uber.org/mock/mockgen -package eventsource -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,WatchableDB,EventSource -//go:generate go run go.uber.org/mock/mockgen -package eventsource -destination watcher_mock_test.go -source=./consume.go +//go:generate go run go.uber.org/mock/mockgen -typed -package eventsource -destination package_mock_test.go github.com/juju/juju/core/watcher/eventsource Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package eventsource -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,WatchableDB,EventSource +//go:generate go run go.uber.org/mock/mockgen -typed -package eventsource -destination watcher_mock_test.go -source=./consume.go func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/watcher/eventsource/watcher_mock_test.go b/core/watcher/eventsource/watcher_mock_test.go index a7c09314a35..cab6ad99acf 100644 --- a/core/watcher/eventsource/watcher_mock_test.go +++ b/core/watcher/eventsource/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventsource -destination watcher_mock_test.go -source=./consume.go +// mockgen -typed -package eventsource -destination watcher_mock_test.go -source=./consume.go // // Package eventsource is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockWatcher[T]) Changes() <-chan T { } // Changes indicates an expected call of Changes. -func (mr *MockWatcherMockRecorder[T]) Changes() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Changes() *MockWatcherChangesCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockWatcher[T])(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockWatcher[T])(nil).Changes)) + return &MockWatcherChangesCall[T]{Call: call} +} + +// MockWatcherChangesCall wrap *gomock.Call +type MockWatcherChangesCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherChangesCall[T]) Return(arg0 <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherChangesCall[T]) Do(f func() <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherChangesCall[T]) DoAndReturn(f func() <-chan T) *MockWatcherChangesCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockWatcher[T]) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWatcherMockRecorder[T]) Kill() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Kill() *MockWatcherKillCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcher[T])(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatcher[T])(nil).Kill)) + return &MockWatcherKillCall[T]{Call: call} +} + +// MockWatcherKillCall wrap *gomock.Call +type MockWatcherKillCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherKillCall[T]) Return() *MockWatcherKillCall[T] { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherKillCall[T]) Do(f func()) *MockWatcherKillCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherKillCall[T]) DoAndReturn(f func()) *MockWatcherKillCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockWatcher[T]) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWatcherMockRecorder[T]) Wait() *gomock.Call { +func (mr *MockWatcherMockRecorder[T]) Wait() *MockWatcherWaitCall[T] { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcher[T])(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatcher[T])(nil).Wait)) + return &MockWatcherWaitCall[T]{Call: call} +} + +// MockWatcherWaitCall wrap *gomock.Call +type MockWatcherWaitCall[T any] struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherWaitCall[T]) Return(arg0 error) *MockWatcherWaitCall[T] { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherWaitCall[T]) Do(f func() error) *MockWatcherWaitCall[T] { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherWaitCall[T]) DoAndReturn(f func() error) *MockWatcherWaitCall[T] { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/registry/clock_mock_test.go b/core/watcher/registry/clock_mock_test.go index c36df469278..52648db7a3e 100644 --- a/core/watcher/registry/clock_mock_test.go +++ b/core/watcher/registry/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package registry -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package registry -destination clock_mock_test.go github.com/juju/clock Clock // // Package registry is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/registry/logger_mock_test.go b/core/watcher/registry/logger_mock_test.go index 111316619ba..dd03e1934ec 100644 --- a/core/watcher/registry/logger_mock_test.go +++ b/core/watcher/registry/logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package registry -destination logger_mock_test.go github.com/juju/juju/core/watcher/registry Logger +// mockgen -typed -package registry -destination logger_mock_test.go github.com/juju/juju/core/watcher/registry Logger // // Package registry is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -63,8 +87,32 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/core/watcher/registry/package_test.go b/core/watcher/registry/package_test.go index c0fe57cfb82..3bc79632732 100644 --- a/core/watcher/registry/package_test.go +++ b/core/watcher/registry/package_test.go @@ -12,9 +12,9 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package registry -destination worker_mock_test.go github.com/juju/worker/v4 Worker -//go:generate go run go.uber.org/mock/mockgen -package registry -destination clock_mock_test.go github.com/juju/clock Clock -//go:generate go run go.uber.org/mock/mockgen -package registry -destination logger_mock_test.go github.com/juju/juju/core/watcher/registry Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package registry -destination worker_mock_test.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package registry -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package registry -destination logger_mock_test.go github.com/juju/juju/core/watcher/registry Logger func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/core/watcher/registry/worker_mock_test.go b/core/watcher/registry/worker_mock_test.go index 085404aa847..57bae4986dd 100644 --- a/core/watcher/registry/worker_mock_test.go +++ b/core/watcher/registry/worker_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package registry -destination worker_mock_test.go github.com/juju/worker/v4 Worker +// mockgen -typed -package registry -destination worker_mock_test.go github.com/juju/worker/v4 Worker // // Package registry is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/access/service/package_test.go b/domain/access/service/package_test.go index 48d629ecab1..e2523309f78 100644 --- a/domain/access/service/package_test.go +++ b/domain/access/service/package_test.go @@ -12,7 +12,7 @@ import ( "github.com/juju/juju/core/user" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/access/service State,UserState,PermissionState +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/access/service State,UserState,PermissionState func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/access/service/state_mock_test.go b/domain/access/service/state_mock_test.go index 051ef2df607..edc9f3e9814 100644 --- a/domain/access/service/state_mock_test.go +++ b/domain/access/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/access/service State,UserState,PermissionState +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/access/service State,UserState,PermissionState // // Package service is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockState) AddUser(arg0 context.Context, arg1 user.UUID, arg2, arg3 str } // AddUser indicates an expected call of AddUser. -func (mr *MockStateMockRecorder) AddUser(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddUser(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockStateAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockState)(nil).AddUser), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockState)(nil).AddUser), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockStateAddUserCall{Call: call} +} + +// MockStateAddUserCall wrap *gomock.Call +type MockStateAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddUserCall) Return(arg0 error) *MockStateAddUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddUserCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec) error) *MockStateAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddUserCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec) error) *MockStateAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUserWithActivationKey mocks base method. @@ -68,9 +92,33 @@ func (m *MockState) AddUserWithActivationKey(arg0 context.Context, arg1 user.UUI } // AddUserWithActivationKey indicates an expected call of AddUserWithActivationKey. -func (mr *MockStateMockRecorder) AddUserWithActivationKey(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddUserWithActivationKey(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockStateAddUserWithActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithActivationKey", reflect.TypeOf((*MockState)(nil).AddUserWithActivationKey), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithActivationKey", reflect.TypeOf((*MockState)(nil).AddUserWithActivationKey), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockStateAddUserWithActivationKeyCall{Call: call} +} + +// MockStateAddUserWithActivationKeyCall wrap *gomock.Call +type MockStateAddUserWithActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddUserWithActivationKeyCall) Return(arg0 error) *MockStateAddUserWithActivationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddUserWithActivationKeyCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, []byte) error) *MockStateAddUserWithActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddUserWithActivationKeyCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, []byte) error) *MockStateAddUserWithActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUserWithPasswordHash mocks base method. @@ -82,9 +130,33 @@ func (m *MockState) AddUserWithPasswordHash(arg0 context.Context, arg1 user.UUID } // AddUserWithPasswordHash indicates an expected call of AddUserWithPasswordHash. -func (mr *MockStateMockRecorder) AddUserWithPasswordHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddUserWithPasswordHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *MockStateAddUserWithPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithPasswordHash", reflect.TypeOf((*MockState)(nil).AddUserWithPasswordHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithPasswordHash", reflect.TypeOf((*MockState)(nil).AddUserWithPasswordHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + return &MockStateAddUserWithPasswordHashCall{Call: call} +} + +// MockStateAddUserWithPasswordHashCall wrap *gomock.Call +type MockStateAddUserWithPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddUserWithPasswordHashCall) Return(arg0 error) *MockStateAddUserWithPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddUserWithPasswordHashCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, string, []byte) error) *MockStateAddUserWithPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddUserWithPasswordHashCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, string, []byte) error) *MockStateAddUserWithPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllModelAccessForCloudCredential mocks base method. @@ -97,9 +169,33 @@ func (m *MockState) AllModelAccessForCloudCredential(arg0 context.Context, arg1 } // AllModelAccessForCloudCredential indicates an expected call of AllModelAccessForCloudCredential. -func (mr *MockStateMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *MockStateAllModelAccessForCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockState)(nil).AllModelAccessForCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockState)(nil).AllModelAccessForCloudCredential), arg0, arg1) + return &MockStateAllModelAccessForCloudCredentialCall{Call: call} +} + +// MockStateAllModelAccessForCloudCredentialCall wrap *gomock.Call +type MockStateAllModelAccessForCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllModelAccessForCloudCredentialCall) Return(arg0 []access.CredentialOwnerModelAccess, arg1 error) *MockStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllModelAccessForCloudCredentialCall) Do(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllModelAccessForCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePermission mocks base method. @@ -112,9 +208,33 @@ func (m *MockState) CreatePermission(arg0 context.Context, arg1 uuid.UUID, arg2 } // CreatePermission indicates an expected call of CreatePermission. -func (mr *MockStateMockRecorder) CreatePermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreatePermission(arg0, arg1, arg2 any) *MockStateCreatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockState)(nil).CreatePermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockState)(nil).CreatePermission), arg0, arg1, arg2) + return &MockStateCreatePermissionCall{Call: call} +} + +// MockStateCreatePermissionCall wrap *gomock.Call +type MockStateCreatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreatePermissionCall) Return(arg0 permission.UserAccess, arg1 error) *MockStateCreatePermissionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreatePermissionCall) Do(f func(context.Context, uuid.UUID, permission.UserAccessSpec) (permission.UserAccess, error)) *MockStateCreatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreatePermissionCall) DoAndReturn(f func(context.Context, uuid.UUID, permission.UserAccessSpec) (permission.UserAccess, error)) *MockStateCreatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeletePermission mocks base method. @@ -126,9 +246,33 @@ func (m *MockState) DeletePermission(arg0 context.Context, arg1 string, arg2 per } // DeletePermission indicates an expected call of DeletePermission. -func (mr *MockStateMockRecorder) DeletePermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeletePermission(arg0, arg1, arg2 any) *MockStateDeletePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePermission", reflect.TypeOf((*MockState)(nil).DeletePermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePermission", reflect.TypeOf((*MockState)(nil).DeletePermission), arg0, arg1, arg2) + return &MockStateDeletePermissionCall{Call: call} +} + +// MockStateDeletePermissionCall wrap *gomock.Call +type MockStateDeletePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeletePermissionCall) Return(arg0 error) *MockStateDeletePermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeletePermissionCall) Do(f func(context.Context, string, permission.ID) error) *MockStateDeletePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeletePermissionCall) DoAndReturn(f func(context.Context, string, permission.ID) error) *MockStateDeletePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DisableUserAuthentication mocks base method. @@ -140,9 +284,33 @@ func (m *MockState) DisableUserAuthentication(arg0 context.Context, arg1 string) } // DisableUserAuthentication indicates an expected call of DisableUserAuthentication. -func (mr *MockStateMockRecorder) DisableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DisableUserAuthentication(arg0, arg1 any) *MockStateDisableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockState)(nil).DisableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockState)(nil).DisableUserAuthentication), arg0, arg1) + return &MockStateDisableUserAuthenticationCall{Call: call} +} + +// MockStateDisableUserAuthenticationCall wrap *gomock.Call +type MockStateDisableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDisableUserAuthenticationCall) Return(arg0 error) *MockStateDisableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDisableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockStateDisableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDisableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockStateDisableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableUserAuthentication mocks base method. @@ -154,9 +322,33 @@ func (m *MockState) EnableUserAuthentication(arg0 context.Context, arg1 string) } // EnableUserAuthentication indicates an expected call of EnableUserAuthentication. -func (mr *MockStateMockRecorder) EnableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) EnableUserAuthentication(arg0, arg1 any) *MockStateEnableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockState)(nil).EnableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockState)(nil).EnableUserAuthentication), arg0, arg1) + return &MockStateEnableUserAuthenticationCall{Call: call} +} + +// MockStateEnableUserAuthenticationCall wrap *gomock.Call +type MockStateEnableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateEnableUserAuthenticationCall) Return(arg0 error) *MockStateEnableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateEnableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockStateEnableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateEnableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockStateEnableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetActivationKey mocks base method. @@ -169,9 +361,33 @@ func (m *MockState) GetActivationKey(arg0 context.Context, arg1 string) ([]byte, } // GetActivationKey indicates an expected call of GetActivationKey. -func (mr *MockStateMockRecorder) GetActivationKey(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetActivationKey(arg0, arg1 any) *MockStateGetActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationKey", reflect.TypeOf((*MockState)(nil).GetActivationKey), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationKey", reflect.TypeOf((*MockState)(nil).GetActivationKey), arg0, arg1) + return &MockStateGetActivationKeyCall{Call: call} +} + +// MockStateGetActivationKeyCall wrap *gomock.Call +type MockStateGetActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetActivationKeyCall) Return(arg0 []byte, arg1 error) *MockStateGetActivationKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetActivationKeyCall) Do(f func(context.Context, string) ([]byte, error)) *MockStateGetActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetActivationKeyCall) DoAndReturn(f func(context.Context, string) ([]byte, error)) *MockStateGetActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllUsers mocks base method. @@ -184,9 +400,33 @@ func (m *MockState) GetAllUsers(arg0 context.Context) ([]user.User, error) { } // GetAllUsers indicates an expected call of GetAllUsers. -func (mr *MockStateMockRecorder) GetAllUsers(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetAllUsers(arg0 any) *MockStateGetAllUsersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockState)(nil).GetAllUsers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockState)(nil).GetAllUsers), arg0) + return &MockStateGetAllUsersCall{Call: call} +} + +// MockStateGetAllUsersCall wrap *gomock.Call +type MockStateGetAllUsersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetAllUsersCall) Return(arg0 []user.User, arg1 error) *MockStateGetAllUsersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetAllUsersCall) Do(f func(context.Context) ([]user.User, error)) *MockStateGetAllUsersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetAllUsersCall) DoAndReturn(f func(context.Context) ([]user.User, error)) *MockStateGetAllUsersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUser mocks base method. @@ -199,9 +439,33 @@ func (m *MockState) GetUser(arg0 context.Context, arg1 user.UUID) (user.User, er } // GetUser indicates an expected call of GetUser. -func (mr *MockStateMockRecorder) GetUser(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetUser(arg0, arg1 any) *MockStateGetUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUser", reflect.TypeOf((*MockState)(nil).GetUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUser", reflect.TypeOf((*MockState)(nil).GetUser), arg0, arg1) + return &MockStateGetUserCall{Call: call} +} + +// MockStateGetUserCall wrap *gomock.Call +type MockStateGetUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetUserCall) Return(arg0 user.User, arg1 error) *MockStateGetUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetUserCall) Do(f func(context.Context, user.UUID) (user.User, error)) *MockStateGetUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetUserCall) DoAndReturn(f func(context.Context, user.UUID) (user.User, error)) *MockStateGetUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByAuth mocks base method. @@ -214,9 +478,33 @@ func (m *MockState) GetUserByAuth(arg0 context.Context, arg1 string, arg2 auth.P } // GetUserByAuth indicates an expected call of GetUserByAuth. -func (mr *MockStateMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *MockStateGetUserByAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockState)(nil).GetUserByAuth), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockState)(nil).GetUserByAuth), arg0, arg1, arg2) + return &MockStateGetUserByAuthCall{Call: call} +} + +// MockStateGetUserByAuthCall wrap *gomock.Call +type MockStateGetUserByAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetUserByAuthCall) Return(arg0 user.User, arg1 error) *MockStateGetUserByAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetUserByAuthCall) Do(f func(context.Context, string, auth.Password) (user.User, error)) *MockStateGetUserByAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetUserByAuthCall) DoAndReturn(f func(context.Context, string, auth.Password) (user.User, error)) *MockStateGetUserByAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -229,9 +517,33 @@ func (m *MockState) GetUserByName(arg0 context.Context, arg1 string) (user.User, } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockStateMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetUserByName(arg0, arg1 any) *MockStateGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockState)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockState)(nil).GetUserByName), arg0, arg1) + return &MockStateGetUserByNameCall{Call: call} +} + +// MockStateGetUserByNameCall wrap *gomock.Call +type MockStateGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockStateGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockStateGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockStateGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllAccessForUserAndObjectType mocks base method. @@ -244,9 +556,33 @@ func (m *MockState) ReadAllAccessForUserAndObjectType(arg0 context.Context, arg1 } // ReadAllAccessForUserAndObjectType indicates an expected call of ReadAllAccessForUserAndObjectType. -func (mr *MockStateMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *MockStateReadAllAccessForUserAndObjectTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockState)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockState)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + return &MockStateReadAllAccessForUserAndObjectTypeCall{Call: call} +} + +// MockStateReadAllAccessForUserAndObjectTypeCall wrap *gomock.Call +type MockStateReadAllAccessForUserAndObjectTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReadAllAccessForUserAndObjectTypeCall) Return(arg0 []permission.UserAccess, arg1 error) *MockStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReadAllAccessForUserAndObjectTypeCall) Do(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReadAllAccessForUserAndObjectTypeCall) DoAndReturn(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllUserAccessForTarget mocks base method. @@ -259,9 +595,33 @@ func (m *MockState) ReadAllUserAccessForTarget(arg0 context.Context, arg1 permis } // ReadAllUserAccessForTarget indicates an expected call of ReadAllUserAccessForTarget. -func (mr *MockStateMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *MockStateReadAllUserAccessForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockState)(nil).ReadAllUserAccessForTarget), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockState)(nil).ReadAllUserAccessForTarget), arg0, arg1) + return &MockStateReadAllUserAccessForTargetCall{Call: call} +} + +// MockStateReadAllUserAccessForTargetCall wrap *gomock.Call +type MockStateReadAllUserAccessForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReadAllUserAccessForTargetCall) Return(arg0 []permission.UserAccess, arg1 error) *MockStateReadAllUserAccessForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReadAllUserAccessForTargetCall) Do(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockStateReadAllUserAccessForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReadAllUserAccessForTargetCall) DoAndReturn(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockStateReadAllUserAccessForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllUserAccessForUser mocks base method. @@ -274,9 +634,33 @@ func (m *MockState) ReadAllUserAccessForUser(arg0 context.Context, arg1 string) } // ReadAllUserAccessForUser indicates an expected call of ReadAllUserAccessForUser. -func (mr *MockStateMockRecorder) ReadAllUserAccessForUser(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadAllUserAccessForUser(arg0, arg1 any) *MockStateReadAllUserAccessForUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForUser", reflect.TypeOf((*MockState)(nil).ReadAllUserAccessForUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForUser", reflect.TypeOf((*MockState)(nil).ReadAllUserAccessForUser), arg0, arg1) + return &MockStateReadAllUserAccessForUserCall{Call: call} +} + +// MockStateReadAllUserAccessForUserCall wrap *gomock.Call +type MockStateReadAllUserAccessForUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReadAllUserAccessForUserCall) Return(arg0 []permission.UserAccess, arg1 error) *MockStateReadAllUserAccessForUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReadAllUserAccessForUserCall) Do(f func(context.Context, string) ([]permission.UserAccess, error)) *MockStateReadAllUserAccessForUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReadAllUserAccessForUserCall) DoAndReturn(f func(context.Context, string) ([]permission.UserAccess, error)) *MockStateReadAllUserAccessForUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessForTarget mocks base method. @@ -289,9 +673,33 @@ func (m *MockState) ReadUserAccessForTarget(arg0 context.Context, arg1 string, a } // ReadUserAccessForTarget indicates an expected call of ReadUserAccessForTarget. -func (mr *MockStateMockRecorder) ReadUserAccessForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadUserAccessForTarget(arg0, arg1, arg2 any) *MockStateReadUserAccessForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessForTarget", reflect.TypeOf((*MockState)(nil).ReadUserAccessForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessForTarget", reflect.TypeOf((*MockState)(nil).ReadUserAccessForTarget), arg0, arg1, arg2) + return &MockStateReadUserAccessForTargetCall{Call: call} +} + +// MockStateReadUserAccessForTargetCall wrap *gomock.Call +type MockStateReadUserAccessForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReadUserAccessForTargetCall) Return(arg0 permission.UserAccess, arg1 error) *MockStateReadUserAccessForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReadUserAccessForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.UserAccess, error)) *MockStateReadUserAccessForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReadUserAccessForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.UserAccess, error)) *MockStateReadUserAccessForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessLevelForTarget mocks base method. @@ -304,9 +712,33 @@ func (m *MockState) ReadUserAccessLevelForTarget(arg0 context.Context, arg1 stri } // ReadUserAccessLevelForTarget indicates an expected call of ReadUserAccessLevelForTarget. -func (mr *MockStateMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *MockStateReadUserAccessLevelForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockState)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockState)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + return &MockStateReadUserAccessLevelForTargetCall{Call: call} +} + +// MockStateReadUserAccessLevelForTargetCall wrap *gomock.Call +type MockStateReadUserAccessLevelForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReadUserAccessLevelForTargetCall) Return(arg0 permission.Access, arg1 error) *MockStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReadUserAccessLevelForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReadUserAccessLevelForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUser mocks base method. @@ -318,9 +750,33 @@ func (m *MockState) RemoveUser(arg0 context.Context, arg1 string) error { } // RemoveUser indicates an expected call of RemoveUser. -func (mr *MockStateMockRecorder) RemoveUser(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) RemoveUser(arg0, arg1 any) *MockStateRemoveUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockState)(nil).RemoveUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockState)(nil).RemoveUser), arg0, arg1) + return &MockStateRemoveUserCall{Call: call} +} + +// MockStateRemoveUserCall wrap *gomock.Call +type MockStateRemoveUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateRemoveUserCall) Return(arg0 error) *MockStateRemoveUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateRemoveUserCall) Do(f func(context.Context, string) error) *MockStateRemoveUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateRemoveUserCall) DoAndReturn(f func(context.Context, string) error) *MockStateRemoveUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActivationKey mocks base method. @@ -332,9 +788,33 @@ func (m *MockState) SetActivationKey(arg0 context.Context, arg1 string, arg2 []b } // SetActivationKey indicates an expected call of SetActivationKey. -func (mr *MockStateMockRecorder) SetActivationKey(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetActivationKey(arg0, arg1, arg2 any) *MockStateSetActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActivationKey", reflect.TypeOf((*MockState)(nil).SetActivationKey), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActivationKey", reflect.TypeOf((*MockState)(nil).SetActivationKey), arg0, arg1, arg2) + return &MockStateSetActivationKeyCall{Call: call} +} + +// MockStateSetActivationKeyCall wrap *gomock.Call +type MockStateSetActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetActivationKeyCall) Return(arg0 error) *MockStateSetActivationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetActivationKeyCall) Do(f func(context.Context, string, []byte) error) *MockStateSetActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetActivationKeyCall) DoAndReturn(f func(context.Context, string, []byte) error) *MockStateSetActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPasswordHash mocks base method. @@ -346,9 +826,33 @@ func (m *MockState) SetPasswordHash(arg0 context.Context, arg1, arg2 string, arg } // SetPasswordHash indicates an expected call of SetPasswordHash. -func (mr *MockStateMockRecorder) SetPasswordHash(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetPasswordHash(arg0, arg1, arg2, arg3 any) *MockStateSetPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPasswordHash", reflect.TypeOf((*MockState)(nil).SetPasswordHash), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPasswordHash", reflect.TypeOf((*MockState)(nil).SetPasswordHash), arg0, arg1, arg2, arg3) + return &MockStateSetPasswordHashCall{Call: call} +} + +// MockStateSetPasswordHashCall wrap *gomock.Call +type MockStateSetPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetPasswordHashCall) Return(arg0 error) *MockStateSetPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetPasswordHashCall) Do(f func(context.Context, string, string, []byte) error) *MockStateSetPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetPasswordHashCall) DoAndReturn(f func(context.Context, string, string, []byte) error) *MockStateSetPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateLastLogin mocks base method. @@ -360,9 +864,33 @@ func (m *MockState) UpdateLastLogin(arg0 context.Context, arg1 string) error { } // UpdateLastLogin indicates an expected call of UpdateLastLogin. -func (mr *MockStateMockRecorder) UpdateLastLogin(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateLastLogin(arg0, arg1 any) *MockStateUpdateLastLoginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockState)(nil).UpdateLastLogin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockState)(nil).UpdateLastLogin), arg0, arg1) + return &MockStateUpdateLastLoginCall{Call: call} +} + +// MockStateUpdateLastLoginCall wrap *gomock.Call +type MockStateUpdateLastLoginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateLastLoginCall) Return(arg0 error) *MockStateUpdateLastLoginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateLastLoginCall) Do(f func(context.Context, string) error) *MockStateUpdateLastLoginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateLastLoginCall) DoAndReturn(f func(context.Context, string) error) *MockStateUpdateLastLoginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertPermission mocks base method. @@ -374,9 +902,33 @@ func (m *MockState) UpsertPermission(arg0 context.Context, arg1 access.UpdatePer } // UpsertPermission indicates an expected call of UpsertPermission. -func (mr *MockStateMockRecorder) UpsertPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpsertPermission(arg0, arg1 any) *MockStateUpsertPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertPermission", reflect.TypeOf((*MockState)(nil).UpsertPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertPermission", reflect.TypeOf((*MockState)(nil).UpsertPermission), arg0, arg1) + return &MockStateUpsertPermissionCall{Call: call} +} + +// MockStateUpsertPermissionCall wrap *gomock.Call +type MockStateUpsertPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpsertPermissionCall) Return(arg0 error) *MockStateUpsertPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpsertPermissionCall) Do(f func(context.Context, access.UpdatePermissionArgs) error) *MockStateUpsertPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpsertPermissionCall) DoAndReturn(f func(context.Context, access.UpdatePermissionArgs) error) *MockStateUpsertPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUserState is a mock of UserState interface. @@ -411,9 +963,33 @@ func (m *MockUserState) AddUser(arg0 context.Context, arg1 user.UUID, arg2, arg3 } // AddUser indicates an expected call of AddUser. -func (mr *MockUserStateMockRecorder) AddUser(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) AddUser(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockUserStateAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserState)(nil).AddUser), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserState)(nil).AddUser), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockUserStateAddUserCall{Call: call} +} + +// MockUserStateAddUserCall wrap *gomock.Call +type MockUserStateAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateAddUserCall) Return(arg0 error) *MockUserStateAddUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateAddUserCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec) error) *MockUserStateAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateAddUserCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec) error) *MockUserStateAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUserWithActivationKey mocks base method. @@ -425,9 +1001,33 @@ func (m *MockUserState) AddUserWithActivationKey(arg0 context.Context, arg1 user } // AddUserWithActivationKey indicates an expected call of AddUserWithActivationKey. -func (mr *MockUserStateMockRecorder) AddUserWithActivationKey(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) AddUserWithActivationKey(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockUserStateAddUserWithActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithActivationKey", reflect.TypeOf((*MockUserState)(nil).AddUserWithActivationKey), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithActivationKey", reflect.TypeOf((*MockUserState)(nil).AddUserWithActivationKey), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockUserStateAddUserWithActivationKeyCall{Call: call} +} + +// MockUserStateAddUserWithActivationKeyCall wrap *gomock.Call +type MockUserStateAddUserWithActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateAddUserWithActivationKeyCall) Return(arg0 error) *MockUserStateAddUserWithActivationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateAddUserWithActivationKeyCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, []byte) error) *MockUserStateAddUserWithActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateAddUserWithActivationKeyCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, []byte) error) *MockUserStateAddUserWithActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUserWithPasswordHash mocks base method. @@ -439,9 +1039,33 @@ func (m *MockUserState) AddUserWithPasswordHash(arg0 context.Context, arg1 user. } // AddUserWithPasswordHash indicates an expected call of AddUserWithPasswordHash. -func (mr *MockUserStateMockRecorder) AddUserWithPasswordHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) AddUserWithPasswordHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *MockUserStateAddUserWithPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithPasswordHash", reflect.TypeOf((*MockUserState)(nil).AddUserWithPasswordHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserWithPasswordHash", reflect.TypeOf((*MockUserState)(nil).AddUserWithPasswordHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + return &MockUserStateAddUserWithPasswordHashCall{Call: call} +} + +// MockUserStateAddUserWithPasswordHashCall wrap *gomock.Call +type MockUserStateAddUserWithPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateAddUserWithPasswordHashCall) Return(arg0 error) *MockUserStateAddUserWithPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateAddUserWithPasswordHashCall) Do(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, string, []byte) error) *MockUserStateAddUserWithPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateAddUserWithPasswordHashCall) DoAndReturn(f func(context.Context, user.UUID, string, string, user.UUID, permission.AccessSpec, string, []byte) error) *MockUserStateAddUserWithPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DisableUserAuthentication mocks base method. @@ -453,9 +1077,33 @@ func (m *MockUserState) DisableUserAuthentication(arg0 context.Context, arg1 str } // DisableUserAuthentication indicates an expected call of DisableUserAuthentication. -func (mr *MockUserStateMockRecorder) DisableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) DisableUserAuthentication(arg0, arg1 any) *MockUserStateDisableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockUserState)(nil).DisableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUserAuthentication", reflect.TypeOf((*MockUserState)(nil).DisableUserAuthentication), arg0, arg1) + return &MockUserStateDisableUserAuthenticationCall{Call: call} +} + +// MockUserStateDisableUserAuthenticationCall wrap *gomock.Call +type MockUserStateDisableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateDisableUserAuthenticationCall) Return(arg0 error) *MockUserStateDisableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateDisableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockUserStateDisableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateDisableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockUserStateDisableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableUserAuthentication mocks base method. @@ -467,9 +1115,33 @@ func (m *MockUserState) EnableUserAuthentication(arg0 context.Context, arg1 stri } // EnableUserAuthentication indicates an expected call of EnableUserAuthentication. -func (mr *MockUserStateMockRecorder) EnableUserAuthentication(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) EnableUserAuthentication(arg0, arg1 any) *MockUserStateEnableUserAuthenticationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockUserState)(nil).EnableUserAuthentication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUserAuthentication", reflect.TypeOf((*MockUserState)(nil).EnableUserAuthentication), arg0, arg1) + return &MockUserStateEnableUserAuthenticationCall{Call: call} +} + +// MockUserStateEnableUserAuthenticationCall wrap *gomock.Call +type MockUserStateEnableUserAuthenticationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateEnableUserAuthenticationCall) Return(arg0 error) *MockUserStateEnableUserAuthenticationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateEnableUserAuthenticationCall) Do(f func(context.Context, string) error) *MockUserStateEnableUserAuthenticationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateEnableUserAuthenticationCall) DoAndReturn(f func(context.Context, string) error) *MockUserStateEnableUserAuthenticationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetActivationKey mocks base method. @@ -482,9 +1154,33 @@ func (m *MockUserState) GetActivationKey(arg0 context.Context, arg1 string) ([]b } // GetActivationKey indicates an expected call of GetActivationKey. -func (mr *MockUserStateMockRecorder) GetActivationKey(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) GetActivationKey(arg0, arg1 any) *MockUserStateGetActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationKey", reflect.TypeOf((*MockUserState)(nil).GetActivationKey), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActivationKey", reflect.TypeOf((*MockUserState)(nil).GetActivationKey), arg0, arg1) + return &MockUserStateGetActivationKeyCall{Call: call} +} + +// MockUserStateGetActivationKeyCall wrap *gomock.Call +type MockUserStateGetActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateGetActivationKeyCall) Return(arg0 []byte, arg1 error) *MockUserStateGetActivationKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateGetActivationKeyCall) Do(f func(context.Context, string) ([]byte, error)) *MockUserStateGetActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateGetActivationKeyCall) DoAndReturn(f func(context.Context, string) ([]byte, error)) *MockUserStateGetActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllUsers mocks base method. @@ -497,9 +1193,33 @@ func (m *MockUserState) GetAllUsers(arg0 context.Context) ([]user.User, error) { } // GetAllUsers indicates an expected call of GetAllUsers. -func (mr *MockUserStateMockRecorder) GetAllUsers(arg0 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) GetAllUsers(arg0 any) *MockUserStateGetAllUsersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockUserState)(nil).GetAllUsers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllUsers", reflect.TypeOf((*MockUserState)(nil).GetAllUsers), arg0) + return &MockUserStateGetAllUsersCall{Call: call} +} + +// MockUserStateGetAllUsersCall wrap *gomock.Call +type MockUserStateGetAllUsersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateGetAllUsersCall) Return(arg0 []user.User, arg1 error) *MockUserStateGetAllUsersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateGetAllUsersCall) Do(f func(context.Context) ([]user.User, error)) *MockUserStateGetAllUsersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateGetAllUsersCall) DoAndReturn(f func(context.Context) ([]user.User, error)) *MockUserStateGetAllUsersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUser mocks base method. @@ -512,9 +1232,33 @@ func (m *MockUserState) GetUser(arg0 context.Context, arg1 user.UUID) (user.User } // GetUser indicates an expected call of GetUser. -func (mr *MockUserStateMockRecorder) GetUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) GetUser(arg0, arg1 any) *MockUserStateGetUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUser", reflect.TypeOf((*MockUserState)(nil).GetUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUser", reflect.TypeOf((*MockUserState)(nil).GetUser), arg0, arg1) + return &MockUserStateGetUserCall{Call: call} +} + +// MockUserStateGetUserCall wrap *gomock.Call +type MockUserStateGetUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateGetUserCall) Return(arg0 user.User, arg1 error) *MockUserStateGetUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateGetUserCall) Do(f func(context.Context, user.UUID) (user.User, error)) *MockUserStateGetUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateGetUserCall) DoAndReturn(f func(context.Context, user.UUID) (user.User, error)) *MockUserStateGetUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByAuth mocks base method. @@ -527,9 +1271,33 @@ func (m *MockUserState) GetUserByAuth(arg0 context.Context, arg1 string, arg2 au } // GetUserByAuth indicates an expected call of GetUserByAuth. -func (mr *MockUserStateMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *MockUserStateGetUserByAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserState)(nil).GetUserByAuth), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserState)(nil).GetUserByAuth), arg0, arg1, arg2) + return &MockUserStateGetUserByAuthCall{Call: call} +} + +// MockUserStateGetUserByAuthCall wrap *gomock.Call +type MockUserStateGetUserByAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateGetUserByAuthCall) Return(arg0 user.User, arg1 error) *MockUserStateGetUserByAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateGetUserByAuthCall) Do(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserStateGetUserByAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateGetUserByAuthCall) DoAndReturn(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserStateGetUserByAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -542,9 +1310,33 @@ func (m *MockUserState) GetUserByName(arg0 context.Context, arg1 string) (user.U } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserStateMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) GetUserByName(arg0, arg1 any) *MockUserStateGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserState)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserState)(nil).GetUserByName), arg0, arg1) + return &MockUserStateGetUserByNameCall{Call: call} +} + +// MockUserStateGetUserByNameCall wrap *gomock.Call +type MockUserStateGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserStateGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserStateGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserStateGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUser mocks base method. @@ -556,9 +1348,33 @@ func (m *MockUserState) RemoveUser(arg0 context.Context, arg1 string) error { } // RemoveUser indicates an expected call of RemoveUser. -func (mr *MockUserStateMockRecorder) RemoveUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) RemoveUser(arg0, arg1 any) *MockUserStateRemoveUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserState)(nil).RemoveUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserState)(nil).RemoveUser), arg0, arg1) + return &MockUserStateRemoveUserCall{Call: call} +} + +// MockUserStateRemoveUserCall wrap *gomock.Call +type MockUserStateRemoveUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateRemoveUserCall) Return(arg0 error) *MockUserStateRemoveUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateRemoveUserCall) Do(f func(context.Context, string) error) *MockUserStateRemoveUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateRemoveUserCall) DoAndReturn(f func(context.Context, string) error) *MockUserStateRemoveUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActivationKey mocks base method. @@ -570,9 +1386,33 @@ func (m *MockUserState) SetActivationKey(arg0 context.Context, arg1 string, arg2 } // SetActivationKey indicates an expected call of SetActivationKey. -func (mr *MockUserStateMockRecorder) SetActivationKey(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) SetActivationKey(arg0, arg1, arg2 any) *MockUserStateSetActivationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActivationKey", reflect.TypeOf((*MockUserState)(nil).SetActivationKey), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActivationKey", reflect.TypeOf((*MockUserState)(nil).SetActivationKey), arg0, arg1, arg2) + return &MockUserStateSetActivationKeyCall{Call: call} +} + +// MockUserStateSetActivationKeyCall wrap *gomock.Call +type MockUserStateSetActivationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateSetActivationKeyCall) Return(arg0 error) *MockUserStateSetActivationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateSetActivationKeyCall) Do(f func(context.Context, string, []byte) error) *MockUserStateSetActivationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateSetActivationKeyCall) DoAndReturn(f func(context.Context, string, []byte) error) *MockUserStateSetActivationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPasswordHash mocks base method. @@ -584,9 +1424,33 @@ func (m *MockUserState) SetPasswordHash(arg0 context.Context, arg1, arg2 string, } // SetPasswordHash indicates an expected call of SetPasswordHash. -func (mr *MockUserStateMockRecorder) SetPasswordHash(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) SetPasswordHash(arg0, arg1, arg2, arg3 any) *MockUserStateSetPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPasswordHash", reflect.TypeOf((*MockUserState)(nil).SetPasswordHash), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPasswordHash", reflect.TypeOf((*MockUserState)(nil).SetPasswordHash), arg0, arg1, arg2, arg3) + return &MockUserStateSetPasswordHashCall{Call: call} +} + +// MockUserStateSetPasswordHashCall wrap *gomock.Call +type MockUserStateSetPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateSetPasswordHashCall) Return(arg0 error) *MockUserStateSetPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateSetPasswordHashCall) Do(f func(context.Context, string, string, []byte) error) *MockUserStateSetPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateSetPasswordHashCall) DoAndReturn(f func(context.Context, string, string, []byte) error) *MockUserStateSetPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateLastLogin mocks base method. @@ -598,9 +1462,33 @@ func (m *MockUserState) UpdateLastLogin(arg0 context.Context, arg1 string) error } // UpdateLastLogin indicates an expected call of UpdateLastLogin. -func (mr *MockUserStateMockRecorder) UpdateLastLogin(arg0, arg1 any) *gomock.Call { +func (mr *MockUserStateMockRecorder) UpdateLastLogin(arg0, arg1 any) *MockUserStateUpdateLastLoginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserState)(nil).UpdateLastLogin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserState)(nil).UpdateLastLogin), arg0, arg1) + return &MockUserStateUpdateLastLoginCall{Call: call} +} + +// MockUserStateUpdateLastLoginCall wrap *gomock.Call +type MockUserStateUpdateLastLoginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserStateUpdateLastLoginCall) Return(arg0 error) *MockUserStateUpdateLastLoginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserStateUpdateLastLoginCall) Do(f func(context.Context, string) error) *MockUserStateUpdateLastLoginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserStateUpdateLastLoginCall) DoAndReturn(f func(context.Context, string) error) *MockUserStateUpdateLastLoginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPermissionState is a mock of PermissionState interface. @@ -636,9 +1524,33 @@ func (m *MockPermissionState) AllModelAccessForCloudCredential(arg0 context.Cont } // AllModelAccessForCloudCredential indicates an expected call of AllModelAccessForCloudCredential. -func (mr *MockPermissionStateMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) AllModelAccessForCloudCredential(arg0, arg1 any) *MockPermissionStateAllModelAccessForCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockPermissionState)(nil).AllModelAccessForCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllModelAccessForCloudCredential", reflect.TypeOf((*MockPermissionState)(nil).AllModelAccessForCloudCredential), arg0, arg1) + return &MockPermissionStateAllModelAccessForCloudCredentialCall{Call: call} +} + +// MockPermissionStateAllModelAccessForCloudCredentialCall wrap *gomock.Call +type MockPermissionStateAllModelAccessForCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateAllModelAccessForCloudCredentialCall) Return(arg0 []access.CredentialOwnerModelAccess, arg1 error) *MockPermissionStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateAllModelAccessForCloudCredentialCall) Do(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockPermissionStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateAllModelAccessForCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) ([]access.CredentialOwnerModelAccess, error)) *MockPermissionStateAllModelAccessForCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePermission mocks base method. @@ -651,9 +1563,33 @@ func (m *MockPermissionState) CreatePermission(arg0 context.Context, arg1 uuid.U } // CreatePermission indicates an expected call of CreatePermission. -func (mr *MockPermissionStateMockRecorder) CreatePermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) CreatePermission(arg0, arg1, arg2 any) *MockPermissionStateCreatePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockPermissionState)(nil).CreatePermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePermission", reflect.TypeOf((*MockPermissionState)(nil).CreatePermission), arg0, arg1, arg2) + return &MockPermissionStateCreatePermissionCall{Call: call} +} + +// MockPermissionStateCreatePermissionCall wrap *gomock.Call +type MockPermissionStateCreatePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateCreatePermissionCall) Return(arg0 permission.UserAccess, arg1 error) *MockPermissionStateCreatePermissionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateCreatePermissionCall) Do(f func(context.Context, uuid.UUID, permission.UserAccessSpec) (permission.UserAccess, error)) *MockPermissionStateCreatePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateCreatePermissionCall) DoAndReturn(f func(context.Context, uuid.UUID, permission.UserAccessSpec) (permission.UserAccess, error)) *MockPermissionStateCreatePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeletePermission mocks base method. @@ -665,9 +1601,33 @@ func (m *MockPermissionState) DeletePermission(arg0 context.Context, arg1 string } // DeletePermission indicates an expected call of DeletePermission. -func (mr *MockPermissionStateMockRecorder) DeletePermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) DeletePermission(arg0, arg1, arg2 any) *MockPermissionStateDeletePermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePermission", reflect.TypeOf((*MockPermissionState)(nil).DeletePermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePermission", reflect.TypeOf((*MockPermissionState)(nil).DeletePermission), arg0, arg1, arg2) + return &MockPermissionStateDeletePermissionCall{Call: call} +} + +// MockPermissionStateDeletePermissionCall wrap *gomock.Call +type MockPermissionStateDeletePermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateDeletePermissionCall) Return(arg0 error) *MockPermissionStateDeletePermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateDeletePermissionCall) Do(f func(context.Context, string, permission.ID) error) *MockPermissionStateDeletePermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateDeletePermissionCall) DoAndReturn(f func(context.Context, string, permission.ID) error) *MockPermissionStateDeletePermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllAccessForUserAndObjectType mocks base method. @@ -680,9 +1640,33 @@ func (m *MockPermissionState) ReadAllAccessForUserAndObjectType(arg0 context.Con } // ReadAllAccessForUserAndObjectType indicates an expected call of ReadAllAccessForUserAndObjectType. -func (mr *MockPermissionStateMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) ReadAllAccessForUserAndObjectType(arg0, arg1, arg2 any) *MockPermissionStateReadAllAccessForUserAndObjectTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockPermissionState)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllAccessForUserAndObjectType", reflect.TypeOf((*MockPermissionState)(nil).ReadAllAccessForUserAndObjectType), arg0, arg1, arg2) + return &MockPermissionStateReadAllAccessForUserAndObjectTypeCall{Call: call} +} + +// MockPermissionStateReadAllAccessForUserAndObjectTypeCall wrap *gomock.Call +type MockPermissionStateReadAllAccessForUserAndObjectTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateReadAllAccessForUserAndObjectTypeCall) Return(arg0 []permission.UserAccess, arg1 error) *MockPermissionStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateReadAllAccessForUserAndObjectTypeCall) Do(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockPermissionStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateReadAllAccessForUserAndObjectTypeCall) DoAndReturn(f func(context.Context, string, permission.ObjectType) ([]permission.UserAccess, error)) *MockPermissionStateReadAllAccessForUserAndObjectTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllUserAccessForTarget mocks base method. @@ -695,9 +1679,33 @@ func (m *MockPermissionState) ReadAllUserAccessForTarget(arg0 context.Context, a } // ReadAllUserAccessForTarget indicates an expected call of ReadAllUserAccessForTarget. -func (mr *MockPermissionStateMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) ReadAllUserAccessForTarget(arg0, arg1 any) *MockPermissionStateReadAllUserAccessForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadAllUserAccessForTarget), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadAllUserAccessForTarget), arg0, arg1) + return &MockPermissionStateReadAllUserAccessForTargetCall{Call: call} +} + +// MockPermissionStateReadAllUserAccessForTargetCall wrap *gomock.Call +type MockPermissionStateReadAllUserAccessForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateReadAllUserAccessForTargetCall) Return(arg0 []permission.UserAccess, arg1 error) *MockPermissionStateReadAllUserAccessForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateReadAllUserAccessForTargetCall) Do(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockPermissionStateReadAllUserAccessForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateReadAllUserAccessForTargetCall) DoAndReturn(f func(context.Context, permission.ID) ([]permission.UserAccess, error)) *MockPermissionStateReadAllUserAccessForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadAllUserAccessForUser mocks base method. @@ -710,9 +1718,33 @@ func (m *MockPermissionState) ReadAllUserAccessForUser(arg0 context.Context, arg } // ReadAllUserAccessForUser indicates an expected call of ReadAllUserAccessForUser. -func (mr *MockPermissionStateMockRecorder) ReadAllUserAccessForUser(arg0, arg1 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) ReadAllUserAccessForUser(arg0, arg1 any) *MockPermissionStateReadAllUserAccessForUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForUser", reflect.TypeOf((*MockPermissionState)(nil).ReadAllUserAccessForUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadAllUserAccessForUser", reflect.TypeOf((*MockPermissionState)(nil).ReadAllUserAccessForUser), arg0, arg1) + return &MockPermissionStateReadAllUserAccessForUserCall{Call: call} +} + +// MockPermissionStateReadAllUserAccessForUserCall wrap *gomock.Call +type MockPermissionStateReadAllUserAccessForUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateReadAllUserAccessForUserCall) Return(arg0 []permission.UserAccess, arg1 error) *MockPermissionStateReadAllUserAccessForUserCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateReadAllUserAccessForUserCall) Do(f func(context.Context, string) ([]permission.UserAccess, error)) *MockPermissionStateReadAllUserAccessForUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateReadAllUserAccessForUserCall) DoAndReturn(f func(context.Context, string) ([]permission.UserAccess, error)) *MockPermissionStateReadAllUserAccessForUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessForTarget mocks base method. @@ -725,9 +1757,33 @@ func (m *MockPermissionState) ReadUserAccessForTarget(arg0 context.Context, arg1 } // ReadUserAccessForTarget indicates an expected call of ReadUserAccessForTarget. -func (mr *MockPermissionStateMockRecorder) ReadUserAccessForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) ReadUserAccessForTarget(arg0, arg1, arg2 any) *MockPermissionStateReadUserAccessForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadUserAccessForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadUserAccessForTarget), arg0, arg1, arg2) + return &MockPermissionStateReadUserAccessForTargetCall{Call: call} +} + +// MockPermissionStateReadUserAccessForTargetCall wrap *gomock.Call +type MockPermissionStateReadUserAccessForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateReadUserAccessForTargetCall) Return(arg0 permission.UserAccess, arg1 error) *MockPermissionStateReadUserAccessForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateReadUserAccessForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.UserAccess, error)) *MockPermissionStateReadUserAccessForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateReadUserAccessForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.UserAccess, error)) *MockPermissionStateReadUserAccessForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadUserAccessLevelForTarget mocks base method. @@ -740,9 +1796,33 @@ func (m *MockPermissionState) ReadUserAccessLevelForTarget(arg0 context.Context, } // ReadUserAccessLevelForTarget indicates an expected call of ReadUserAccessLevelForTarget. -func (mr *MockPermissionStateMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) ReadUserAccessLevelForTarget(arg0, arg1, arg2 any) *MockPermissionStateReadUserAccessLevelForTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUserAccessLevelForTarget", reflect.TypeOf((*MockPermissionState)(nil).ReadUserAccessLevelForTarget), arg0, arg1, arg2) + return &MockPermissionStateReadUserAccessLevelForTargetCall{Call: call} +} + +// MockPermissionStateReadUserAccessLevelForTargetCall wrap *gomock.Call +type MockPermissionStateReadUserAccessLevelForTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateReadUserAccessLevelForTargetCall) Return(arg0 permission.Access, arg1 error) *MockPermissionStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateReadUserAccessLevelForTargetCall) Do(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockPermissionStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateReadUserAccessLevelForTargetCall) DoAndReturn(f func(context.Context, string, permission.ID) (permission.Access, error)) *MockPermissionStateReadUserAccessLevelForTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertPermission mocks base method. @@ -754,7 +1834,31 @@ func (m *MockPermissionState) UpsertPermission(arg0 context.Context, arg1 access } // UpsertPermission indicates an expected call of UpsertPermission. -func (mr *MockPermissionStateMockRecorder) UpsertPermission(arg0, arg1 any) *gomock.Call { +func (mr *MockPermissionStateMockRecorder) UpsertPermission(arg0, arg1 any) *MockPermissionStateUpsertPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertPermission", reflect.TypeOf((*MockPermissionState)(nil).UpsertPermission), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertPermission", reflect.TypeOf((*MockPermissionState)(nil).UpsertPermission), arg0, arg1) + return &MockPermissionStateUpsertPermissionCall{Call: call} +} + +// MockPermissionStateUpsertPermissionCall wrap *gomock.Call +type MockPermissionStateUpsertPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionStateUpsertPermissionCall) Return(arg0 error) *MockPermissionStateUpsertPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionStateUpsertPermissionCall) Do(f func(context.Context, access.UpdatePermissionArgs) error) *MockPermissionStateUpsertPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionStateUpsertPermissionCall) DoAndReturn(f func(context.Context, access.UpdatePermissionArgs) error) *MockPermissionStateUpsertPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/annotation/service/package_test.go b/domain/annotation/service/package_test.go index 5e01f27d49d..86f9ce5df29 100644 --- a/domain/annotation/service/package_test.go +++ b/domain/annotation/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/annotation/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/annotation/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/annotation/service/state_mock_test.go b/domain/annotation/service/state_mock_test.go index d82f661e91d..9860da3f3e7 100644 --- a/domain/annotation/service/state_mock_test.go +++ b/domain/annotation/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/annotation/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/annotation/service State // // Package service is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockState) GetAnnotations(arg0 context.Context, arg1 annotations.ID) (m } // GetAnnotations indicates an expected call of GetAnnotations. -func (mr *MockStateMockRecorder) GetAnnotations(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetAnnotations(arg0, arg1 any) *MockStateGetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockState)(nil).GetAnnotations), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnnotations", reflect.TypeOf((*MockState)(nil).GetAnnotations), arg0, arg1) + return &MockStateGetAnnotationsCall{Call: call} +} + +// MockStateGetAnnotationsCall wrap *gomock.Call +type MockStateGetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetAnnotationsCall) Return(arg0 map[string]string, arg1 error) *MockStateGetAnnotationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetAnnotationsCall) Do(f func(context.Context, annotations.ID) (map[string]string, error)) *MockStateGetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetAnnotationsCall) DoAndReturn(f func(context.Context, annotations.ID) (map[string]string, error)) *MockStateGetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAnnotations mocks base method. @@ -64,7 +88,31 @@ func (m *MockState) SetAnnotations(arg0 context.Context, arg1 annotations.ID, ar } // SetAnnotations indicates an expected call of SetAnnotations. -func (mr *MockStateMockRecorder) SetAnnotations(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetAnnotations(arg0, arg1, arg2 any) *MockStateSetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockState)(nil).SetAnnotations), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockState)(nil).SetAnnotations), arg0, arg1, arg2) + return &MockStateSetAnnotationsCall{Call: call} +} + +// MockStateSetAnnotationsCall wrap *gomock.Call +type MockStateSetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetAnnotationsCall) Return(arg0 error) *MockStateSetAnnotationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetAnnotationsCall) Do(f func(context.Context, annotations.ID, map[string]string) error) *MockStateSetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetAnnotationsCall) DoAndReturn(f func(context.Context, annotations.ID, map[string]string) error) *MockStateSetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/application/modelmigration/migrations_mock_test.go b/domain/application/modelmigration/migrations_mock_test.go index a66e138c9d1..39900133281 100644 --- a/domain/application/modelmigration/migrations_mock_test.go +++ b/domain/application/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/application/modelmigration ImportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/application/modelmigration ImportService // // Package modelmigration is a generated GoMock package. @@ -53,8 +53,32 @@ func (m *MockImportService) CreateApplication(arg0 context.Context, arg1 string, } // CreateApplication indicates an expected call of CreateApplication. -func (mr *MockImportServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *MockImportServiceCreateApplicationCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockImportService)(nil).CreateApplication), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockImportService)(nil).CreateApplication), varargs...) + return &MockImportServiceCreateApplicationCall{Call: call} +} + +// MockImportServiceCreateApplicationCall wrap *gomock.Call +type MockImportServiceCreateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceCreateApplicationCall) Return(arg0 error) *MockImportServiceCreateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceCreateApplicationCall) Do(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockImportServiceCreateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceCreateApplicationCall) DoAndReturn(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockImportServiceCreateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/application/modelmigration/package_test.go b/domain/application/modelmigration/package_test.go index a81b5d64892..6fd964a79dd 100644 --- a/domain/application/modelmigration/package_test.go +++ b/domain/application/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/application/modelmigration ImportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/application/modelmigration ImportService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/application/service/package_mock_test.go b/domain/application/service/package_mock_test.go index 5009f704740..a2c3bd7a24f 100644 --- a/domain/application/service/package_mock_test.go +++ b/domain/application/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/application/service State,Charm +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/application/service State,Charm // // Package service is a generated GoMock package. @@ -55,10 +55,34 @@ func (m *MockState) AddUnits(arg0 context.Context, arg1 string, arg2 ...applicat } // AddUnits indicates an expected call of AddUnits. -func (mr *MockStateMockRecorder) AddUnits(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) AddUnits(arg0, arg1 any, arg2 ...any) *MockStateAddUnitsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockState)(nil).AddUnits), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockState)(nil).AddUnits), varargs...) + return &MockStateAddUnitsCall{Call: call} +} + +// MockStateAddUnitsCall wrap *gomock.Call +type MockStateAddUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddUnitsCall) Return(arg0 error) *MockStateAddUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddUnitsCall) Do(f func(context.Context, string, ...application.AddUnitParams) error) *MockStateAddUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddUnitsCall) DoAndReturn(f func(context.Context, string, ...application.AddUnitParams) error) *MockStateAddUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteApplication mocks base method. @@ -70,9 +94,33 @@ func (m *MockState) DeleteApplication(arg0 context.Context, arg1 string) error { } // DeleteApplication indicates an expected call of DeleteApplication. -func (mr *MockStateMockRecorder) DeleteApplication(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteApplication(arg0, arg1 any) *MockStateDeleteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteApplication", reflect.TypeOf((*MockState)(nil).DeleteApplication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteApplication", reflect.TypeOf((*MockState)(nil).DeleteApplication), arg0, arg1) + return &MockStateDeleteApplicationCall{Call: call} +} + +// MockStateDeleteApplicationCall wrap *gomock.Call +type MockStateDeleteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteApplicationCall) Return(arg0 error) *MockStateDeleteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteApplicationCall) Do(f func(context.Context, string) error) *MockStateDeleteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteApplicationCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolByName mocks base method. @@ -85,9 +133,33 @@ func (m *MockState) GetStoragePoolByName(arg0 context.Context, arg1 string) (sto } // GetStoragePoolByName indicates an expected call of GetStoragePoolByName. -func (mr *MockStateMockRecorder) GetStoragePoolByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetStoragePoolByName(arg0, arg1 any) *MockStateGetStoragePoolByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockState)(nil).GetStoragePoolByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockState)(nil).GetStoragePoolByName), arg0, arg1) + return &MockStateGetStoragePoolByNameCall{Call: call} +} + +// MockStateGetStoragePoolByNameCall wrap *gomock.Call +type MockStateGetStoragePoolByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetStoragePoolByNameCall) Return(arg0 storage.StoragePoolDetails, arg1 error) *MockStateGetStoragePoolByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetStoragePoolByNameCall) Do(f func(context.Context, string) (storage.StoragePoolDetails, error)) *MockStateGetStoragePoolByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetStoragePoolByNameCall) DoAndReturn(f func(context.Context, string) (storage.StoragePoolDetails, error)) *MockStateGetStoragePoolByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageDefaults mocks base method. @@ -100,9 +172,33 @@ func (m *MockState) StorageDefaults(arg0 context.Context) (storage.StorageDefaul } // StorageDefaults indicates an expected call of StorageDefaults. -func (mr *MockStateMockRecorder) StorageDefaults(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) StorageDefaults(arg0 any) *MockStateStorageDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageDefaults", reflect.TypeOf((*MockState)(nil).StorageDefaults), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageDefaults", reflect.TypeOf((*MockState)(nil).StorageDefaults), arg0) + return &MockStateStorageDefaultsCall{Call: call} +} + +// MockStateStorageDefaultsCall wrap *gomock.Call +type MockStateStorageDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateStorageDefaultsCall) Return(arg0 storage.StorageDefaults, arg1 error) *MockStateStorageDefaultsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateStorageDefaultsCall) Do(f func(context.Context) (storage.StorageDefaults, error)) *MockStateStorageDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateStorageDefaultsCall) DoAndReturn(f func(context.Context) (storage.StorageDefaults, error)) *MockStateStorageDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertApplication mocks base method. @@ -118,10 +214,34 @@ func (m *MockState) UpsertApplication(arg0 context.Context, arg1 string, arg2 .. } // UpsertApplication indicates an expected call of UpsertApplication. -func (mr *MockStateMockRecorder) UpsertApplication(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) UpsertApplication(arg0, arg1 any, arg2 ...any) *MockStateUpsertApplicationCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertApplication", reflect.TypeOf((*MockState)(nil).UpsertApplication), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertApplication", reflect.TypeOf((*MockState)(nil).UpsertApplication), varargs...) + return &MockStateUpsertApplicationCall{Call: call} +} + +// MockStateUpsertApplicationCall wrap *gomock.Call +type MockStateUpsertApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpsertApplicationCall) Return(arg0 error) *MockStateUpsertApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpsertApplicationCall) Do(f func(context.Context, string, ...application.AddUnitParams) error) *MockStateUpsertApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpsertApplicationCall) DoAndReturn(f func(context.Context, string, ...application.AddUnitParams) error) *MockStateUpsertApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -156,7 +276,31 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/application/service/package_test.go b/domain/application/service/package_test.go index 5abbc5f2460..02682760f5f 100644 --- a/domain/application/service/package_test.go +++ b/domain/application/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/application/service State,Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/application/service State,Charm func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/autocert/service/package_test.go b/domain/autocert/service/package_test.go index 134ddc3a9f8..c6475cbcefe 100644 --- a/domain/autocert/service/package_test.go +++ b/domain/autocert/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination service_mock_test.go github.com/juju/juju/domain/autocert/service State,Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination service_mock_test.go github.com/juju/juju/domain/autocert/service State,Logger func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/autocert/service/service_mock_test.go b/domain/autocert/service/service_mock_test.go index ff5baf7e4ee..df9e3e40b5a 100644 --- a/domain/autocert/service/service_mock_test.go +++ b/domain/autocert/service/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination service_mock_test.go github.com/juju/juju/domain/autocert/service State,Logger +// mockgen -typed -package service -destination service_mock_test.go github.com/juju/juju/domain/autocert/service State,Logger // // Package service is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockState) Delete(arg0 context.Context, arg1 string) error { } // Delete indicates an expected call of Delete. -func (mr *MockStateMockRecorder) Delete(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) Delete(arg0, arg1 any) *MockStateDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockState)(nil).Delete), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockState)(nil).Delete), arg0, arg1) + return &MockStateDeleteCall{Call: call} +} + +// MockStateDeleteCall wrap *gomock.Call +type MockStateDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteCall) Return(arg0 error) *MockStateDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteCall) Do(f func(context.Context, string) error) *MockStateDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -63,9 +87,33 @@ func (m *MockState) Get(arg0 context.Context, arg1 string) ([]byte, error) { } // Get indicates an expected call of Get. -func (mr *MockStateMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) Get(arg0, arg1 any) *MockStateGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockState)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockState)(nil).Get), arg0, arg1) + return &MockStateGetCall{Call: call} +} + +// MockStateGetCall wrap *gomock.Call +type MockStateGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetCall) Return(arg0 []byte, arg1 error) *MockStateGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetCall) Do(f func(context.Context, string) ([]byte, error)) *MockStateGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetCall) DoAndReturn(f func(context.Context, string) ([]byte, error)) *MockStateGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -77,9 +125,33 @@ func (m *MockState) Put(arg0 context.Context, arg1 string, arg2 []byte) error { } // Put indicates an expected call of Put. -func (mr *MockStateMockRecorder) Put(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) Put(arg0, arg1, arg2 any) *MockStatePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockState)(nil).Put), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockState)(nil).Put), arg0, arg1, arg2) + return &MockStatePutCall{Call: call} +} + +// MockStatePutCall wrap *gomock.Call +type MockStatePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePutCall) Return(arg0 error) *MockStatePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePutCall) Do(f func(context.Context, string, []byte) error) *MockStatePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePutCall) DoAndReturn(f func(context.Context, string, []byte) error) *MockStatePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -116,8 +188,32 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/blockdevice/modelmigration/migrations_mock_test.go b/domain/blockdevice/modelmigration/migrations_mock_test.go index 20b9509622a..b40ea09e5fb 100644 --- a/domain/blockdevice/modelmigration/migrations_mock_test.go +++ b/domain/blockdevice/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/blockdevice/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/blockdevice/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -89,10 +113,34 @@ func (m *MockImportService) UpdateBlockDevices(arg0 context.Context, arg1 string } // UpdateBlockDevices indicates an expected call of UpdateBlockDevices. -func (mr *MockImportServiceMockRecorder) UpdateBlockDevices(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) UpdateBlockDevices(arg0, arg1 any, arg2 ...any) *MockImportServiceUpdateBlockDevicesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBlockDevices", reflect.TypeOf((*MockImportService)(nil).UpdateBlockDevices), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBlockDevices", reflect.TypeOf((*MockImportService)(nil).UpdateBlockDevices), varargs...) + return &MockImportServiceUpdateBlockDevicesCall{Call: call} +} + +// MockImportServiceUpdateBlockDevicesCall wrap *gomock.Call +type MockImportServiceUpdateBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceUpdateBlockDevicesCall) Return(arg0 error) *MockImportServiceUpdateBlockDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceUpdateBlockDevicesCall) Do(f func(context.Context, string, ...blockdevice.BlockDevice) error) *MockImportServiceUpdateBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceUpdateBlockDevicesCall) DoAndReturn(f func(context.Context, string, ...blockdevice.BlockDevice) error) *MockImportServiceUpdateBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -128,7 +176,31 @@ func (m *MockExportService) AllBlockDevices(arg0 context.Context) (map[string]bl } // AllBlockDevices indicates an expected call of AllBlockDevices. -func (mr *MockExportServiceMockRecorder) AllBlockDevices(arg0 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) AllBlockDevices(arg0 any) *MockExportServiceAllBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBlockDevices", reflect.TypeOf((*MockExportService)(nil).AllBlockDevices), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBlockDevices", reflect.TypeOf((*MockExportService)(nil).AllBlockDevices), arg0) + return &MockExportServiceAllBlockDevicesCall{Call: call} +} + +// MockExportServiceAllBlockDevicesCall wrap *gomock.Call +type MockExportServiceAllBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceAllBlockDevicesCall) Return(arg0 map[string]blockdevice.BlockDevice, arg1 error) *MockExportServiceAllBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceAllBlockDevicesCall) Do(f func(context.Context) (map[string]blockdevice.BlockDevice, error)) *MockExportServiceAllBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceAllBlockDevicesCall) DoAndReturn(f func(context.Context) (map[string]blockdevice.BlockDevice, error)) *MockExportServiceAllBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/blockdevice/modelmigration/package_test.go b/domain/blockdevice/modelmigration/package_test.go index f8f6d7de03e..54ac4e772bc 100644 --- a/domain/blockdevice/modelmigration/package_test.go +++ b/domain/blockdevice/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/blockdevice/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/blockdevice/modelmigration Coordinator,ImportService,ExportService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/blockdevice/service/package_test.go b/domain/blockdevice/service/package_test.go index dfd6548acb3..a072a01c6c7 100644 --- a/domain/blockdevice/service/package_test.go +++ b/domain/blockdevice/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/blockdevice/service State,WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/blockdevice/service State,WatcherFactory func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/blockdevice/service/state_mock_test.go b/domain/blockdevice/service/state_mock_test.go index 52a7ff7849d..a992348f611 100644 --- a/domain/blockdevice/service/state_mock_test.go +++ b/domain/blockdevice/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/blockdevice/service State,WatcherFactory +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/blockdevice/service State,WatcherFactory // // Package service is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockState) BlockDevices(arg0 context.Context, arg1 string) ([]blockdevi } // BlockDevices indicates an expected call of BlockDevices. -func (mr *MockStateMockRecorder) BlockDevices(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) BlockDevices(arg0, arg1 any) *MockStateBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockState)(nil).BlockDevices), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockState)(nil).BlockDevices), arg0, arg1) + return &MockStateBlockDevicesCall{Call: call} +} + +// MockStateBlockDevicesCall wrap *gomock.Call +type MockStateBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBlockDevicesCall) Return(arg0 []blockdevice.BlockDevice, arg1 error) *MockStateBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBlockDevicesCall) Do(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockStateBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBlockDevicesCall) DoAndReturn(f func(context.Context, string) ([]blockdevice.BlockDevice, error)) *MockStateBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineBlockDevices mocks base method. @@ -68,9 +92,33 @@ func (m *MockState) MachineBlockDevices(arg0 context.Context) ([]blockdevice.Mac } // MachineBlockDevices indicates an expected call of MachineBlockDevices. -func (mr *MockStateMockRecorder) MachineBlockDevices(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) MachineBlockDevices(arg0 any) *MockStateMachineBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineBlockDevices", reflect.TypeOf((*MockState)(nil).MachineBlockDevices), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineBlockDevices", reflect.TypeOf((*MockState)(nil).MachineBlockDevices), arg0) + return &MockStateMachineBlockDevicesCall{Call: call} +} + +// MockStateMachineBlockDevicesCall wrap *gomock.Call +type MockStateMachineBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMachineBlockDevicesCall) Return(arg0 []blockdevice.MachineBlockDevice, arg1 error) *MockStateMachineBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMachineBlockDevicesCall) Do(f func(context.Context) ([]blockdevice.MachineBlockDevice, error)) *MockStateMachineBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMachineBlockDevicesCall) DoAndReturn(f func(context.Context) ([]blockdevice.MachineBlockDevice, error)) *MockStateMachineBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMachineBlockDevices mocks base method. @@ -86,10 +134,34 @@ func (m *MockState) SetMachineBlockDevices(arg0 context.Context, arg1 string, ar } // SetMachineBlockDevices indicates an expected call of SetMachineBlockDevices. -func (mr *MockStateMockRecorder) SetMachineBlockDevices(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) SetMachineBlockDevices(arg0, arg1 any, arg2 ...any) *MockStateSetMachineBlockDevicesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMachineBlockDevices", reflect.TypeOf((*MockState)(nil).SetMachineBlockDevices), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMachineBlockDevices", reflect.TypeOf((*MockState)(nil).SetMachineBlockDevices), varargs...) + return &MockStateSetMachineBlockDevicesCall{Call: call} +} + +// MockStateSetMachineBlockDevicesCall wrap *gomock.Call +type MockStateSetMachineBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetMachineBlockDevicesCall) Return(arg0 error) *MockStateSetMachineBlockDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetMachineBlockDevicesCall) Do(f func(context.Context, string, ...blockdevice.BlockDevice) error) *MockStateSetMachineBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetMachineBlockDevicesCall) DoAndReturn(f func(context.Context, string, ...blockdevice.BlockDevice) error) *MockStateSetMachineBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchBlockDevices mocks base method. @@ -102,9 +174,33 @@ func (m *MockState) WatchBlockDevices(arg0 context.Context, arg1 func(string, st } // WatchBlockDevices indicates an expected call of WatchBlockDevices. -func (mr *MockStateMockRecorder) WatchBlockDevices(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) WatchBlockDevices(arg0, arg1, arg2 any) *MockStateWatchBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchBlockDevices", reflect.TypeOf((*MockState)(nil).WatchBlockDevices), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchBlockDevices", reflect.TypeOf((*MockState)(nil).WatchBlockDevices), arg0, arg1, arg2) + return &MockStateWatchBlockDevicesCall{Call: call} +} + +// MockStateWatchBlockDevicesCall wrap *gomock.Call +type MockStateWatchBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchBlockDevicesCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockStateWatchBlockDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchBlockDevicesCall) Do(f func(context.Context, func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error), string) (watcher.Watcher[struct{}], error)) *MockStateWatchBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchBlockDevicesCall) DoAndReturn(f func(context.Context, func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error), string) (watcher.Watcher[struct{}], error)) *MockStateWatchBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -140,7 +236,31 @@ func (m *MockWatcherFactory) NewValueMapperWatcher(arg0, arg1 string, arg2 chang } // NewValueMapperWatcher indicates an expected call of NewValueMapperWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewValueMapperWatcher(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewValueMapperWatcher(arg0, arg1, arg2, arg3 any) *MockWatcherFactoryNewValueMapperWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueMapperWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueMapperWatcher), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueMapperWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueMapperWatcher), arg0, arg1, arg2, arg3) + return &MockWatcherFactoryNewValueMapperWatcherCall{Call: call} +} + +// MockWatcherFactoryNewValueMapperWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewValueMapperWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewValueMapperWatcherCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewValueMapperWatcherCall) Do(f func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewValueMapperWatcherCall) DoAndReturn(f func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/changestream_mock_test.go b/domain/changestream_mock_test.go index 421747d4513..4aa3512d895 100644 --- a/domain/changestream_mock_test.go +++ b/domain/changestream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package domain -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,EventSource +// mockgen -typed -package domain -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,EventSource // // Package domain is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockSubscription) Changes() <-chan []changestream.ChangeEvent { } // Changes indicates an expected call of Changes. -func (mr *MockSubscriptionMockRecorder) Changes() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Changes() *MockSubscriptionChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSubscription)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSubscription)(nil).Changes)) + return &MockSubscriptionChangesCall{Call: call} +} + +// MockSubscriptionChangesCall wrap *gomock.Call +type MockSubscriptionChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionChangesCall) Return(arg0 <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionChangesCall) Do(f func() <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionChangesCall) DoAndReturn(f func() <-chan []changestream.ChangeEvent) *MockSubscriptionChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -62,9 +86,33 @@ func (m *MockSubscription) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockSubscriptionMockRecorder) Done() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Done() *MockSubscriptionDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockSubscription)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockSubscription)(nil).Done)) + return &MockSubscriptionDoneCall{Call: call} +} + +// MockSubscriptionDoneCall wrap *gomock.Call +type MockSubscriptionDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionDoneCall) Return(arg0 <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionDoneCall) Do(f func() <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionDoneCall) DoAndReturn(f func() <-chan struct{}) *MockSubscriptionDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unsubscribe mocks base method. @@ -74,9 +122,33 @@ func (m *MockSubscription) Unsubscribe() { } // Unsubscribe indicates an expected call of Unsubscribe. -func (mr *MockSubscriptionMockRecorder) Unsubscribe() *gomock.Call { +func (mr *MockSubscriptionMockRecorder) Unsubscribe() *MockSubscriptionUnsubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockSubscription)(nil).Unsubscribe)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockSubscription)(nil).Unsubscribe)) + return &MockSubscriptionUnsubscribeCall{Call: call} +} + +// MockSubscriptionUnsubscribeCall wrap *gomock.Call +type MockSubscriptionUnsubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubscriptionUnsubscribeCall) Return() *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubscriptionUnsubscribeCall) Do(f func()) *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubscriptionUnsubscribeCall) DoAndReturn(f func()) *MockSubscriptionUnsubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEventSource is a mock of EventSource interface. @@ -116,7 +188,31 @@ func (m *MockEventSource) Subscribe(arg0 ...changestream.SubscriptionOption) (ch } // Subscribe indicates an expected call of Subscribe. -func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *gomock.Call { +func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *MockEventSourceSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + return &MockEventSourceSubscribeCall{Call: call} +} + +// MockEventSourceSubscribeCall wrap *gomock.Call +type MockEventSourceSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventSourceSubscribeCall) Return(arg0 changestream.Subscription, arg1 error) *MockEventSourceSubscribeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventSourceSubscribeCall) Do(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventSourceSubscribeCall) DoAndReturn(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/cloud/service/package_mock_test.go b/domain/cloud/service/package_mock_test.go index db0bf6392eb..28e713372b2 100644 --- a/domain/cloud/service/package_mock_test.go +++ b/domain/cloud/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/cloud/service State,WatcherFactory +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/cloud/service State,WatcherFactory // // Package service is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockState) Cloud(arg0 context.Context, arg1 string) (*cloud.Cloud, erro } // Cloud indicates an expected call of Cloud. -func (mr *MockStateMockRecorder) Cloud(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) Cloud(arg0, arg1 any) *MockStateCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockState)(nil).Cloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockState)(nil).Cloud), arg0, arg1) + return &MockStateCloudCall{Call: call} +} + +// MockStateCloudCall wrap *gomock.Call +type MockStateCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCloudCall) Return(arg0 *cloud.Cloud, arg1 error) *MockStateCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCloudCall) Do(f func(context.Context, string) (*cloud.Cloud, error)) *MockStateCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCloudCall) DoAndReturn(f func(context.Context, string) (*cloud.Cloud, error)) *MockStateCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCloud mocks base method. @@ -66,9 +90,33 @@ func (m *MockState) CreateCloud(arg0 context.Context, arg1, arg2 string, arg3 cl } // CreateCloud indicates an expected call of CreateCloud. -func (mr *MockStateMockRecorder) CreateCloud(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateCloud(arg0, arg1, arg2, arg3 any) *MockStateCreateCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCloud", reflect.TypeOf((*MockState)(nil).CreateCloud), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCloud", reflect.TypeOf((*MockState)(nil).CreateCloud), arg0, arg1, arg2, arg3) + return &MockStateCreateCloudCall{Call: call} +} + +// MockStateCreateCloudCall wrap *gomock.Call +type MockStateCreateCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateCloudCall) Return(arg0 error) *MockStateCreateCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateCloudCall) Do(f func(context.Context, string, string, cloud.Cloud) error) *MockStateCreateCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateCloudCall) DoAndReturn(f func(context.Context, string, string, cloud.Cloud) error) *MockStateCreateCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCloud mocks base method. @@ -80,9 +128,33 @@ func (m *MockState) DeleteCloud(arg0 context.Context, arg1 string) error { } // DeleteCloud indicates an expected call of DeleteCloud. -func (mr *MockStateMockRecorder) DeleteCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteCloud(arg0, arg1 any) *MockStateDeleteCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCloud", reflect.TypeOf((*MockState)(nil).DeleteCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCloud", reflect.TypeOf((*MockState)(nil).DeleteCloud), arg0, arg1) + return &MockStateDeleteCloudCall{Call: call} +} + +// MockStateDeleteCloudCall wrap *gomock.Call +type MockStateDeleteCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteCloudCall) Return(arg0 error) *MockStateDeleteCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteCloudCall) Do(f func(context.Context, string) error) *MockStateDeleteCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteCloudCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListClouds mocks base method. @@ -95,9 +167,33 @@ func (m *MockState) ListClouds(arg0 context.Context) ([]cloud.Cloud, error) { } // ListClouds indicates an expected call of ListClouds. -func (mr *MockStateMockRecorder) ListClouds(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListClouds(arg0 any) *MockStateListCloudsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClouds", reflect.TypeOf((*MockState)(nil).ListClouds), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListClouds", reflect.TypeOf((*MockState)(nil).ListClouds), arg0) + return &MockStateListCloudsCall{Call: call} +} + +// MockStateListCloudsCall wrap *gomock.Call +type MockStateListCloudsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListCloudsCall) Return(arg0 []cloud.Cloud, arg1 error) *MockStateListCloudsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListCloudsCall) Do(f func(context.Context) ([]cloud.Cloud, error)) *MockStateListCloudsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListCloudsCall) DoAndReturn(f func(context.Context) ([]cloud.Cloud, error)) *MockStateListCloudsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCloud mocks base method. @@ -109,9 +205,33 @@ func (m *MockState) UpdateCloud(arg0 context.Context, arg1 cloud.Cloud) error { } // UpdateCloud indicates an expected call of UpdateCloud. -func (mr *MockStateMockRecorder) UpdateCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateCloud(arg0, arg1 any) *MockStateUpdateCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockState)(nil).UpdateCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockState)(nil).UpdateCloud), arg0, arg1) + return &MockStateUpdateCloudCall{Call: call} +} + +// MockStateUpdateCloudCall wrap *gomock.Call +type MockStateUpdateCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateCloudCall) Return(arg0 error) *MockStateUpdateCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateCloudCall) Do(f func(context.Context, cloud.Cloud) error) *MockStateUpdateCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateCloudCall) DoAndReturn(f func(context.Context, cloud.Cloud) error) *MockStateUpdateCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCloud mocks base method. @@ -124,9 +244,33 @@ func (m *MockState) WatchCloud(arg0 context.Context, arg1 func(string, string, c } // WatchCloud indicates an expected call of WatchCloud. -func (mr *MockStateMockRecorder) WatchCloud(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) WatchCloud(arg0, arg1, arg2 any) *MockStateWatchCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockState)(nil).WatchCloud), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockState)(nil).WatchCloud), arg0, arg1, arg2) + return &MockStateWatchCloudCall{Call: call} +} + +// MockStateWatchCloudCall wrap *gomock.Call +type MockStateWatchCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchCloudCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockStateWatchCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchCloudCall) Do(f func(context.Context, func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error), string) (watcher.Watcher[struct{}], error)) *MockStateWatchCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchCloudCall) DoAndReturn(f func(context.Context, func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error), string) (watcher.Watcher[struct{}], error)) *MockStateWatchCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -162,7 +306,31 @@ func (m *MockWatcherFactory) NewValueWatcher(arg0, arg1 string, arg2 changestrea } // NewValueWatcher indicates an expected call of NewValueWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewValueWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewValueWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewValueWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewValueWatcherCall{Call: call} +} + +// MockWatcherFactoryNewValueWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewValueWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewValueWatcherCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewValueWatcherCall) Do(f func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewValueWatcherCall) DoAndReturn(f func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/cloud/service/package_test.go b/domain/cloud/service/package_test.go index 4ffe5164a81..4354ee94168 100644 --- a/domain/cloud/service/package_test.go +++ b/domain/cloud/service/package_test.go @@ -11,7 +11,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/cloud/service State,WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/cloud/service State,WatcherFactory func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/controllerconfig/service/package_mock_test.go b/domain/controllerconfig/service/package_mock_test.go index 71df3126e1b..c7bf54d2485 100644 --- a/domain/controllerconfig/service/package_mock_test.go +++ b/domain/controllerconfig/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/controllerconfig/service State,WatcherFactory +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/controllerconfig/service State,WatcherFactory // // Package service is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockState) AllKeysQuery() string { } // AllKeysQuery indicates an expected call of AllKeysQuery. -func (mr *MockStateMockRecorder) AllKeysQuery() *gomock.Call { +func (mr *MockStateMockRecorder) AllKeysQuery() *MockStateAllKeysQueryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllKeysQuery", reflect.TypeOf((*MockState)(nil).AllKeysQuery)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllKeysQuery", reflect.TypeOf((*MockState)(nil).AllKeysQuery)) + return &MockStateAllKeysQueryCall{Call: call} +} + +// MockStateAllKeysQueryCall wrap *gomock.Call +type MockStateAllKeysQueryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllKeysQueryCall) Return(arg0 string) *MockStateAllKeysQueryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllKeysQueryCall) Do(f func() string) *MockStateAllKeysQueryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllKeysQueryCall) DoAndReturn(f func() string) *MockStateAllKeysQueryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -66,9 +90,33 @@ func (m *MockState) ControllerConfig(arg0 context.Context) (map[string]string, e } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockStateMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ControllerConfig(arg0 any) *MockStateControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockState)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockState)(nil).ControllerConfig), arg0) + return &MockStateControllerConfigCall{Call: call} +} + +// MockStateControllerConfigCall wrap *gomock.Call +type MockStateControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateControllerConfigCall) Return(arg0 map[string]string, arg1 error) *MockStateControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateControllerConfigCall) Do(f func(context.Context) (map[string]string, error)) *MockStateControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateControllerConfigCall) DoAndReturn(f func(context.Context) (map[string]string, error)) *MockStateControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateControllerConfig mocks base method. @@ -80,9 +128,33 @@ func (m *MockState) UpdateControllerConfig(arg0 context.Context, arg1 map[string } // UpdateControllerConfig indicates an expected call of UpdateControllerConfig. -func (mr *MockStateMockRecorder) UpdateControllerConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateControllerConfig(arg0, arg1, arg2, arg3 any) *MockStateUpdateControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateControllerConfig", reflect.TypeOf((*MockState)(nil).UpdateControllerConfig), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateControllerConfig", reflect.TypeOf((*MockState)(nil).UpdateControllerConfig), arg0, arg1, arg2, arg3) + return &MockStateUpdateControllerConfigCall{Call: call} +} + +// MockStateUpdateControllerConfigCall wrap *gomock.Call +type MockStateUpdateControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateControllerConfigCall) Return(arg0 error) *MockStateUpdateControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateControllerConfigCall) Do(f func(context.Context, map[string]string, []string, func(map[string]string) error) error) *MockStateUpdateControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateControllerConfigCall) DoAndReturn(f func(context.Context, map[string]string, []string, func(map[string]string) error) error) *MockStateUpdateControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -118,7 +190,31 @@ func (m *MockWatcherFactory) NewNamespaceWatcher(arg0 string, arg1 changestream. } // NewNamespaceWatcher indicates an expected call of NewNamespaceWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewNamespaceWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewNamespaceWatcherCall{Call: call} +} + +// MockWatcherFactoryNewNamespaceWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewNamespaceWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Do(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewNamespaceWatcherCall) DoAndReturn(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/controllerconfig/service/package_test.go b/domain/controllerconfig/service/package_test.go index 878d39df26e..99ed4ea84d8 100644 --- a/domain/controllerconfig/service/package_test.go +++ b/domain/controllerconfig/service/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/controllerconfig/service State,WatcherFactory -//go:generate go run go.uber.org/mock/mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/controllerconfig/service State,WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/controllerconfig/service/watcher_mock_test.go b/domain/controllerconfig/service/watcher_mock_test.go index 0e21b363af3..82c0b4eaead 100644 --- a/domain/controllerconfig/service/watcher_mock_test.go +++ b/domain/controllerconfig/service/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher // // Package service is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/controllernode/service/package_mock_test.go b/domain/controllernode/service/package_mock_test.go index 9b160e0adab..d6fba537446 100644 --- a/domain/controllernode/service/package_mock_test.go +++ b/domain/controllernode/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/controllernode/service State +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/controllernode/service State // // Package service is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockState) CurateNodes(arg0 context.Context, arg1, arg2 []string) error } // CurateNodes indicates an expected call of CurateNodes. -func (mr *MockStateMockRecorder) CurateNodes(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) CurateNodes(arg0, arg1, arg2 any) *MockStateCurateNodesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurateNodes", reflect.TypeOf((*MockState)(nil).CurateNodes), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurateNodes", reflect.TypeOf((*MockState)(nil).CurateNodes), arg0, arg1, arg2) + return &MockStateCurateNodesCall{Call: call} +} + +// MockStateCurateNodesCall wrap *gomock.Call +type MockStateCurateNodesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCurateNodesCall) Return(arg0 error) *MockStateCurateNodesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCurateNodesCall) Do(f func(context.Context, []string, []string) error) *MockStateCurateNodesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCurateNodesCall) DoAndReturn(f func(context.Context, []string, []string) error) *MockStateCurateNodesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SelectDatabaseNamespace mocks base method. @@ -63,9 +87,33 @@ func (m *MockState) SelectDatabaseNamespace(arg0 context.Context, arg1 string) ( } // SelectDatabaseNamespace indicates an expected call of SelectDatabaseNamespace. -func (mr *MockStateMockRecorder) SelectDatabaseNamespace(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) SelectDatabaseNamespace(arg0, arg1 any) *MockStateSelectDatabaseNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDatabaseNamespace", reflect.TypeOf((*MockState)(nil).SelectDatabaseNamespace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDatabaseNamespace", reflect.TypeOf((*MockState)(nil).SelectDatabaseNamespace), arg0, arg1) + return &MockStateSelectDatabaseNamespaceCall{Call: call} +} + +// MockStateSelectDatabaseNamespaceCall wrap *gomock.Call +type MockStateSelectDatabaseNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSelectDatabaseNamespaceCall) Return(arg0 string, arg1 error) *MockStateSelectDatabaseNamespaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSelectDatabaseNamespaceCall) Do(f func(context.Context, string) (string, error)) *MockStateSelectDatabaseNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSelectDatabaseNamespaceCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockStateSelectDatabaseNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateDqliteNode mocks base method. @@ -77,7 +125,31 @@ func (m *MockState) UpdateDqliteNode(arg0 context.Context, arg1 string, arg2 uin } // UpdateDqliteNode indicates an expected call of UpdateDqliteNode. -func (mr *MockStateMockRecorder) UpdateDqliteNode(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateDqliteNode(arg0, arg1, arg2, arg3 any) *MockStateUpdateDqliteNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDqliteNode", reflect.TypeOf((*MockState)(nil).UpdateDqliteNode), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDqliteNode", reflect.TypeOf((*MockState)(nil).UpdateDqliteNode), arg0, arg1, arg2, arg3) + return &MockStateUpdateDqliteNodeCall{Call: call} +} + +// MockStateUpdateDqliteNodeCall wrap *gomock.Call +type MockStateUpdateDqliteNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateDqliteNodeCall) Return(arg0 error) *MockStateUpdateDqliteNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateDqliteNodeCall) Do(f func(context.Context, string, uint64, string) error) *MockStateUpdateDqliteNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateDqliteNodeCall) DoAndReturn(f func(context.Context, string, uint64, string) error) *MockStateUpdateDqliteNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/controllernode/service/package_test.go b/domain/controllernode/service/package_test.go index 28a52ffe4bd..d99f5183580 100644 --- a/domain/controllernode/service/package_test.go +++ b/domain/controllernode/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/controllernode/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/controllernode/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/credential/modelmigration/migrations_mock_test.go b/domain/credential/modelmigration/migrations_mock_test.go index d279a5467ec..7e3be5fafd5 100644 --- a/domain/credential/modelmigration/migrations_mock_test.go +++ b/domain/credential/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/credential/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/credential/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -87,9 +111,33 @@ func (m *MockImportService) CloudCredential(arg0 context.Context, arg1 credentia } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockImportServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockImportServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockImportService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockImportService)(nil).CloudCredential), arg0, arg1) + return &MockImportServiceCloudCredentialCall{Call: call} +} + +// MockImportServiceCloudCredentialCall wrap *gomock.Call +type MockImportServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockImportServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockImportServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockImportServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCloudCredential mocks base method. @@ -101,9 +149,33 @@ func (m *MockImportService) UpdateCloudCredential(arg0 context.Context, arg1 cre } // UpdateCloudCredential indicates an expected call of UpdateCloudCredential. -func (mr *MockImportServiceMockRecorder) UpdateCloudCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) UpdateCloudCredential(arg0, arg1, arg2 any) *MockImportServiceUpdateCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloudCredential", reflect.TypeOf((*MockImportService)(nil).UpdateCloudCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloudCredential", reflect.TypeOf((*MockImportService)(nil).UpdateCloudCredential), arg0, arg1, arg2) + return &MockImportServiceUpdateCloudCredentialCall{Call: call} +} + +// MockImportServiceUpdateCloudCredentialCall wrap *gomock.Call +type MockImportServiceUpdateCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceUpdateCloudCredentialCall) Return(arg0 error) *MockImportServiceUpdateCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceUpdateCloudCredentialCall) Do(f func(context.Context, credential.Key, cloud.Credential) error) *MockImportServiceUpdateCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceUpdateCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key, cloud.Credential) error) *MockImportServiceUpdateCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -139,7 +211,31 @@ func (m *MockExportService) CloudCredential(arg0 context.Context, arg1 credentia } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockExportServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockExportServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockExportService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockExportService)(nil).CloudCredential), arg0, arg1) + return &MockExportServiceCloudCredentialCall{Call: call} +} + +// MockExportServiceCloudCredentialCall wrap *gomock.Call +type MockExportServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockExportServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockExportServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockExportServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/credential/modelmigration/package_test.go b/domain/credential/modelmigration/package_test.go index d6b73545697..9cddf3b3cab 100644 --- a/domain/credential/modelmigration/package_test.go +++ b/domain/credential/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/credential/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/credential/modelmigration Coordinator,ImportService,ExportService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/credential/service/package_test.go b/domain/credential/service/package_test.go index 3ad113f69c2..9afb31334f3 100644 --- a/domain/credential/service/package_test.go +++ b/domain/credential/service/package_test.go @@ -11,8 +11,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/credential/service State,WatcherFactory,MachineService -//go:generate go run go.uber.org/mock/mockgen -package service -destination validator_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/credential/service State,WatcherFactory,MachineService +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination validator_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/credential/service/state_mock_test.go b/domain/credential/service/state_mock_test.go index 3f218f80d63..7530bf2f5ba 100644 --- a/domain/credential/service/state_mock_test.go +++ b/domain/credential/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/credential/service State,WatcherFactory,MachineService +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/credential/service State,WatcherFactory,MachineService // // Package service is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockState) AllCloudCredentialsForOwner(arg0 context.Context, arg1 strin } // AllCloudCredentialsForOwner indicates an expected call of AllCloudCredentialsForOwner. -func (mr *MockStateMockRecorder) AllCloudCredentialsForOwner(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AllCloudCredentialsForOwner(arg0, arg1 any) *MockStateAllCloudCredentialsForOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCloudCredentialsForOwner", reflect.TypeOf((*MockState)(nil).AllCloudCredentialsForOwner), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllCloudCredentialsForOwner", reflect.TypeOf((*MockState)(nil).AllCloudCredentialsForOwner), arg0, arg1) + return &MockStateAllCloudCredentialsForOwnerCall{Call: call} +} + +// MockStateAllCloudCredentialsForOwnerCall wrap *gomock.Call +type MockStateAllCloudCredentialsForOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllCloudCredentialsForOwnerCall) Return(arg0 map[credential.Key]credential0.CloudCredentialResult, arg1 error) *MockStateAllCloudCredentialsForOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllCloudCredentialsForOwnerCall) Do(f func(context.Context, string) (map[credential.Key]credential0.CloudCredentialResult, error)) *MockStateAllCloudCredentialsForOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllCloudCredentialsForOwnerCall) DoAndReturn(f func(context.Context, string) (map[credential.Key]credential0.CloudCredentialResult, error)) *MockStateAllCloudCredentialsForOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredential mocks base method. @@ -69,9 +93,33 @@ func (m *MockState) CloudCredential(arg0 context.Context, arg1 credential.Key) ( } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockStateMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) CloudCredential(arg0, arg1 any) *MockStateCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockState)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockState)(nil).CloudCredential), arg0, arg1) + return &MockStateCloudCredentialCall{Call: call} +} + +// MockStateCloudCredentialCall wrap *gomock.Call +type MockStateCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCloudCredentialCall) Return(arg0 credential0.CloudCredentialResult, arg1 error) *MockStateCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCloudCredentialCall) Do(f func(context.Context, credential.Key) (credential0.CloudCredentialResult, error)) *MockStateCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (credential0.CloudCredentialResult, error)) *MockStateCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudCredentialsForOwner mocks base method. @@ -84,9 +132,33 @@ func (m *MockState) CloudCredentialsForOwner(arg0 context.Context, arg1, arg2 st } // CloudCredentialsForOwner indicates an expected call of CloudCredentialsForOwner. -func (mr *MockStateMockRecorder) CloudCredentialsForOwner(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) CloudCredentialsForOwner(arg0, arg1, arg2 any) *MockStateCloudCredentialsForOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsForOwner", reflect.TypeOf((*MockState)(nil).CloudCredentialsForOwner), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsForOwner", reflect.TypeOf((*MockState)(nil).CloudCredentialsForOwner), arg0, arg1, arg2) + return &MockStateCloudCredentialsForOwnerCall{Call: call} +} + +// MockStateCloudCredentialsForOwnerCall wrap *gomock.Call +type MockStateCloudCredentialsForOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCloudCredentialsForOwnerCall) Return(arg0 map[string]credential0.CloudCredentialResult, arg1 error) *MockStateCloudCredentialsForOwnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCloudCredentialsForOwnerCall) Do(f func(context.Context, string, string) (map[string]credential0.CloudCredentialResult, error)) *MockStateCloudCredentialsForOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCloudCredentialsForOwnerCall) DoAndReturn(f func(context.Context, string, string) (map[string]credential0.CloudCredentialResult, error)) *MockStateCloudCredentialsForOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InvalidateCloudCredential mocks base method. @@ -98,9 +170,33 @@ func (m *MockState) InvalidateCloudCredential(arg0 context.Context, arg1 credent } // InvalidateCloudCredential indicates an expected call of InvalidateCloudCredential. -func (mr *MockStateMockRecorder) InvalidateCloudCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) InvalidateCloudCredential(arg0, arg1, arg2 any) *MockStateInvalidateCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateCloudCredential", reflect.TypeOf((*MockState)(nil).InvalidateCloudCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateCloudCredential", reflect.TypeOf((*MockState)(nil).InvalidateCloudCredential), arg0, arg1, arg2) + return &MockStateInvalidateCloudCredentialCall{Call: call} +} + +// MockStateInvalidateCloudCredentialCall wrap *gomock.Call +type MockStateInvalidateCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInvalidateCloudCredentialCall) Return(arg0 error) *MockStateInvalidateCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInvalidateCloudCredentialCall) Do(f func(context.Context, credential.Key, string) error) *MockStateInvalidateCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInvalidateCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key, string) error) *MockStateInvalidateCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelsUsingCloudCredential mocks base method. @@ -113,9 +209,33 @@ func (m *MockState) ModelsUsingCloudCredential(arg0 context.Context, arg1 creden } // ModelsUsingCloudCredential indicates an expected call of ModelsUsingCloudCredential. -func (mr *MockStateMockRecorder) ModelsUsingCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) ModelsUsingCloudCredential(arg0, arg1 any) *MockStateModelsUsingCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsUsingCloudCredential", reflect.TypeOf((*MockState)(nil).ModelsUsingCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsUsingCloudCredential", reflect.TypeOf((*MockState)(nil).ModelsUsingCloudCredential), arg0, arg1) + return &MockStateModelsUsingCloudCredentialCall{Call: call} +} + +// MockStateModelsUsingCloudCredentialCall wrap *gomock.Call +type MockStateModelsUsingCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelsUsingCloudCredentialCall) Return(arg0 map[model.UUID]string, arg1 error) *MockStateModelsUsingCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelsUsingCloudCredentialCall) Do(f func(context.Context, credential.Key) (map[model.UUID]string, error)) *MockStateModelsUsingCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelsUsingCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (map[model.UUID]string, error)) *MockStateModelsUsingCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveCloudCredential mocks base method. @@ -127,9 +247,33 @@ func (m *MockState) RemoveCloudCredential(arg0 context.Context, arg1 credential. } // RemoveCloudCredential indicates an expected call of RemoveCloudCredential. -func (mr *MockStateMockRecorder) RemoveCloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) RemoveCloudCredential(arg0, arg1 any) *MockStateRemoveCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredential", reflect.TypeOf((*MockState)(nil).RemoveCloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredential", reflect.TypeOf((*MockState)(nil).RemoveCloudCredential), arg0, arg1) + return &MockStateRemoveCloudCredentialCall{Call: call} +} + +// MockStateRemoveCloudCredentialCall wrap *gomock.Call +type MockStateRemoveCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateRemoveCloudCredentialCall) Return(arg0 error) *MockStateRemoveCloudCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateRemoveCloudCredentialCall) Do(f func(context.Context, credential.Key) error) *MockStateRemoveCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateRemoveCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) error) *MockStateRemoveCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertCloudCredential mocks base method. @@ -142,9 +286,33 @@ func (m *MockState) UpsertCloudCredential(arg0 context.Context, arg1 credential. } // UpsertCloudCredential indicates an expected call of UpsertCloudCredential. -func (mr *MockStateMockRecorder) UpsertCloudCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpsertCloudCredential(arg0, arg1, arg2 any) *MockStateUpsertCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertCloudCredential", reflect.TypeOf((*MockState)(nil).UpsertCloudCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertCloudCredential", reflect.TypeOf((*MockState)(nil).UpsertCloudCredential), arg0, arg1, arg2) + return &MockStateUpsertCloudCredentialCall{Call: call} +} + +// MockStateUpsertCloudCredentialCall wrap *gomock.Call +type MockStateUpsertCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpsertCloudCredentialCall) Return(arg0 *bool, arg1 error) *MockStateUpsertCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpsertCloudCredentialCall) Do(f func(context.Context, credential.Key, credential0.CloudCredentialInfo) (*bool, error)) *MockStateUpsertCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpsertCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key, credential0.CloudCredentialInfo) (*bool, error)) *MockStateUpsertCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCredential mocks base method. @@ -157,9 +325,33 @@ func (m *MockState) WatchCredential(arg0 context.Context, arg1 func(string, stri } // WatchCredential indicates an expected call of WatchCredential. -func (mr *MockStateMockRecorder) WatchCredential(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) WatchCredential(arg0, arg1, arg2 any) *MockStateWatchCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockState)(nil).WatchCredential), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockState)(nil).WatchCredential), arg0, arg1, arg2) + return &MockStateWatchCredentialCall{Call: call} +} + +// MockStateWatchCredentialCall wrap *gomock.Call +type MockStateWatchCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateWatchCredentialCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockStateWatchCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateWatchCredentialCall) Do(f func(context.Context, func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error), credential.Key) (watcher.Watcher[struct{}], error)) *MockStateWatchCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateWatchCredentialCall) DoAndReturn(f func(context.Context, func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error), credential.Key) (watcher.Watcher[struct{}], error)) *MockStateWatchCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -195,9 +387,33 @@ func (m *MockWatcherFactory) NewValueWatcher(arg0, arg1 string, arg2 changestrea } // NewValueWatcher indicates an expected call of NewValueWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewValueWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewValueWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewValueWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewValueWatcherCall{Call: call} +} + +// MockWatcherFactoryNewValueWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewValueWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewValueWatcherCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewValueWatcherCall) Do(f func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewValueWatcherCall) DoAndReturn(f func(string, string, changestream.ChangeType) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachineService is a mock of MachineService interface. @@ -233,7 +449,31 @@ func (m *MockMachineService) AllMachines() ([]Machine, error) { } // AllMachines indicates an expected call of AllMachines. -func (mr *MockMachineServiceMockRecorder) AllMachines() *gomock.Call { +func (mr *MockMachineServiceMockRecorder) AllMachines() *MockMachineServiceAllMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockMachineService)(nil).AllMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMachines", reflect.TypeOf((*MockMachineService)(nil).AllMachines)) + return &MockMachineServiceAllMachinesCall{Call: call} +} + +// MockMachineServiceAllMachinesCall wrap *gomock.Call +type MockMachineServiceAllMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineServiceAllMachinesCall) Return(arg0 []Machine, arg1 error) *MockMachineServiceAllMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineServiceAllMachinesCall) Do(f func() ([]Machine, error)) *MockMachineServiceAllMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineServiceAllMachinesCall) DoAndReturn(f func() ([]Machine, error)) *MockMachineServiceAllMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/credential/service/validator_mock_test.go b/domain/credential/service/validator_mock_test.go index 4185a3884c3..9d7cf0571d0 100644 --- a/domain/credential/service/validator_mock_test.go +++ b/domain/credential/service/validator_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination validator_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator +// mockgen -typed -package service -destination validator_mock_test.go github.com/juju/juju/domain/credential/service CredentialValidator // // Package service is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockCredentialValidator) Validate(arg0 context.Context, arg1 Credential } // Validate indicates an expected call of Validate. -func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockCredentialValidatorMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4 any) *MockCredentialValidatorValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCredentialValidator)(nil).Validate), arg0, arg1, arg2, arg3, arg4) + return &MockCredentialValidatorValidateCall{Call: call} +} + +// MockCredentialValidatorValidateCall wrap *gomock.Call +type MockCredentialValidatorValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialValidatorValidateCall) Return(arg0 []error, arg1 error) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialValidatorValidateCall) Do(f func(context.Context, CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialValidatorValidateCall) DoAndReturn(f func(context.Context, CredentialValidationContext, credential.Key, *cloud.Credential, bool) ([]error, error)) *MockCredentialValidatorValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/externalcontroller/modelmigration/migrations_mock_test.go b/domain/externalcontroller/modelmigration/migrations_mock_test.go index 061db05d6b5..a84f140d66a 100644 --- a/domain/externalcontroller/modelmigration/migrations_mock_test.go +++ b/domain/externalcontroller/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/externalcontroller/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/externalcontroller/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -85,9 +109,33 @@ func (m *MockImportService) ImportExternalControllers(arg0 context.Context, arg1 } // ImportExternalControllers indicates an expected call of ImportExternalControllers. -func (mr *MockImportServiceMockRecorder) ImportExternalControllers(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) ImportExternalControllers(arg0, arg1 any) *MockImportServiceImportExternalControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportExternalControllers", reflect.TypeOf((*MockImportService)(nil).ImportExternalControllers), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportExternalControllers", reflect.TypeOf((*MockImportService)(nil).ImportExternalControllers), arg0, arg1) + return &MockImportServiceImportExternalControllersCall{Call: call} +} + +// MockImportServiceImportExternalControllersCall wrap *gomock.Call +type MockImportServiceImportExternalControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceImportExternalControllersCall) Return(arg0 error) *MockImportServiceImportExternalControllersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceImportExternalControllersCall) Do(f func(context.Context, []crossmodel.ControllerInfo) error) *MockImportServiceImportExternalControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceImportExternalControllersCall) DoAndReturn(f func(context.Context, []crossmodel.ControllerInfo) error) *MockImportServiceImportExternalControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -123,9 +171,33 @@ func (m *MockExportService) ControllerForModel(arg0 context.Context, arg1 string } // ControllerForModel indicates an expected call of ControllerForModel. -func (mr *MockExportServiceMockRecorder) ControllerForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) ControllerForModel(arg0, arg1 any) *MockExportServiceControllerForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExportService)(nil).ControllerForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerForModel", reflect.TypeOf((*MockExportService)(nil).ControllerForModel), arg0, arg1) + return &MockExportServiceControllerForModelCall{Call: call} +} + +// MockExportServiceControllerForModelCall wrap *gomock.Call +type MockExportServiceControllerForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceControllerForModelCall) Return(arg0 *crossmodel.ControllerInfo, arg1 error) *MockExportServiceControllerForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceControllerForModelCall) Do(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExportServiceControllerForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceControllerForModelCall) DoAndReturn(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockExportServiceControllerForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllersForModels mocks base method. @@ -142,10 +214,34 @@ func (m *MockExportService) ControllersForModels(arg0 context.Context, arg1 ...s } // ControllersForModels indicates an expected call of ControllersForModels. -func (mr *MockExportServiceMockRecorder) ControllersForModels(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) ControllersForModels(arg0 any, arg1 ...any) *MockExportServiceControllersForModelsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllersForModels", reflect.TypeOf((*MockExportService)(nil).ControllersForModels), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllersForModels", reflect.TypeOf((*MockExportService)(nil).ControllersForModels), varargs...) + return &MockExportServiceControllersForModelsCall{Call: call} +} + +// MockExportServiceControllersForModelsCall wrap *gomock.Call +type MockExportServiceControllersForModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceControllersForModelsCall) Return(arg0 []crossmodel.ControllerInfo, arg1 error) *MockExportServiceControllersForModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceControllersForModelsCall) Do(f func(context.Context, ...string) ([]crossmodel.ControllerInfo, error)) *MockExportServiceControllersForModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceControllersForModelsCall) DoAndReturn(f func(context.Context, ...string) ([]crossmodel.ControllerInfo, error)) *MockExportServiceControllersForModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelsForController mocks base method. @@ -158,7 +254,31 @@ func (m *MockExportService) ModelsForController(arg0 context.Context, arg1 strin } // ModelsForController indicates an expected call of ModelsForController. -func (mr *MockExportServiceMockRecorder) ModelsForController(arg0, arg1 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) ModelsForController(arg0, arg1 any) *MockExportServiceModelsForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsForController", reflect.TypeOf((*MockExportService)(nil).ModelsForController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsForController", reflect.TypeOf((*MockExportService)(nil).ModelsForController), arg0, arg1) + return &MockExportServiceModelsForControllerCall{Call: call} +} + +// MockExportServiceModelsForControllerCall wrap *gomock.Call +type MockExportServiceModelsForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceModelsForControllerCall) Return(arg0 []string, arg1 error) *MockExportServiceModelsForControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceModelsForControllerCall) Do(f func(context.Context, string) ([]string, error)) *MockExportServiceModelsForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceModelsForControllerCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockExportServiceModelsForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/externalcontroller/modelmigration/package_test.go b/domain/externalcontroller/modelmigration/package_test.go index 2919efc9c8b..dc9f7810350 100644 --- a/domain/externalcontroller/modelmigration/package_test.go +++ b/domain/externalcontroller/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/externalcontroller/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/externalcontroller/modelmigration Coordinator,ImportService,ExportService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/externalcontroller/service/package_test.go b/domain/externalcontroller/service/package_test.go index d9a1b00fe6a..5d1b26abf21 100644 --- a/domain/externalcontroller/service/package_test.go +++ b/domain/externalcontroller/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/externalcontroller/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/externalcontroller/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/externalcontroller/service/state_mock_test.go b/domain/externalcontroller/service/state_mock_test.go index 176ba95d292..4622e42b46a 100644 --- a/domain/externalcontroller/service/state_mock_test.go +++ b/domain/externalcontroller/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/externalcontroller/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/externalcontroller/service State // // Package service is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockState) Controller(arg0 context.Context, arg1 string) (*crossmodel.C } // Controller indicates an expected call of Controller. -func (mr *MockStateMockRecorder) Controller(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) Controller(arg0, arg1 any) *MockStateControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockState)(nil).Controller), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockState)(nil).Controller), arg0, arg1) + return &MockStateControllerCall{Call: call} +} + +// MockStateControllerCall wrap *gomock.Call +type MockStateControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateControllerCall) Return(arg0 *crossmodel.ControllerInfo, arg1 error) *MockStateControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateControllerCall) Do(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockStateControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateControllerCall) DoAndReturn(f func(context.Context, string) (*crossmodel.ControllerInfo, error)) *MockStateControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllersForModels mocks base method. @@ -69,10 +93,34 @@ func (m *MockState) ControllersForModels(arg0 context.Context, arg1 ...string) ( } // ControllersForModels indicates an expected call of ControllersForModels. -func (mr *MockStateMockRecorder) ControllersForModels(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) ControllersForModels(arg0 any, arg1 ...any) *MockStateControllersForModelsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllersForModels", reflect.TypeOf((*MockState)(nil).ControllersForModels), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllersForModels", reflect.TypeOf((*MockState)(nil).ControllersForModels), varargs...) + return &MockStateControllersForModelsCall{Call: call} +} + +// MockStateControllersForModelsCall wrap *gomock.Call +type MockStateControllersForModelsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateControllersForModelsCall) Return(arg0 []crossmodel.ControllerInfo, arg1 error) *MockStateControllersForModelsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateControllersForModelsCall) Do(f func(context.Context, ...string) ([]crossmodel.ControllerInfo, error)) *MockStateControllersForModelsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateControllersForModelsCall) DoAndReturn(f func(context.Context, ...string) ([]crossmodel.ControllerInfo, error)) *MockStateControllersForModelsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ImportExternalControllers mocks base method. @@ -84,9 +132,33 @@ func (m *MockState) ImportExternalControllers(arg0 context.Context, arg1 []cross } // ImportExternalControllers indicates an expected call of ImportExternalControllers. -func (mr *MockStateMockRecorder) ImportExternalControllers(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) ImportExternalControllers(arg0, arg1 any) *MockStateImportExternalControllersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportExternalControllers", reflect.TypeOf((*MockState)(nil).ImportExternalControllers), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportExternalControllers", reflect.TypeOf((*MockState)(nil).ImportExternalControllers), arg0, arg1) + return &MockStateImportExternalControllersCall{Call: call} +} + +// MockStateImportExternalControllersCall wrap *gomock.Call +type MockStateImportExternalControllersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateImportExternalControllersCall) Return(arg0 error) *MockStateImportExternalControllersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateImportExternalControllersCall) Do(f func(context.Context, []crossmodel.ControllerInfo) error) *MockStateImportExternalControllersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateImportExternalControllersCall) DoAndReturn(f func(context.Context, []crossmodel.ControllerInfo) error) *MockStateImportExternalControllersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelsForController mocks base method. @@ -99,9 +171,33 @@ func (m *MockState) ModelsForController(arg0 context.Context, arg1 string) ([]st } // ModelsForController indicates an expected call of ModelsForController. -func (mr *MockStateMockRecorder) ModelsForController(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) ModelsForController(arg0, arg1 any) *MockStateModelsForControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsForController", reflect.TypeOf((*MockState)(nil).ModelsForController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelsForController", reflect.TypeOf((*MockState)(nil).ModelsForController), arg0, arg1) + return &MockStateModelsForControllerCall{Call: call} +} + +// MockStateModelsForControllerCall wrap *gomock.Call +type MockStateModelsForControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateModelsForControllerCall) Return(arg0 []string, arg1 error) *MockStateModelsForControllerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateModelsForControllerCall) Do(f func(context.Context, string) ([]string, error)) *MockStateModelsForControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateModelsForControllerCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockStateModelsForControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateExternalController mocks base method. @@ -113,7 +209,31 @@ func (m *MockState) UpdateExternalController(arg0 context.Context, arg1 crossmod } // UpdateExternalController indicates an expected call of UpdateExternalController. -func (mr *MockStateMockRecorder) UpdateExternalController(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateExternalController(arg0, arg1 any) *MockStateUpdateExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockState)(nil).UpdateExternalController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExternalController", reflect.TypeOf((*MockState)(nil).UpdateExternalController), arg0, arg1) + return &MockStateUpdateExternalControllerCall{Call: call} +} + +// MockStateUpdateExternalControllerCall wrap *gomock.Call +type MockStateUpdateExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateExternalControllerCall) Return(arg0 error) *MockStateUpdateExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateExternalControllerCall) Do(f func(context.Context, crossmodel.ControllerInfo) error) *MockStateUpdateExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateExternalControllerCall) DoAndReturn(f func(context.Context, crossmodel.ControllerInfo) error) *MockStateUpdateExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/flag/service/package_test.go b/domain/flag/service/package_test.go index 816a958802f..227619a9389 100644 --- a/domain/flag/service/package_test.go +++ b/domain/flag/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/flag/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/flag/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/flag/service/state_mock_test.go b/domain/flag/service/state_mock_test.go index ca72cdb29b7..8f9479da430 100644 --- a/domain/flag/service/state_mock_test.go +++ b/domain/flag/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/flag/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/flag/service State // // Package service is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockState) GetFlag(arg0 context.Context, arg1 string) (bool, error) { } // GetFlag indicates an expected call of GetFlag. -func (mr *MockStateMockRecorder) GetFlag(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetFlag(arg0, arg1 any) *MockStateGetFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlag", reflect.TypeOf((*MockState)(nil).GetFlag), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlag", reflect.TypeOf((*MockState)(nil).GetFlag), arg0, arg1) + return &MockStateGetFlagCall{Call: call} +} + +// MockStateGetFlagCall wrap *gomock.Call +type MockStateGetFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetFlagCall) Return(arg0 bool, arg1 error) *MockStateGetFlagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetFlagCall) Do(f func(context.Context, string) (bool, error)) *MockStateGetFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetFlagCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockStateGetFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetFlag mocks base method. @@ -63,7 +87,31 @@ func (m *MockState) SetFlag(arg0 context.Context, arg1 string, arg2 bool, arg3 s } // SetFlag indicates an expected call of SetFlag. -func (mr *MockStateMockRecorder) SetFlag(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetFlag(arg0, arg1, arg2, arg3 any) *MockStateSetFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlag", reflect.TypeOf((*MockState)(nil).SetFlag), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlag", reflect.TypeOf((*MockState)(nil).SetFlag), arg0, arg1, arg2, arg3) + return &MockStateSetFlagCall{Call: call} +} + +// MockStateSetFlagCall wrap *gomock.Call +type MockStateSetFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetFlagCall) Return(arg0 error) *MockStateSetFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetFlagCall) Do(f func(context.Context, string, bool, string) error) *MockStateSetFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetFlagCall) DoAndReturn(f func(context.Context, string, bool, string) error) *MockStateSetFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/lease/modelmigration/database_mock_test.go b/domain/lease/modelmigration/database_mock_test.go index 36c9f899709..b38babbd2fd 100644 --- a/domain/lease/modelmigration/database_mock_test.go +++ b/domain/lease/modelmigration/database_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +// mockgen -typed -package modelmigration -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner // // Package modelmigration is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockTxnRunner) StdTxn(arg0 context.Context, arg1 func(context.Context, } // StdTxn indicates an expected call of StdTxn. -func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *MockTxnRunnerStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + return &MockTxnRunnerStdTxnCall{Call: call} +} + +// MockTxnRunnerStdTxnCall wrap *gomock.Call +type MockTxnRunnerStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerStdTxnCall) Return(arg0 error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -64,7 +88,31 @@ func (m *MockTxnRunner) Txn(arg0 context.Context, arg1 func(context.Context, *sq } // Txn indicates an expected call of Txn. -func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *MockTxnRunnerTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + return &MockTxnRunnerTxnCall{Call: call} +} + +// MockTxnRunnerTxnCall wrap *gomock.Call +type MockTxnRunnerTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerTxnCall) Return(arg0 error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/lease/modelmigration/migrations_mock_test.go b/domain/lease/modelmigration/migrations_mock_test.go index 0c61ee306b4..0ec6021a354 100644 --- a/domain/lease/modelmigration/migrations_mock_test.go +++ b/domain/lease/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/lease/modelmigration Coordinator,ImportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/lease/modelmigration Coordinator,ImportService // // Package modelmigration is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -85,7 +109,31 @@ func (m *MockImportService) ClaimLease(arg0 context.Context, arg1 lease.Key, arg } // ClaimLease indicates an expected call of ClaimLease. -func (mr *MockImportServiceMockRecorder) ClaimLease(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) ClaimLease(arg0, arg1, arg2 any) *MockImportServiceClaimLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClaimLease", reflect.TypeOf((*MockImportService)(nil).ClaimLease), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClaimLease", reflect.TypeOf((*MockImportService)(nil).ClaimLease), arg0, arg1, arg2) + return &MockImportServiceClaimLeaseCall{Call: call} +} + +// MockImportServiceClaimLeaseCall wrap *gomock.Call +type MockImportServiceClaimLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceClaimLeaseCall) Return(arg0 error) *MockImportServiceClaimLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceClaimLeaseCall) Do(f func(context.Context, lease.Key, lease.Request) error) *MockImportServiceClaimLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceClaimLeaseCall) DoAndReturn(f func(context.Context, lease.Key, lease.Request) error) *MockImportServiceClaimLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/lease/modelmigration/package_test.go b/domain/lease/modelmigration/package_test.go index 9fe59c7fa53..179cca5ff85 100644 --- a/domain/lease/modelmigration/package_test.go +++ b/domain/lease/modelmigration/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/lease/modelmigration Coordinator,ImportService -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/lease/modelmigration Coordinator,ImportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/lease/service/package_test.go b/domain/lease/service/package_test.go index 00db9e1fab6..a47497d2840 100644 --- a/domain/lease/service/package_test.go +++ b/domain/lease/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/lease/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/lease/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/lease/service/state_mock_test.go b/domain/lease/service/state_mock_test.go index fb283f63ae8..c76b8f5f7e4 100644 --- a/domain/lease/service/state_mock_test.go +++ b/domain/lease/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/lease/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/lease/service State // // Package service is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockState) ClaimLease(arg0 context.Context, arg1 uuid.UUID, arg2 lease. } // ClaimLease indicates an expected call of ClaimLease. -func (mr *MockStateMockRecorder) ClaimLease(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) ClaimLease(arg0, arg1, arg2, arg3 any) *MockStateClaimLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClaimLease", reflect.TypeOf((*MockState)(nil).ClaimLease), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClaimLease", reflect.TypeOf((*MockState)(nil).ClaimLease), arg0, arg1, arg2, arg3) + return &MockStateClaimLeaseCall{Call: call} +} + +// MockStateClaimLeaseCall wrap *gomock.Call +type MockStateClaimLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateClaimLeaseCall) Return(arg0 error) *MockStateClaimLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateClaimLeaseCall) Do(f func(context.Context, uuid.UUID, lease.Key, lease.Request) error) *MockStateClaimLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateClaimLeaseCall) DoAndReturn(f func(context.Context, uuid.UUID, lease.Key, lease.Request) error) *MockStateClaimLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExpireLeases mocks base method. @@ -64,9 +88,33 @@ func (m *MockState) ExpireLeases(arg0 context.Context) error { } // ExpireLeases indicates an expected call of ExpireLeases. -func (mr *MockStateMockRecorder) ExpireLeases(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ExpireLeases(arg0 any) *MockStateExpireLeasesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireLeases", reflect.TypeOf((*MockState)(nil).ExpireLeases), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireLeases", reflect.TypeOf((*MockState)(nil).ExpireLeases), arg0) + return &MockStateExpireLeasesCall{Call: call} +} + +// MockStateExpireLeasesCall wrap *gomock.Call +type MockStateExpireLeasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateExpireLeasesCall) Return(arg0 error) *MockStateExpireLeasesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateExpireLeasesCall) Do(f func(context.Context) error) *MockStateExpireLeasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateExpireLeasesCall) DoAndReturn(f func(context.Context) error) *MockStateExpireLeasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExtendLease mocks base method. @@ -78,9 +126,33 @@ func (m *MockState) ExtendLease(arg0 context.Context, arg1 lease.Key, arg2 lease } // ExtendLease indicates an expected call of ExtendLease. -func (mr *MockStateMockRecorder) ExtendLease(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ExtendLease(arg0, arg1, arg2 any) *MockStateExtendLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtendLease", reflect.TypeOf((*MockState)(nil).ExtendLease), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtendLease", reflect.TypeOf((*MockState)(nil).ExtendLease), arg0, arg1, arg2) + return &MockStateExtendLeaseCall{Call: call} +} + +// MockStateExtendLeaseCall wrap *gomock.Call +type MockStateExtendLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateExtendLeaseCall) Return(arg0 error) *MockStateExtendLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateExtendLeaseCall) Do(f func(context.Context, lease.Key, lease.Request) error) *MockStateExtendLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateExtendLeaseCall) DoAndReturn(f func(context.Context, lease.Key, lease.Request) error) *MockStateExtendLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeaseGroup mocks base method. @@ -93,9 +165,33 @@ func (m *MockState) LeaseGroup(arg0 context.Context, arg1, arg2 string) (map[lea } // LeaseGroup indicates an expected call of LeaseGroup. -func (mr *MockStateMockRecorder) LeaseGroup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) LeaseGroup(arg0, arg1, arg2 any) *MockStateLeaseGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaseGroup", reflect.TypeOf((*MockState)(nil).LeaseGroup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaseGroup", reflect.TypeOf((*MockState)(nil).LeaseGroup), arg0, arg1, arg2) + return &MockStateLeaseGroupCall{Call: call} +} + +// MockStateLeaseGroupCall wrap *gomock.Call +type MockStateLeaseGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateLeaseGroupCall) Return(arg0 map[lease.Key]lease.Info, arg1 error) *MockStateLeaseGroupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateLeaseGroupCall) Do(f func(context.Context, string, string) (map[lease.Key]lease.Info, error)) *MockStateLeaseGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateLeaseGroupCall) DoAndReturn(f func(context.Context, string, string) (map[lease.Key]lease.Info, error)) *MockStateLeaseGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Leases mocks base method. @@ -112,10 +208,34 @@ func (m *MockState) Leases(arg0 context.Context, arg1 ...lease.Key) (map[lease.K } // Leases indicates an expected call of Leases. -func (mr *MockStateMockRecorder) Leases(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) Leases(arg0 any, arg1 ...any) *MockStateLeasesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leases", reflect.TypeOf((*MockState)(nil).Leases), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leases", reflect.TypeOf((*MockState)(nil).Leases), varargs...) + return &MockStateLeasesCall{Call: call} +} + +// MockStateLeasesCall wrap *gomock.Call +type MockStateLeasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateLeasesCall) Return(arg0 map[lease.Key]lease.Info, arg1 error) *MockStateLeasesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateLeasesCall) Do(f func(context.Context, ...lease.Key) (map[lease.Key]lease.Info, error)) *MockStateLeasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateLeasesCall) DoAndReturn(f func(context.Context, ...lease.Key) (map[lease.Key]lease.Info, error)) *MockStateLeasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PinLease mocks base method. @@ -127,9 +247,33 @@ func (m *MockState) PinLease(arg0 context.Context, arg1 lease.Key, arg2 string) } // PinLease indicates an expected call of PinLease. -func (mr *MockStateMockRecorder) PinLease(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) PinLease(arg0, arg1, arg2 any) *MockStatePinLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinLease", reflect.TypeOf((*MockState)(nil).PinLease), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinLease", reflect.TypeOf((*MockState)(nil).PinLease), arg0, arg1, arg2) + return &MockStatePinLeaseCall{Call: call} +} + +// MockStatePinLeaseCall wrap *gomock.Call +type MockStatePinLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePinLeaseCall) Return(arg0 error) *MockStatePinLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePinLeaseCall) Do(f func(context.Context, lease.Key, string) error) *MockStatePinLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePinLeaseCall) DoAndReturn(f func(context.Context, lease.Key, string) error) *MockStatePinLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pinned mocks base method. @@ -142,9 +286,33 @@ func (m *MockState) Pinned(arg0 context.Context) (map[lease.Key][]string, error) } // Pinned indicates an expected call of Pinned. -func (mr *MockStateMockRecorder) Pinned(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) Pinned(arg0 any) *MockStatePinnedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pinned", reflect.TypeOf((*MockState)(nil).Pinned), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pinned", reflect.TypeOf((*MockState)(nil).Pinned), arg0) + return &MockStatePinnedCall{Call: call} +} + +// MockStatePinnedCall wrap *gomock.Call +type MockStatePinnedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePinnedCall) Return(arg0 map[lease.Key][]string, arg1 error) *MockStatePinnedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePinnedCall) Do(f func(context.Context) (map[lease.Key][]string, error)) *MockStatePinnedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePinnedCall) DoAndReturn(f func(context.Context) (map[lease.Key][]string, error)) *MockStatePinnedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeLease mocks base method. @@ -156,9 +324,33 @@ func (m *MockState) RevokeLease(arg0 context.Context, arg1 lease.Key, arg2 strin } // RevokeLease indicates an expected call of RevokeLease. -func (mr *MockStateMockRecorder) RevokeLease(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) RevokeLease(arg0, arg1, arg2 any) *MockStateRevokeLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeLease", reflect.TypeOf((*MockState)(nil).RevokeLease), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeLease", reflect.TypeOf((*MockState)(nil).RevokeLease), arg0, arg1, arg2) + return &MockStateRevokeLeaseCall{Call: call} +} + +// MockStateRevokeLeaseCall wrap *gomock.Call +type MockStateRevokeLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateRevokeLeaseCall) Return(arg0 error) *MockStateRevokeLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateRevokeLeaseCall) Do(f func(context.Context, lease.Key, string) error) *MockStateRevokeLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateRevokeLeaseCall) DoAndReturn(f func(context.Context, lease.Key, string) error) *MockStateRevokeLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnpinLease mocks base method. @@ -170,7 +362,31 @@ func (m *MockState) UnpinLease(arg0 context.Context, arg1 lease.Key, arg2 string } // UnpinLease indicates an expected call of UnpinLease. -func (mr *MockStateMockRecorder) UnpinLease(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UnpinLease(arg0, arg1, arg2 any) *MockStateUnpinLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinLease", reflect.TypeOf((*MockState)(nil).UnpinLease), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinLease", reflect.TypeOf((*MockState)(nil).UnpinLease), arg0, arg1, arg2) + return &MockStateUnpinLeaseCall{Call: call} +} + +// MockStateUnpinLeaseCall wrap *gomock.Call +type MockStateUnpinLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUnpinLeaseCall) Return(arg0 error) *MockStateUnpinLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUnpinLeaseCall) Do(f func(context.Context, lease.Key, string) error) *MockStateUnpinLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUnpinLeaseCall) DoAndReturn(f func(context.Context, lease.Key, string) error) *MockStateUnpinLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/machine/service/package_mock_test.go b/domain/machine/service/package_mock_test.go index bd8035fccae..c91e5227fbb 100644 --- a/domain/machine/service/package_mock_test.go +++ b/domain/machine/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/machine/service State +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/machine/service State // // Package service is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockState) DeleteMachine(arg0 context.Context, arg1 string) error { } // DeleteMachine indicates an expected call of DeleteMachine. -func (mr *MockStateMockRecorder) DeleteMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteMachine(arg0, arg1 any) *MockStateDeleteMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMachine", reflect.TypeOf((*MockState)(nil).DeleteMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMachine", reflect.TypeOf((*MockState)(nil).DeleteMachine), arg0, arg1) + return &MockStateDeleteMachineCall{Call: call} +} + +// MockStateDeleteMachineCall wrap *gomock.Call +type MockStateDeleteMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteMachineCall) Return(arg0 error) *MockStateDeleteMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteMachineCall) Do(f func(context.Context, string) error) *MockStateDeleteMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteMachineCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertMachine mocks base method. @@ -62,7 +86,31 @@ func (m *MockState) UpsertMachine(arg0 context.Context, arg1 string) error { } // UpsertMachine indicates an expected call of UpsertMachine. -func (mr *MockStateMockRecorder) UpsertMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpsertMachine(arg0, arg1 any) *MockStateUpsertMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertMachine", reflect.TypeOf((*MockState)(nil).UpsertMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertMachine", reflect.TypeOf((*MockState)(nil).UpsertMachine), arg0, arg1) + return &MockStateUpsertMachineCall{Call: call} +} + +// MockStateUpsertMachineCall wrap *gomock.Call +type MockStateUpsertMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpsertMachineCall) Return(arg0 error) *MockStateUpsertMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpsertMachineCall) Do(f func(context.Context, string) error) *MockStateUpsertMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpsertMachineCall) DoAndReturn(f func(context.Context, string) error) *MockStateUpsertMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/machine/service/package_test.go b/domain/machine/service/package_test.go index 58fc697cc52..39f2bfd649c 100644 --- a/domain/machine/service/package_test.go +++ b/domain/machine/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/machine/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/machine/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/model/modelmigration/migrations_mock_test.go b/domain/model/modelmigration/migrations_mock_test.go index e83257b62be..8f696ef6296 100644 --- a/domain/model/modelmigration/migrations_mock_test.go +++ b/domain/model/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/model/modelmigration ModelService,ReadOnlyModelService,UserService,ControllerConfigService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/model/modelmigration ModelService,ReadOnlyModelService,UserService,ControllerConfigService // // Package modelmigration is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockModelService) CreateModel(arg0 context.Context, arg1 model0.ModelCr } // CreateModel indicates an expected call of CreateModel. -func (mr *MockModelServiceMockRecorder) CreateModel(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) CreateModel(arg0, arg1 any) *MockModelServiceCreateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockModelService)(nil).CreateModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockModelService)(nil).CreateModel), arg0, arg1) + return &MockModelServiceCreateModelCall{Call: call} +} + +// MockModelServiceCreateModelCall wrap *gomock.Call +type MockModelServiceCreateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceCreateModelCall) Return(arg0 func(context.Context) error, arg1 error) *MockModelServiceCreateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceCreateModelCall) Do(f func(context.Context, model0.ModelCreationArgs) (func(context.Context) error, error)) *MockModelServiceCreateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceCreateModelCall) DoAndReturn(f func(context.Context, model0.ModelCreationArgs) (func(context.Context) error, error)) *MockModelServiceCreateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteModel mocks base method. @@ -68,9 +92,33 @@ func (m *MockModelService) DeleteModel(arg0 context.Context, arg1 model.UUID) er } // DeleteModel indicates an expected call of DeleteModel. -func (mr *MockModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *MockModelServiceDeleteModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockModelService)(nil).DeleteModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockModelService)(nil).DeleteModel), arg0, arg1) + return &MockModelServiceDeleteModelCall{Call: call} +} + +// MockModelServiceDeleteModelCall wrap *gomock.Call +type MockModelServiceDeleteModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceDeleteModelCall) Return(arg0 error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceDeleteModelCall) Do(f func(context.Context, model.UUID) error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceDeleteModelCall) DoAndReturn(f func(context.Context, model.UUID) error) *MockModelServiceDeleteModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelType mocks base method. @@ -83,9 +131,33 @@ func (m *MockModelService) ModelType(arg0 context.Context, arg1 model.UUID) (mod } // ModelType indicates an expected call of ModelType. -func (mr *MockModelServiceMockRecorder) ModelType(arg0, arg1 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) ModelType(arg0, arg1 any) *MockModelServiceModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockModelService)(nil).ModelType), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockModelService)(nil).ModelType), arg0, arg1) + return &MockModelServiceModelTypeCall{Call: call} +} + +// MockModelServiceModelTypeCall wrap *gomock.Call +type MockModelServiceModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceModelTypeCall) Return(arg0 model.ModelType, arg1 error) *MockModelServiceModelTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceModelTypeCall) Do(f func(context.Context, model.UUID) (model.ModelType, error)) *MockModelServiceModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceModelTypeCall) DoAndReturn(f func(context.Context, model.UUID) (model.ModelType, error)) *MockModelServiceModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockReadOnlyModelService is a mock of ReadOnlyModelService interface. @@ -120,9 +192,33 @@ func (m *MockReadOnlyModelService) CreateModel(arg0 context.Context, arg1 model. } // CreateModel indicates an expected call of CreateModel. -func (mr *MockReadOnlyModelServiceMockRecorder) CreateModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockReadOnlyModelServiceMockRecorder) CreateModel(arg0, arg1, arg2 any) *MockReadOnlyModelServiceCreateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockReadOnlyModelService)(nil).CreateModel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateModel", reflect.TypeOf((*MockReadOnlyModelService)(nil).CreateModel), arg0, arg1, arg2) + return &MockReadOnlyModelServiceCreateModelCall{Call: call} +} + +// MockReadOnlyModelServiceCreateModelCall wrap *gomock.Call +type MockReadOnlyModelServiceCreateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReadOnlyModelServiceCreateModelCall) Return(arg0 error) *MockReadOnlyModelServiceCreateModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReadOnlyModelServiceCreateModelCall) Do(f func(context.Context, model.UUID, uuid.UUID) error) *MockReadOnlyModelServiceCreateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReadOnlyModelServiceCreateModelCall) DoAndReturn(f func(context.Context, model.UUID, uuid.UUID) error) *MockReadOnlyModelServiceCreateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteModel mocks base method. @@ -134,9 +230,33 @@ func (m *MockReadOnlyModelService) DeleteModel(arg0 context.Context, arg1 model. } // DeleteModel indicates an expected call of DeleteModel. -func (mr *MockReadOnlyModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *gomock.Call { +func (mr *MockReadOnlyModelServiceMockRecorder) DeleteModel(arg0, arg1 any) *MockReadOnlyModelServiceDeleteModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockReadOnlyModelService)(nil).DeleteModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteModel", reflect.TypeOf((*MockReadOnlyModelService)(nil).DeleteModel), arg0, arg1) + return &MockReadOnlyModelServiceDeleteModelCall{Call: call} +} + +// MockReadOnlyModelServiceDeleteModelCall wrap *gomock.Call +type MockReadOnlyModelServiceDeleteModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReadOnlyModelServiceDeleteModelCall) Return(arg0 error) *MockReadOnlyModelServiceDeleteModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReadOnlyModelServiceDeleteModelCall) Do(f func(context.Context, model.UUID) error) *MockReadOnlyModelServiceDeleteModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReadOnlyModelServiceDeleteModelCall) DoAndReturn(f func(context.Context, model.UUID) error) *MockReadOnlyModelServiceDeleteModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUserService is a mock of UserService interface. @@ -172,9 +292,33 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -210,7 +354,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/model/modelmigration/package_test.go b/domain/model/modelmigration/package_test.go index 5070cbd0aa0..9756b4ee265 100644 --- a/domain/model/modelmigration/package_test.go +++ b/domain/model/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/model/modelmigration ModelService,ReadOnlyModelService,UserService,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/model/modelmigration ModelService,ReadOnlyModelService,UserService,ControllerConfigService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/modelconfig/modelmigration/migrations_mock_test.go b/domain/modelconfig/modelmigration/migrations_mock_test.go index 87944087bed..ba0780e9f92 100644 --- a/domain/modelconfig/modelmigration/migrations_mock_test.go +++ b/domain/modelconfig/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/modelconfig/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/modelconfig/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -85,9 +109,33 @@ func (m *MockImportService) SetModelConfig(arg0 context.Context, arg1 map[string } // SetModelConfig indicates an expected call of SetModelConfig. -func (mr *MockImportServiceMockRecorder) SetModelConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) SetModelConfig(arg0, arg1 any) *MockImportServiceSetModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelConfig", reflect.TypeOf((*MockImportService)(nil).SetModelConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelConfig", reflect.TypeOf((*MockImportService)(nil).SetModelConfig), arg0, arg1) + return &MockImportServiceSetModelConfigCall{Call: call} +} + +// MockImportServiceSetModelConfigCall wrap *gomock.Call +type MockImportServiceSetModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceSetModelConfigCall) Return(arg0 error) *MockImportServiceSetModelConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceSetModelConfigCall) Do(f func(context.Context, map[string]any) error) *MockImportServiceSetModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceSetModelConfigCall) DoAndReturn(f func(context.Context, map[string]any) error) *MockImportServiceSetModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -123,7 +171,31 @@ func (m *MockExportService) ModelConfig(arg0 context.Context) (*config.Config, e } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockExportServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) ModelConfig(arg0 any) *MockExportServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockExportService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockExportService)(nil).ModelConfig), arg0) + return &MockExportServiceModelConfigCall{Call: call} +} + +// MockExportServiceModelConfigCall wrap *gomock.Call +type MockExportServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockExportServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockExportServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockExportServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/modelconfig/modelmigration/package_test.go b/domain/modelconfig/modelmigration/package_test.go index 481d03d5cb8..a9ed6bc1f6c 100644 --- a/domain/modelconfig/modelmigration/package_test.go +++ b/domain/modelconfig/modelmigration/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/modelconfig/modelmigration Coordinator,ImportService,ExportService -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination service_mock_test.go github.com/juju/juju/domain/modelconfig/service ModelDefaultsProvider +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/modelconfig/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination service_mock_test.go github.com/juju/juju/domain/modelconfig/service ModelDefaultsProvider func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/modelconfig/modelmigration/service_mock_test.go b/domain/modelconfig/modelmigration/service_mock_test.go index a72ea36931f..d9a45cf44f4 100644 --- a/domain/modelconfig/modelmigration/service_mock_test.go +++ b/domain/modelconfig/modelmigration/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination service_mock_test.go github.com/juju/juju/domain/modelconfig/service ModelDefaultsProvider +// mockgen -typed -package modelmigration -destination service_mock_test.go github.com/juju/juju/domain/modelconfig/service ModelDefaultsProvider // // Package modelmigration is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockModelDefaultsProvider) ModelDefaults(arg0 context.Context) (modelde } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockModelDefaultsProviderMockRecorder) ModelDefaults(arg0 any) *gomock.Call { +func (mr *MockModelDefaultsProviderMockRecorder) ModelDefaults(arg0 any) *MockModelDefaultsProviderModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockModelDefaultsProvider)(nil).ModelDefaults), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockModelDefaultsProvider)(nil).ModelDefaults), arg0) + return &MockModelDefaultsProviderModelDefaultsCall{Call: call} +} + +// MockModelDefaultsProviderModelDefaultsCall wrap *gomock.Call +type MockModelDefaultsProviderModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelDefaultsProviderModelDefaultsCall) Return(arg0 modeldefaults.Defaults, arg1 error) *MockModelDefaultsProviderModelDefaultsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelDefaultsProviderModelDefaultsCall) Do(f func(context.Context) (modeldefaults.Defaults, error)) *MockModelDefaultsProviderModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelDefaultsProviderModelDefaultsCall) DoAndReturn(f func(context.Context) (modeldefaults.Defaults, error)) *MockModelDefaultsProviderModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/network/modelmigration/migrations_mock_test.go b/domain/network/modelmigration/migrations_mock_test.go index 2820750e236..e6b016d7b47 100644 --- a/domain/network/modelmigration/migrations_mock_test.go +++ b/domain/network/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/network/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/network/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -86,9 +110,33 @@ func (m *MockImportService) AddSpace(arg0 context.Context, arg1 network.SpaceInf } // AddSpace indicates an expected call of AddSpace. -func (mr *MockImportServiceMockRecorder) AddSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) AddSpace(arg0, arg1 any) *MockImportServiceAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockImportService)(nil).AddSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockImportService)(nil).AddSpace), arg0, arg1) + return &MockImportServiceAddSpaceCall{Call: call} +} + +// MockImportServiceAddSpaceCall wrap *gomock.Call +type MockImportServiceAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceAddSpaceCall) Return(arg0 network.Id, arg1 error) *MockImportServiceAddSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceAddSpaceCall) Do(f func(context.Context, network.SpaceInfo) (network.Id, error)) *MockImportServiceAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceAddSpaceCall) DoAndReturn(f func(context.Context, network.SpaceInfo) (network.Id, error)) *MockImportServiceAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSubnet mocks base method. @@ -101,9 +149,33 @@ func (m *MockImportService) AddSubnet(arg0 context.Context, arg1 network.SubnetI } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockImportServiceMockRecorder) AddSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) AddSubnet(arg0, arg1 any) *MockImportServiceAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockImportService)(nil).AddSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockImportService)(nil).AddSubnet), arg0, arg1) + return &MockImportServiceAddSubnetCall{Call: call} +} + +// MockImportServiceAddSubnetCall wrap *gomock.Call +type MockImportServiceAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceAddSubnetCall) Return(arg0 network.Id, arg1 error) *MockImportServiceAddSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceAddSubnetCall) Do(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockImportServiceAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceAddSubnetCall) DoAndReturn(f func(context.Context, network.SubnetInfo) (network.Id, error)) *MockImportServiceAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Space mocks base method. @@ -116,9 +188,33 @@ func (m *MockImportService) Space(arg0 context.Context, arg1 string) (*network.S } // Space indicates an expected call of Space. -func (mr *MockImportServiceMockRecorder) Space(arg0, arg1 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) Space(arg0, arg1 any) *MockImportServiceSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockImportService)(nil).Space), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockImportService)(nil).Space), arg0, arg1) + return &MockImportServiceSpaceCall{Call: call} +} + +// MockImportServiceSpaceCall wrap *gomock.Call +type MockImportServiceSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockImportServiceSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockImportServiceSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockImportServiceSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -154,9 +250,33 @@ func (m *MockExportService) GetAllSpaces(arg0 context.Context) (network.SpaceInf } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockExportServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) GetAllSpaces(arg0 any) *MockExportServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockExportService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockExportService)(nil).GetAllSpaces), arg0) + return &MockExportServiceGetAllSpacesCall{Call: call} +} + +// MockExportServiceGetAllSpacesCall wrap *gomock.Call +type MockExportServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockExportServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockExportServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockExportServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -169,7 +289,31 @@ func (m *MockExportService) GetAllSubnets(arg0 context.Context) (network.SubnetI } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockExportServiceMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) GetAllSubnets(arg0 any) *MockExportServiceGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockExportService)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockExportService)(nil).GetAllSubnets), arg0) + return &MockExportServiceGetAllSubnetsCall{Call: call} +} + +// MockExportServiceGetAllSubnetsCall wrap *gomock.Call +type MockExportServiceGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockExportServiceGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockExportServiceGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockExportServiceGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/network/modelmigration/package_test.go b/domain/network/modelmigration/package_test.go index 04758c218be..6252cf19652 100644 --- a/domain/network/modelmigration/package_test.go +++ b/domain/network/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/network/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/network/modelmigration Coordinator,ImportService,ExportService func TestPackage(t *testing.T) { gc.TestingT(t) } diff --git a/domain/network/service/package_mock_test.go b/domain/network/service/package_mock_test.go index be9eddb6b1b..dce9d0882be 100644 --- a/domain/network/service/package_mock_test.go +++ b/domain/network/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/network/service State,Logger,Provider +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/network/service State,Logger,Provider // // Package service is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockState) AddSpace(arg0 context.Context, arg1, arg2 string, arg3 netwo } // AddSpace indicates an expected call of AddSpace. -func (mr *MockStateMockRecorder) AddSpace(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddSpace(arg0, arg1, arg2, arg3, arg4 any) *MockStateAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockState)(nil).AddSpace), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockState)(nil).AddSpace), arg0, arg1, arg2, arg3, arg4) + return &MockStateAddSpaceCall{Call: call} +} + +// MockStateAddSpaceCall wrap *gomock.Call +type MockStateAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddSpaceCall) Return(arg0 error) *MockStateAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddSpaceCall) Do(f func(context.Context, string, string, network.Id, []string) error) *MockStateAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddSpaceCall) DoAndReturn(f func(context.Context, string, string, network.Id, []string) error) *MockStateAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSubnet mocks base method. @@ -68,9 +92,33 @@ func (m *MockState) AddSubnet(arg0 context.Context, arg1 network.SubnetInfo) err } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockStateMockRecorder) AddSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AddSubnet(arg0, arg1 any) *MockStateAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockState)(nil).AddSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockState)(nil).AddSubnet), arg0, arg1) + return &MockStateAddSubnetCall{Call: call} +} + +// MockStateAddSubnetCall wrap *gomock.Call +type MockStateAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAddSubnetCall) Return(arg0 error) *MockStateAddSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAddSubnetCall) Do(f func(context.Context, network.SubnetInfo) error) *MockStateAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAddSubnetCall) DoAndReturn(f func(context.Context, network.SubnetInfo) error) *MockStateAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllAssociatedSubnetsQuery mocks base method. @@ -83,9 +131,33 @@ func (m *MockState) AllAssociatedSubnetsQuery(arg0 context.Context, arg1 databas } // AllAssociatedSubnetsQuery indicates an expected call of AllAssociatedSubnetsQuery. -func (mr *MockStateMockRecorder) AllAssociatedSubnetsQuery(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AllAssociatedSubnetsQuery(arg0, arg1 any) *MockStateAllAssociatedSubnetsQueryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAssociatedSubnetsQuery", reflect.TypeOf((*MockState)(nil).AllAssociatedSubnetsQuery), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllAssociatedSubnetsQuery", reflect.TypeOf((*MockState)(nil).AllAssociatedSubnetsQuery), arg0, arg1) + return &MockStateAllAssociatedSubnetsQueryCall{Call: call} +} + +// MockStateAllAssociatedSubnetsQueryCall wrap *gomock.Call +type MockStateAllAssociatedSubnetsQueryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllAssociatedSubnetsQueryCall) Return(arg0 []string, arg1 error) *MockStateAllAssociatedSubnetsQueryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllAssociatedSubnetsQueryCall) Do(f func(context.Context, database.TxnRunner) ([]string, error)) *MockStateAllAssociatedSubnetsQueryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllAssociatedSubnetsQueryCall) DoAndReturn(f func(context.Context, database.TxnRunner) ([]string, error)) *MockStateAllAssociatedSubnetsQueryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllSubnetsQuery mocks base method. @@ -98,9 +170,33 @@ func (m *MockState) AllSubnetsQuery(arg0 context.Context, arg1 database.TxnRunne } // AllSubnetsQuery indicates an expected call of AllSubnetsQuery. -func (mr *MockStateMockRecorder) AllSubnetsQuery(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AllSubnetsQuery(arg0, arg1 any) *MockStateAllSubnetsQueryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSubnetsQuery", reflect.TypeOf((*MockState)(nil).AllSubnetsQuery), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSubnetsQuery", reflect.TypeOf((*MockState)(nil).AllSubnetsQuery), arg0, arg1) + return &MockStateAllSubnetsQueryCall{Call: call} +} + +// MockStateAllSubnetsQueryCall wrap *gomock.Call +type MockStateAllSubnetsQueryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllSubnetsQueryCall) Return(arg0 []string, arg1 error) *MockStateAllSubnetsQueryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllSubnetsQueryCall) Do(f func(context.Context, database.TxnRunner) ([]string, error)) *MockStateAllSubnetsQueryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllSubnetsQueryCall) DoAndReturn(f func(context.Context, database.TxnRunner) ([]string, error)) *MockStateAllSubnetsQueryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSpace mocks base method. @@ -112,9 +208,33 @@ func (m *MockState) DeleteSpace(arg0 context.Context, arg1 string) error { } // DeleteSpace indicates an expected call of DeleteSpace. -func (mr *MockStateMockRecorder) DeleteSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteSpace(arg0, arg1 any) *MockStateDeleteSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSpace", reflect.TypeOf((*MockState)(nil).DeleteSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSpace", reflect.TypeOf((*MockState)(nil).DeleteSpace), arg0, arg1) + return &MockStateDeleteSpaceCall{Call: call} +} + +// MockStateDeleteSpaceCall wrap *gomock.Call +type MockStateDeleteSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteSpaceCall) Return(arg0 error) *MockStateDeleteSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteSpaceCall) Do(f func(context.Context, string) error) *MockStateDeleteSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteSpaceCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSubnet mocks base method. @@ -126,9 +246,33 @@ func (m *MockState) DeleteSubnet(arg0 context.Context, arg1 string) error { } // DeleteSubnet indicates an expected call of DeleteSubnet. -func (mr *MockStateMockRecorder) DeleteSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteSubnet(arg0, arg1 any) *MockStateDeleteSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockState)(nil).DeleteSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockState)(nil).DeleteSubnet), arg0, arg1) + return &MockStateDeleteSubnetCall{Call: call} +} + +// MockStateDeleteSubnetCall wrap *gomock.Call +type MockStateDeleteSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteSubnetCall) Return(arg0 error) *MockStateDeleteSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteSubnetCall) Do(f func(context.Context, string) error) *MockStateDeleteSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteSubnetCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FanConfig mocks base method. @@ -141,9 +285,33 @@ func (m *MockState) FanConfig(arg0 context.Context) (string, error) { } // FanConfig indicates an expected call of FanConfig. -func (mr *MockStateMockRecorder) FanConfig(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) FanConfig(arg0 any) *MockStateFanConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FanConfig", reflect.TypeOf((*MockState)(nil).FanConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FanConfig", reflect.TypeOf((*MockState)(nil).FanConfig), arg0) + return &MockStateFanConfigCall{Call: call} +} + +// MockStateFanConfigCall wrap *gomock.Call +type MockStateFanConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateFanConfigCall) Return(arg0 string, arg1 error) *MockStateFanConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateFanConfigCall) Do(f func(context.Context) (string, error)) *MockStateFanConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateFanConfigCall) DoAndReturn(f func(context.Context) (string, error)) *MockStateFanConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSpaces mocks base method. @@ -156,9 +324,33 @@ func (m *MockState) GetAllSpaces(arg0 context.Context) (network.SpaceInfos, erro } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockStateMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetAllSpaces(arg0 any) *MockStateGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockState)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockState)(nil).GetAllSpaces), arg0) + return &MockStateGetAllSpacesCall{Call: call} +} + +// MockStateGetAllSpacesCall wrap *gomock.Call +type MockStateGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockStateGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockStateGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockStateGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetAllSubnets mocks base method. @@ -171,9 +363,33 @@ func (m *MockState) GetAllSubnets(arg0 context.Context) (network.SubnetInfos, er } // GetAllSubnets indicates an expected call of GetAllSubnets. -func (mr *MockStateMockRecorder) GetAllSubnets(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetAllSubnets(arg0 any) *MockStateGetAllSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockState)(nil).GetAllSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSubnets", reflect.TypeOf((*MockState)(nil).GetAllSubnets), arg0) + return &MockStateGetAllSubnetsCall{Call: call} +} + +// MockStateGetAllSubnetsCall wrap *gomock.Call +type MockStateGetAllSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetAllSubnetsCall) Return(arg0 network.SubnetInfos, arg1 error) *MockStateGetAllSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetAllSubnetsCall) Do(f func(context.Context) (network.SubnetInfos, error)) *MockStateGetAllSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetAllSubnetsCall) DoAndReturn(f func(context.Context) (network.SubnetInfos, error)) *MockStateGetAllSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSpace mocks base method. @@ -186,9 +402,33 @@ func (m *MockState) GetSpace(arg0 context.Context, arg1 string) (*network.SpaceI } // GetSpace indicates an expected call of GetSpace. -func (mr *MockStateMockRecorder) GetSpace(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSpace(arg0, arg1 any) *MockStateGetSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpace", reflect.TypeOf((*MockState)(nil).GetSpace), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpace", reflect.TypeOf((*MockState)(nil).GetSpace), arg0, arg1) + return &MockStateGetSpaceCall{Call: call} +} + +// MockStateGetSpaceCall wrap *gomock.Call +type MockStateGetSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockStateGetSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockStateGetSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockStateGetSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSpaceByName mocks base method. @@ -201,9 +441,33 @@ func (m *MockState) GetSpaceByName(arg0 context.Context, arg1 string) (*network. } // GetSpaceByName indicates an expected call of GetSpaceByName. -func (mr *MockStateMockRecorder) GetSpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSpaceByName(arg0, arg1 any) *MockStateGetSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpaceByName", reflect.TypeOf((*MockState)(nil).GetSpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpaceByName", reflect.TypeOf((*MockState)(nil).GetSpaceByName), arg0, arg1) + return &MockStateGetSpaceByNameCall{Call: call} +} + +// MockStateGetSpaceByNameCall wrap *gomock.Call +type MockStateGetSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockStateGetSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockStateGetSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockStateGetSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSubnet mocks base method. @@ -216,9 +480,33 @@ func (m *MockState) GetSubnet(arg0 context.Context, arg1 string) (*network.Subne } // GetSubnet indicates an expected call of GetSubnet. -func (mr *MockStateMockRecorder) GetSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSubnet(arg0, arg1 any) *MockStateGetSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockState)(nil).GetSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockState)(nil).GetSubnet), arg0, arg1) + return &MockStateGetSubnetCall{Call: call} +} + +// MockStateGetSubnetCall wrap *gomock.Call +type MockStateGetSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSubnetCall) Return(arg0 *network.SubnetInfo, arg1 error) *MockStateGetSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSubnetCall) Do(f func(context.Context, string) (*network.SubnetInfo, error)) *MockStateGetSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSubnetCall) DoAndReturn(f func(context.Context, string) (*network.SubnetInfo, error)) *MockStateGetSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSubnetsByCIDR mocks base method. @@ -235,10 +523,34 @@ func (m *MockState) GetSubnetsByCIDR(arg0 context.Context, arg1 ...string) (netw } // GetSubnetsByCIDR indicates an expected call of GetSubnetsByCIDR. -func (mr *MockStateMockRecorder) GetSubnetsByCIDR(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSubnetsByCIDR(arg0 any, arg1 ...any) *MockStateGetSubnetsByCIDRCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetsByCIDR", reflect.TypeOf((*MockState)(nil).GetSubnetsByCIDR), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetsByCIDR", reflect.TypeOf((*MockState)(nil).GetSubnetsByCIDR), varargs...) + return &MockStateGetSubnetsByCIDRCall{Call: call} +} + +// MockStateGetSubnetsByCIDRCall wrap *gomock.Call +type MockStateGetSubnetsByCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSubnetsByCIDRCall) Return(arg0 network.SubnetInfos, arg1 error) *MockStateGetSubnetsByCIDRCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSubnetsByCIDRCall) Do(f func(context.Context, ...string) (network.SubnetInfos, error)) *MockStateGetSubnetsByCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSubnetsByCIDRCall) DoAndReturn(f func(context.Context, ...string) (network.SubnetInfos, error)) *MockStateGetSubnetsByCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSpace mocks base method. @@ -250,9 +562,33 @@ func (m *MockState) UpdateSpace(arg0 context.Context, arg1, arg2 string) error { } // UpdateSpace indicates an expected call of UpdateSpace. -func (mr *MockStateMockRecorder) UpdateSpace(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateSpace(arg0, arg1, arg2 any) *MockStateUpdateSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSpace", reflect.TypeOf((*MockState)(nil).UpdateSpace), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSpace", reflect.TypeOf((*MockState)(nil).UpdateSpace), arg0, arg1, arg2) + return &MockStateUpdateSpaceCall{Call: call} +} + +// MockStateUpdateSpaceCall wrap *gomock.Call +type MockStateUpdateSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateSpaceCall) Return(arg0 error) *MockStateUpdateSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateSpaceCall) Do(f func(context.Context, string, string) error) *MockStateUpdateSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateSpaceCall) DoAndReturn(f func(context.Context, string, string) error) *MockStateUpdateSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSubnet mocks base method. @@ -264,9 +600,33 @@ func (m *MockState) UpdateSubnet(arg0 context.Context, arg1, arg2 string) error } // UpdateSubnet indicates an expected call of UpdateSubnet. -func (mr *MockStateMockRecorder) UpdateSubnet(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateSubnet(arg0, arg1, arg2 any) *MockStateUpdateSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSubnet", reflect.TypeOf((*MockState)(nil).UpdateSubnet), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSubnet", reflect.TypeOf((*MockState)(nil).UpdateSubnet), arg0, arg1, arg2) + return &MockStateUpdateSubnetCall{Call: call} +} + +// MockStateUpdateSubnetCall wrap *gomock.Call +type MockStateUpdateSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateSubnetCall) Return(arg0 error) *MockStateUpdateSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateSubnetCall) Do(f func(context.Context, string, string) error) *MockStateUpdateSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateSubnetCall) DoAndReturn(f func(context.Context, string, string) error) *MockStateUpdateSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpsertSubnets mocks base method. @@ -278,9 +638,33 @@ func (m *MockState) UpsertSubnets(arg0 context.Context, arg1 []network.SubnetInf } // UpsertSubnets indicates an expected call of UpsertSubnets. -func (mr *MockStateMockRecorder) UpsertSubnets(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpsertSubnets(arg0, arg1 any) *MockStateUpsertSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertSubnets", reflect.TypeOf((*MockState)(nil).UpsertSubnets), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertSubnets", reflect.TypeOf((*MockState)(nil).UpsertSubnets), arg0, arg1) + return &MockStateUpsertSubnetsCall{Call: call} +} + +// MockStateUpsertSubnetsCall wrap *gomock.Call +type MockStateUpsertSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpsertSubnetsCall) Return(arg0 error) *MockStateUpsertSubnetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpsertSubnetsCall) Do(f func(context.Context, []network.SubnetInfo) error) *MockStateUpsertSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpsertSubnetsCall) DoAndReturn(f func(context.Context, []network.SubnetInfo) error) *MockStateUpsertSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -317,10 +701,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -334,10 +742,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -351,10 +783,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProvider is a mock of Provider interface. @@ -390,9 +846,33 @@ func (m *MockProvider) AllocateContainerAddresses(arg0 envcontext.ProviderCallCo } // AllocateContainerAddresses indicates an expected call of AllocateContainerAddresses. -func (mr *MockProviderMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockProviderMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *MockProviderAllocateContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockProvider)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockProvider)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + return &MockProviderAllocateContainerAddressesCall{Call: call} +} + +// MockProviderAllocateContainerAddressesCall wrap *gomock.Call +type MockProviderAllocateContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderAllocateContainerAddressesCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockProviderAllocateContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderAllocateContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockProviderAllocateContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderAllocateContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockProviderAllocateContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInterfaces mocks base method. @@ -405,9 +885,33 @@ func (m *MockProvider) NetworkInterfaces(arg0 envcontext.ProviderCallContext, ar } // NetworkInterfaces indicates an expected call of NetworkInterfaces. -func (mr *MockProviderMockRecorder) NetworkInterfaces(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) NetworkInterfaces(arg0, arg1 any) *MockProviderNetworkInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockProvider)(nil).NetworkInterfaces), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockProvider)(nil).NetworkInterfaces), arg0, arg1) + return &MockProviderNetworkInterfacesCall{Call: call} +} + +// MockProviderNetworkInterfacesCall wrap *gomock.Call +type MockProviderNetworkInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderNetworkInterfacesCall) Return(arg0 []network.InterfaceInfos, arg1 error) *MockProviderNetworkInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderNetworkInterfacesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockProviderNetworkInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderNetworkInterfacesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockProviderNetworkInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderSpaceInfo mocks base method. @@ -420,9 +924,33 @@ func (m *MockProvider) ProviderSpaceInfo(arg0 envcontext.ProviderCallContext, ar } // ProviderSpaceInfo indicates an expected call of ProviderSpaceInfo. -func (mr *MockProviderMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *MockProviderProviderSpaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockProvider)(nil).ProviderSpaceInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockProvider)(nil).ProviderSpaceInfo), arg0, arg1) + return &MockProviderProviderSpaceInfoCall{Call: call} +} + +// MockProviderProviderSpaceInfoCall wrap *gomock.Call +type MockProviderProviderSpaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderProviderSpaceInfoCall) Return(arg0 *environs.ProviderSpaceInfo, arg1 error) *MockProviderProviderSpaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderProviderSpaceInfoCall) Do(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockProviderProviderSpaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderProviderSpaceInfoCall) DoAndReturn(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockProviderProviderSpaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -434,9 +962,33 @@ func (m *MockProvider) ReleaseContainerAddresses(arg0 envcontext.ProviderCallCon } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockProviderMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *MockProviderReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockProvider)(nil).ReleaseContainerAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockProvider)(nil).ReleaseContainerAddresses), arg0, arg1) + return &MockProviderReleaseContainerAddressesCall{Call: call} +} + +// MockProviderReleaseContainerAddressesCall wrap *gomock.Call +type MockProviderReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderReleaseContainerAddressesCall) Return(arg0 error) *MockProviderReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderReleaseContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockProviderReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderReleaseContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockProviderReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -449,9 +1001,33 @@ func (m *MockProvider) Spaces(arg0 envcontext.ProviderCallContext) (network.Spac } // Spaces indicates an expected call of Spaces. -func (mr *MockProviderMockRecorder) Spaces(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Spaces(arg0 any) *MockProviderSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockProvider)(nil).Spaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockProvider)(nil).Spaces), arg0) + return &MockProviderSpacesCall{Call: call} +} + +// MockProviderSpacesCall wrap *gomock.Call +type MockProviderSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockProviderSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSpacesCall) Do(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockProviderSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockProviderSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -464,9 +1040,33 @@ func (m *MockProvider) Subnets(arg0 envcontext.ProviderCallContext, arg1 instanc } // Subnets indicates an expected call of Subnets. -func (mr *MockProviderMockRecorder) Subnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Subnets(arg0, arg1, arg2 any) *MockProviderSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockProvider)(nil).Subnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockProvider)(nil).Subnets), arg0, arg1, arg2) + return &MockProviderSubnetsCall{Call: call} +} + +// MockProviderSubnetsCall wrap *gomock.Call +type MockProviderSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSubnetsCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockProviderSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSubnetsCall) Do(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockProviderSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockProviderSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SuperSubnets mocks base method. @@ -479,9 +1079,33 @@ func (m *MockProvider) SuperSubnets(arg0 envcontext.ProviderCallContext) ([]stri } // SuperSubnets indicates an expected call of SuperSubnets. -func (mr *MockProviderMockRecorder) SuperSubnets(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SuperSubnets(arg0 any) *MockProviderSuperSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockProvider)(nil).SuperSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockProvider)(nil).SuperSubnets), arg0) + return &MockProviderSuperSubnetsCall{Call: call} +} + +// MockProviderSuperSubnetsCall wrap *gomock.Call +type MockProviderSuperSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSuperSubnetsCall) Return(arg0 []string, arg1 error) *MockProviderSuperSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSuperSubnetsCall) Do(f func(envcontext.ProviderCallContext) ([]string, error)) *MockProviderSuperSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSuperSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]string, error)) *MockProviderSuperSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsContainerAddresses mocks base method. @@ -494,9 +1118,33 @@ func (m *MockProvider) SupportsContainerAddresses(arg0 envcontext.ProviderCallCo } // SupportsContainerAddresses indicates an expected call of SupportsContainerAddresses. -func (mr *MockProviderMockRecorder) SupportsContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SupportsContainerAddresses(arg0 any) *MockProviderSupportsContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockProvider)(nil).SupportsContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockProvider)(nil).SupportsContainerAddresses), arg0) + return &MockProviderSupportsContainerAddressesCall{Call: call} +} + +// MockProviderSupportsContainerAddressesCall wrap *gomock.Call +type MockProviderSupportsContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSupportsContainerAddressesCall) Return(arg0 bool, arg1 error) *MockProviderSupportsContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSupportsContainerAddressesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSupportsContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaceDiscovery mocks base method. @@ -509,9 +1157,33 @@ func (m *MockProvider) SupportsSpaceDiscovery(arg0 envcontext.ProviderCallContex } // SupportsSpaceDiscovery indicates an expected call of SupportsSpaceDiscovery. -func (mr *MockProviderMockRecorder) SupportsSpaceDiscovery(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SupportsSpaceDiscovery(arg0 any) *MockProviderSupportsSpaceDiscoveryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockProvider)(nil).SupportsSpaceDiscovery), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockProvider)(nil).SupportsSpaceDiscovery), arg0) + return &MockProviderSupportsSpaceDiscoveryCall{Call: call} +} + +// MockProviderSupportsSpaceDiscoveryCall wrap *gomock.Call +type MockProviderSupportsSpaceDiscoveryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSupportsSpaceDiscoveryCall) Return(arg0 bool, arg1 error) *MockProviderSupportsSpaceDiscoveryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSupportsSpaceDiscoveryCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsSpaceDiscoveryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSupportsSpaceDiscoveryCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsSpaceDiscoveryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaces mocks base method. @@ -524,7 +1196,31 @@ func (m *MockProvider) SupportsSpaces(arg0 envcontext.ProviderCallContext) (bool } // SupportsSpaces indicates an expected call of SupportsSpaces. -func (mr *MockProviderMockRecorder) SupportsSpaces(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SupportsSpaces(arg0 any) *MockProviderSupportsSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockProvider)(nil).SupportsSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockProvider)(nil).SupportsSpaces), arg0) + return &MockProviderSupportsSpacesCall{Call: call} +} + +// MockProviderSupportsSpacesCall wrap *gomock.Call +type MockProviderSupportsSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSupportsSpacesCall) Return(arg0 bool, arg1 error) *MockProviderSupportsSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSupportsSpacesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSupportsSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockProviderSupportsSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/network/service/package_test.go b/domain/network/service/package_test.go index d5318c228a0..c6f1a6b2d55 100644 --- a/domain/network/service/package_test.go +++ b/domain/network/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/network/service State,Logger,Provider +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/network/service State,Logger,Provider func TestPackage(t *testing.T) { gc.TestingT(t) } diff --git a/domain/network/service/space_test.go b/domain/network/service/space_test.go index fbcf5bbfbb9..a49349e7f54 100644 --- a/domain/network/service/space_test.go +++ b/domain/network/service/space_test.go @@ -207,7 +207,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsWithoutSpaceUUID(c *gc.C) { s.st.EXPECT().UpsertSubnets( gomock.Any(), gomock.Any()).Do( - func(cxt context.Context, subnets []network.SubnetInfo) { + func(cxt context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].ProviderId, gc.Equals, twoSubnets[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, twoSubnets[0].AvailabilityZones) @@ -215,6 +215,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsWithoutSpaceUUID(c *gc.C) { c.Check(subnets[1].ProviderId, gc.Equals, twoSubnets[1].ProviderId) c.Check(subnets[1].AvailabilityZones, jc.SameContents, twoSubnets[1].AvailabilityZones) c.Check(subnets[1].CIDR, gc.Equals, twoSubnets[1].CIDR) + return nil }) err := NewProviderService(s.st, s.providerGetter, s.logger).saveProviderSubnets(context.Background(), twoSubnets, "", nil) @@ -238,7 +239,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsOnlyAddsSubnets(c *gc.C) { } s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].ProviderId, gc.Equals, twoSubnets[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, twoSubnets[0].AvailabilityZones) @@ -246,6 +247,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsOnlyAddsSubnets(c *gc.C) { c.Check(subnets[1].ProviderId, gc.Equals, twoSubnets[1].ProviderId) c.Check(subnets[1].AvailabilityZones, jc.SameContents, twoSubnets[1].AvailabilityZones) c.Check(subnets[1].CIDR, gc.Equals, twoSubnets[1].CIDR) + return nil }, ) @@ -261,11 +263,12 @@ func (s *spaceSuite) TestSaveProviderSubnetsOnlyAddsSubnets(c *gc.C) { } s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].ProviderId, gc.Equals, anotherSubnet[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, anotherSubnet[0].AvailabilityZones) c.Check(subnets[0].CIDR, gc.Equals, anotherSubnet[0].CIDR) + return nil }, ) @@ -285,11 +288,12 @@ func (s *spaceSuite) TestSaveProviderSubnetsOnlyIdempotent(c *gc.C) { } s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].ProviderId, gc.Equals, oneSubnet[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, oneSubnet[0].AvailabilityZones) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) + return nil }, ) @@ -298,11 +302,12 @@ func (s *spaceSuite) TestSaveProviderSubnetsOnlyIdempotent(c *gc.C) { // We expect the same subnets to be passed to the state methods. s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].ProviderId, gc.Equals, oneSubnet[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, oneSubnet[0].AvailabilityZones) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) + return nil }, ) err = NewProviderService(s.st, s.providerGetter, s.logger).saveProviderSubnets(context.Background(), oneSubnet, "", nil) @@ -335,7 +340,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsWithFAN(c *gc.C) { ) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 3) c.Check(subnets[0].ProviderId, gc.Equals, expected[0].ProviderId) c.Check(subnets[0].AvailabilityZones, jc.SameContents, expected[0].AvailabilityZones) @@ -347,6 +352,7 @@ func (s *spaceSuite) TestSaveProviderSubnetsWithFAN(c *gc.C) { c.Check(subnets[2].AvailabilityZones, jc.SameContents, expected[2].AvailabilityZones) c.Check(subnets[2].CIDR, gc.Equals, expected[2].CIDR) c.Check(subnets[2].FanInfo, gc.DeepEquals, expected[2].FanInfo) + return nil }, ) @@ -484,21 +490,23 @@ func (s *spaceSuite) TestReloadSpacesFromProvider(c *gc.C) { return nil }) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].CIDR, gc.Equals, twoSpaces[0].Subnets[0].CIDR) c.Check(subnets[1].CIDR, gc.Equals, twoSpaces[0].Subnets[1].CIDR) c.Check(subnets[0].SpaceID, gc.Equals, spUUID0) c.Check(subnets[1].SpaceID, gc.Equals, spUUID0) + return nil }, ) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].CIDR, gc.Equals, twoSpaces[1].Subnets[0].CIDR) c.Check(subnets[1].CIDR, gc.Equals, twoSpaces[1].Subnets[1].CIDR) c.Check(subnets[0].SpaceID, gc.Equals, spUUID1) c.Check(subnets[1].SpaceID, gc.Equals, spUUID1) + return nil }, ) s.logger.EXPECT().Tracef(gomock.Any()) @@ -521,10 +529,11 @@ func (s *spaceSuite) TestReloadSpacesUsingSubnets(c *gc.C) { s.logger.EXPECT().Debugf("environ does not support space discovery, falling back to subnet discovery") s.st.EXPECT().FanConfig(gomock.Any()).Return("", nil) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].CIDR, gc.Equals, twoSubnets[0].CIDR) c.Check(subnets[1].CIDR, gc.Equals, twoSubnets[1].CIDR) + return nil }, ) @@ -546,10 +555,11 @@ func (s *spaceSuite) TestReloadSpacesUsingSubnetsFailsOnSave(c *gc.C) { s.logger.EXPECT().Debugf("environ does not support space discovery, falling back to subnet discovery") s.st.EXPECT().FanConfig(gomock.Any()).Return("", nil) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 2) c.Check(subnets[0].CIDR, gc.Equals, twoSubnets[0].CIDR) c.Check(subnets[1].CIDR, gc.Equals, twoSubnets[1].CIDR) + return nil }, ).Return(errors.New("boom")) @@ -592,10 +602,11 @@ func (s *spaceSuite) TestSaveProviderSpaces(c *gc.C) { {ProviderId: network.Id("1"), Subnets: oneSubnet}, } s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) c.Check(subnets[0].SpaceID, gc.Equals, oneSubnet[0].SpaceID) + return nil }, ) @@ -639,9 +650,10 @@ func (s *spaceSuite) TestSaveProviderSpacesWithoutProviderId(c *gc.C) { }). Return(nil) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) + return nil }, ) @@ -694,9 +706,10 @@ func (s *spaceSuite) TestSaveProviderSpacesDeltaSpacesAfterNotUpdated(c *gc.C) { s.st.EXPECT().AddSpace(gomock.Any(), gomock.Any(), "empty", network.Id("2"), []string{}). Return(nil) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) + return nil }, ) @@ -829,9 +842,10 @@ func (s *spaceSuite) TestProviderSpacesRun(c *gc.C) { }). Return(nil) s.st.EXPECT().UpsertSubnets(gomock.Any(), gomock.Any()).Do( - func(ctx context.Context, subnets []network.SubnetInfo) { + func(ctx context.Context, subnets []network.SubnetInfo) error { c.Check(subnets, gc.HasLen, 1) c.Check(subnets[0].CIDR, gc.Equals, oneSubnet[0].CIDR) + return nil }, ) s.st.EXPECT().DeleteSpace(gomock.Any(), "1") diff --git a/domain/objectstore/service/package_test.go b/domain/objectstore/service/package_test.go index 9e079c8cdce..719bc91eb0e 100644 --- a/domain/objectstore/service/package_test.go +++ b/domain/objectstore/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/objectstore/service State,WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/objectstore/service State,WatcherFactory func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/objectstore/service/state_mock_test.go b/domain/objectstore/service/state_mock_test.go index 9ea664a8528..665cff59806 100644 --- a/domain/objectstore/service/state_mock_test.go +++ b/domain/objectstore/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/objectstore/service State,WatcherFactory +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/objectstore/service State,WatcherFactory // // Package service is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockState) GetMetadata(arg0 context.Context, arg1 string) (objectstore. } // GetMetadata indicates an expected call of GetMetadata. -func (mr *MockStateMockRecorder) GetMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetMetadata(arg0, arg1 any) *MockStateGetMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockState)(nil).GetMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockState)(nil).GetMetadata), arg0, arg1) + return &MockStateGetMetadataCall{Call: call} +} + +// MockStateGetMetadataCall wrap *gomock.Call +type MockStateGetMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetMetadataCall) Return(arg0 objectstore.Metadata, arg1 error) *MockStateGetMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetMetadataCall) Do(f func(context.Context, string) (objectstore.Metadata, error)) *MockStateGetMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetMetadataCall) DoAndReturn(f func(context.Context, string) (objectstore.Metadata, error)) *MockStateGetMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatement mocks base method. @@ -68,9 +92,33 @@ func (m *MockState) InitialWatchStatement() (string, string) { } // InitialWatchStatement indicates an expected call of InitialWatchStatement. -func (mr *MockStateMockRecorder) InitialWatchStatement() *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatement() *MockStateInitialWatchStatementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatement", reflect.TypeOf((*MockState)(nil).InitialWatchStatement)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatement", reflect.TypeOf((*MockState)(nil).InitialWatchStatement)) + return &MockStateInitialWatchStatementCall{Call: call} +} + +// MockStateInitialWatchStatementCall wrap *gomock.Call +type MockStateInitialWatchStatementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementCall) Return(arg0, arg1 string) *MockStateInitialWatchStatementCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementCall) Do(f func() (string, string)) *MockStateInitialWatchStatementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementCall) DoAndReturn(f func() (string, string)) *MockStateInitialWatchStatementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListMetadata mocks base method. @@ -83,9 +131,33 @@ func (m *MockState) ListMetadata(arg0 context.Context) ([]objectstore.Metadata, } // ListMetadata indicates an expected call of ListMetadata. -func (mr *MockStateMockRecorder) ListMetadata(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListMetadata(arg0 any) *MockStateListMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetadata", reflect.TypeOf((*MockState)(nil).ListMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetadata", reflect.TypeOf((*MockState)(nil).ListMetadata), arg0) + return &MockStateListMetadataCall{Call: call} +} + +// MockStateListMetadataCall wrap *gomock.Call +type MockStateListMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListMetadataCall) Return(arg0 []objectstore.Metadata, arg1 error) *MockStateListMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListMetadataCall) Do(f func(context.Context) ([]objectstore.Metadata, error)) *MockStateListMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListMetadataCall) DoAndReturn(f func(context.Context) ([]objectstore.Metadata, error)) *MockStateListMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutMetadata mocks base method. @@ -97,9 +169,33 @@ func (m *MockState) PutMetadata(arg0 context.Context, arg1 objectstore.Metadata) } // PutMetadata indicates an expected call of PutMetadata. -func (mr *MockStateMockRecorder) PutMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) PutMetadata(arg0, arg1 any) *MockStatePutMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutMetadata", reflect.TypeOf((*MockState)(nil).PutMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutMetadata", reflect.TypeOf((*MockState)(nil).PutMetadata), arg0, arg1) + return &MockStatePutMetadataCall{Call: call} +} + +// MockStatePutMetadataCall wrap *gomock.Call +type MockStatePutMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePutMetadataCall) Return(arg0 error) *MockStatePutMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePutMetadataCall) Do(f func(context.Context, objectstore.Metadata) error) *MockStatePutMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePutMetadataCall) DoAndReturn(f func(context.Context, objectstore.Metadata) error) *MockStatePutMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveMetadata mocks base method. @@ -111,9 +207,33 @@ func (m *MockState) RemoveMetadata(arg0 context.Context, arg1 string) error { } // RemoveMetadata indicates an expected call of RemoveMetadata. -func (mr *MockStateMockRecorder) RemoveMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) RemoveMetadata(arg0, arg1 any) *MockStateRemoveMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMetadata", reflect.TypeOf((*MockState)(nil).RemoveMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMetadata", reflect.TypeOf((*MockState)(nil).RemoveMetadata), arg0, arg1) + return &MockStateRemoveMetadataCall{Call: call} +} + +// MockStateRemoveMetadataCall wrap *gomock.Call +type MockStateRemoveMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateRemoveMetadataCall) Return(arg0 error) *MockStateRemoveMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateRemoveMetadataCall) Do(f func(context.Context, string) error) *MockStateRemoveMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateRemoveMetadataCall) DoAndReturn(f func(context.Context, string) error) *MockStateRemoveMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -149,7 +269,31 @@ func (m *MockWatcherFactory) NewNamespaceWatcher(arg0 string, arg1 changestream. } // NewNamespaceWatcher indicates an expected call of NewNamespaceWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewNamespaceWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewNamespaceWatcherCall{Call: call} +} + +// MockWatcherFactoryNewNamespaceWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewNamespaceWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Do(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewNamespaceWatcherCall) DoAndReturn(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/package_test.go b/domain/package_test.go index 05aa5a844e7..5cd4affaa86 100644 --- a/domain/package_test.go +++ b/domain/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package domain -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,EventSource +//go:generate go run go.uber.org/mock/mockgen -typed -package domain -destination changestream_mock_test.go github.com/juju/juju/core/changestream Subscription,EventSource func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/secret/service/package_test.go b/domain/secret/service/package_test.go index b2f0158d3e0..11ba5a1688b 100644 --- a/domain/secret/service/package_test.go +++ b/domain/secret/service/package_test.go @@ -9,11 +9,11 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/secret/service State -//go:generate go run go.uber.org/mock/mockgen -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend -//go:generate go run go.uber.org/mock/mockgen -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secret/service WatcherFactory -//go:generate go run go.uber.org/mock/mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher -//go:generate go run go.uber.org/mock/mockgen -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/secret/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secret/service WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token func Test(t *testing.T) { gc.TestingT(t) diff --git a/domain/secret/service/provider_mock_test.go b/domain/secret/service/provider_mock_test.go index 23a90b83727..f335932247a 100644 --- a/domain/secret/service/provider_mock_test.go +++ b/domain/secret/service/provider_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend +// mockgen -typed -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend // // Package service is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockSecretBackendProvider) CleanupModel(arg0 *provider.ModelBackendConf } // CleanupModel indicates an expected call of CleanupModel. -func (mr *MockSecretBackendProviderMockRecorder) CleanupModel(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) CleanupModel(arg0 any) *MockSecretBackendProviderCleanupModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupModel", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupModel", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupModel), arg0) + return &MockSecretBackendProviderCleanupModelCall{Call: call} +} + +// MockSecretBackendProviderCleanupModelCall wrap *gomock.Call +type MockSecretBackendProviderCleanupModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderCleanupModelCall) Return(arg0 error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderCleanupModelCall) Do(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderCleanupModelCall) DoAndReturn(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CleanupSecrets mocks base method. @@ -64,9 +88,33 @@ func (m *MockSecretBackendProvider) CleanupSecrets(arg0 context.Context, arg1 *p } // CleanupSecrets indicates an expected call of CleanupSecrets. -func (mr *MockSecretBackendProviderMockRecorder) CleanupSecrets(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) CleanupSecrets(arg0, arg1, arg2, arg3 any) *MockSecretBackendProviderCleanupSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupSecrets", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupSecrets), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupSecrets", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupSecrets), arg0, arg1, arg2, arg3) + return &MockSecretBackendProviderCleanupSecretsCall{Call: call} +} + +// MockSecretBackendProviderCleanupSecretsCall wrap *gomock.Call +type MockSecretBackendProviderCleanupSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderCleanupSecretsCall) Return(arg0 error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderCleanupSecretsCall) Do(f func(context.Context, *provider.ModelBackendConfig, string, provider.SecretRevisions) error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderCleanupSecretsCall) DoAndReturn(f func(context.Context, *provider.ModelBackendConfig, string, provider.SecretRevisions) error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Initialise mocks base method. @@ -78,9 +126,33 @@ func (m *MockSecretBackendProvider) Initialise(arg0 *provider.ModelBackendConfig } // Initialise indicates an expected call of Initialise. -func (mr *MockSecretBackendProviderMockRecorder) Initialise(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) Initialise(arg0 any) *MockSecretBackendProviderInitialiseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockSecretBackendProvider)(nil).Initialise), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockSecretBackendProvider)(nil).Initialise), arg0) + return &MockSecretBackendProviderInitialiseCall{Call: call} +} + +// MockSecretBackendProviderInitialiseCall wrap *gomock.Call +type MockSecretBackendProviderInitialiseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderInitialiseCall) Return(arg0 error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderInitialiseCall) Do(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderInitialiseCall) DoAndReturn(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewBackend mocks base method. @@ -93,9 +165,33 @@ func (m *MockSecretBackendProvider) NewBackend(arg0 *provider.ModelBackendConfig } // NewBackend indicates an expected call of NewBackend. -func (mr *MockSecretBackendProviderMockRecorder) NewBackend(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) NewBackend(arg0 any) *MockSecretBackendProviderNewBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBackend", reflect.TypeOf((*MockSecretBackendProvider)(nil).NewBackend), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBackend", reflect.TypeOf((*MockSecretBackendProvider)(nil).NewBackend), arg0) + return &MockSecretBackendProviderNewBackendCall{Call: call} +} + +// MockSecretBackendProviderNewBackendCall wrap *gomock.Call +type MockSecretBackendProviderNewBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderNewBackendCall) Return(arg0 provider.SecretsBackend, arg1 error) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderNewBackendCall) Do(f func(*provider.ModelBackendConfig) (provider.SecretsBackend, error)) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderNewBackendCall) DoAndReturn(f func(*provider.ModelBackendConfig) (provider.SecretsBackend, error)) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RestrictedConfig mocks base method. @@ -108,9 +204,33 @@ func (m *MockSecretBackendProvider) RestrictedConfig(arg0 context.Context, arg1 } // RestrictedConfig indicates an expected call of RestrictedConfig. -func (mr *MockSecretBackendProviderMockRecorder) RestrictedConfig(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) RestrictedConfig(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockSecretBackendProviderRestrictedConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictedConfig", reflect.TypeOf((*MockSecretBackendProvider)(nil).RestrictedConfig), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictedConfig", reflect.TypeOf((*MockSecretBackendProvider)(nil).RestrictedConfig), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockSecretBackendProviderRestrictedConfigCall{Call: call} +} + +// MockSecretBackendProviderRestrictedConfigCall wrap *gomock.Call +type MockSecretBackendProviderRestrictedConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderRestrictedConfigCall) Return(arg0 *provider.BackendConfig, arg1 error) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderRestrictedConfigCall) Do(f func(context.Context, *provider.ModelBackendConfig, bool, bool, secrets.Accessor, provider.SecretRevisions, provider.SecretRevisions) (*provider.BackendConfig, error)) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderRestrictedConfigCall) DoAndReturn(f func(context.Context, *provider.ModelBackendConfig, bool, bool, secrets.Accessor, provider.SecretRevisions, provider.SecretRevisions) (*provider.BackendConfig, error)) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -122,9 +242,33 @@ func (m *MockSecretBackendProvider) Type() string { } // Type indicates an expected call of Type. -func (mr *MockSecretBackendProviderMockRecorder) Type() *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) Type() *MockSecretBackendProviderTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockSecretBackendProvider)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockSecretBackendProvider)(nil).Type)) + return &MockSecretBackendProviderTypeCall{Call: call} +} + +// MockSecretBackendProviderTypeCall wrap *gomock.Call +type MockSecretBackendProviderTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderTypeCall) Return(arg0 string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderTypeCall) Do(f func() string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderTypeCall) DoAndReturn(f func() string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsBackend is a mock of SecretsBackend interface. @@ -159,9 +303,33 @@ func (m *MockSecretsBackend) DeleteContent(arg0 context.Context, arg1 string) er } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *MockSecretsBackendDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + return &MockSecretsBackendDeleteContentCall{Call: call} +} + +// MockSecretsBackendDeleteContentCall wrap *gomock.Call +type MockSecretsBackendDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteContentCall) Return(arg0 error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteContentCall) Do(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteContentCall) DoAndReturn(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -174,9 +342,33 @@ func (m *MockSecretsBackend) GetContent(arg0 context.Context, arg1 string) (secr } // GetContent indicates an expected call of GetContent. -func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *MockSecretsBackendGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + return &MockSecretsBackendGetContentCall{Call: call} +} + +// MockSecretsBackendGetContentCall wrap *gomock.Call +type MockSecretsBackendGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendGetContentCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendGetContentCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -188,9 +380,33 @@ func (m *MockSecretsBackend) Ping() error { } // Ping indicates an expected call of Ping. -func (mr *MockSecretsBackendMockRecorder) Ping() *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) Ping() *MockSecretsBackendPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + return &MockSecretsBackendPingCall{Call: call} +} + +// MockSecretsBackendPingCall wrap *gomock.Call +type MockSecretsBackendPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendPingCall) Return(arg0 error) *MockSecretsBackendPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendPingCall) Do(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendPingCall) DoAndReturn(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -203,7 +419,31 @@ func (m *MockSecretsBackend) SaveContent(arg0 context.Context, arg1 *secrets.URI } // SaveContent indicates an expected call of SaveContent. -func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *MockSecretsBackendSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + return &MockSecretsBackendSaveContentCall{Call: call} +} + +// MockSecretsBackendSaveContentCall wrap *gomock.Call +type MockSecretsBackendSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendSaveContentCall) Return(arg0 string, arg1 error) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendSaveContentCall) Do(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendSaveContentCall) DoAndReturn(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secret/service/state_mock_test.go b/domain/secret/service/state_mock_test.go index 1fac59e6de9..b635f1f6e02 100644 --- a/domain/secret/service/state_mock_test.go +++ b/domain/secret/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/secret/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/secret/service State // // Package service is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockState) CreateCharmApplicationSecret(arg0 context.Context, arg1 int, } // CreateCharmApplicationSecret indicates an expected call of CreateCharmApplicationSecret. -func (mr *MockStateMockRecorder) CreateCharmApplicationSecret(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateCharmApplicationSecret(arg0, arg1, arg2, arg3, arg4 any) *MockStateCreateCharmApplicationSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmApplicationSecret", reflect.TypeOf((*MockState)(nil).CreateCharmApplicationSecret), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmApplicationSecret", reflect.TypeOf((*MockState)(nil).CreateCharmApplicationSecret), arg0, arg1, arg2, arg3, arg4) + return &MockStateCreateCharmApplicationSecretCall{Call: call} +} + +// MockStateCreateCharmApplicationSecretCall wrap *gomock.Call +type MockStateCreateCharmApplicationSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateCharmApplicationSecretCall) Return(arg0 error) *MockStateCreateCharmApplicationSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateCharmApplicationSecretCall) Do(f func(context.Context, int, *secrets.URI, string, secret.UpsertSecretParams) error) *MockStateCreateCharmApplicationSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateCharmApplicationSecretCall) DoAndReturn(f func(context.Context, int, *secrets.URI, string, secret.UpsertSecretParams) error) *MockStateCreateCharmApplicationSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCharmUnitSecret mocks base method. @@ -65,9 +89,33 @@ func (m *MockState) CreateCharmUnitSecret(arg0 context.Context, arg1 int, arg2 * } // CreateCharmUnitSecret indicates an expected call of CreateCharmUnitSecret. -func (mr *MockStateMockRecorder) CreateCharmUnitSecret(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateCharmUnitSecret(arg0, arg1, arg2, arg3, arg4 any) *MockStateCreateCharmUnitSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmUnitSecret", reflect.TypeOf((*MockState)(nil).CreateCharmUnitSecret), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCharmUnitSecret", reflect.TypeOf((*MockState)(nil).CreateCharmUnitSecret), arg0, arg1, arg2, arg3, arg4) + return &MockStateCreateCharmUnitSecretCall{Call: call} +} + +// MockStateCreateCharmUnitSecretCall wrap *gomock.Call +type MockStateCreateCharmUnitSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateCharmUnitSecretCall) Return(arg0 error) *MockStateCreateCharmUnitSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateCharmUnitSecretCall) Do(f func(context.Context, int, *secrets.URI, string, secret.UpsertSecretParams) error) *MockStateCreateCharmUnitSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateCharmUnitSecretCall) DoAndReturn(f func(context.Context, int, *secrets.URI, string, secret.UpsertSecretParams) error) *MockStateCreateCharmUnitSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateUserSecret mocks base method. @@ -79,9 +127,33 @@ func (m *MockState) CreateUserSecret(arg0 context.Context, arg1 int, arg2 *secre } // CreateUserSecret indicates an expected call of CreateUserSecret. -func (mr *MockStateMockRecorder) CreateUserSecret(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateUserSecret(arg0, arg1, arg2, arg3 any) *MockStateCreateUserSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUserSecret", reflect.TypeOf((*MockState)(nil).CreateUserSecret), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUserSecret", reflect.TypeOf((*MockState)(nil).CreateUserSecret), arg0, arg1, arg2, arg3) + return &MockStateCreateUserSecretCall{Call: call} +} + +// MockStateCreateUserSecretCall wrap *gomock.Call +type MockStateCreateUserSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateUserSecretCall) Return(arg0 error) *MockStateCreateUserSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateUserSecretCall) Do(f func(context.Context, int, *secrets.URI, secret.UpsertSecretParams) error) *MockStateCreateUserSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateUserSecretCall) DoAndReturn(f func(context.Context, int, *secrets.URI, secret.UpsertSecretParams) error) *MockStateCreateUserSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecret mocks base method. @@ -93,9 +165,33 @@ func (m *MockState) DeleteSecret(arg0 context.Context, arg1 *secrets.URI, arg2 [ } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockStateMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *MockStateDeleteSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockState)(nil).DeleteSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockState)(nil).DeleteSecret), arg0, arg1, arg2) + return &MockStateDeleteSecretCall{Call: call} +} + +// MockStateDeleteSecretCall wrap *gomock.Call +type MockStateDeleteSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteSecretCall) Return(arg0 error) *MockStateDeleteSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteSecretCall) Do(f func(context.Context, *secrets.URI, []int) error) *MockStateDeleteSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, []int) error) *MockStateDeleteSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumedRemoteSecretURIsWithChanges mocks base method. @@ -112,10 +208,34 @@ func (m *MockState) GetConsumedRemoteSecretURIsWithChanges(arg0 context.Context, } // GetConsumedRemoteSecretURIsWithChanges indicates an expected call of GetConsumedRemoteSecretURIsWithChanges. -func (mr *MockStateMockRecorder) GetConsumedRemoteSecretURIsWithChanges(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetConsumedRemoteSecretURIsWithChanges(arg0, arg1 any, arg2 ...any) *MockStateGetConsumedRemoteSecretURIsWithChangesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRemoteSecretURIsWithChanges", reflect.TypeOf((*MockState)(nil).GetConsumedRemoteSecretURIsWithChanges), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedRemoteSecretURIsWithChanges", reflect.TypeOf((*MockState)(nil).GetConsumedRemoteSecretURIsWithChanges), varargs...) + return &MockStateGetConsumedRemoteSecretURIsWithChangesCall{Call: call} +} + +// MockStateGetConsumedRemoteSecretURIsWithChangesCall wrap *gomock.Call +type MockStateGetConsumedRemoteSecretURIsWithChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetConsumedRemoteSecretURIsWithChangesCall) Return(arg0 []string, arg1 error) *MockStateGetConsumedRemoteSecretURIsWithChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetConsumedRemoteSecretURIsWithChangesCall) Do(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetConsumedRemoteSecretURIsWithChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetConsumedRemoteSecretURIsWithChangesCall) DoAndReturn(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetConsumedRemoteSecretURIsWithChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumedSecretURIsWithChanges mocks base method. @@ -132,10 +252,34 @@ func (m *MockState) GetConsumedSecretURIsWithChanges(arg0 context.Context, arg1 } // GetConsumedSecretURIsWithChanges indicates an expected call of GetConsumedSecretURIsWithChanges. -func (mr *MockStateMockRecorder) GetConsumedSecretURIsWithChanges(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetConsumedSecretURIsWithChanges(arg0, arg1 any, arg2 ...any) *MockStateGetConsumedSecretURIsWithChangesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedSecretURIsWithChanges", reflect.TypeOf((*MockState)(nil).GetConsumedSecretURIsWithChanges), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumedSecretURIsWithChanges", reflect.TypeOf((*MockState)(nil).GetConsumedSecretURIsWithChanges), varargs...) + return &MockStateGetConsumedSecretURIsWithChangesCall{Call: call} +} + +// MockStateGetConsumedSecretURIsWithChangesCall wrap *gomock.Call +type MockStateGetConsumedSecretURIsWithChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetConsumedSecretURIsWithChangesCall) Return(arg0 []string, arg1 error) *MockStateGetConsumedSecretURIsWithChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetConsumedSecretURIsWithChangesCall) Do(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetConsumedSecretURIsWithChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetConsumedSecretURIsWithChangesCall) DoAndReturn(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetConsumedSecretURIsWithChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetModelUUID mocks base method. @@ -148,9 +292,33 @@ func (m *MockState) GetModelUUID(arg0 context.Context) (string, error) { } // GetModelUUID indicates an expected call of GetModelUUID. -func (mr *MockStateMockRecorder) GetModelUUID(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetModelUUID(arg0 any) *MockStateGetModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelUUID", reflect.TypeOf((*MockState)(nil).GetModelUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelUUID", reflect.TypeOf((*MockState)(nil).GetModelUUID), arg0) + return &MockStateGetModelUUIDCall{Call: call} +} + +// MockStateGetModelUUIDCall wrap *gomock.Call +type MockStateGetModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetModelUUIDCall) Return(arg0 string, arg1 error) *MockStateGetModelUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetModelUUIDCall) Do(f func(context.Context) (string, error)) *MockStateGetModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetModelUUIDCall) DoAndReturn(f func(context.Context) (string, error)) *MockStateGetModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRemoteConsumedSecretURIsWithChangesFromOfferingSide mocks base method. @@ -167,10 +335,34 @@ func (m *MockState) GetRemoteConsumedSecretURIsWithChangesFromOfferingSide(arg0 } // GetRemoteConsumedSecretURIsWithChangesFromOfferingSide indicates an expected call of GetRemoteConsumedSecretURIsWithChangesFromOfferingSide. -func (mr *MockStateMockRecorder) GetRemoteConsumedSecretURIsWithChangesFromOfferingSide(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetRemoteConsumedSecretURIsWithChangesFromOfferingSide(arg0, arg1 any, arg2 ...any) *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteConsumedSecretURIsWithChangesFromOfferingSide", reflect.TypeOf((*MockState)(nil).GetRemoteConsumedSecretURIsWithChangesFromOfferingSide), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRemoteConsumedSecretURIsWithChangesFromOfferingSide", reflect.TypeOf((*MockState)(nil).GetRemoteConsumedSecretURIsWithChangesFromOfferingSide), varargs...) + return &MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall{Call: call} +} + +// MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall wrap *gomock.Call +type MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall) Return(arg0 []string, arg1 error) *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall) Do(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall) DoAndReturn(f func(context.Context, string, ...string) ([]string, error)) *MockStateGetRemoteConsumedSecretURIsWithChangesFromOfferingSideCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRevisionIDsForObsolete mocks base method. @@ -187,10 +379,34 @@ func (m *MockState) GetRevisionIDsForObsolete(arg0 context.Context, arg1 secret. } // GetRevisionIDsForObsolete indicates an expected call of GetRevisionIDsForObsolete. -func (mr *MockStateMockRecorder) GetRevisionIDsForObsolete(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetRevisionIDsForObsolete(arg0, arg1, arg2 any, arg3 ...any) *MockStateGetRevisionIDsForObsoleteCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionIDsForObsolete", reflect.TypeOf((*MockState)(nil).GetRevisionIDsForObsolete), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionIDsForObsolete", reflect.TypeOf((*MockState)(nil).GetRevisionIDsForObsolete), varargs...) + return &MockStateGetRevisionIDsForObsoleteCall{Call: call} +} + +// MockStateGetRevisionIDsForObsoleteCall wrap *gomock.Call +type MockStateGetRevisionIDsForObsoleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetRevisionIDsForObsoleteCall) Return(arg0 []string, arg1 error) *MockStateGetRevisionIDsForObsoleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetRevisionIDsForObsoleteCall) Do(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners, ...string) ([]string, error)) *MockStateGetRevisionIDsForObsoleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetRevisionIDsForObsoleteCall) DoAndReturn(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners, ...string) ([]string, error)) *MockStateGetRevisionIDsForObsoleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecret mocks base method. @@ -203,9 +419,33 @@ func (m *MockState) GetSecret(arg0 context.Context, arg1 *secrets.URI) (*secrets } // GetSecret indicates an expected call of GetSecret. -func (mr *MockStateMockRecorder) GetSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecret(arg0, arg1 any) *MockStateGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockState)(nil).GetSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockState)(nil).GetSecret), arg0, arg1) + return &MockStateGetSecretCall{Call: call} +} + +// MockStateGetSecretCall wrap *gomock.Call +type MockStateGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretCall) Return(arg0 *secrets.SecretMetadata, arg1 error) *MockStateGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretCall) Do(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockStateGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretCall) DoAndReturn(f func(context.Context, *secrets.URI) (*secrets.SecretMetadata, error)) *MockStateGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretAccess mocks base method. @@ -218,9 +458,33 @@ func (m *MockState) GetSecretAccess(arg0 context.Context, arg1 *secrets.URI, arg } // GetSecretAccess indicates an expected call of GetSecretAccess. -func (mr *MockStateMockRecorder) GetSecretAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretAccess(arg0, arg1, arg2 any) *MockStateGetSecretAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccess", reflect.TypeOf((*MockState)(nil).GetSecretAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccess", reflect.TypeOf((*MockState)(nil).GetSecretAccess), arg0, arg1, arg2) + return &MockStateGetSecretAccessCall{Call: call} +} + +// MockStateGetSecretAccessCall wrap *gomock.Call +type MockStateGetSecretAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretAccessCall) Return(arg0 string, arg1 error) *MockStateGetSecretAccessCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretAccessCall) Do(f func(context.Context, *secrets.URI, secret.AccessParams) (string, error)) *MockStateGetSecretAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, secret.AccessParams) (string, error)) *MockStateGetSecretAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretAccessScope mocks base method. @@ -233,9 +497,33 @@ func (m *MockState) GetSecretAccessScope(arg0 context.Context, arg1 *secrets.URI } // GetSecretAccessScope indicates an expected call of GetSecretAccessScope. -func (mr *MockStateMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretAccessScope(arg0, arg1, arg2 any) *MockStateGetSecretAccessScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockState)(nil).GetSecretAccessScope), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretAccessScope", reflect.TypeOf((*MockState)(nil).GetSecretAccessScope), arg0, arg1, arg2) + return &MockStateGetSecretAccessScopeCall{Call: call} +} + +// MockStateGetSecretAccessScopeCall wrap *gomock.Call +type MockStateGetSecretAccessScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretAccessScopeCall) Return(arg0 *secret.AccessScope, arg1 error) *MockStateGetSecretAccessScopeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretAccessScopeCall) Do(f func(context.Context, *secrets.URI, secret.AccessParams) (*secret.AccessScope, error)) *MockStateGetSecretAccessScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretAccessScopeCall) DoAndReturn(f func(context.Context, *secrets.URI, secret.AccessParams) (*secret.AccessScope, error)) *MockStateGetSecretAccessScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretConsumer mocks base method. @@ -249,9 +537,33 @@ func (m *MockState) GetSecretConsumer(arg0 context.Context, arg1 *secrets.URI, a } // GetSecretConsumer indicates an expected call of GetSecretConsumer. -func (mr *MockStateMockRecorder) GetSecretConsumer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretConsumer(arg0, arg1, arg2 any) *MockStateGetSecretConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumer", reflect.TypeOf((*MockState)(nil).GetSecretConsumer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretConsumer", reflect.TypeOf((*MockState)(nil).GetSecretConsumer), arg0, arg1, arg2) + return &MockStateGetSecretConsumerCall{Call: call} +} + +// MockStateGetSecretConsumerCall wrap *gomock.Call +type MockStateGetSecretConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretConsumerCall) Return(arg0 *secrets.SecretConsumerMetadata, arg1 int, arg2 error) *MockStateGetSecretConsumerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretConsumerCall) Do(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockStateGetSecretConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockStateGetSecretConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretGrants mocks base method. @@ -264,9 +576,33 @@ func (m *MockState) GetSecretGrants(arg0 context.Context, arg1 *secrets.URI, arg } // GetSecretGrants indicates an expected call of GetSecretGrants. -func (mr *MockStateMockRecorder) GetSecretGrants(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretGrants(arg0, arg1, arg2 any) *MockStateGetSecretGrantsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockState)(nil).GetSecretGrants), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretGrants", reflect.TypeOf((*MockState)(nil).GetSecretGrants), arg0, arg1, arg2) + return &MockStateGetSecretGrantsCall{Call: call} +} + +// MockStateGetSecretGrantsCall wrap *gomock.Call +type MockStateGetSecretGrantsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretGrantsCall) Return(arg0 []secret.GrantParams, arg1 error) *MockStateGetSecretGrantsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretGrantsCall) Do(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]secret.GrantParams, error)) *MockStateGetSecretGrantsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretGrantsCall) DoAndReturn(f func(context.Context, *secrets.URI, secrets.SecretRole) ([]secret.GrantParams, error)) *MockStateGetSecretGrantsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretRemoteConsumer mocks base method. @@ -280,9 +616,33 @@ func (m *MockState) GetSecretRemoteConsumer(arg0 context.Context, arg1 *secrets. } // GetSecretRemoteConsumer indicates an expected call of GetSecretRemoteConsumer. -func (mr *MockStateMockRecorder) GetSecretRemoteConsumer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretRemoteConsumer(arg0, arg1, arg2 any) *MockStateGetSecretRemoteConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretRemoteConsumer", reflect.TypeOf((*MockState)(nil).GetSecretRemoteConsumer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretRemoteConsumer", reflect.TypeOf((*MockState)(nil).GetSecretRemoteConsumer), arg0, arg1, arg2) + return &MockStateGetSecretRemoteConsumerCall{Call: call} +} + +// MockStateGetSecretRemoteConsumerCall wrap *gomock.Call +type MockStateGetSecretRemoteConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretRemoteConsumerCall) Return(arg0 *secrets.SecretConsumerMetadata, arg1 int, arg2 error) *MockStateGetSecretRemoteConsumerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretRemoteConsumerCall) Do(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockStateGetSecretRemoteConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretRemoteConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string) (*secrets.SecretConsumerMetadata, int, error)) *MockStateGetSecretRemoteConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretValue mocks base method. @@ -296,9 +656,33 @@ func (m *MockState) GetSecretValue(arg0 context.Context, arg1 *secrets.URI, arg2 } // GetSecretValue indicates an expected call of GetSecretValue. -func (mr *MockStateMockRecorder) GetSecretValue(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretValue(arg0, arg1, arg2 any) *MockStateGetSecretValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockState)(nil).GetSecretValue), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretValue", reflect.TypeOf((*MockState)(nil).GetSecretValue), arg0, arg1, arg2) + return &MockStateGetSecretValueCall{Call: call} +} + +// MockStateGetSecretValueCall wrap *gomock.Call +type MockStateGetSecretValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretValueCall) Return(arg0 secrets.SecretData, arg1 *secrets.ValueRef, arg2 error) *MockStateGetSecretValueCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretValueCall) Do(f func(context.Context, *secrets.URI, int) (secrets.SecretData, *secrets.ValueRef, error)) *MockStateGetSecretValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretValueCall) DoAndReturn(f func(context.Context, *secrets.URI, int) (secrets.SecretData, *secrets.ValueRef, error)) *MockStateGetSecretValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetURIByConsumerLabel mocks base method. @@ -311,9 +695,33 @@ func (m *MockState) GetURIByConsumerLabel(arg0 context.Context, arg1, arg2 strin } // GetURIByConsumerLabel indicates an expected call of GetURIByConsumerLabel. -func (mr *MockStateMockRecorder) GetURIByConsumerLabel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetURIByConsumerLabel(arg0, arg1, arg2 any) *MockStateGetURIByConsumerLabelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetURIByConsumerLabel", reflect.TypeOf((*MockState)(nil).GetURIByConsumerLabel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetURIByConsumerLabel", reflect.TypeOf((*MockState)(nil).GetURIByConsumerLabel), arg0, arg1, arg2) + return &MockStateGetURIByConsumerLabelCall{Call: call} +} + +// MockStateGetURIByConsumerLabelCall wrap *gomock.Call +type MockStateGetURIByConsumerLabelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetURIByConsumerLabelCall) Return(arg0 *secrets.URI, arg1 error) *MockStateGetURIByConsumerLabelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetURIByConsumerLabelCall) Do(f func(context.Context, string, string) (*secrets.URI, error)) *MockStateGetURIByConsumerLabelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetURIByConsumerLabelCall) DoAndReturn(f func(context.Context, string, string) (*secrets.URI, error)) *MockStateGetURIByConsumerLabelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserSecretURIByLabel mocks base method. @@ -326,9 +734,33 @@ func (m *MockState) GetUserSecretURIByLabel(arg0 context.Context, arg1 string) ( } // GetUserSecretURIByLabel indicates an expected call of GetUserSecretURIByLabel. -func (mr *MockStateMockRecorder) GetUserSecretURIByLabel(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetUserSecretURIByLabel(arg0, arg1 any) *MockStateGetUserSecretURIByLabelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserSecretURIByLabel", reflect.TypeOf((*MockState)(nil).GetUserSecretURIByLabel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserSecretURIByLabel", reflect.TypeOf((*MockState)(nil).GetUserSecretURIByLabel), arg0, arg1) + return &MockStateGetUserSecretURIByLabelCall{Call: call} +} + +// MockStateGetUserSecretURIByLabelCall wrap *gomock.Call +type MockStateGetUserSecretURIByLabelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetUserSecretURIByLabelCall) Return(arg0 *secrets.URI, arg1 error) *MockStateGetUserSecretURIByLabelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetUserSecretURIByLabelCall) Do(f func(context.Context, string) (*secrets.URI, error)) *MockStateGetUserSecretURIByLabelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetUserSecretURIByLabelCall) DoAndReturn(f func(context.Context, string) (*secrets.URI, error)) *MockStateGetUserSecretURIByLabelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantAccess mocks base method. @@ -340,9 +772,33 @@ func (m *MockState) GrantAccess(arg0 context.Context, arg1 *secrets.URI, arg2 se } // GrantAccess indicates an expected call of GrantAccess. -func (mr *MockStateMockRecorder) GrantAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) GrantAccess(arg0, arg1, arg2 any) *MockStateGrantAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantAccess", reflect.TypeOf((*MockState)(nil).GrantAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantAccess", reflect.TypeOf((*MockState)(nil).GrantAccess), arg0, arg1, arg2) + return &MockStateGrantAccessCall{Call: call} +} + +// MockStateGrantAccessCall wrap *gomock.Call +type MockStateGrantAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGrantAccessCall) Return(arg0 error) *MockStateGrantAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGrantAccessCall) Do(f func(context.Context, *secrets.URI, secret.GrantParams) error) *MockStateGrantAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGrantAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, secret.GrantParams) error) *MockStateGrantAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatementForConsumedRemoteSecretsChange mocks base method. @@ -355,9 +811,33 @@ func (m *MockState) InitialWatchStatementForConsumedRemoteSecretsChange(arg0 str } // InitialWatchStatementForConsumedRemoteSecretsChange indicates an expected call of InitialWatchStatementForConsumedRemoteSecretsChange. -func (mr *MockStateMockRecorder) InitialWatchStatementForConsumedRemoteSecretsChange(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatementForConsumedRemoteSecretsChange(arg0 any) *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForConsumedRemoteSecretsChange", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForConsumedRemoteSecretsChange), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForConsumedRemoteSecretsChange", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForConsumedRemoteSecretsChange), arg0) + return &MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall{Call: call} +} + +// MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall wrap *gomock.Call +type MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall) Return(arg0 string, arg1 eventsource.NamespaceQuery) *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall) Do(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall) DoAndReturn(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForConsumedRemoteSecretsChangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatementForConsumedSecretsChange mocks base method. @@ -370,9 +850,33 @@ func (m *MockState) InitialWatchStatementForConsumedSecretsChange(arg0 string) ( } // InitialWatchStatementForConsumedSecretsChange indicates an expected call of InitialWatchStatementForConsumedSecretsChange. -func (mr *MockStateMockRecorder) InitialWatchStatementForConsumedSecretsChange(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatementForConsumedSecretsChange(arg0 any) *MockStateInitialWatchStatementForConsumedSecretsChangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForConsumedSecretsChange", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForConsumedSecretsChange), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForConsumedSecretsChange", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForConsumedSecretsChange), arg0) + return &MockStateInitialWatchStatementForConsumedSecretsChangeCall{Call: call} +} + +// MockStateInitialWatchStatementForConsumedSecretsChangeCall wrap *gomock.Call +type MockStateInitialWatchStatementForConsumedSecretsChangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementForConsumedSecretsChangeCall) Return(arg0 string, arg1 eventsource.NamespaceQuery) *MockStateInitialWatchStatementForConsumedSecretsChangeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementForConsumedSecretsChangeCall) Do(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForConsumedSecretsChangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementForConsumedSecretsChangeCall) DoAndReturn(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForConsumedSecretsChangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatementForObsoleteRevision mocks base method. @@ -385,9 +889,33 @@ func (m *MockState) InitialWatchStatementForObsoleteRevision(arg0 secret.Applica } // InitialWatchStatementForObsoleteRevision indicates an expected call of InitialWatchStatementForObsoleteRevision. -func (mr *MockStateMockRecorder) InitialWatchStatementForObsoleteRevision(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatementForObsoleteRevision(arg0, arg1 any) *MockStateInitialWatchStatementForObsoleteRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForObsoleteRevision", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForObsoleteRevision), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForObsoleteRevision", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForObsoleteRevision), arg0, arg1) + return &MockStateInitialWatchStatementForObsoleteRevisionCall{Call: call} +} + +// MockStateInitialWatchStatementForObsoleteRevisionCall wrap *gomock.Call +type MockStateInitialWatchStatementForObsoleteRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementForObsoleteRevisionCall) Return(arg0 string, arg1 eventsource.NamespaceQuery) *MockStateInitialWatchStatementForObsoleteRevisionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementForObsoleteRevisionCall) Do(f func(secret.ApplicationOwners, secret.UnitOwners) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForObsoleteRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementForObsoleteRevisionCall) DoAndReturn(f func(secret.ApplicationOwners, secret.UnitOwners) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForObsoleteRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide mocks base method. @@ -400,9 +928,33 @@ func (m *MockState) InitialWatchStatementForRemoteConsumedSecretsChangesFromOffe } // InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide indicates an expected call of InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide. -func (mr *MockStateMockRecorder) InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide(arg0 any) *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide", reflect.TypeOf((*MockState)(nil).InitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSide), arg0) + return &MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall{Call: call} +} + +// MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall wrap *gomock.Call +type MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall) Return(arg0 string, arg1 eventsource.NamespaceQuery) *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall) Do(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall) DoAndReturn(f func(string) (string, eventsource.NamespaceQuery)) *MockStateInitialWatchStatementForRemoteConsumedSecretsChangesFromOfferingSideCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmSecrets mocks base method. @@ -416,9 +968,33 @@ func (m *MockState) ListCharmSecrets(arg0 context.Context, arg1 secret.Applicati } // ListCharmSecrets indicates an expected call of ListCharmSecrets. -func (mr *MockStateMockRecorder) ListCharmSecrets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListCharmSecrets(arg0, arg1, arg2 any) *MockStateListCharmSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockState)(nil).ListCharmSecrets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecrets", reflect.TypeOf((*MockState)(nil).ListCharmSecrets), arg0, arg1, arg2) + return &MockStateListCharmSecretsCall{Call: call} +} + +// MockStateListCharmSecretsCall wrap *gomock.Call +type MockStateListCharmSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListCharmSecretsCall) Return(arg0 []*secrets.SecretMetadata, arg1 [][]*secrets.SecretRevisionMetadata, arg2 error) *MockStateListCharmSecretsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListCharmSecretsCall) Do(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockStateListCharmSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListCharmSecretsCall) DoAndReturn(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockStateListCharmSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListCharmSecretsToDrain mocks base method. @@ -431,9 +1007,33 @@ func (m *MockState) ListCharmSecretsToDrain(arg0 context.Context, arg1 secret.Ap } // ListCharmSecretsToDrain indicates an expected call of ListCharmSecretsToDrain. -func (mr *MockStateMockRecorder) ListCharmSecretsToDrain(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListCharmSecretsToDrain(arg0, arg1, arg2 any) *MockStateListCharmSecretsToDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecretsToDrain", reflect.TypeOf((*MockState)(nil).ListCharmSecretsToDrain), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCharmSecretsToDrain", reflect.TypeOf((*MockState)(nil).ListCharmSecretsToDrain), arg0, arg1, arg2) + return &MockStateListCharmSecretsToDrainCall{Call: call} +} + +// MockStateListCharmSecretsToDrainCall wrap *gomock.Call +type MockStateListCharmSecretsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListCharmSecretsToDrainCall) Return(arg0 []*secrets.SecretMetadataForDrain, arg1 error) *MockStateListCharmSecretsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListCharmSecretsToDrainCall) Do(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners) ([]*secrets.SecretMetadataForDrain, error)) *MockStateListCharmSecretsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListCharmSecretsToDrainCall) DoAndReturn(f func(context.Context, secret.ApplicationOwners, secret.UnitOwners) ([]*secrets.SecretMetadataForDrain, error)) *MockStateListCharmSecretsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListExternalSecretRevisions mocks base method. @@ -450,10 +1050,34 @@ func (m *MockState) ListExternalSecretRevisions(arg0 context.Context, arg1 *secr } // ListExternalSecretRevisions indicates an expected call of ListExternalSecretRevisions. -func (mr *MockStateMockRecorder) ListExternalSecretRevisions(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) ListExternalSecretRevisions(arg0, arg1 any, arg2 ...any) *MockStateListExternalSecretRevisionsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExternalSecretRevisions", reflect.TypeOf((*MockState)(nil).ListExternalSecretRevisions), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExternalSecretRevisions", reflect.TypeOf((*MockState)(nil).ListExternalSecretRevisions), varargs...) + return &MockStateListExternalSecretRevisionsCall{Call: call} +} + +// MockStateListExternalSecretRevisionsCall wrap *gomock.Call +type MockStateListExternalSecretRevisionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListExternalSecretRevisionsCall) Return(arg0 []secrets.ValueRef, arg1 error) *MockStateListExternalSecretRevisionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListExternalSecretRevisionsCall) Do(f func(context.Context, *secrets.URI, ...int) ([]secrets.ValueRef, error)) *MockStateListExternalSecretRevisionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListExternalSecretRevisionsCall) DoAndReturn(f func(context.Context, *secrets.URI, ...int) ([]secrets.ValueRef, error)) *MockStateListExternalSecretRevisionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListGrantedSecretsForBackend mocks base method. @@ -466,9 +1090,33 @@ func (m *MockState) ListGrantedSecretsForBackend(arg0 context.Context, arg1 stri } // ListGrantedSecretsForBackend indicates an expected call of ListGrantedSecretsForBackend. -func (mr *MockStateMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListGrantedSecretsForBackend(arg0, arg1, arg2, arg3 any) *MockStateListGrantedSecretsForBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockState)(nil).ListGrantedSecretsForBackend), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGrantedSecretsForBackend", reflect.TypeOf((*MockState)(nil).ListGrantedSecretsForBackend), arg0, arg1, arg2, arg3) + return &MockStateListGrantedSecretsForBackendCall{Call: call} +} + +// MockStateListGrantedSecretsForBackendCall wrap *gomock.Call +type MockStateListGrantedSecretsForBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListGrantedSecretsForBackendCall) Return(arg0 []*secrets.SecretRevisionRef, arg1 error) *MockStateListGrantedSecretsForBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListGrantedSecretsForBackendCall) Do(f func(context.Context, string, []secret.AccessParams, secrets.SecretRole) ([]*secrets.SecretRevisionRef, error)) *MockStateListGrantedSecretsForBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListGrantedSecretsForBackendCall) DoAndReturn(f func(context.Context, string, []secret.AccessParams, secrets.SecretRole) ([]*secrets.SecretRevisionRef, error)) *MockStateListGrantedSecretsForBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecrets mocks base method. @@ -482,9 +1130,33 @@ func (m *MockState) ListSecrets(arg0 context.Context, arg1 *secrets.URI, arg2 *i } // ListSecrets indicates an expected call of ListSecrets. -func (mr *MockStateMockRecorder) ListSecrets(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListSecrets(arg0, arg1, arg2, arg3 any) *MockStateListSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockState)(nil).ListSecrets), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockState)(nil).ListSecrets), arg0, arg1, arg2, arg3) + return &MockStateListSecretsCall{Call: call} +} + +// MockStateListSecretsCall wrap *gomock.Call +type MockStateListSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListSecretsCall) Return(arg0 []*secrets.SecretMetadata, arg1 [][]*secrets.SecretRevisionMetadata, arg2 error) *MockStateListSecretsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListSecretsCall) Do(f func(context.Context, *secrets.URI, *int, secret.Labels) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockStateListSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListSecretsCall) DoAndReturn(f func(context.Context, *secrets.URI, *int, secret.Labels) ([]*secrets.SecretMetadata, [][]*secrets.SecretRevisionMetadata, error)) *MockStateListSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListUserSecretsToDrain mocks base method. @@ -497,9 +1169,33 @@ func (m *MockState) ListUserSecretsToDrain(arg0 context.Context) ([]*secrets.Sec } // ListUserSecretsToDrain indicates an expected call of ListUserSecretsToDrain. -func (mr *MockStateMockRecorder) ListUserSecretsToDrain(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListUserSecretsToDrain(arg0 any) *MockStateListUserSecretsToDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUserSecretsToDrain", reflect.TypeOf((*MockState)(nil).ListUserSecretsToDrain), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUserSecretsToDrain", reflect.TypeOf((*MockState)(nil).ListUserSecretsToDrain), arg0) + return &MockStateListUserSecretsToDrainCall{Call: call} +} + +// MockStateListUserSecretsToDrainCall wrap *gomock.Call +type MockStateListUserSecretsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListUserSecretsToDrainCall) Return(arg0 []*secrets.SecretMetadataForDrain, arg1 error) *MockStateListUserSecretsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListUserSecretsToDrainCall) Do(f func(context.Context) ([]*secrets.SecretMetadataForDrain, error)) *MockStateListUserSecretsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListUserSecretsToDrainCall) DoAndReturn(f func(context.Context) ([]*secrets.SecretMetadataForDrain, error)) *MockStateListUserSecretsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeAccess mocks base method. @@ -511,9 +1207,33 @@ func (m *MockState) RevokeAccess(arg0 context.Context, arg1 *secrets.URI, arg2 s } // RevokeAccess indicates an expected call of RevokeAccess. -func (mr *MockStateMockRecorder) RevokeAccess(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) RevokeAccess(arg0, arg1, arg2 any) *MockStateRevokeAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeAccess", reflect.TypeOf((*MockState)(nil).RevokeAccess), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeAccess", reflect.TypeOf((*MockState)(nil).RevokeAccess), arg0, arg1, arg2) + return &MockStateRevokeAccessCall{Call: call} +} + +// MockStateRevokeAccessCall wrap *gomock.Call +type MockStateRevokeAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateRevokeAccessCall) Return(arg0 error) *MockStateRevokeAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateRevokeAccessCall) Do(f func(context.Context, *secrets.URI, secret.AccessParams) error) *MockStateRevokeAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateRevokeAccessCall) DoAndReturn(f func(context.Context, *secrets.URI, secret.AccessParams) error) *MockStateRevokeAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveSecretConsumer mocks base method. @@ -525,9 +1245,33 @@ func (m *MockState) SaveSecretConsumer(arg0 context.Context, arg1 *secrets.URI, } // SaveSecretConsumer indicates an expected call of SaveSecretConsumer. -func (mr *MockStateMockRecorder) SaveSecretConsumer(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) SaveSecretConsumer(arg0, arg1, arg2, arg3 any) *MockStateSaveSecretConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretConsumer", reflect.TypeOf((*MockState)(nil).SaveSecretConsumer), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretConsumer", reflect.TypeOf((*MockState)(nil).SaveSecretConsumer), arg0, arg1, arg2, arg3) + return &MockStateSaveSecretConsumerCall{Call: call} +} + +// MockStateSaveSecretConsumerCall wrap *gomock.Call +type MockStateSaveSecretConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSaveSecretConsumerCall) Return(arg0 error) *MockStateSaveSecretConsumerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSaveSecretConsumerCall) Do(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockStateSaveSecretConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSaveSecretConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockStateSaveSecretConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveSecretRemoteConsumer mocks base method. @@ -539,9 +1283,33 @@ func (m *MockState) SaveSecretRemoteConsumer(arg0 context.Context, arg1 *secrets } // SaveSecretRemoteConsumer indicates an expected call of SaveSecretRemoteConsumer. -func (mr *MockStateMockRecorder) SaveSecretRemoteConsumer(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateMockRecorder) SaveSecretRemoteConsumer(arg0, arg1, arg2, arg3 any) *MockStateSaveSecretRemoteConsumerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretRemoteConsumer", reflect.TypeOf((*MockState)(nil).SaveSecretRemoteConsumer), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSecretRemoteConsumer", reflect.TypeOf((*MockState)(nil).SaveSecretRemoteConsumer), arg0, arg1, arg2, arg3) + return &MockStateSaveSecretRemoteConsumerCall{Call: call} +} + +// MockStateSaveSecretRemoteConsumerCall wrap *gomock.Call +type MockStateSaveSecretRemoteConsumerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSaveSecretRemoteConsumerCall) Return(arg0 error) *MockStateSaveSecretRemoteConsumerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSaveSecretRemoteConsumerCall) Do(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockStateSaveSecretRemoteConsumerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSaveSecretRemoteConsumerCall) DoAndReturn(f func(context.Context, *secrets.URI, string, *secrets.SecretConsumerMetadata) error) *MockStateSaveSecretRemoteConsumerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateRemoteSecretRevision mocks base method. @@ -553,9 +1321,33 @@ func (m *MockState) UpdateRemoteSecretRevision(arg0 context.Context, arg1 *secre } // UpdateRemoteSecretRevision indicates an expected call of UpdateRemoteSecretRevision. -func (mr *MockStateMockRecorder) UpdateRemoteSecretRevision(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateRemoteSecretRevision(arg0, arg1, arg2 any) *MockStateUpdateRemoteSecretRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteSecretRevision", reflect.TypeOf((*MockState)(nil).UpdateRemoteSecretRevision), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRemoteSecretRevision", reflect.TypeOf((*MockState)(nil).UpdateRemoteSecretRevision), arg0, arg1, arg2) + return &MockStateUpdateRemoteSecretRevisionCall{Call: call} +} + +// MockStateUpdateRemoteSecretRevisionCall wrap *gomock.Call +type MockStateUpdateRemoteSecretRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateRemoteSecretRevisionCall) Return(arg0 error) *MockStateUpdateRemoteSecretRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateRemoteSecretRevisionCall) Do(f func(context.Context, *secrets.URI, int) error) *MockStateUpdateRemoteSecretRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateRemoteSecretRevisionCall) DoAndReturn(f func(context.Context, *secrets.URI, int) error) *MockStateUpdateRemoteSecretRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecret mocks base method. @@ -567,7 +1359,31 @@ func (m *MockState) UpdateSecret(arg0 context.Context, arg1 *secrets.URI, arg2 s } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockStateMockRecorder) UpdateSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateSecret(arg0, arg1, arg2 any) *MockStateUpdateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockState)(nil).UpdateSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockState)(nil).UpdateSecret), arg0, arg1, arg2) + return &MockStateUpdateSecretCall{Call: call} +} + +// MockStateUpdateSecretCall wrap *gomock.Call +type MockStateUpdateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateSecretCall) Return(arg0 error) *MockStateUpdateSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateSecretCall) Do(f func(context.Context, *secrets.URI, secret.UpsertSecretParams) error) *MockStateUpdateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateSecretCall) DoAndReturn(f func(context.Context, *secrets.URI, secret.UpsertSecretParams) error) *MockStateUpdateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secret/service/token_mock_test.go b/domain/secret/service/token_mock_test.go index 0c06fb116ab..2d8ce9f7d75 100644 --- a/domain/secret/service/token_mock_test.go +++ b/domain/secret/service/token_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token +// mockgen -typed -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token // // Package service is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockToken) Check() error { } // Check indicates an expected call of Check. -func (mr *MockTokenMockRecorder) Check() *gomock.Call { +func (mr *MockTokenMockRecorder) Check() *MockTokenCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + return &MockTokenCheckCall{Call: call} +} + +// MockTokenCheckCall wrap *gomock.Call +type MockTokenCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenCheckCall) Return(arg0 error) *MockTokenCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenCheckCall) Do(f func() error) *MockTokenCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenCheckCall) DoAndReturn(f func() error) *MockTokenCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secret/service/watcher_mock_test.go b/domain/secret/service/watcher_mock_test.go index 0e21b363af3..82c0b4eaead 100644 --- a/domain/secret/service/watcher_mock_test.go +++ b/domain/secret/service/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher // // Package service is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secret/service/watcherfactory_mock_test.go b/domain/secret/service/watcherfactory_mock_test.go index dcffd3b541e..3f86ca17786 100644 --- a/domain/secret/service/watcherfactory_mock_test.go +++ b/domain/secret/service/watcherfactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secret/service WatcherFactory +// mockgen -typed -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secret/service WatcherFactory // // Package service is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockWatcherFactory) NewNamespaceWatcher(arg0 string, arg1 changestream. } // NewNamespaceWatcher indicates an expected call of NewNamespaceWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewNamespaceWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewNamespaceWatcherCall{Call: call} +} + +// MockWatcherFactoryNewNamespaceWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewNamespaceWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Do(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewNamespaceWatcherCall) DoAndReturn(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secretbackend/service/package_test.go b/domain/secretbackend/service/package_test.go index 8077affa9b6..e6912858761 100644 --- a/domain/secretbackend/service/package_test.go +++ b/domain/secretbackend/service/package_test.go @@ -9,11 +9,11 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/secretbackend/service State -//go:generate go run go.uber.org/mock/mockgen -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secretbackend/service WatcherFactory -//go:generate go run go.uber.org/mock/mockgen -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend -//go:generate go run go.uber.org/mock/mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher -//go:generate go run go.uber.org/mock/mockgen -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/secretbackend/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secretbackend/service WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/secretbackend/service/provider_mock_test.go b/domain/secretbackend/service/provider_mock_test.go index 23a90b83727..f335932247a 100644 --- a/domain/secretbackend/service/provider_mock_test.go +++ b/domain/secretbackend/service/provider_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend +// mockgen -typed -package service -destination provider_mock_test.go github.com/juju/juju/internal/secrets/provider SecretBackendProvider,SecretsBackend // // Package service is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockSecretBackendProvider) CleanupModel(arg0 *provider.ModelBackendConf } // CleanupModel indicates an expected call of CleanupModel. -func (mr *MockSecretBackendProviderMockRecorder) CleanupModel(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) CleanupModel(arg0 any) *MockSecretBackendProviderCleanupModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupModel", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupModel", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupModel), arg0) + return &MockSecretBackendProviderCleanupModelCall{Call: call} +} + +// MockSecretBackendProviderCleanupModelCall wrap *gomock.Call +type MockSecretBackendProviderCleanupModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderCleanupModelCall) Return(arg0 error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderCleanupModelCall) Do(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderCleanupModelCall) DoAndReturn(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderCleanupModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CleanupSecrets mocks base method. @@ -64,9 +88,33 @@ func (m *MockSecretBackendProvider) CleanupSecrets(arg0 context.Context, arg1 *p } // CleanupSecrets indicates an expected call of CleanupSecrets. -func (mr *MockSecretBackendProviderMockRecorder) CleanupSecrets(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) CleanupSecrets(arg0, arg1, arg2, arg3 any) *MockSecretBackendProviderCleanupSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupSecrets", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupSecrets), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupSecrets", reflect.TypeOf((*MockSecretBackendProvider)(nil).CleanupSecrets), arg0, arg1, arg2, arg3) + return &MockSecretBackendProviderCleanupSecretsCall{Call: call} +} + +// MockSecretBackendProviderCleanupSecretsCall wrap *gomock.Call +type MockSecretBackendProviderCleanupSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderCleanupSecretsCall) Return(arg0 error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderCleanupSecretsCall) Do(f func(context.Context, *provider.ModelBackendConfig, string, provider.SecretRevisions) error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderCleanupSecretsCall) DoAndReturn(f func(context.Context, *provider.ModelBackendConfig, string, provider.SecretRevisions) error) *MockSecretBackendProviderCleanupSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Initialise mocks base method. @@ -78,9 +126,33 @@ func (m *MockSecretBackendProvider) Initialise(arg0 *provider.ModelBackendConfig } // Initialise indicates an expected call of Initialise. -func (mr *MockSecretBackendProviderMockRecorder) Initialise(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) Initialise(arg0 any) *MockSecretBackendProviderInitialiseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockSecretBackendProvider)(nil).Initialise), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockSecretBackendProvider)(nil).Initialise), arg0) + return &MockSecretBackendProviderInitialiseCall{Call: call} +} + +// MockSecretBackendProviderInitialiseCall wrap *gomock.Call +type MockSecretBackendProviderInitialiseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderInitialiseCall) Return(arg0 error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderInitialiseCall) Do(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderInitialiseCall) DoAndReturn(f func(*provider.ModelBackendConfig) error) *MockSecretBackendProviderInitialiseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewBackend mocks base method. @@ -93,9 +165,33 @@ func (m *MockSecretBackendProvider) NewBackend(arg0 *provider.ModelBackendConfig } // NewBackend indicates an expected call of NewBackend. -func (mr *MockSecretBackendProviderMockRecorder) NewBackend(arg0 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) NewBackend(arg0 any) *MockSecretBackendProviderNewBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBackend", reflect.TypeOf((*MockSecretBackendProvider)(nil).NewBackend), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBackend", reflect.TypeOf((*MockSecretBackendProvider)(nil).NewBackend), arg0) + return &MockSecretBackendProviderNewBackendCall{Call: call} +} + +// MockSecretBackendProviderNewBackendCall wrap *gomock.Call +type MockSecretBackendProviderNewBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderNewBackendCall) Return(arg0 provider.SecretsBackend, arg1 error) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderNewBackendCall) Do(f func(*provider.ModelBackendConfig) (provider.SecretsBackend, error)) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderNewBackendCall) DoAndReturn(f func(*provider.ModelBackendConfig) (provider.SecretsBackend, error)) *MockSecretBackendProviderNewBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RestrictedConfig mocks base method. @@ -108,9 +204,33 @@ func (m *MockSecretBackendProvider) RestrictedConfig(arg0 context.Context, arg1 } // RestrictedConfig indicates an expected call of RestrictedConfig. -func (mr *MockSecretBackendProviderMockRecorder) RestrictedConfig(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) RestrictedConfig(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockSecretBackendProviderRestrictedConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictedConfig", reflect.TypeOf((*MockSecretBackendProvider)(nil).RestrictedConfig), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictedConfig", reflect.TypeOf((*MockSecretBackendProvider)(nil).RestrictedConfig), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockSecretBackendProviderRestrictedConfigCall{Call: call} +} + +// MockSecretBackendProviderRestrictedConfigCall wrap *gomock.Call +type MockSecretBackendProviderRestrictedConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderRestrictedConfigCall) Return(arg0 *provider.BackendConfig, arg1 error) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderRestrictedConfigCall) Do(f func(context.Context, *provider.ModelBackendConfig, bool, bool, secrets.Accessor, provider.SecretRevisions, provider.SecretRevisions) (*provider.BackendConfig, error)) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderRestrictedConfigCall) DoAndReturn(f func(context.Context, *provider.ModelBackendConfig, bool, bool, secrets.Accessor, provider.SecretRevisions, provider.SecretRevisions) (*provider.BackendConfig, error)) *MockSecretBackendProviderRestrictedConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -122,9 +242,33 @@ func (m *MockSecretBackendProvider) Type() string { } // Type indicates an expected call of Type. -func (mr *MockSecretBackendProviderMockRecorder) Type() *gomock.Call { +func (mr *MockSecretBackendProviderMockRecorder) Type() *MockSecretBackendProviderTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockSecretBackendProvider)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockSecretBackendProvider)(nil).Type)) + return &MockSecretBackendProviderTypeCall{Call: call} +} + +// MockSecretBackendProviderTypeCall wrap *gomock.Call +type MockSecretBackendProviderTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendProviderTypeCall) Return(arg0 string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendProviderTypeCall) Do(f func() string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendProviderTypeCall) DoAndReturn(f func() string) *MockSecretBackendProviderTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsBackend is a mock of SecretsBackend interface. @@ -159,9 +303,33 @@ func (m *MockSecretsBackend) DeleteContent(arg0 context.Context, arg1 string) er } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *MockSecretsBackendDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + return &MockSecretsBackendDeleteContentCall{Call: call} +} + +// MockSecretsBackendDeleteContentCall wrap *gomock.Call +type MockSecretsBackendDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteContentCall) Return(arg0 error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteContentCall) Do(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteContentCall) DoAndReturn(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -174,9 +342,33 @@ func (m *MockSecretsBackend) GetContent(arg0 context.Context, arg1 string) (secr } // GetContent indicates an expected call of GetContent. -func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *MockSecretsBackendGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + return &MockSecretsBackendGetContentCall{Call: call} +} + +// MockSecretsBackendGetContentCall wrap *gomock.Call +type MockSecretsBackendGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendGetContentCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendGetContentCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -188,9 +380,33 @@ func (m *MockSecretsBackend) Ping() error { } // Ping indicates an expected call of Ping. -func (mr *MockSecretsBackendMockRecorder) Ping() *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) Ping() *MockSecretsBackendPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + return &MockSecretsBackendPingCall{Call: call} +} + +// MockSecretsBackendPingCall wrap *gomock.Call +type MockSecretsBackendPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendPingCall) Return(arg0 error) *MockSecretsBackendPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendPingCall) Do(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendPingCall) DoAndReturn(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -203,7 +419,31 @@ func (m *MockSecretsBackend) SaveContent(arg0 context.Context, arg1 *secrets.URI } // SaveContent indicates an expected call of SaveContent. -func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *MockSecretsBackendSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + return &MockSecretsBackendSaveContentCall{Call: call} +} + +// MockSecretsBackendSaveContentCall wrap *gomock.Call +type MockSecretsBackendSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendSaveContentCall) Return(arg0 string, arg1 error) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendSaveContentCall) Do(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendSaveContentCall) DoAndReturn(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secretbackend/service/state_mock_test.go b/domain/secretbackend/service/state_mock_test.go index f906f35c940..52b08eeed88 100644 --- a/domain/secretbackend/service/state_mock_test.go +++ b/domain/secretbackend/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/secretbackend/service State +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/secretbackend/service State // // Package service is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockState) CreateSecretBackend(arg0 context.Context, arg1 secretbackend } // CreateSecretBackend indicates an expected call of CreateSecretBackend. -func (mr *MockStateMockRecorder) CreateSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateSecretBackend(arg0, arg1 any) *MockStateCreateSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretBackend", reflect.TypeOf((*MockState)(nil).CreateSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretBackend", reflect.TypeOf((*MockState)(nil).CreateSecretBackend), arg0, arg1) + return &MockStateCreateSecretBackendCall{Call: call} +} + +// MockStateCreateSecretBackendCall wrap *gomock.Call +type MockStateCreateSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateSecretBackendCall) Return(arg0 string, arg1 error) *MockStateCreateSecretBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateSecretBackendCall) Do(f func(context.Context, secretbackend.CreateSecretBackendParams) (string, error)) *MockStateCreateSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateSecretBackendCall) DoAndReturn(f func(context.Context, secretbackend.CreateSecretBackendParams) (string, error)) *MockStateCreateSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecretBackend mocks base method. @@ -68,9 +92,33 @@ func (m *MockState) DeleteSecretBackend(arg0 context.Context, arg1 secretbackend } // DeleteSecretBackend indicates an expected call of DeleteSecretBackend. -func (mr *MockStateMockRecorder) DeleteSecretBackend(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteSecretBackend(arg0, arg1, arg2 any) *MockStateDeleteSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretBackend", reflect.TypeOf((*MockState)(nil).DeleteSecretBackend), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretBackend", reflect.TypeOf((*MockState)(nil).DeleteSecretBackend), arg0, arg1, arg2) + return &MockStateDeleteSecretBackendCall{Call: call} +} + +// MockStateDeleteSecretBackendCall wrap *gomock.Call +type MockStateDeleteSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteSecretBackendCall) Return(arg0 error) *MockStateDeleteSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteSecretBackendCall) Do(f func(context.Context, secretbackend.BackendIdentifier, bool) error) *MockStateDeleteSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteSecretBackendCall) DoAndReturn(f func(context.Context, secretbackend.BackendIdentifier, bool) error) *MockStateDeleteSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetControllerModelCloudAndCredential mocks base method. @@ -84,9 +132,33 @@ func (m *MockState) GetControllerModelCloudAndCredential(arg0 context.Context) ( } // GetControllerModelCloudAndCredential indicates an expected call of GetControllerModelCloudAndCredential. -func (mr *MockStateMockRecorder) GetControllerModelCloudAndCredential(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetControllerModelCloudAndCredential(arg0 any) *MockStateGetControllerModelCloudAndCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetControllerModelCloudAndCredential", reflect.TypeOf((*MockState)(nil).GetControllerModelCloudAndCredential), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetControllerModelCloudAndCredential", reflect.TypeOf((*MockState)(nil).GetControllerModelCloudAndCredential), arg0) + return &MockStateGetControllerModelCloudAndCredentialCall{Call: call} +} + +// MockStateGetControllerModelCloudAndCredentialCall wrap *gomock.Call +type MockStateGetControllerModelCloudAndCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetControllerModelCloudAndCredentialCall) Return(arg0 cloud.Cloud, arg1 cloud.Credential, arg2 error) *MockStateGetControllerModelCloudAndCredentialCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetControllerModelCloudAndCredentialCall) Do(f func(context.Context) (cloud.Cloud, cloud.Credential, error)) *MockStateGetControllerModelCloudAndCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetControllerModelCloudAndCredentialCall) DoAndReturn(f func(context.Context) (cloud.Cloud, cloud.Credential, error)) *MockStateGetControllerModelCloudAndCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetModelCloudAndCredential mocks base method. @@ -100,9 +172,33 @@ func (m *MockState) GetModelCloudAndCredential(arg0 context.Context, arg1 model. } // GetModelCloudAndCredential indicates an expected call of GetModelCloudAndCredential. -func (mr *MockStateMockRecorder) GetModelCloudAndCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetModelCloudAndCredential(arg0, arg1 any) *MockStateGetModelCloudAndCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelCloudAndCredential", reflect.TypeOf((*MockState)(nil).GetModelCloudAndCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelCloudAndCredential", reflect.TypeOf((*MockState)(nil).GetModelCloudAndCredential), arg0, arg1) + return &MockStateGetModelCloudAndCredentialCall{Call: call} +} + +// MockStateGetModelCloudAndCredentialCall wrap *gomock.Call +type MockStateGetModelCloudAndCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetModelCloudAndCredentialCall) Return(arg0 cloud.Cloud, arg1 cloud.Credential, arg2 error) *MockStateGetModelCloudAndCredentialCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetModelCloudAndCredentialCall) Do(f func(context.Context, model.UUID) (cloud.Cloud, cloud.Credential, error)) *MockStateGetModelCloudAndCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetModelCloudAndCredentialCall) DoAndReturn(f func(context.Context, model.UUID) (cloud.Cloud, cloud.Credential, error)) *MockStateGetModelCloudAndCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetModelSecretBackendDetails mocks base method. @@ -115,9 +211,33 @@ func (m *MockState) GetModelSecretBackendDetails(arg0 context.Context, arg1 mode } // GetModelSecretBackendDetails indicates an expected call of GetModelSecretBackendDetails. -func (mr *MockStateMockRecorder) GetModelSecretBackendDetails(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetModelSecretBackendDetails(arg0, arg1 any) *MockStateGetModelSecretBackendDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelSecretBackendDetails", reflect.TypeOf((*MockState)(nil).GetModelSecretBackendDetails), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModelSecretBackendDetails", reflect.TypeOf((*MockState)(nil).GetModelSecretBackendDetails), arg0, arg1) + return &MockStateGetModelSecretBackendDetailsCall{Call: call} +} + +// MockStateGetModelSecretBackendDetailsCall wrap *gomock.Call +type MockStateGetModelSecretBackendDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetModelSecretBackendDetailsCall) Return(arg0 secretbackend.ModelSecretBackend, arg1 error) *MockStateGetModelSecretBackendDetailsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetModelSecretBackendDetailsCall) Do(f func(context.Context, model.UUID) (secretbackend.ModelSecretBackend, error)) *MockStateGetModelSecretBackendDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetModelSecretBackendDetailsCall) DoAndReturn(f func(context.Context, model.UUID) (secretbackend.ModelSecretBackend, error)) *MockStateGetModelSecretBackendDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretBackend mocks base method. @@ -130,9 +250,33 @@ func (m *MockState) GetSecretBackend(arg0 context.Context, arg1 secretbackend.Ba } // GetSecretBackend indicates an expected call of GetSecretBackend. -func (mr *MockStateMockRecorder) GetSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretBackend(arg0, arg1 any) *MockStateGetSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackend", reflect.TypeOf((*MockState)(nil).GetSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackend", reflect.TypeOf((*MockState)(nil).GetSecretBackend), arg0, arg1) + return &MockStateGetSecretBackendCall{Call: call} +} + +// MockStateGetSecretBackendCall wrap *gomock.Call +type MockStateGetSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretBackendCall) Return(arg0 *secretbackend.SecretBackend, arg1 error) *MockStateGetSecretBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretBackendCall) Do(f func(context.Context, secretbackend.BackendIdentifier) (*secretbackend.SecretBackend, error)) *MockStateGetSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretBackendCall) DoAndReturn(f func(context.Context, secretbackend.BackendIdentifier) (*secretbackend.SecretBackend, error)) *MockStateGetSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretBackendRotateChanges mocks base method. @@ -149,10 +293,34 @@ func (m *MockState) GetSecretBackendRotateChanges(arg0 context.Context, arg1 ... } // GetSecretBackendRotateChanges indicates an expected call of GetSecretBackendRotateChanges. -func (mr *MockStateMockRecorder) GetSecretBackendRotateChanges(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) GetSecretBackendRotateChanges(arg0 any, arg1 ...any) *MockStateGetSecretBackendRotateChangesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendRotateChanges", reflect.TypeOf((*MockState)(nil).GetSecretBackendRotateChanges), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendRotateChanges", reflect.TypeOf((*MockState)(nil).GetSecretBackendRotateChanges), varargs...) + return &MockStateGetSecretBackendRotateChangesCall{Call: call} +} + +// MockStateGetSecretBackendRotateChangesCall wrap *gomock.Call +type MockStateGetSecretBackendRotateChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetSecretBackendRotateChangesCall) Return(arg0 []watcher.SecretBackendRotateChange, arg1 error) *MockStateGetSecretBackendRotateChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetSecretBackendRotateChangesCall) Do(f func(context.Context, ...string) ([]watcher.SecretBackendRotateChange, error)) *MockStateGetSecretBackendRotateChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetSecretBackendRotateChangesCall) DoAndReturn(f func(context.Context, ...string) ([]watcher.SecretBackendRotateChange, error)) *MockStateGetSecretBackendRotateChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InitialWatchStatement mocks base method. @@ -165,9 +333,33 @@ func (m *MockState) InitialWatchStatement() (string, string) { } // InitialWatchStatement indicates an expected call of InitialWatchStatement. -func (mr *MockStateMockRecorder) InitialWatchStatement() *gomock.Call { +func (mr *MockStateMockRecorder) InitialWatchStatement() *MockStateInitialWatchStatementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatement", reflect.TypeOf((*MockState)(nil).InitialWatchStatement)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialWatchStatement", reflect.TypeOf((*MockState)(nil).InitialWatchStatement)) + return &MockStateInitialWatchStatementCall{Call: call} +} + +// MockStateInitialWatchStatementCall wrap *gomock.Call +type MockStateInitialWatchStatementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateInitialWatchStatementCall) Return(arg0, arg1 string) *MockStateInitialWatchStatementCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateInitialWatchStatementCall) Do(f func() (string, string)) *MockStateInitialWatchStatementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateInitialWatchStatementCall) DoAndReturn(f func() (string, string)) *MockStateInitialWatchStatementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecretBackends mocks base method. @@ -180,9 +372,33 @@ func (m *MockState) ListSecretBackends(arg0 context.Context) ([]*secretbackend.S } // ListSecretBackends indicates an expected call of ListSecretBackends. -func (mr *MockStateMockRecorder) ListSecretBackends(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListSecretBackends(arg0 any) *MockStateListSecretBackendsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackends", reflect.TypeOf((*MockState)(nil).ListSecretBackends), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackends", reflect.TypeOf((*MockState)(nil).ListSecretBackends), arg0) + return &MockStateListSecretBackendsCall{Call: call} +} + +// MockStateListSecretBackendsCall wrap *gomock.Call +type MockStateListSecretBackendsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListSecretBackendsCall) Return(arg0 []*secretbackend.SecretBackend, arg1 error) *MockStateListSecretBackendsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListSecretBackendsCall) Do(f func(context.Context) ([]*secretbackend.SecretBackend, error)) *MockStateListSecretBackendsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListSecretBackendsCall) DoAndReturn(f func(context.Context) ([]*secretbackend.SecretBackend, error)) *MockStateListSecretBackendsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecretBackendsForModel mocks base method. @@ -195,9 +411,33 @@ func (m *MockState) ListSecretBackendsForModel(arg0 context.Context, arg1 model. } // ListSecretBackendsForModel indicates an expected call of ListSecretBackendsForModel. -func (mr *MockStateMockRecorder) ListSecretBackendsForModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) ListSecretBackendsForModel(arg0, arg1, arg2 any) *MockStateListSecretBackendsForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackendsForModel", reflect.TypeOf((*MockState)(nil).ListSecretBackendsForModel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecretBackendsForModel", reflect.TypeOf((*MockState)(nil).ListSecretBackendsForModel), arg0, arg1, arg2) + return &MockStateListSecretBackendsForModelCall{Call: call} +} + +// MockStateListSecretBackendsForModelCall wrap *gomock.Call +type MockStateListSecretBackendsForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateListSecretBackendsForModelCall) Return(arg0 []*secretbackend.SecretBackend, arg1 error) *MockStateListSecretBackendsForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateListSecretBackendsForModelCall) Do(f func(context.Context, model.UUID, bool) ([]*secretbackend.SecretBackend, error)) *MockStateListSecretBackendsForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateListSecretBackendsForModelCall) DoAndReturn(f func(context.Context, model.UUID, bool) ([]*secretbackend.SecretBackend, error)) *MockStateListSecretBackendsForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackendRotated mocks base method. @@ -209,9 +449,33 @@ func (m *MockState) SecretBackendRotated(arg0 context.Context, arg1 string, arg2 } // SecretBackendRotated indicates an expected call of SecretBackendRotated. -func (mr *MockStateMockRecorder) SecretBackendRotated(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SecretBackendRotated(arg0, arg1, arg2 any) *MockStateSecretBackendRotatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackendRotated", reflect.TypeOf((*MockState)(nil).SecretBackendRotated), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackendRotated", reflect.TypeOf((*MockState)(nil).SecretBackendRotated), arg0, arg1, arg2) + return &MockStateSecretBackendRotatedCall{Call: call} +} + +// MockStateSecretBackendRotatedCall wrap *gomock.Call +type MockStateSecretBackendRotatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSecretBackendRotatedCall) Return(arg0 error) *MockStateSecretBackendRotatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSecretBackendRotatedCall) Do(f func(context.Context, string, time.Time) error) *MockStateSecretBackendRotatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSecretBackendRotatedCall) DoAndReturn(f func(context.Context, string, time.Time) error) *MockStateSecretBackendRotatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModelSecretBackend mocks base method. @@ -223,9 +487,33 @@ func (m *MockState) SetModelSecretBackend(arg0 context.Context, arg1 model.UUID, } // SetModelSecretBackend indicates an expected call of SetModelSecretBackend. -func (mr *MockStateMockRecorder) SetModelSecretBackend(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetModelSecretBackend(arg0, arg1, arg2 any) *MockStateSetModelSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelSecretBackend", reflect.TypeOf((*MockState)(nil).SetModelSecretBackend), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModelSecretBackend", reflect.TypeOf((*MockState)(nil).SetModelSecretBackend), arg0, arg1, arg2) + return &MockStateSetModelSecretBackendCall{Call: call} +} + +// MockStateSetModelSecretBackendCall wrap *gomock.Call +type MockStateSetModelSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetModelSecretBackendCall) Return(arg0 error) *MockStateSetModelSecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetModelSecretBackendCall) Do(f func(context.Context, model.UUID, string) error) *MockStateSetModelSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetModelSecretBackendCall) DoAndReturn(f func(context.Context, model.UUID, string) error) *MockStateSetModelSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecretBackend mocks base method. @@ -238,7 +526,31 @@ func (m *MockState) UpdateSecretBackend(arg0 context.Context, arg1 secretbackend } // UpdateSecretBackend indicates an expected call of UpdateSecretBackend. -func (mr *MockStateMockRecorder) UpdateSecretBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpdateSecretBackend(arg0, arg1 any) *MockStateUpdateSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockState)(nil).UpdateSecretBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecretBackend", reflect.TypeOf((*MockState)(nil).UpdateSecretBackend), arg0, arg1) + return &MockStateUpdateSecretBackendCall{Call: call} +} + +// MockStateUpdateSecretBackendCall wrap *gomock.Call +type MockStateUpdateSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpdateSecretBackendCall) Return(arg0 string, arg1 error) *MockStateUpdateSecretBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpdateSecretBackendCall) Do(f func(context.Context, secretbackend.UpdateSecretBackendParams) (string, error)) *MockStateUpdateSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpdateSecretBackendCall) DoAndReturn(f func(context.Context, secretbackend.UpdateSecretBackendParams) (string, error)) *MockStateUpdateSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secretbackend/service/token_mock_test.go b/domain/secretbackend/service/token_mock_test.go index 0c06fb116ab..2d8ce9f7d75 100644 --- a/domain/secretbackend/service/token_mock_test.go +++ b/domain/secretbackend/service/token_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token +// mockgen -typed -package service -destination token_mock_test.go github.com/juju/juju/core/leadership Token // // Package service is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockToken) Check() error { } // Check indicates an expected call of Check. -func (mr *MockTokenMockRecorder) Check() *gomock.Call { +func (mr *MockTokenMockRecorder) Check() *MockTokenCheckCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockToken)(nil).Check)) + return &MockTokenCheckCall{Call: call} +} + +// MockTokenCheckCall wrap *gomock.Call +type MockTokenCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenCheckCall) Return(arg0 error) *MockTokenCheckCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenCheckCall) Do(f func() error) *MockTokenCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenCheckCall) DoAndReturn(f func() error) *MockTokenCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secretbackend/service/watcher_mock_test.go b/domain/secretbackend/service/watcher_mock_test.go index 0e21b363af3..82c0b4eaead 100644 --- a/domain/secretbackend/service/watcher_mock_test.go +++ b/domain/secretbackend/service/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package service -destination watcher_mock_test.go github.com/juju/juju/core/watcher StringsWatcher // // Package service is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/secretbackend/service/watcherfactory_mock_test.go b/domain/secretbackend/service/watcherfactory_mock_test.go index 0f947ec6cf5..66c0bd7a8c8 100644 --- a/domain/secretbackend/service/watcherfactory_mock_test.go +++ b/domain/secretbackend/service/watcherfactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secretbackend/service WatcherFactory +// mockgen -typed -package service -destination watcherfactory_mock_test.go github.com/juju/juju/domain/secretbackend/service WatcherFactory // // Package service is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockWatcherFactory) NewNamespaceWatcher(arg0 string, arg1 changestream. } // NewNamespaceWatcher indicates an expected call of NewNamespaceWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewNamespaceWatcher(arg0, arg1, arg2 any) *MockWatcherFactoryNewNamespaceWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNamespaceWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewNamespaceWatcher), arg0, arg1, arg2) + return &MockWatcherFactoryNewNamespaceWatcherCall{Call: call} +} + +// MockWatcherFactoryNewNamespaceWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewNamespaceWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewNamespaceWatcherCall) Do(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewNamespaceWatcherCall) DoAndReturn(f func(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.Watcher[[]string], error)) *MockWatcherFactoryNewNamespaceWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/storage/modelmigration/migrations_mock_test.go b/domain/storage/modelmigration/migrations_mock_test.go index 8305b526069..99bfce625cb 100644 --- a/domain/storage/modelmigration/migrations_mock_test.go +++ b/domain/storage/modelmigration/migrations_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/storage/modelmigration Coordinator,ImportService,ExportService +// mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/storage/modelmigration Coordinator,ImportService,ExportService // // Package modelmigration is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockCoordinator) Add(arg0 modelmigration.Operation) { } // Add indicates an expected call of Add. -func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockCoordinatorMockRecorder) Add(arg0 any) *MockCoordinatorAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockCoordinator)(nil).Add), arg0) + return &MockCoordinatorAddCall{Call: call} +} + +// MockCoordinatorAddCall wrap *gomock.Call +type MockCoordinatorAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCoordinatorAddCall) Return() *MockCoordinatorAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCoordinatorAddCall) Do(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCoordinatorAddCall) DoAndReturn(f func(modelmigration.Operation)) *MockCoordinatorAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImportService is a mock of ImportService interface. @@ -86,9 +110,33 @@ func (m *MockImportService) CreateStoragePool(arg0 context.Context, arg1 string, } // CreateStoragePool indicates an expected call of CreateStoragePool. -func (mr *MockImportServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockImportServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *MockImportServiceCreateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockImportService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockImportService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + return &MockImportServiceCreateStoragePoolCall{Call: call} +} + +// MockImportServiceCreateStoragePoolCall wrap *gomock.Call +type MockImportServiceCreateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImportServiceCreateStoragePoolCall) Return(arg0 error) *MockImportServiceCreateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImportServiceCreateStoragePoolCall) Do(f func(context.Context, string, storage.ProviderType, service.PoolAttrs) error) *MockImportServiceCreateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImportServiceCreateStoragePoolCall) DoAndReturn(f func(context.Context, string, storage.ProviderType, service.PoolAttrs) error) *MockImportServiceCreateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockExportService is a mock of ExportService interface. @@ -124,7 +172,31 @@ func (m *MockExportService) AllStoragePools(arg0 context.Context) ([]*storage.Co } // AllStoragePools indicates an expected call of AllStoragePools. -func (mr *MockExportServiceMockRecorder) AllStoragePools(arg0 any) *gomock.Call { +func (mr *MockExportServiceMockRecorder) AllStoragePools(arg0 any) *MockExportServiceAllStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllStoragePools", reflect.TypeOf((*MockExportService)(nil).AllStoragePools), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllStoragePools", reflect.TypeOf((*MockExportService)(nil).AllStoragePools), arg0) + return &MockExportServiceAllStoragePoolsCall{Call: call} +} + +// MockExportServiceAllStoragePoolsCall wrap *gomock.Call +type MockExportServiceAllStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExportServiceAllStoragePoolsCall) Return(arg0 []*storage.Config, arg1 error) *MockExportServiceAllStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExportServiceAllStoragePoolsCall) Do(f func(context.Context) ([]*storage.Config, error)) *MockExportServiceAllStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExportServiceAllStoragePoolsCall) DoAndReturn(f func(context.Context) ([]*storage.Config, error)) *MockExportServiceAllStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/storage/modelmigration/package_test.go b/domain/storage/modelmigration/package_test.go index 09218d881c5..c7687ecb41e 100644 --- a/domain/storage/modelmigration/package_test.go +++ b/domain/storage/modelmigration/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/storage/modelmigration Coordinator,ImportService,ExportService +//go:generate go run go.uber.org/mock/mockgen -typed -package modelmigration -destination migrations_mock_test.go github.com/juju/juju/domain/storage/modelmigration Coordinator,ImportService,ExportService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/storage/service/package_test.go b/domain/storage/service/package_test.go index 8e5797f33eb..0c657bf41a0 100644 --- a/domain/storage/service/package_test.go +++ b/domain/storage/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/storage/service StoragePoolState +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/storage/service StoragePoolState func TestPackage(t *testing.T) { gc.TestingT(t) } diff --git a/domain/storage/service/state_mock_test.go b/domain/storage/service/state_mock_test.go index 8ea92b5c29f..6be603cbf2a 100644 --- a/domain/storage/service/state_mock_test.go +++ b/domain/storage/service/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/storage/service StoragePoolState +// mockgen -typed -package service -destination state_mock_test.go github.com/juju/juju/domain/storage/service StoragePoolState // // Package service is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockStoragePoolState) CreateStoragePool(arg0 context.Context, arg1 stor } // CreateStoragePool indicates an expected call of CreateStoragePool. -func (mr *MockStoragePoolStateMockRecorder) CreateStoragePool(arg0, arg1 any) *gomock.Call { +func (mr *MockStoragePoolStateMockRecorder) CreateStoragePool(arg0, arg1 any) *MockStoragePoolStateCreateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).CreateStoragePool), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).CreateStoragePool), arg0, arg1) + return &MockStoragePoolStateCreateStoragePoolCall{Call: call} +} + +// MockStoragePoolStateCreateStoragePoolCall wrap *gomock.Call +type MockStoragePoolStateCreateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolStateCreateStoragePoolCall) Return(arg0 error) *MockStoragePoolStateCreateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolStateCreateStoragePoolCall) Do(f func(context.Context, storage.StoragePoolDetails) error) *MockStoragePoolStateCreateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolStateCreateStoragePoolCall) DoAndReturn(f func(context.Context, storage.StoragePoolDetails) error) *MockStoragePoolStateCreateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePool mocks base method. @@ -63,9 +87,33 @@ func (m *MockStoragePoolState) DeleteStoragePool(arg0 context.Context, arg1 stri } // DeleteStoragePool indicates an expected call of DeleteStoragePool. -func (mr *MockStoragePoolStateMockRecorder) DeleteStoragePool(arg0, arg1 any) *gomock.Call { +func (mr *MockStoragePoolStateMockRecorder) DeleteStoragePool(arg0, arg1 any) *MockStoragePoolStateDeleteStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).DeleteStoragePool), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).DeleteStoragePool), arg0, arg1) + return &MockStoragePoolStateDeleteStoragePoolCall{Call: call} +} + +// MockStoragePoolStateDeleteStoragePoolCall wrap *gomock.Call +type MockStoragePoolStateDeleteStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolStateDeleteStoragePoolCall) Return(arg0 error) *MockStoragePoolStateDeleteStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolStateDeleteStoragePoolCall) Do(f func(context.Context, string) error) *MockStoragePoolStateDeleteStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolStateDeleteStoragePoolCall) DoAndReturn(f func(context.Context, string) error) *MockStoragePoolStateDeleteStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolByName mocks base method. @@ -78,9 +126,33 @@ func (m *MockStoragePoolState) GetStoragePoolByName(arg0 context.Context, arg1 s } // GetStoragePoolByName indicates an expected call of GetStoragePoolByName. -func (mr *MockStoragePoolStateMockRecorder) GetStoragePoolByName(arg0, arg1 any) *gomock.Call { +func (mr *MockStoragePoolStateMockRecorder) GetStoragePoolByName(arg0, arg1 any) *MockStoragePoolStateGetStoragePoolByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStoragePoolState)(nil).GetStoragePoolByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolByName", reflect.TypeOf((*MockStoragePoolState)(nil).GetStoragePoolByName), arg0, arg1) + return &MockStoragePoolStateGetStoragePoolByNameCall{Call: call} +} + +// MockStoragePoolStateGetStoragePoolByNameCall wrap *gomock.Call +type MockStoragePoolStateGetStoragePoolByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolStateGetStoragePoolByNameCall) Return(arg0 storage.StoragePoolDetails, arg1 error) *MockStoragePoolStateGetStoragePoolByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolStateGetStoragePoolByNameCall) Do(f func(context.Context, string) (storage.StoragePoolDetails, error)) *MockStoragePoolStateGetStoragePoolByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolStateGetStoragePoolByNameCall) DoAndReturn(f func(context.Context, string) (storage.StoragePoolDetails, error)) *MockStoragePoolStateGetStoragePoolByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListStoragePools mocks base method. @@ -93,9 +165,33 @@ func (m *MockStoragePoolState) ListStoragePools(arg0 context.Context, arg1 stora } // ListStoragePools indicates an expected call of ListStoragePools. -func (mr *MockStoragePoolStateMockRecorder) ListStoragePools(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStoragePoolStateMockRecorder) ListStoragePools(arg0, arg1, arg2 any) *MockStoragePoolStateListStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStoragePools", reflect.TypeOf((*MockStoragePoolState)(nil).ListStoragePools), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStoragePools", reflect.TypeOf((*MockStoragePoolState)(nil).ListStoragePools), arg0, arg1, arg2) + return &MockStoragePoolStateListStoragePoolsCall{Call: call} +} + +// MockStoragePoolStateListStoragePoolsCall wrap *gomock.Call +type MockStoragePoolStateListStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolStateListStoragePoolsCall) Return(arg0 []storage.StoragePoolDetails, arg1 error) *MockStoragePoolStateListStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolStateListStoragePoolsCall) Do(f func(context.Context, storage.Names, storage.Providers) ([]storage.StoragePoolDetails, error)) *MockStoragePoolStateListStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolStateListStoragePoolsCall) DoAndReturn(f func(context.Context, storage.Names, storage.Providers) ([]storage.StoragePoolDetails, error)) *MockStoragePoolStateListStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplaceStoragePool mocks base method. @@ -107,7 +203,31 @@ func (m *MockStoragePoolState) ReplaceStoragePool(arg0 context.Context, arg1 sto } // ReplaceStoragePool indicates an expected call of ReplaceStoragePool. -func (mr *MockStoragePoolStateMockRecorder) ReplaceStoragePool(arg0, arg1 any) *gomock.Call { +func (mr *MockStoragePoolStateMockRecorder) ReplaceStoragePool(arg0, arg1 any) *MockStoragePoolStateReplaceStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).ReplaceStoragePool), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceStoragePool", reflect.TypeOf((*MockStoragePoolState)(nil).ReplaceStoragePool), arg0, arg1) + return &MockStoragePoolStateReplaceStoragePoolCall{Call: call} +} + +// MockStoragePoolStateReplaceStoragePoolCall wrap *gomock.Call +type MockStoragePoolStateReplaceStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePoolStateReplaceStoragePoolCall) Return(arg0 error) *MockStoragePoolStateReplaceStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePoolStateReplaceStoragePoolCall) Do(f func(context.Context, storage.StoragePoolDetails) error) *MockStoragePoolStateReplaceStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePoolStateReplaceStoragePoolCall) DoAndReturn(f func(context.Context, storage.StoragePoolDetails) error) *MockStoragePoolStateReplaceStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/unit/service/package_mock_test.go b/domain/unit/service/package_mock_test.go index 4254f1e2471..760de020931 100644 --- a/domain/unit/service/package_mock_test.go +++ b/domain/unit/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/unit/service State +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/unit/service State // // Package service is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockState) DeleteUnit(arg0 context.Context, arg1 string) error { } // DeleteUnit indicates an expected call of DeleteUnit. -func (mr *MockStateMockRecorder) DeleteUnit(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) DeleteUnit(arg0, arg1 any) *MockStateDeleteUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnit", reflect.TypeOf((*MockState)(nil).DeleteUnit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnit", reflect.TypeOf((*MockState)(nil).DeleteUnit), arg0, arg1) + return &MockStateDeleteUnitCall{Call: call} +} + +// MockStateDeleteUnitCall wrap *gomock.Call +type MockStateDeleteUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDeleteUnitCall) Return(arg0 error) *MockStateDeleteUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDeleteUnitCall) Do(f func(context.Context, string) error) *MockStateDeleteUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDeleteUnitCall) DoAndReturn(f func(context.Context, string) error) *MockStateDeleteUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/unit/service/package_test.go b/domain/unit/service/package_test.go index eacfa978b9a..7cc86905bdb 100644 --- a/domain/unit/service/package_test.go +++ b/domain/unit/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/unit/service State +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/unit/service State func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/domain/upgrade/service/package_mock_test.go b/domain/upgrade/service/package_mock_test.go index c423a4f5b40..fa707f7f320 100644 --- a/domain/upgrade/service/package_mock_test.go +++ b/domain/upgrade/service/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/upgrade/service State,WatcherFactory +// mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/upgrade/service State,WatcherFactory // // Package service is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockState) ActiveUpgrade(arg0 context.Context) (upgrade0.UUID, error) { } // ActiveUpgrade indicates an expected call of ActiveUpgrade. -func (mr *MockStateMockRecorder) ActiveUpgrade(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ActiveUpgrade(arg0 any) *MockStateActiveUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockState)(nil).ActiveUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockState)(nil).ActiveUpgrade), arg0) + return &MockStateActiveUpgradeCall{Call: call} +} + +// MockStateActiveUpgradeCall wrap *gomock.Call +type MockStateActiveUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateActiveUpgradeCall) Return(arg0 upgrade0.UUID, arg1 error) *MockStateActiveUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateActiveUpgradeCall) Do(f func(context.Context) (upgrade0.UUID, error)) *MockStateActiveUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateActiveUpgradeCall) DoAndReturn(f func(context.Context) (upgrade0.UUID, error)) *MockStateActiveUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllProvisionedControllersReady mocks base method. @@ -70,9 +94,33 @@ func (m *MockState) AllProvisionedControllersReady(arg0 context.Context, arg1 up } // AllProvisionedControllersReady indicates an expected call of AllProvisionedControllersReady. -func (mr *MockStateMockRecorder) AllProvisionedControllersReady(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) AllProvisionedControllersReady(arg0, arg1 any) *MockStateAllProvisionedControllersReadyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllProvisionedControllersReady", reflect.TypeOf((*MockState)(nil).AllProvisionedControllersReady), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllProvisionedControllersReady", reflect.TypeOf((*MockState)(nil).AllProvisionedControllersReady), arg0, arg1) + return &MockStateAllProvisionedControllersReadyCall{Call: call} +} + +// MockStateAllProvisionedControllersReadyCall wrap *gomock.Call +type MockStateAllProvisionedControllersReadyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateAllProvisionedControllersReadyCall) Return(arg0 bool, arg1 error) *MockStateAllProvisionedControllersReadyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateAllProvisionedControllersReadyCall) Do(f func(context.Context, upgrade0.UUID) (bool, error)) *MockStateAllProvisionedControllersReadyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateAllProvisionedControllersReadyCall) DoAndReturn(f func(context.Context, upgrade0.UUID) (bool, error)) *MockStateAllProvisionedControllersReadyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateUpgrade mocks base method. @@ -85,9 +133,33 @@ func (m *MockState) CreateUpgrade(arg0 context.Context, arg1, arg2 version.Numbe } // CreateUpgrade indicates an expected call of CreateUpgrade. -func (mr *MockStateMockRecorder) CreateUpgrade(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) CreateUpgrade(arg0, arg1, arg2 any) *MockStateCreateUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgrade", reflect.TypeOf((*MockState)(nil).CreateUpgrade), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgrade", reflect.TypeOf((*MockState)(nil).CreateUpgrade), arg0, arg1, arg2) + return &MockStateCreateUpgradeCall{Call: call} +} + +// MockStateCreateUpgradeCall wrap *gomock.Call +type MockStateCreateUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateCreateUpgradeCall) Return(arg0 upgrade0.UUID, arg1 error) *MockStateCreateUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateCreateUpgradeCall) Do(f func(context.Context, version.Number, version.Number) (upgrade0.UUID, error)) *MockStateCreateUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateCreateUpgradeCall) DoAndReturn(f func(context.Context, version.Number, version.Number) (upgrade0.UUID, error)) *MockStateCreateUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerDone mocks base method. @@ -99,9 +171,33 @@ func (m *MockState) SetControllerDone(arg0 context.Context, arg1 upgrade0.UUID, } // SetControllerDone indicates an expected call of SetControllerDone. -func (mr *MockStateMockRecorder) SetControllerDone(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetControllerDone(arg0, arg1, arg2 any) *MockStateSetControllerDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerDone", reflect.TypeOf((*MockState)(nil).SetControllerDone), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerDone", reflect.TypeOf((*MockState)(nil).SetControllerDone), arg0, arg1, arg2) + return &MockStateSetControllerDoneCall{Call: call} +} + +// MockStateSetControllerDoneCall wrap *gomock.Call +type MockStateSetControllerDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetControllerDoneCall) Return(arg0 error) *MockStateSetControllerDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetControllerDoneCall) Do(f func(context.Context, upgrade0.UUID, string) error) *MockStateSetControllerDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetControllerDoneCall) DoAndReturn(f func(context.Context, upgrade0.UUID, string) error) *MockStateSetControllerDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerReady mocks base method. @@ -113,9 +209,33 @@ func (m *MockState) SetControllerReady(arg0 context.Context, arg1 upgrade0.UUID, } // SetControllerReady indicates an expected call of SetControllerReady. -func (mr *MockStateMockRecorder) SetControllerReady(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetControllerReady(arg0, arg1, arg2 any) *MockStateSetControllerReadyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerReady", reflect.TypeOf((*MockState)(nil).SetControllerReady), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerReady", reflect.TypeOf((*MockState)(nil).SetControllerReady), arg0, arg1, arg2) + return &MockStateSetControllerReadyCall{Call: call} +} + +// MockStateSetControllerReadyCall wrap *gomock.Call +type MockStateSetControllerReadyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetControllerReadyCall) Return(arg0 error) *MockStateSetControllerReadyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetControllerReadyCall) Do(f func(context.Context, upgrade0.UUID, string) error) *MockStateSetControllerReadyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetControllerReadyCall) DoAndReturn(f func(context.Context, upgrade0.UUID, string) error) *MockStateSetControllerReadyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDBUpgradeCompleted mocks base method. @@ -127,9 +247,33 @@ func (m *MockState) SetDBUpgradeCompleted(arg0 context.Context, arg1 upgrade0.UU } // SetDBUpgradeCompleted indicates an expected call of SetDBUpgradeCompleted. -func (mr *MockStateMockRecorder) SetDBUpgradeCompleted(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetDBUpgradeCompleted(arg0, arg1 any) *MockStateSetDBUpgradeCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeCompleted", reflect.TypeOf((*MockState)(nil).SetDBUpgradeCompleted), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeCompleted", reflect.TypeOf((*MockState)(nil).SetDBUpgradeCompleted), arg0, arg1) + return &MockStateSetDBUpgradeCompletedCall{Call: call} +} + +// MockStateSetDBUpgradeCompletedCall wrap *gomock.Call +type MockStateSetDBUpgradeCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetDBUpgradeCompletedCall) Return(arg0 error) *MockStateSetDBUpgradeCompletedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetDBUpgradeCompletedCall) Do(f func(context.Context, upgrade0.UUID) error) *MockStateSetDBUpgradeCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetDBUpgradeCompletedCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockStateSetDBUpgradeCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDBUpgradeFailed mocks base method. @@ -141,9 +285,33 @@ func (m *MockState) SetDBUpgradeFailed(arg0 context.Context, arg1 upgrade0.UUID) } // SetDBUpgradeFailed indicates an expected call of SetDBUpgradeFailed. -func (mr *MockStateMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *MockStateSetDBUpgradeFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockState)(nil).SetDBUpgradeFailed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockState)(nil).SetDBUpgradeFailed), arg0, arg1) + return &MockStateSetDBUpgradeFailedCall{Call: call} +} + +// MockStateSetDBUpgradeFailedCall wrap *gomock.Call +type MockStateSetDBUpgradeFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetDBUpgradeFailedCall) Return(arg0 error) *MockStateSetDBUpgradeFailedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetDBUpgradeFailedCall) Do(f func(context.Context, upgrade0.UUID) error) *MockStateSetDBUpgradeFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetDBUpgradeFailedCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockStateSetDBUpgradeFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartUpgrade mocks base method. @@ -155,9 +323,33 @@ func (m *MockState) StartUpgrade(arg0 context.Context, arg1 upgrade0.UUID) error } // StartUpgrade indicates an expected call of StartUpgrade. -func (mr *MockStateMockRecorder) StartUpgrade(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) StartUpgrade(arg0, arg1 any) *MockStateStartUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgrade", reflect.TypeOf((*MockState)(nil).StartUpgrade), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgrade", reflect.TypeOf((*MockState)(nil).StartUpgrade), arg0, arg1) + return &MockStateStartUpgradeCall{Call: call} +} + +// MockStateStartUpgradeCall wrap *gomock.Call +type MockStateStartUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateStartUpgradeCall) Return(arg0 error) *MockStateStartUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateStartUpgradeCall) Do(f func(context.Context, upgrade0.UUID) error) *MockStateStartUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateStartUpgradeCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockStateStartUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeInfo mocks base method. @@ -170,9 +362,33 @@ func (m *MockState) UpgradeInfo(arg0 context.Context, arg1 upgrade0.UUID) (upgra } // UpgradeInfo indicates an expected call of UpgradeInfo. -func (mr *MockStateMockRecorder) UpgradeInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) UpgradeInfo(arg0, arg1 any) *MockStateUpgradeInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockState)(nil).UpgradeInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockState)(nil).UpgradeInfo), arg0, arg1) + return &MockStateUpgradeInfoCall{Call: call} +} + +// MockStateUpgradeInfoCall wrap *gomock.Call +type MockStateUpgradeInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateUpgradeInfoCall) Return(arg0 upgrade.Info, arg1 error) *MockStateUpgradeInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateUpgradeInfoCall) Do(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockStateUpgradeInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateUpgradeInfoCall) DoAndReturn(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockStateUpgradeInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatcherFactory is a mock of WatcherFactory interface. @@ -208,7 +424,31 @@ func (m *MockWatcherFactory) NewValueMapperWatcher(arg0, arg1 string, arg2 chang } // NewValueMapperWatcher indicates an expected call of NewValueMapperWatcher. -func (mr *MockWatcherFactoryMockRecorder) NewValueMapperWatcher(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockWatcherFactoryMockRecorder) NewValueMapperWatcher(arg0, arg1, arg2, arg3 any) *MockWatcherFactoryNewValueMapperWatcherCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueMapperWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueMapperWatcher), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewValueMapperWatcher", reflect.TypeOf((*MockWatcherFactory)(nil).NewValueMapperWatcher), arg0, arg1, arg2, arg3) + return &MockWatcherFactoryNewValueMapperWatcherCall{Call: call} +} + +// MockWatcherFactoryNewValueMapperWatcherCall wrap *gomock.Call +type MockWatcherFactoryNewValueMapperWatcherCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatcherFactoryNewValueMapperWatcherCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatcherFactoryNewValueMapperWatcherCall) Do(f func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatcherFactoryNewValueMapperWatcherCall) DoAndReturn(f func(string, string, changestream.ChangeType, eventsource.Mapper) (watcher.Watcher[struct{}], error)) *MockWatcherFactoryNewValueMapperWatcherCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/domain/upgrade/service/package_test.go b/domain/upgrade/service/package_test.go index f86e4aa07b3..9484771bb35 100644 --- a/domain/upgrade/service/package_test.go +++ b/domain/upgrade/service/package_test.go @@ -13,7 +13,7 @@ import ( "github.com/juju/juju/internal/uuid" ) -//go:generate go run go.uber.org/mock/mockgen -package service -destination package_mock_test.go github.com/juju/juju/domain/upgrade/service State,WatcherFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package service -destination package_mock_test.go github.com/juju/juju/domain/upgrade/service State,WatcherFactory func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/environs/interface.go b/environs/interface.go index 284f25da49d..3858f7771ae 100644 --- a/environs/interface.go +++ b/environs/interface.go @@ -26,7 +26,7 @@ import ( "github.com/juju/juju/internal/storage" ) -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/environs EnvironProvider,CloudEnvironProvider,ProviderSchema,ProviderCredentials,FinalizeCredentialContext,FinalizeCloudContext,CloudFinalizer,CloudDetector,CloudRegionDetector,ConfigGetter,CloudDestroyer,Environ,InstancePrechecker,Firewaller,InstanceTagger,InstanceTypesFetcher,Upgrader,UpgradeStep,DefaultConstraintsChecker,ProviderCredentialsRegister,RequestFinalizeCredential,NetworkingEnviron +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/environs EnvironProvider,CloudEnvironProvider,ProviderSchema,ProviderCredentials,FinalizeCredentialContext,FinalizeCloudContext,CloudFinalizer,CloudDetector,CloudRegionDetector,ConfigGetter,CloudDestroyer,Environ,InstancePrechecker,Firewaller,InstanceTagger,InstanceTypesFetcher,Upgrader,UpgradeStep,DefaultConstraintsChecker,ProviderCredentialsRegister,RequestFinalizeCredential,NetworkingEnviron type ConnectorInfo interface { ConnectionProxyInfo(ctx stdcontext.Context) (proxy.Proxier, error) diff --git a/environs/mocks/package_mock.go b/environs/mocks/package_mock.go index c38fa193ef4..e823bfd082f 100644 --- a/environs/mocks/package_mock.go +++ b/environs/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/environs Environ,NetworkingEnviron,CloudEnvironProvider,InstanceTypesFetcher +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/environs Environ,NetworkingEnviron,CloudEnvironProvider,InstanceTypesFetcher // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -75,9 +99,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -90,9 +138,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -105,9 +177,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -119,9 +215,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -134,9 +254,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -149,9 +293,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -163,9 +331,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -177,9 +369,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -191,9 +407,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -206,9 +446,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -221,9 +485,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -235,9 +523,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -249,9 +561,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -263,9 +599,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -277,9 +637,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -292,9 +676,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -310,10 +718,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -326,9 +758,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -341,9 +797,33 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingEnviron is a mock of NetworkingEnviron interface. @@ -378,9 +858,33 @@ func (m *MockNetworkingEnviron) AdoptResources(arg0 envcontext.ProviderCallConte } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockNetworkingEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockNetworkingEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockNetworkingEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockNetworkingEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockNetworkingEnvironAdoptResourcesCall{Call: call} +} + +// MockNetworkingEnvironAdoptResourcesCall wrap *gomock.Call +type MockNetworkingEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAdoptResourcesCall) Return(arg0 error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -393,9 +897,33 @@ func (m *MockNetworkingEnviron) AllInstances(arg0 envcontext.ProviderCallContext } // AllInstances indicates an expected call of AllInstances. -func (mr *MockNetworkingEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllInstances(arg0 any) *MockNetworkingEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllInstances), arg0) + return &MockNetworkingEnvironAllInstancesCall{Call: call} +} + +// MockNetworkingEnvironAllInstancesCall wrap *gomock.Call +type MockNetworkingEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -408,9 +936,33 @@ func (m *MockNetworkingEnviron) AllRunningInstances(arg0 envcontext.ProviderCall } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockNetworkingEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllRunningInstances(arg0 any) *MockNetworkingEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllRunningInstances), arg0) + return &MockNetworkingEnvironAllRunningInstancesCall{Call: call} +} + +// MockNetworkingEnvironAllRunningInstancesCall wrap *gomock.Call +type MockNetworkingEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllocateContainerAddresses mocks base method. @@ -423,9 +975,33 @@ func (m *MockNetworkingEnviron) AllocateContainerAddresses(arg0 envcontext.Provi } // AllocateContainerAddresses indicates an expected call of AllocateContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *MockNetworkingEnvironAllocateContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + return &MockNetworkingEnvironAllocateContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironAllocateContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironAllocateContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -438,9 +1014,33 @@ func (m *MockNetworkingEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 e } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockNetworkingEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockNetworkingEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockNetworkingEnvironBootstrapCall{Call: call} +} + +// MockNetworkingEnvironBootstrapCall wrap *gomock.Call +type MockNetworkingEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -452,9 +1052,33 @@ func (m *MockNetworkingEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockNetworkingEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Config() *MockNetworkingEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockNetworkingEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockNetworkingEnviron)(nil).Config)) + return &MockNetworkingEnvironConfigCall{Call: call} +} + +// MockNetworkingEnvironConfigCall wrap *gomock.Call +type MockNetworkingEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConfigCall) Return(arg0 *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConfigCall) Do(f func() *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -467,9 +1091,33 @@ func (m *MockNetworkingEnviron) ConstraintsValidator(arg0 envcontext.ProviderCal } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockNetworkingEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockNetworkingEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockNetworkingEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockNetworkingEnviron)(nil).ConstraintsValidator), arg0) + return &MockNetworkingEnvironConstraintsValidatorCall{Call: call} +} + +// MockNetworkingEnvironConstraintsValidatorCall wrap *gomock.Call +type MockNetworkingEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -482,9 +1130,33 @@ func (m *MockNetworkingEnviron) ControllerInstances(arg0 envcontext.ProviderCall } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockNetworkingEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockNetworkingEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockNetworkingEnvironControllerInstancesCall{Call: call} +} + +// MockNetworkingEnvironControllerInstancesCall wrap *gomock.Call +type MockNetworkingEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -496,9 +1168,33 @@ func (m *MockNetworkingEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 } // Create indicates an expected call of Create. -func (mr *MockNetworkingEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Create(arg0, arg1 any) *MockNetworkingEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkingEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkingEnviron)(nil).Create), arg0, arg1) + return &MockNetworkingEnvironCreateCall{Call: call} +} + +// MockNetworkingEnvironCreateCall wrap *gomock.Call +type MockNetworkingEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironCreateCall) Return(arg0 error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -510,9 +1206,33 @@ func (m *MockNetworkingEnviron) Destroy(arg0 envcontext.ProviderCallContext) err } // Destroy indicates an expected call of Destroy. -func (mr *MockNetworkingEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Destroy(arg0 any) *MockNetworkingEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockNetworkingEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockNetworkingEnviron)(nil).Destroy), arg0) + return &MockNetworkingEnvironDestroyCall{Call: call} +} + +// MockNetworkingEnvironDestroyCall wrap *gomock.Call +type MockNetworkingEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironDestroyCall) Return(arg0 error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -524,9 +1244,33 @@ func (m *MockNetworkingEnviron) DestroyController(arg0 envcontext.ProviderCallCo } // DestroyController indicates an expected call of DestroyController. -func (mr *MockNetworkingEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockNetworkingEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockNetworkingEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockNetworkingEnviron)(nil).DestroyController), arg0, arg1) + return &MockNetworkingEnvironDestroyControllerCall{Call: call} +} + +// MockNetworkingEnvironDestroyControllerCall wrap *gomock.Call +type MockNetworkingEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironDestroyControllerCall) Return(arg0 error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -539,9 +1283,33 @@ func (m *MockNetworkingEnviron) InstanceTypes(arg0 envcontext.ProviderCallContex } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockNetworkingEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockNetworkingEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockNetworkingEnvironInstanceTypesCall{Call: call} +} + +// MockNetworkingEnvironInstanceTypesCall wrap *gomock.Call +type MockNetworkingEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -554,9 +1322,33 @@ func (m *MockNetworkingEnviron) Instances(arg0 envcontext.ProviderCallContext, a } // Instances indicates an expected call of Instances. -func (mr *MockNetworkingEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Instances(arg0, arg1 any) *MockNetworkingEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockNetworkingEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockNetworkingEnviron)(nil).Instances), arg0, arg1) + return &MockNetworkingEnvironInstancesCall{Call: call} +} + +// MockNetworkingEnvironInstancesCall wrap *gomock.Call +type MockNetworkingEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInterfaces mocks base method. @@ -569,9 +1361,33 @@ func (m *MockNetworkingEnviron) NetworkInterfaces(arg0 envcontext.ProviderCallCo } // NetworkInterfaces indicates an expected call of NetworkInterfaces. -func (mr *MockNetworkingEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *MockNetworkingEnvironNetworkInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).NetworkInterfaces), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).NetworkInterfaces), arg0, arg1) + return &MockNetworkingEnvironNetworkInterfacesCall{Call: call} +} + +// MockNetworkingEnvironNetworkInterfacesCall wrap *gomock.Call +type MockNetworkingEnvironNetworkInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironNetworkInterfacesCall) Return(arg0 []network.InterfaceInfos, arg1 error) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironNetworkInterfacesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironNetworkInterfacesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -583,9 +1399,33 @@ func (m *MockNetworkingEnviron) PrecheckInstance(arg0 envcontext.ProviderCallCon } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockNetworkingEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockNetworkingEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockNetworkingEnvironPrecheckInstanceCall{Call: call} +} + +// MockNetworkingEnvironPrecheckInstanceCall wrap *gomock.Call +type MockNetworkingEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironPrecheckInstanceCall) Return(arg0 error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -597,9 +1437,33 @@ func (m *MockNetworkingEnviron) PrepareForBootstrap(arg0 environs.BootstrapConte } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockNetworkingEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockNetworkingEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockNetworkingEnvironPrepareForBootstrapCall{Call: call} +} + +// MockNetworkingEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockNetworkingEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironPrepareForBootstrapCall) Return(arg0 error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -611,9 +1475,33 @@ func (m *MockNetworkingEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockNetworkingEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Provider() *MockNetworkingEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockNetworkingEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockNetworkingEnviron)(nil).Provider)) + return &MockNetworkingEnvironProviderCall{Call: call} +} + +// MockNetworkingEnvironProviderCall wrap *gomock.Call +type MockNetworkingEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderSpaceInfo mocks base method. @@ -626,9 +1514,33 @@ func (m *MockNetworkingEnviron) ProviderSpaceInfo(arg0 envcontext.ProviderCallCo } // ProviderSpaceInfo indicates an expected call of ProviderSpaceInfo. -func (mr *MockNetworkingEnvironMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *MockNetworkingEnvironProviderSpaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockNetworkingEnviron)(nil).ProviderSpaceInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockNetworkingEnviron)(nil).ProviderSpaceInfo), arg0, arg1) + return &MockNetworkingEnvironProviderSpaceInfoCall{Call: call} +} + +// MockNetworkingEnvironProviderSpaceInfoCall wrap *gomock.Call +type MockNetworkingEnvironProviderSpaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironProviderSpaceInfoCall) Return(arg0 *environs.ProviderSpaceInfo, arg1 error) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironProviderSpaceInfoCall) Do(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironProviderSpaceInfoCall) DoAndReturn(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -640,9 +1552,33 @@ func (m *MockNetworkingEnviron) ReleaseContainerAddresses(arg0 envcontext.Provid } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *MockNetworkingEnvironReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).ReleaseContainerAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).ReleaseContainerAddresses), arg0, arg1) + return &MockNetworkingEnvironReleaseContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironReleaseContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) Return(arg0 error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -654,9 +1590,33 @@ func (m *MockNetworkingEnviron) SetConfig(arg0 context.Context, arg1 *config.Con } // SetConfig indicates an expected call of SetConfig. -func (mr *MockNetworkingEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockNetworkingEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockNetworkingEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockNetworkingEnviron)(nil).SetConfig), arg0, arg1) + return &MockNetworkingEnvironSetConfigCall{Call: call} +} + +// MockNetworkingEnvironSetConfigCall wrap *gomock.Call +type MockNetworkingEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSetConfigCall) Return(arg0 error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -669,9 +1629,33 @@ func (m *MockNetworkingEnviron) Spaces(arg0 envcontext.ProviderCallContext) (net } // Spaces indicates an expected call of Spaces. -func (mr *MockNetworkingEnvironMockRecorder) Spaces(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Spaces(arg0 any) *MockNetworkingEnvironSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).Spaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).Spaces), arg0) + return &MockNetworkingEnvironSpacesCall{Call: call} +} + +// MockNetworkingEnvironSpacesCall wrap *gomock.Call +type MockNetworkingEnvironSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSpacesCall) Do(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -684,9 +1668,33 @@ func (m *MockNetworkingEnviron) StartInstance(arg0 envcontext.ProviderCallContex } // StartInstance indicates an expected call of StartInstance. -func (mr *MockNetworkingEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockNetworkingEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).StartInstance), arg0, arg1) + return &MockNetworkingEnvironStartInstanceCall{Call: call} +} + +// MockNetworkingEnvironStartInstanceCall wrap *gomock.Call +type MockNetworkingEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -702,10 +1710,34 @@ func (m *MockNetworkingEnviron) StopInstances(arg0 envcontext.ProviderCallContex } // StopInstances indicates an expected call of StopInstances. -func (mr *MockNetworkingEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockNetworkingEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).StopInstances), varargs...) + return &MockNetworkingEnvironStopInstancesCall{Call: call} +} + +// MockNetworkingEnvironStopInstancesCall wrap *gomock.Call +type MockNetworkingEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStopInstancesCall) Return(arg0 error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -718,9 +1750,33 @@ func (m *MockNetworkingEnviron) StorageProvider(arg0 storage.ProviderType) (stor } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockNetworkingEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StorageProvider(arg0 any) *MockNetworkingEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProvider), arg0) + return &MockNetworkingEnvironStorageProviderCall{Call: call} +} + +// MockNetworkingEnvironStorageProviderCall wrap *gomock.Call +type MockNetworkingEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -733,9 +1789,33 @@ func (m *MockNetworkingEnviron) StorageProviderTypes() ([]storage.ProviderType, } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockNetworkingEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StorageProviderTypes() *MockNetworkingEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProviderTypes)) + return &MockNetworkingEnvironStorageProviderTypesCall{Call: call} +} + +// MockNetworkingEnvironStorageProviderTypesCall wrap *gomock.Call +type MockNetworkingEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -748,9 +1828,33 @@ func (m *MockNetworkingEnviron) Subnets(arg0 envcontext.ProviderCallContext, arg } // Subnets indicates an expected call of Subnets. -func (mr *MockNetworkingEnvironMockRecorder) Subnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Subnets(arg0, arg1, arg2 any) *MockNetworkingEnvironSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).Subnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).Subnets), arg0, arg1, arg2) + return &MockNetworkingEnvironSubnetsCall{Call: call} +} + +// MockNetworkingEnvironSubnetsCall wrap *gomock.Call +type MockNetworkingEnvironSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSubnetsCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSubnetsCall) Do(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SuperSubnets mocks base method. @@ -763,9 +1867,33 @@ func (m *MockNetworkingEnviron) SuperSubnets(arg0 envcontext.ProviderCallContext } // SuperSubnets indicates an expected call of SuperSubnets. -func (mr *MockNetworkingEnvironMockRecorder) SuperSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SuperSubnets(arg0 any) *MockNetworkingEnvironSuperSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).SuperSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).SuperSubnets), arg0) + return &MockNetworkingEnvironSuperSubnetsCall{Call: call} +} + +// MockNetworkingEnvironSuperSubnetsCall wrap *gomock.Call +type MockNetworkingEnvironSuperSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSuperSubnetsCall) Return(arg0 []string, arg1 error) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSuperSubnetsCall) Do(f func(envcontext.ProviderCallContext) ([]string, error)) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSuperSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]string, error)) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsContainerAddresses mocks base method. @@ -778,9 +1906,33 @@ func (m *MockNetworkingEnviron) SupportsContainerAddresses(arg0 envcontext.Provi } // SupportsContainerAddresses indicates an expected call of SupportsContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) SupportsContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsContainerAddresses(arg0 any) *MockNetworkingEnvironSupportsContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsContainerAddresses), arg0) + return &MockNetworkingEnvironSupportsContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironSupportsContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironSupportsContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaceDiscovery mocks base method. @@ -793,9 +1945,33 @@ func (m *MockNetworkingEnviron) SupportsSpaceDiscovery(arg0 envcontext.ProviderC } // SupportsSpaceDiscovery indicates an expected call of SupportsSpaceDiscovery. -func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaceDiscovery(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaceDiscovery(arg0 any) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaceDiscovery), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaceDiscovery), arg0) + return &MockNetworkingEnvironSupportsSpaceDiscoveryCall{Call: call} +} + +// MockNetworkingEnvironSupportsSpaceDiscoveryCall wrap *gomock.Call +type MockNetworkingEnvironSupportsSpaceDiscoveryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaces mocks base method. @@ -808,9 +1984,33 @@ func (m *MockNetworkingEnviron) SupportsSpaces(arg0 envcontext.ProviderCallConte } // SupportsSpaces indicates an expected call of SupportsSpaces. -func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaces(arg0 any) *MockNetworkingEnvironSupportsSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaces), arg0) + return &MockNetworkingEnvironSupportsSpacesCall{Call: call} +} + +// MockNetworkingEnvironSupportsSpacesCall wrap *gomock.Call +type MockNetworkingEnvironSupportsSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsSpacesCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsSpacesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudEnvironProvider is a mock of CloudEnvironProvider interface. @@ -845,9 +2045,33 @@ func (m *MockCloudEnvironProvider) CloudSchema() *jsonschema.Schema { } // CloudSchema indicates an expected call of CloudSchema. -func (mr *MockCloudEnvironProviderMockRecorder) CloudSchema() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) CloudSchema() *MockCloudEnvironProviderCloudSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CloudSchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CloudSchema)) + return &MockCloudEnvironProviderCloudSchemaCall{Call: call} +} + +// MockCloudEnvironProviderCloudSchemaCall wrap *gomock.Call +type MockCloudEnvironProviderCloudSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderCloudSchemaCall) Return(arg0 *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderCloudSchemaCall) Do(f func() *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderCloudSchemaCall) DoAndReturn(f func() *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialSchemas mocks base method. @@ -859,9 +2083,33 @@ func (m *MockCloudEnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud. } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockCloudEnvironProviderMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) CredentialSchemas() *MockCloudEnvironProviderCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CredentialSchemas)) + return &MockCloudEnvironProviderCredentialSchemasCall{Call: call} +} + +// MockCloudEnvironProviderCredentialSchemasCall wrap *gomock.Call +type MockCloudEnvironProviderCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -874,9 +2122,33 @@ func (m *MockCloudEnvironProvider) DetectCredentials(arg0 string) (*cloud.CloudC } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockCloudEnvironProviderMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) DetectCredentials(arg0 any) *MockCloudEnvironProviderDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockCloudEnvironProvider)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockCloudEnvironProvider)(nil).DetectCredentials), arg0) + return &MockCloudEnvironProviderDetectCredentialsCall{Call: call} +} + +// MockCloudEnvironProviderDetectCredentialsCall wrap *gomock.Call +type MockCloudEnvironProviderDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -889,9 +2161,33 @@ func (m *MockCloudEnvironProvider) FinalizeCredential(arg0 environs.FinalizeCred } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockCloudEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *MockCloudEnvironProviderFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockCloudEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockCloudEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + return &MockCloudEnvironProviderFinalizeCredentialCall{Call: call} +} + +// MockCloudEnvironProviderFinalizeCredentialCall wrap *gomock.Call +type MockCloudEnvironProviderFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -904,9 +2200,33 @@ func (m *MockCloudEnvironProvider) Open(arg0 context.Context, arg1 environs.Open } // Open indicates an expected call of Open. -func (mr *MockCloudEnvironProviderMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Open(arg0, arg1 any) *MockCloudEnvironProviderOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Open), arg0, arg1) + return &MockCloudEnvironProviderOpenCall{Call: call} +} + +// MockCloudEnvironProviderOpenCall wrap *gomock.Call +type MockCloudEnvironProviderOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderOpenCall) Return(arg0 environs.Environ, arg1 error) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderOpenCall) Do(f func(context.Context, environs.OpenParams) (environs.Environ, error)) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderOpenCall) DoAndReturn(f func(context.Context, environs.OpenParams) (environs.Environ, error)) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -918,9 +2238,33 @@ func (m *MockCloudEnvironProvider) Ping(arg0 envcontext.ProviderCallContext, arg } // Ping indicates an expected call of Ping. -func (mr *MockCloudEnvironProviderMockRecorder) Ping(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Ping(arg0, arg1 any) *MockCloudEnvironProviderPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Ping), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Ping), arg0, arg1) + return &MockCloudEnvironProviderPingCall{Call: call} +} + +// MockCloudEnvironProviderPingCall wrap *gomock.Call +type MockCloudEnvironProviderPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderPingCall) Return(arg0 error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderPingCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderPingCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareConfig mocks base method. @@ -933,9 +2277,33 @@ func (m *MockCloudEnvironProvider) PrepareConfig(arg0 context.Context, arg1 envi } // PrepareConfig indicates an expected call of PrepareConfig. -func (mr *MockCloudEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *MockCloudEnvironProviderPrepareConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockCloudEnvironProvider)(nil).PrepareConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockCloudEnvironProvider)(nil).PrepareConfig), arg0, arg1) + return &MockCloudEnvironProviderPrepareConfigCall{Call: call} +} + +// MockCloudEnvironProviderPrepareConfigCall wrap *gomock.Call +type MockCloudEnvironProviderPrepareConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderPrepareConfigCall) Return(arg0 *config.Config, arg1 error) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderPrepareConfigCall) Do(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderPrepareConfigCall) DoAndReturn(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -948,9 +2316,33 @@ func (m *MockCloudEnvironProvider) Validate(arg0 context.Context, arg1, arg2 *co } // Validate indicates an expected call of Validate. -func (mr *MockCloudEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *MockCloudEnvironProviderValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Validate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Validate), arg0, arg1, arg2) + return &MockCloudEnvironProviderValidateCall{Call: call} +} + +// MockCloudEnvironProviderValidateCall wrap *gomock.Call +type MockCloudEnvironProviderValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderValidateCall) Return(arg0 *config.Config, arg1 error) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderValidateCall) Do(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderValidateCall) DoAndReturn(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -962,9 +2354,33 @@ func (m *MockCloudEnvironProvider) Version() int { } // Version indicates an expected call of Version. -func (mr *MockCloudEnvironProviderMockRecorder) Version() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Version() *MockCloudEnvironProviderVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Version)) + return &MockCloudEnvironProviderVersionCall{Call: call} +} + +// MockCloudEnvironProviderVersionCall wrap *gomock.Call +type MockCloudEnvironProviderVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderVersionCall) Return(arg0 int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderVersionCall) Do(f func() int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderVersionCall) DoAndReturn(f func() int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceTypesFetcher is a mock of InstanceTypesFetcher interface. @@ -1000,7 +2416,31 @@ func (m *MockInstanceTypesFetcher) InstanceTypes(arg0 envcontext.ProviderCallCon } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockInstanceTypesFetcherMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceTypesFetcherMockRecorder) InstanceTypes(arg0, arg1 any) *MockInstanceTypesFetcherInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockInstanceTypesFetcher)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockInstanceTypesFetcher)(nil).InstanceTypes), arg0, arg1) + return &MockInstanceTypesFetcherInstanceTypesCall{Call: call} +} + +// MockInstanceTypesFetcherInstanceTypesCall wrap *gomock.Call +type MockInstanceTypesFetcherInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceTypesFetcherInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceTypesFetcherInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceTypesFetcherInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/environs/package_test.go b/environs/package_test.go index 993391a95b1..a488a1a7c75 100644 --- a/environs/package_test.go +++ b/environs/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/environs Environ,NetworkingEnviron,CloudEnvironProvider,InstanceTypesFetcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/environs Environ,NetworkingEnviron,CloudEnvironProvider,InstanceTypesFetcher func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/environs/sync/package_test.go b/environs/sync/package_test.go index 1e402138903..b770a0a2111 100644 --- a/environs/sync/package_test.go +++ b/environs/sync/package_test.go @@ -13,4 +13,4 @@ func TestPackage(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package sync_test -destination simplestreams_mock_test.go github.com/juju/juju/environs/tools SimplestreamsFetcher +//go:generate go run go.uber.org/mock/mockgen -typed -package sync_test -destination simplestreams_mock_test.go github.com/juju/juju/environs/tools SimplestreamsFetcher diff --git a/environs/sync/simplestreams_mock_test.go b/environs/sync/simplestreams_mock_test.go index 94e95a2d49f..a4ba2cf5571 100644 --- a/environs/sync/simplestreams_mock_test.go +++ b/environs/sync/simplestreams_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sync_test -destination simplestreams_mock_test.go github.com/juju/juju/environs/tools SimplestreamsFetcher +// mockgen -typed -package sync_test -destination simplestreams_mock_test.go github.com/juju/juju/environs/tools SimplestreamsFetcher // // Package sync_test is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockSimplestreamsFetcher) GetMetadata(arg0 context.Context, arg1 []simp } // GetMetadata indicates an expected call of GetMetadata. -func (mr *MockSimplestreamsFetcherMockRecorder) GetMetadata(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSimplestreamsFetcherMockRecorder) GetMetadata(arg0, arg1, arg2 any) *MockSimplestreamsFetcherGetMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockSimplestreamsFetcher)(nil).GetMetadata), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockSimplestreamsFetcher)(nil).GetMetadata), arg0, arg1, arg2) + return &MockSimplestreamsFetcherGetMetadataCall{Call: call} +} + +// MockSimplestreamsFetcherGetMetadataCall wrap *gomock.Call +type MockSimplestreamsFetcherGetMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSimplestreamsFetcherGetMetadataCall) Return(arg0 []any, arg1 *simplestreams.ResolveInfo, arg2 error) *MockSimplestreamsFetcherGetMetadataCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSimplestreamsFetcherGetMetadataCall) Do(f func(context.Context, []simplestreams.DataSource, simplestreams.GetMetadataParams) ([]any, *simplestreams.ResolveInfo, error)) *MockSimplestreamsFetcherGetMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSimplestreamsFetcherGetMetadataCall) DoAndReturn(f func(context.Context, []simplestreams.DataSource, simplestreams.GetMetadataParams) ([]any, *simplestreams.ResolveInfo, error)) *MockSimplestreamsFetcherGetMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewDataSource mocks base method. @@ -65,7 +89,31 @@ func (m *MockSimplestreamsFetcher) NewDataSource(arg0 simplestreams.Config) simp } // NewDataSource indicates an expected call of NewDataSource. -func (mr *MockSimplestreamsFetcherMockRecorder) NewDataSource(arg0 any) *gomock.Call { +func (mr *MockSimplestreamsFetcherMockRecorder) NewDataSource(arg0 any) *MockSimplestreamsFetcherNewDataSourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewDataSource", reflect.TypeOf((*MockSimplestreamsFetcher)(nil).NewDataSource), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewDataSource", reflect.TypeOf((*MockSimplestreamsFetcher)(nil).NewDataSource), arg0) + return &MockSimplestreamsFetcherNewDataSourceCall{Call: call} +} + +// MockSimplestreamsFetcherNewDataSourceCall wrap *gomock.Call +type MockSimplestreamsFetcherNewDataSourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSimplestreamsFetcherNewDataSourceCall) Return(arg0 simplestreams.DataSource) *MockSimplestreamsFetcherNewDataSourceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSimplestreamsFetcherNewDataSourceCall) Do(f func(simplestreams.Config) simplestreams.DataSource) *MockSimplestreamsFetcherNewDataSourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSimplestreamsFetcherNewDataSourceCall) DoAndReturn(f func(simplestreams.Config) simplestreams.DataSource) *MockSimplestreamsFetcherNewDataSourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/environs/testing/package_mock.go b/environs/testing/package_mock.go index 18c1af8d526..ba31c3e31da 100644 --- a/environs/testing/package_mock.go +++ b/environs/testing/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/environs EnvironProvider,CloudEnvironProvider,ProviderSchema,ProviderCredentials,FinalizeCredentialContext,FinalizeCloudContext,CloudFinalizer,CloudDetector,CloudRegionDetector,ConfigGetter,CloudDestroyer,Environ,InstancePrechecker,Firewaller,InstanceTagger,InstanceTypesFetcher,Upgrader,UpgradeStep,DefaultConstraintsChecker,ProviderCredentialsRegister,RequestFinalizeCredential,NetworkingEnviron +// mockgen -typed -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/environs EnvironProvider,CloudEnvironProvider,ProviderSchema,ProviderCredentials,FinalizeCredentialContext,FinalizeCloudContext,CloudFinalizer,CloudDetector,CloudRegionDetector,ConfigGetter,CloudDestroyer,Environ,InstancePrechecker,Firewaller,InstanceTagger,InstanceTypesFetcher,Upgrader,UpgradeStep,DefaultConstraintsChecker,ProviderCredentialsRegister,RequestFinalizeCredential,NetworkingEnviron package testing import ( @@ -61,9 +61,33 @@ func (m *MockEnvironProvider) CloudSchema() *jsonschema.Schema { } // CloudSchema indicates an expected call of CloudSchema. -func (mr *MockEnvironProviderMockRecorder) CloudSchema() *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) CloudSchema() *MockEnvironProviderCloudSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockEnvironProvider)(nil).CloudSchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockEnvironProvider)(nil).CloudSchema)) + return &MockEnvironProviderCloudSchemaCall{Call: call} +} + +// MockEnvironProviderCloudSchemaCall wrap *gomock.Call +type MockEnvironProviderCloudSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCloudSchemaCall) Return(arg0 *jsonschema.Schema) *MockEnvironProviderCloudSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCloudSchemaCall) Do(f func() *jsonschema.Schema) *MockEnvironProviderCloudSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCloudSchemaCall) DoAndReturn(f func() *jsonschema.Schema) *MockEnvironProviderCloudSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialSchemas mocks base method. @@ -75,9 +99,33 @@ func (m *MockEnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud.Crede } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockEnvironProviderMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) CredentialSchemas() *MockEnvironProviderCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockEnvironProvider)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockEnvironProvider)(nil).CredentialSchemas)) + return &MockEnvironProviderCredentialSchemasCall{Call: call} +} + +// MockEnvironProviderCredentialSchemasCall wrap *gomock.Call +type MockEnvironProviderCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockEnvironProviderCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -90,9 +138,33 @@ func (m *MockEnvironProvider) DetectCredentials(arg0 string) (*cloud.CloudCreden } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockEnvironProviderMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) DetectCredentials(arg0 any) *MockEnvironProviderDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockEnvironProvider)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockEnvironProvider)(nil).DetectCredentials), arg0) + return &MockEnvironProviderDetectCredentialsCall{Call: call} +} + +// MockEnvironProviderDetectCredentialsCall wrap *gomock.Call +type MockEnvironProviderDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockEnvironProviderDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -105,9 +177,33 @@ func (m *MockEnvironProvider) FinalizeCredential(arg0 environs.FinalizeCredentia } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *MockEnvironProviderFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + return &MockEnvironProviderFinalizeCredentialCall{Call: call} +} + +// MockEnvironProviderFinalizeCredentialCall wrap *gomock.Call +type MockEnvironProviderFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -119,9 +215,33 @@ func (m *MockEnvironProvider) Ping(arg0 envcontext.ProviderCallContext, arg1 str } // Ping indicates an expected call of Ping. -func (mr *MockEnvironProviderMockRecorder) Ping(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) Ping(arg0, arg1 any) *MockEnvironProviderPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockEnvironProvider)(nil).Ping), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockEnvironProvider)(nil).Ping), arg0, arg1) + return &MockEnvironProviderPingCall{Call: call} +} + +// MockEnvironProviderPingCall wrap *gomock.Call +type MockEnvironProviderPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderPingCall) Return(arg0 error) *MockEnvironProviderPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderPingCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironProviderPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderPingCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironProviderPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareConfig mocks base method. @@ -134,9 +254,33 @@ func (m *MockEnvironProvider) PrepareConfig(arg0 context.Context, arg1 environs. } // PrepareConfig indicates an expected call of PrepareConfig. -func (mr *MockEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *MockEnvironProviderPrepareConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockEnvironProvider)(nil).PrepareConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockEnvironProvider)(nil).PrepareConfig), arg0, arg1) + return &MockEnvironProviderPrepareConfigCall{Call: call} +} + +// MockEnvironProviderPrepareConfigCall wrap *gomock.Call +type MockEnvironProviderPrepareConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderPrepareConfigCall) Return(arg0 *config.Config, arg1 error) *MockEnvironProviderPrepareConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderPrepareConfigCall) Do(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockEnvironProviderPrepareConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderPrepareConfigCall) DoAndReturn(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockEnvironProviderPrepareConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -149,9 +293,33 @@ func (m *MockEnvironProvider) Validate(arg0 context.Context, arg1, arg2 *config. } // Validate indicates an expected call of Validate. -func (mr *MockEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *MockEnvironProviderValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockEnvironProvider)(nil).Validate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockEnvironProvider)(nil).Validate), arg0, arg1, arg2) + return &MockEnvironProviderValidateCall{Call: call} +} + +// MockEnvironProviderValidateCall wrap *gomock.Call +type MockEnvironProviderValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderValidateCall) Return(arg0 *config.Config, arg1 error) *MockEnvironProviderValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderValidateCall) Do(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockEnvironProviderValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderValidateCall) DoAndReturn(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockEnvironProviderValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -163,9 +331,33 @@ func (m *MockEnvironProvider) Version() int { } // Version indicates an expected call of Version. -func (mr *MockEnvironProviderMockRecorder) Version() *gomock.Call { +func (mr *MockEnvironProviderMockRecorder) Version() *MockEnvironProviderVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockEnvironProvider)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockEnvironProvider)(nil).Version)) + return &MockEnvironProviderVersionCall{Call: call} +} + +// MockEnvironProviderVersionCall wrap *gomock.Call +type MockEnvironProviderVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderVersionCall) Return(arg0 int) *MockEnvironProviderVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderVersionCall) Do(f func() int) *MockEnvironProviderVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderVersionCall) DoAndReturn(f func() int) *MockEnvironProviderVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudEnvironProvider is a mock of CloudEnvironProvider interface. @@ -200,9 +392,33 @@ func (m *MockCloudEnvironProvider) CloudSchema() *jsonschema.Schema { } // CloudSchema indicates an expected call of CloudSchema. -func (mr *MockCloudEnvironProviderMockRecorder) CloudSchema() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) CloudSchema() *MockCloudEnvironProviderCloudSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CloudSchema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSchema", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CloudSchema)) + return &MockCloudEnvironProviderCloudSchemaCall{Call: call} +} + +// MockCloudEnvironProviderCloudSchemaCall wrap *gomock.Call +type MockCloudEnvironProviderCloudSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderCloudSchemaCall) Return(arg0 *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderCloudSchemaCall) Do(f func() *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderCloudSchemaCall) DoAndReturn(f func() *jsonschema.Schema) *MockCloudEnvironProviderCloudSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CredentialSchemas mocks base method. @@ -214,9 +430,33 @@ func (m *MockCloudEnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud. } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockCloudEnvironProviderMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) CredentialSchemas() *MockCloudEnvironProviderCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockCloudEnvironProvider)(nil).CredentialSchemas)) + return &MockCloudEnvironProviderCredentialSchemasCall{Call: call} +} + +// MockCloudEnvironProviderCredentialSchemasCall wrap *gomock.Call +type MockCloudEnvironProviderCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockCloudEnvironProviderCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -229,9 +469,33 @@ func (m *MockCloudEnvironProvider) DetectCredentials(arg0 string) (*cloud.CloudC } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockCloudEnvironProviderMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) DetectCredentials(arg0 any) *MockCloudEnvironProviderDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockCloudEnvironProvider)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockCloudEnvironProvider)(nil).DetectCredentials), arg0) + return &MockCloudEnvironProviderDetectCredentialsCall{Call: call} +} + +// MockCloudEnvironProviderDetectCredentialsCall wrap *gomock.Call +type MockCloudEnvironProviderDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockCloudEnvironProviderDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -244,9 +508,33 @@ func (m *MockCloudEnvironProvider) FinalizeCredential(arg0 environs.FinalizeCred } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockCloudEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) FinalizeCredential(arg0, arg1 any) *MockCloudEnvironProviderFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockCloudEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockCloudEnvironProvider)(nil).FinalizeCredential), arg0, arg1) + return &MockCloudEnvironProviderFinalizeCredentialCall{Call: call} +} + +// MockCloudEnvironProviderFinalizeCredentialCall wrap *gomock.Call +type MockCloudEnvironProviderFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockCloudEnvironProviderFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -259,9 +547,33 @@ func (m *MockCloudEnvironProvider) Open(arg0 context.Context, arg1 environs.Open } // Open indicates an expected call of Open. -func (mr *MockCloudEnvironProviderMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Open(arg0, arg1 any) *MockCloudEnvironProviderOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Open), arg0, arg1) + return &MockCloudEnvironProviderOpenCall{Call: call} +} + +// MockCloudEnvironProviderOpenCall wrap *gomock.Call +type MockCloudEnvironProviderOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderOpenCall) Return(arg0 environs.Environ, arg1 error) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderOpenCall) Do(f func(context.Context, environs.OpenParams) (environs.Environ, error)) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderOpenCall) DoAndReturn(f func(context.Context, environs.OpenParams) (environs.Environ, error)) *MockCloudEnvironProviderOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -273,9 +585,33 @@ func (m *MockCloudEnvironProvider) Ping(arg0 envcontext.ProviderCallContext, arg } // Ping indicates an expected call of Ping. -func (mr *MockCloudEnvironProviderMockRecorder) Ping(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Ping(arg0, arg1 any) *MockCloudEnvironProviderPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Ping), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Ping), arg0, arg1) + return &MockCloudEnvironProviderPingCall{Call: call} +} + +// MockCloudEnvironProviderPingCall wrap *gomock.Call +type MockCloudEnvironProviderPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderPingCall) Return(arg0 error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderPingCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderPingCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockCloudEnvironProviderPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareConfig mocks base method. @@ -288,9 +624,33 @@ func (m *MockCloudEnvironProvider) PrepareConfig(arg0 context.Context, arg1 envi } // PrepareConfig indicates an expected call of PrepareConfig. -func (mr *MockCloudEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) PrepareConfig(arg0, arg1 any) *MockCloudEnvironProviderPrepareConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockCloudEnvironProvider)(nil).PrepareConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareConfig", reflect.TypeOf((*MockCloudEnvironProvider)(nil).PrepareConfig), arg0, arg1) + return &MockCloudEnvironProviderPrepareConfigCall{Call: call} +} + +// MockCloudEnvironProviderPrepareConfigCall wrap *gomock.Call +type MockCloudEnvironProviderPrepareConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderPrepareConfigCall) Return(arg0 *config.Config, arg1 error) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderPrepareConfigCall) Do(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderPrepareConfigCall) DoAndReturn(f func(context.Context, environs.PrepareConfigParams) (*config.Config, error)) *MockCloudEnvironProviderPrepareConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -303,9 +663,33 @@ func (m *MockCloudEnvironProvider) Validate(arg0 context.Context, arg1, arg2 *co } // Validate indicates an expected call of Validate. -func (mr *MockCloudEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Validate(arg0, arg1, arg2 any) *MockCloudEnvironProviderValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Validate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Validate), arg0, arg1, arg2) + return &MockCloudEnvironProviderValidateCall{Call: call} +} + +// MockCloudEnvironProviderValidateCall wrap *gomock.Call +type MockCloudEnvironProviderValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderValidateCall) Return(arg0 *config.Config, arg1 error) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderValidateCall) Do(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderValidateCall) DoAndReturn(f func(context.Context, *config.Config, *config.Config) (*config.Config, error)) *MockCloudEnvironProviderValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -317,9 +701,33 @@ func (m *MockCloudEnvironProvider) Version() int { } // Version indicates an expected call of Version. -func (mr *MockCloudEnvironProviderMockRecorder) Version() *gomock.Call { +func (mr *MockCloudEnvironProviderMockRecorder) Version() *MockCloudEnvironProviderVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCloudEnvironProvider)(nil).Version)) + return &MockCloudEnvironProviderVersionCall{Call: call} +} + +// MockCloudEnvironProviderVersionCall wrap *gomock.Call +type MockCloudEnvironProviderVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudEnvironProviderVersionCall) Return(arg0 int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudEnvironProviderVersionCall) Do(f func() int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudEnvironProviderVersionCall) DoAndReturn(f func() int) *MockCloudEnvironProviderVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProviderSchema is a mock of ProviderSchema interface. @@ -354,9 +762,33 @@ func (m *MockProviderSchema) Schema() environschema.Fields { } // Schema indicates an expected call of Schema. -func (mr *MockProviderSchemaMockRecorder) Schema() *gomock.Call { +func (mr *MockProviderSchemaMockRecorder) Schema() *MockProviderSchemaSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schema", reflect.TypeOf((*MockProviderSchema)(nil).Schema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schema", reflect.TypeOf((*MockProviderSchema)(nil).Schema)) + return &MockProviderSchemaSchemaCall{Call: call} +} + +// MockProviderSchemaSchemaCall wrap *gomock.Call +type MockProviderSchemaSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSchemaSchemaCall) Return(arg0 environschema.Fields) *MockProviderSchemaSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSchemaSchemaCall) Do(f func() environschema.Fields) *MockProviderSchemaSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSchemaSchemaCall) DoAndReturn(f func() environschema.Fields) *MockProviderSchemaSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProviderCredentials is a mock of ProviderCredentials interface. @@ -391,9 +823,33 @@ func (m *MockProviderCredentials) CredentialSchemas() map[cloud.AuthType]cloud.C } // CredentialSchemas indicates an expected call of CredentialSchemas. -func (mr *MockProviderCredentialsMockRecorder) CredentialSchemas() *gomock.Call { +func (mr *MockProviderCredentialsMockRecorder) CredentialSchemas() *MockProviderCredentialsCredentialSchemasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockProviderCredentials)(nil).CredentialSchemas)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialSchemas", reflect.TypeOf((*MockProviderCredentials)(nil).CredentialSchemas)) + return &MockProviderCredentialsCredentialSchemasCall{Call: call} +} + +// MockProviderCredentialsCredentialSchemasCall wrap *gomock.Call +type MockProviderCredentialsCredentialSchemasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCredentialsCredentialSchemasCall) Return(arg0 map[cloud.AuthType]cloud.CredentialSchema) *MockProviderCredentialsCredentialSchemasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCredentialsCredentialSchemasCall) Do(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockProviderCredentialsCredentialSchemasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCredentialsCredentialSchemasCall) DoAndReturn(f func() map[cloud.AuthType]cloud.CredentialSchema) *MockProviderCredentialsCredentialSchemasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectCredentials mocks base method. @@ -406,9 +862,33 @@ func (m *MockProviderCredentials) DetectCredentials(arg0 string) (*cloud.CloudCr } // DetectCredentials indicates an expected call of DetectCredentials. -func (mr *MockProviderCredentialsMockRecorder) DetectCredentials(arg0 any) *gomock.Call { +func (mr *MockProviderCredentialsMockRecorder) DetectCredentials(arg0 any) *MockProviderCredentialsDetectCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockProviderCredentials)(nil).DetectCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCredentials", reflect.TypeOf((*MockProviderCredentials)(nil).DetectCredentials), arg0) + return &MockProviderCredentialsDetectCredentialsCall{Call: call} +} + +// MockProviderCredentialsDetectCredentialsCall wrap *gomock.Call +type MockProviderCredentialsDetectCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCredentialsDetectCredentialsCall) Return(arg0 *cloud.CloudCredential, arg1 error) *MockProviderCredentialsDetectCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCredentialsDetectCredentialsCall) Do(f func(string) (*cloud.CloudCredential, error)) *MockProviderCredentialsDetectCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCredentialsDetectCredentialsCall) DoAndReturn(f func(string) (*cloud.CloudCredential, error)) *MockProviderCredentialsDetectCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FinalizeCredential mocks base method. @@ -421,9 +901,33 @@ func (m *MockProviderCredentials) FinalizeCredential(arg0 environs.FinalizeCrede } // FinalizeCredential indicates an expected call of FinalizeCredential. -func (mr *MockProviderCredentialsMockRecorder) FinalizeCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderCredentialsMockRecorder) FinalizeCredential(arg0, arg1 any) *MockProviderCredentialsFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockProviderCredentials)(nil).FinalizeCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCredential", reflect.TypeOf((*MockProviderCredentials)(nil).FinalizeCredential), arg0, arg1) + return &MockProviderCredentialsFinalizeCredentialCall{Call: call} +} + +// MockProviderCredentialsFinalizeCredentialCall wrap *gomock.Call +type MockProviderCredentialsFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCredentialsFinalizeCredentialCall) Return(arg0 *cloud.Credential, arg1 error) *MockProviderCredentialsFinalizeCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCredentialsFinalizeCredentialCall) Do(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockProviderCredentialsFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCredentialsFinalizeCredentialCall) DoAndReturn(f func(environs.FinalizeCredentialContext, environs.FinalizeCredentialParams) (*cloud.Credential, error)) *MockProviderCredentialsFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFinalizeCredentialContext is a mock of FinalizeCredentialContext interface. @@ -458,9 +962,33 @@ func (m *MockFinalizeCredentialContext) GetStderr() io.Writer { } // GetStderr indicates an expected call of GetStderr. -func (mr *MockFinalizeCredentialContextMockRecorder) GetStderr() *gomock.Call { +func (mr *MockFinalizeCredentialContextMockRecorder) GetStderr() *MockFinalizeCredentialContextGetStderrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStderr", reflect.TypeOf((*MockFinalizeCredentialContext)(nil).GetStderr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStderr", reflect.TypeOf((*MockFinalizeCredentialContext)(nil).GetStderr)) + return &MockFinalizeCredentialContextGetStderrCall{Call: call} +} + +// MockFinalizeCredentialContextGetStderrCall wrap *gomock.Call +type MockFinalizeCredentialContextGetStderrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCredentialContextGetStderrCall) Return(arg0 io.Writer) *MockFinalizeCredentialContextGetStderrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCredentialContextGetStderrCall) Do(f func() io.Writer) *MockFinalizeCredentialContextGetStderrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCredentialContextGetStderrCall) DoAndReturn(f func() io.Writer) *MockFinalizeCredentialContextGetStderrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Verbosef mocks base method. @@ -474,10 +1002,34 @@ func (m *MockFinalizeCredentialContext) Verbosef(arg0 string, arg1 ...any) { } // Verbosef indicates an expected call of Verbosef. -func (mr *MockFinalizeCredentialContextMockRecorder) Verbosef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockFinalizeCredentialContextMockRecorder) Verbosef(arg0 any, arg1 ...any) *MockFinalizeCredentialContextVerbosefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verbosef", reflect.TypeOf((*MockFinalizeCredentialContext)(nil).Verbosef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verbosef", reflect.TypeOf((*MockFinalizeCredentialContext)(nil).Verbosef), varargs...) + return &MockFinalizeCredentialContextVerbosefCall{Call: call} +} + +// MockFinalizeCredentialContextVerbosefCall wrap *gomock.Call +type MockFinalizeCredentialContextVerbosefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCredentialContextVerbosefCall) Return() *MockFinalizeCredentialContextVerbosefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCredentialContextVerbosefCall) Do(f func(string, ...any)) *MockFinalizeCredentialContextVerbosefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCredentialContextVerbosefCall) DoAndReturn(f func(string, ...any)) *MockFinalizeCredentialContextVerbosefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFinalizeCloudContext is a mock of FinalizeCloudContext interface. @@ -513,9 +1065,33 @@ func (m *MockFinalizeCloudContext) Deadline() (time.Time, bool) { } // Deadline indicates an expected call of Deadline. -func (mr *MockFinalizeCloudContextMockRecorder) Deadline() *gomock.Call { +func (mr *MockFinalizeCloudContextMockRecorder) Deadline() *MockFinalizeCloudContextDeadlineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Deadline)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Deadline)) + return &MockFinalizeCloudContextDeadlineCall{Call: call} +} + +// MockFinalizeCloudContextDeadlineCall wrap *gomock.Call +type MockFinalizeCloudContextDeadlineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCloudContextDeadlineCall) Return(arg0 time.Time, arg1 bool) *MockFinalizeCloudContextDeadlineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCloudContextDeadlineCall) Do(f func() (time.Time, bool)) *MockFinalizeCloudContextDeadlineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCloudContextDeadlineCall) DoAndReturn(f func() (time.Time, bool)) *MockFinalizeCloudContextDeadlineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -527,9 +1103,33 @@ func (m *MockFinalizeCloudContext) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockFinalizeCloudContextMockRecorder) Done() *gomock.Call { +func (mr *MockFinalizeCloudContextMockRecorder) Done() *MockFinalizeCloudContextDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Done)) + return &MockFinalizeCloudContextDoneCall{Call: call} +} + +// MockFinalizeCloudContextDoneCall wrap *gomock.Call +type MockFinalizeCloudContextDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCloudContextDoneCall) Return(arg0 <-chan struct{}) *MockFinalizeCloudContextDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCloudContextDoneCall) Do(f func() <-chan struct{}) *MockFinalizeCloudContextDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCloudContextDoneCall) DoAndReturn(f func() <-chan struct{}) *MockFinalizeCloudContextDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -541,9 +1141,33 @@ func (m *MockFinalizeCloudContext) Err() error { } // Err indicates an expected call of Err. -func (mr *MockFinalizeCloudContextMockRecorder) Err() *gomock.Call { +func (mr *MockFinalizeCloudContextMockRecorder) Err() *MockFinalizeCloudContextErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Err)) + return &MockFinalizeCloudContextErrCall{Call: call} +} + +// MockFinalizeCloudContextErrCall wrap *gomock.Call +type MockFinalizeCloudContextErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCloudContextErrCall) Return(arg0 error) *MockFinalizeCloudContextErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCloudContextErrCall) Do(f func() error) *MockFinalizeCloudContextErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCloudContextErrCall) DoAndReturn(f func() error) *MockFinalizeCloudContextErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -555,9 +1179,33 @@ func (m *MockFinalizeCloudContext) Value(arg0 any) any { } // Value indicates an expected call of Value. -func (mr *MockFinalizeCloudContextMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockFinalizeCloudContextMockRecorder) Value(arg0 any) *MockFinalizeCloudContextValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Value), arg0) + return &MockFinalizeCloudContextValueCall{Call: call} +} + +// MockFinalizeCloudContextValueCall wrap *gomock.Call +type MockFinalizeCloudContextValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCloudContextValueCall) Return(arg0 any) *MockFinalizeCloudContextValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCloudContextValueCall) Do(f func(any) any) *MockFinalizeCloudContextValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCloudContextValueCall) DoAndReturn(f func(any) any) *MockFinalizeCloudContextValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Verbosef mocks base method. @@ -571,10 +1219,34 @@ func (m *MockFinalizeCloudContext) Verbosef(arg0 string, arg1 ...any) { } // Verbosef indicates an expected call of Verbosef. -func (mr *MockFinalizeCloudContextMockRecorder) Verbosef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockFinalizeCloudContextMockRecorder) Verbosef(arg0 any, arg1 ...any) *MockFinalizeCloudContextVerbosefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verbosef", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Verbosef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verbosef", reflect.TypeOf((*MockFinalizeCloudContext)(nil).Verbosef), varargs...) + return &MockFinalizeCloudContextVerbosefCall{Call: call} +} + +// MockFinalizeCloudContextVerbosefCall wrap *gomock.Call +type MockFinalizeCloudContextVerbosefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFinalizeCloudContextVerbosefCall) Return() *MockFinalizeCloudContextVerbosefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFinalizeCloudContextVerbosefCall) Do(f func(string, ...any)) *MockFinalizeCloudContextVerbosefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFinalizeCloudContextVerbosefCall) DoAndReturn(f func(string, ...any)) *MockFinalizeCloudContextVerbosefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudFinalizer is a mock of CloudFinalizer interface. @@ -610,9 +1282,33 @@ func (m *MockCloudFinalizer) FinalizeCloud(arg0 environs.FinalizeCloudContext, a } // FinalizeCloud indicates an expected call of FinalizeCloud. -func (mr *MockCloudFinalizerMockRecorder) FinalizeCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudFinalizerMockRecorder) FinalizeCloud(arg0, arg1 any) *MockCloudFinalizerFinalizeCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCloud", reflect.TypeOf((*MockCloudFinalizer)(nil).FinalizeCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeCloud", reflect.TypeOf((*MockCloudFinalizer)(nil).FinalizeCloud), arg0, arg1) + return &MockCloudFinalizerFinalizeCloudCall{Call: call} +} + +// MockCloudFinalizerFinalizeCloudCall wrap *gomock.Call +type MockCloudFinalizerFinalizeCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudFinalizerFinalizeCloudCall) Return(arg0 cloud.Cloud, arg1 error) *MockCloudFinalizerFinalizeCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudFinalizerFinalizeCloudCall) Do(f func(environs.FinalizeCloudContext, cloud.Cloud) (cloud.Cloud, error)) *MockCloudFinalizerFinalizeCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudFinalizerFinalizeCloudCall) DoAndReturn(f func(environs.FinalizeCloudContext, cloud.Cloud) (cloud.Cloud, error)) *MockCloudFinalizerFinalizeCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudDetector is a mock of CloudDetector interface. @@ -648,9 +1344,33 @@ func (m *MockCloudDetector) DetectCloud(arg0 string) (cloud.Cloud, error) { } // DetectCloud indicates an expected call of DetectCloud. -func (mr *MockCloudDetectorMockRecorder) DetectCloud(arg0 any) *gomock.Call { +func (mr *MockCloudDetectorMockRecorder) DetectCloud(arg0 any) *MockCloudDetectorDetectCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCloud", reflect.TypeOf((*MockCloudDetector)(nil).DetectCloud), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectCloud", reflect.TypeOf((*MockCloudDetector)(nil).DetectCloud), arg0) + return &MockCloudDetectorDetectCloudCall{Call: call} +} + +// MockCloudDetectorDetectCloudCall wrap *gomock.Call +type MockCloudDetectorDetectCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudDetectorDetectCloudCall) Return(arg0 cloud.Cloud, arg1 error) *MockCloudDetectorDetectCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudDetectorDetectCloudCall) Do(f func(string) (cloud.Cloud, error)) *MockCloudDetectorDetectCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudDetectorDetectCloudCall) DoAndReturn(f func(string) (cloud.Cloud, error)) *MockCloudDetectorDetectCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetectClouds mocks base method. @@ -663,9 +1383,33 @@ func (m *MockCloudDetector) DetectClouds() ([]cloud.Cloud, error) { } // DetectClouds indicates an expected call of DetectClouds. -func (mr *MockCloudDetectorMockRecorder) DetectClouds() *gomock.Call { +func (mr *MockCloudDetectorMockRecorder) DetectClouds() *MockCloudDetectorDetectCloudsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectClouds", reflect.TypeOf((*MockCloudDetector)(nil).DetectClouds)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectClouds", reflect.TypeOf((*MockCloudDetector)(nil).DetectClouds)) + return &MockCloudDetectorDetectCloudsCall{Call: call} +} + +// MockCloudDetectorDetectCloudsCall wrap *gomock.Call +type MockCloudDetectorDetectCloudsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudDetectorDetectCloudsCall) Return(arg0 []cloud.Cloud, arg1 error) *MockCloudDetectorDetectCloudsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudDetectorDetectCloudsCall) Do(f func() ([]cloud.Cloud, error)) *MockCloudDetectorDetectCloudsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudDetectorDetectCloudsCall) DoAndReturn(f func() ([]cloud.Cloud, error)) *MockCloudDetectorDetectCloudsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudRegionDetector is a mock of CloudRegionDetector interface. @@ -701,9 +1445,33 @@ func (m *MockCloudRegionDetector) DetectRegions() ([]cloud.Region, error) { } // DetectRegions indicates an expected call of DetectRegions. -func (mr *MockCloudRegionDetectorMockRecorder) DetectRegions() *gomock.Call { +func (mr *MockCloudRegionDetectorMockRecorder) DetectRegions() *MockCloudRegionDetectorDetectRegionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectRegions", reflect.TypeOf((*MockCloudRegionDetector)(nil).DetectRegions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectRegions", reflect.TypeOf((*MockCloudRegionDetector)(nil).DetectRegions)) + return &MockCloudRegionDetectorDetectRegionsCall{Call: call} +} + +// MockCloudRegionDetectorDetectRegionsCall wrap *gomock.Call +type MockCloudRegionDetectorDetectRegionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudRegionDetectorDetectRegionsCall) Return(arg0 []cloud.Region, arg1 error) *MockCloudRegionDetectorDetectRegionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudRegionDetectorDetectRegionsCall) Do(f func() ([]cloud.Region, error)) *MockCloudRegionDetectorDetectRegionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudRegionDetectorDetectRegionsCall) DoAndReturn(f func() ([]cloud.Region, error)) *MockCloudRegionDetectorDetectRegionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigGetter is a mock of ConfigGetter interface. @@ -738,9 +1506,33 @@ func (m *MockConfigGetter) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockConfigGetterMockRecorder) Config() *gomock.Call { +func (mr *MockConfigGetterMockRecorder) Config() *MockConfigGetterConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockConfigGetter)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockConfigGetter)(nil).Config)) + return &MockConfigGetterConfigCall{Call: call} +} + +// MockConfigGetterConfigCall wrap *gomock.Call +type MockConfigGetterConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigGetterConfigCall) Return(arg0 *config.Config) *MockConfigGetterConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigGetterConfigCall) Do(f func() *config.Config) *MockConfigGetterConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigGetterConfigCall) DoAndReturn(f func() *config.Config) *MockConfigGetterConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudDestroyer is a mock of CloudDestroyer interface. @@ -775,9 +1567,33 @@ func (m *MockCloudDestroyer) Destroy(arg0 envcontext.ProviderCallContext) error } // Destroy indicates an expected call of Destroy. -func (mr *MockCloudDestroyerMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockCloudDestroyerMockRecorder) Destroy(arg0 any) *MockCloudDestroyerDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockCloudDestroyer)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockCloudDestroyer)(nil).Destroy), arg0) + return &MockCloudDestroyerDestroyCall{Call: call} +} + +// MockCloudDestroyerDestroyCall wrap *gomock.Call +type MockCloudDestroyerDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudDestroyerDestroyCall) Return(arg0 error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudDestroyerDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudDestroyerDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEnviron is a mock of Environ interface. @@ -812,9 +1628,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -827,9 +1667,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -842,9 +1706,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -857,9 +1745,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -871,9 +1783,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -886,9 +1822,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -901,9 +1861,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -915,9 +1899,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -929,9 +1937,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -943,9 +1975,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -958,9 +2014,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -973,9 +2053,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -987,9 +2091,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -1001,9 +2129,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -1015,9 +2167,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -1029,9 +2205,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -1044,9 +2244,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -1062,10 +2286,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -1078,9 +2326,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -1093,9 +2365,33 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstancePrechecker is a mock of InstancePrechecker interface. @@ -1130,9 +2426,33 @@ func (m *MockInstancePrechecker) PrecheckInstance(arg0 envcontext.ProviderCallCo } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockInstancePrecheckerMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstancePrecheckerMockRecorder) PrecheckInstance(arg0, arg1 any) *MockInstancePrecheckerPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockInstancePrechecker)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockInstancePrechecker)(nil).PrecheckInstance), arg0, arg1) + return &MockInstancePrecheckerPrecheckInstanceCall{Call: call} +} + +// MockInstancePrecheckerPrecheckInstanceCall wrap *gomock.Call +type MockInstancePrecheckerPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstancePrecheckerPrecheckInstanceCall) Return(arg0 error) *MockInstancePrecheckerPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstancePrecheckerPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockInstancePrecheckerPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstancePrecheckerPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockInstancePrecheckerPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewaller is a mock of Firewaller interface. @@ -1167,9 +2487,33 @@ func (m *MockFirewaller) ClosePorts(arg0 envcontext.ProviderCallContext, arg1 fi } // ClosePorts indicates an expected call of ClosePorts. -func (mr *MockFirewallerMockRecorder) ClosePorts(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallerMockRecorder) ClosePorts(arg0, arg1 any) *MockFirewallerClosePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockFirewaller)(nil).ClosePorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockFirewaller)(nil).ClosePorts), arg0, arg1) + return &MockFirewallerClosePortsCall{Call: call} +} + +// MockFirewallerClosePortsCall wrap *gomock.Call +type MockFirewallerClosePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerClosePortsCall) Return(arg0 error) *MockFirewallerClosePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerClosePortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockFirewallerClosePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerClosePortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockFirewallerClosePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IngressRules mocks base method. @@ -1182,9 +2526,33 @@ func (m *MockFirewaller) IngressRules(arg0 envcontext.ProviderCallContext) (fire } // IngressRules indicates an expected call of IngressRules. -func (mr *MockFirewallerMockRecorder) IngressRules(arg0 any) *gomock.Call { +func (mr *MockFirewallerMockRecorder) IngressRules(arg0 any) *MockFirewallerIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockFirewaller)(nil).IngressRules), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockFirewaller)(nil).IngressRules), arg0) + return &MockFirewallerIngressRulesCall{Call: call} +} + +// MockFirewallerIngressRulesCall wrap *gomock.Call +type MockFirewallerIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerIngressRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockFirewallerIngressRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerIngressRulesCall) Do(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockFirewallerIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerIngressRulesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockFirewallerIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenPorts mocks base method. @@ -1196,9 +2564,33 @@ func (m *MockFirewaller) OpenPorts(arg0 envcontext.ProviderCallContext, arg1 fir } // OpenPorts indicates an expected call of OpenPorts. -func (mr *MockFirewallerMockRecorder) OpenPorts(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallerMockRecorder) OpenPorts(arg0, arg1 any) *MockFirewallerOpenPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockFirewaller)(nil).OpenPorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockFirewaller)(nil).OpenPorts), arg0, arg1) + return &MockFirewallerOpenPortsCall{Call: call} +} + +// MockFirewallerOpenPortsCall wrap *gomock.Call +type MockFirewallerOpenPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerOpenPortsCall) Return(arg0 error) *MockFirewallerOpenPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerOpenPortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockFirewallerOpenPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerOpenPortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockFirewallerOpenPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceTagger is a mock of InstanceTagger interface. @@ -1233,9 +2625,33 @@ func (m *MockInstanceTagger) TagInstance(arg0 envcontext.ProviderCallContext, ar } // TagInstance indicates an expected call of TagInstance. -func (mr *MockInstanceTaggerMockRecorder) TagInstance(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceTaggerMockRecorder) TagInstance(arg0, arg1, arg2 any) *MockInstanceTaggerTagInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagInstance", reflect.TypeOf((*MockInstanceTagger)(nil).TagInstance), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagInstance", reflect.TypeOf((*MockInstanceTagger)(nil).TagInstance), arg0, arg1, arg2) + return &MockInstanceTaggerTagInstanceCall{Call: call} +} + +// MockInstanceTaggerTagInstanceCall wrap *gomock.Call +type MockInstanceTaggerTagInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceTaggerTagInstanceCall) Return(arg0 error) *MockInstanceTaggerTagInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceTaggerTagInstanceCall) Do(f func(envcontext.ProviderCallContext, instance.Id, map[string]string) error) *MockInstanceTaggerTagInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceTaggerTagInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, map[string]string) error) *MockInstanceTaggerTagInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceTypesFetcher is a mock of InstanceTypesFetcher interface. @@ -1271,9 +2687,33 @@ func (m *MockInstanceTypesFetcher) InstanceTypes(arg0 envcontext.ProviderCallCon } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockInstanceTypesFetcherMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceTypesFetcherMockRecorder) InstanceTypes(arg0, arg1 any) *MockInstanceTypesFetcherInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockInstanceTypesFetcher)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockInstanceTypesFetcher)(nil).InstanceTypes), arg0, arg1) + return &MockInstanceTypesFetcherInstanceTypesCall{Call: call} +} + +// MockInstanceTypesFetcherInstanceTypesCall wrap *gomock.Call +type MockInstanceTypesFetcherInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceTypesFetcherInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceTypesFetcherInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceTypesFetcherInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockInstanceTypesFetcherInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgrader is a mock of Upgrader interface. @@ -1308,9 +2748,33 @@ func (m *MockUpgrader) UpgradeOperations(arg0 envcontext.ProviderCallContext, ar } // UpgradeOperations indicates an expected call of UpgradeOperations. -func (mr *MockUpgraderMockRecorder) UpgradeOperations(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgraderMockRecorder) UpgradeOperations(arg0, arg1 any) *MockUpgraderUpgradeOperationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeOperations", reflect.TypeOf((*MockUpgrader)(nil).UpgradeOperations), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeOperations", reflect.TypeOf((*MockUpgrader)(nil).UpgradeOperations), arg0, arg1) + return &MockUpgraderUpgradeOperationsCall{Call: call} +} + +// MockUpgraderUpgradeOperationsCall wrap *gomock.Call +type MockUpgraderUpgradeOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderUpgradeOperationsCall) Return(arg0 []environs.UpgradeOperation) *MockUpgraderUpgradeOperationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderUpgradeOperationsCall) Do(f func(envcontext.ProviderCallContext, environs.UpgradeOperationsParams) []environs.UpgradeOperation) *MockUpgraderUpgradeOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderUpgradeOperationsCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.UpgradeOperationsParams) []environs.UpgradeOperation) *MockUpgraderUpgradeOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeStep is a mock of UpgradeStep interface. @@ -1345,9 +2809,33 @@ func (m *MockUpgradeStep) Description() string { } // Description indicates an expected call of Description. -func (mr *MockUpgradeStepMockRecorder) Description() *gomock.Call { +func (mr *MockUpgradeStepMockRecorder) Description() *MockUpgradeStepDescriptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockUpgradeStep)(nil).Description)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockUpgradeStep)(nil).Description)) + return &MockUpgradeStepDescriptionCall{Call: call} +} + +// MockUpgradeStepDescriptionCall wrap *gomock.Call +type MockUpgradeStepDescriptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeStepDescriptionCall) Return(arg0 string) *MockUpgradeStepDescriptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeStepDescriptionCall) Do(f func() string) *MockUpgradeStepDescriptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeStepDescriptionCall) DoAndReturn(f func() string) *MockUpgradeStepDescriptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -1359,9 +2847,33 @@ func (m *MockUpgradeStep) Run(arg0 envcontext.ProviderCallContext) error { } // Run indicates an expected call of Run. -func (mr *MockUpgradeStepMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockUpgradeStepMockRecorder) Run(arg0 any) *MockUpgradeStepRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockUpgradeStep)(nil).Run), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockUpgradeStep)(nil).Run), arg0) + return &MockUpgradeStepRunCall{Call: call} +} + +// MockUpgradeStepRunCall wrap *gomock.Call +type MockUpgradeStepRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeStepRunCall) Return(arg0 error) *MockUpgradeStepRunCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeStepRunCall) Do(f func(envcontext.ProviderCallContext) error) *MockUpgradeStepRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeStepRunCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockUpgradeStepRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDefaultConstraintsChecker is a mock of DefaultConstraintsChecker interface. @@ -1396,9 +2908,33 @@ func (m *MockDefaultConstraintsChecker) ShouldApplyControllerConstraints(arg0 co } // ShouldApplyControllerConstraints indicates an expected call of ShouldApplyControllerConstraints. -func (mr *MockDefaultConstraintsCheckerMockRecorder) ShouldApplyControllerConstraints(arg0 any) *gomock.Call { +func (mr *MockDefaultConstraintsCheckerMockRecorder) ShouldApplyControllerConstraints(arg0 any) *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldApplyControllerConstraints", reflect.TypeOf((*MockDefaultConstraintsChecker)(nil).ShouldApplyControllerConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldApplyControllerConstraints", reflect.TypeOf((*MockDefaultConstraintsChecker)(nil).ShouldApplyControllerConstraints), arg0) + return &MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall{Call: call} +} + +// MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall wrap *gomock.Call +type MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall) Return(arg0 bool) *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall) Do(f func(constraints.Value) bool) *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall) DoAndReturn(f func(constraints.Value) bool) *MockDefaultConstraintsCheckerShouldApplyControllerConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProviderCredentialsRegister is a mock of ProviderCredentialsRegister interface. @@ -1434,9 +2970,33 @@ func (m *MockProviderCredentialsRegister) RegisterCredentials(arg0 cloud.Cloud) } // RegisterCredentials indicates an expected call of RegisterCredentials. -func (mr *MockProviderCredentialsRegisterMockRecorder) RegisterCredentials(arg0 any) *gomock.Call { +func (mr *MockProviderCredentialsRegisterMockRecorder) RegisterCredentials(arg0 any) *MockProviderCredentialsRegisterRegisterCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockProviderCredentialsRegister)(nil).RegisterCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterCredentials", reflect.TypeOf((*MockProviderCredentialsRegister)(nil).RegisterCredentials), arg0) + return &MockProviderCredentialsRegisterRegisterCredentialsCall{Call: call} +} + +// MockProviderCredentialsRegisterRegisterCredentialsCall wrap *gomock.Call +type MockProviderCredentialsRegisterRegisterCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCredentialsRegisterRegisterCredentialsCall) Return(arg0 map[string]*cloud.CloudCredential, arg1 error) *MockProviderCredentialsRegisterRegisterCredentialsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCredentialsRegisterRegisterCredentialsCall) Do(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockProviderCredentialsRegisterRegisterCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCredentialsRegisterRegisterCredentialsCall) DoAndReturn(f func(cloud.Cloud) (map[string]*cloud.CloudCredential, error)) *MockProviderCredentialsRegisterRegisterCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRequestFinalizeCredential is a mock of RequestFinalizeCredential interface. @@ -1471,9 +3031,33 @@ func (m *MockRequestFinalizeCredential) ShouldFinalizeCredential(arg0 cloud.Cred } // ShouldFinalizeCredential indicates an expected call of ShouldFinalizeCredential. -func (mr *MockRequestFinalizeCredentialMockRecorder) ShouldFinalizeCredential(arg0 any) *gomock.Call { +func (mr *MockRequestFinalizeCredentialMockRecorder) ShouldFinalizeCredential(arg0 any) *MockRequestFinalizeCredentialShouldFinalizeCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldFinalizeCredential", reflect.TypeOf((*MockRequestFinalizeCredential)(nil).ShouldFinalizeCredential), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldFinalizeCredential", reflect.TypeOf((*MockRequestFinalizeCredential)(nil).ShouldFinalizeCredential), arg0) + return &MockRequestFinalizeCredentialShouldFinalizeCredentialCall{Call: call} +} + +// MockRequestFinalizeCredentialShouldFinalizeCredentialCall wrap *gomock.Call +type MockRequestFinalizeCredentialShouldFinalizeCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRequestFinalizeCredentialShouldFinalizeCredentialCall) Return(arg0 bool) *MockRequestFinalizeCredentialShouldFinalizeCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRequestFinalizeCredentialShouldFinalizeCredentialCall) Do(f func(cloud.Credential) bool) *MockRequestFinalizeCredentialShouldFinalizeCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRequestFinalizeCredentialShouldFinalizeCredentialCall) DoAndReturn(f func(cloud.Credential) bool) *MockRequestFinalizeCredentialShouldFinalizeCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingEnviron is a mock of NetworkingEnviron interface. @@ -1508,9 +3092,33 @@ func (m *MockNetworkingEnviron) AdoptResources(arg0 envcontext.ProviderCallConte } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockNetworkingEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockNetworkingEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockNetworkingEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockNetworkingEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockNetworkingEnvironAdoptResourcesCall{Call: call} +} + +// MockNetworkingEnvironAdoptResourcesCall wrap *gomock.Call +type MockNetworkingEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAdoptResourcesCall) Return(arg0 error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockNetworkingEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -1523,9 +3131,33 @@ func (m *MockNetworkingEnviron) AllInstances(arg0 envcontext.ProviderCallContext } // AllInstances indicates an expected call of AllInstances. -func (mr *MockNetworkingEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllInstances(arg0 any) *MockNetworkingEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllInstances), arg0) + return &MockNetworkingEnvironAllInstancesCall{Call: call} +} + +// MockNetworkingEnvironAllInstancesCall wrap *gomock.Call +type MockNetworkingEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -1538,9 +3170,33 @@ func (m *MockNetworkingEnviron) AllRunningInstances(arg0 envcontext.ProviderCall } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockNetworkingEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllRunningInstances(arg0 any) *MockNetworkingEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllRunningInstances), arg0) + return &MockNetworkingEnvironAllRunningInstancesCall{Call: call} +} + +// MockNetworkingEnvironAllRunningInstancesCall wrap *gomock.Call +type MockNetworkingEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockNetworkingEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllocateContainerAddresses mocks base method. @@ -1553,9 +3209,33 @@ func (m *MockNetworkingEnviron) AllocateContainerAddresses(arg0 envcontext.Provi } // AllocateContainerAddresses indicates an expected call of AllocateContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) AllocateContainerAddresses(arg0, arg1, arg2, arg3 any) *MockNetworkingEnvironAllocateContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).AllocateContainerAddresses), arg0, arg1, arg2, arg3) + return &MockNetworkingEnvironAllocateContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironAllocateContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironAllocateContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironAllocateContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, names.MachineTag, network.InterfaceInfos) (network.InterfaceInfos, error)) *MockNetworkingEnvironAllocateContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -1568,9 +3248,33 @@ func (m *MockNetworkingEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 e } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockNetworkingEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockNetworkingEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockNetworkingEnvironBootstrapCall{Call: call} +} + +// MockNetworkingEnvironBootstrapCall wrap *gomock.Call +type MockNetworkingEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockNetworkingEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -1582,9 +3286,33 @@ func (m *MockNetworkingEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockNetworkingEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Config() *MockNetworkingEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockNetworkingEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockNetworkingEnviron)(nil).Config)) + return &MockNetworkingEnvironConfigCall{Call: call} +} + +// MockNetworkingEnvironConfigCall wrap *gomock.Call +type MockNetworkingEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConfigCall) Return(arg0 *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConfigCall) Do(f func() *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockNetworkingEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -1597,9 +3325,33 @@ func (m *MockNetworkingEnviron) ConstraintsValidator(arg0 envcontext.ProviderCal } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockNetworkingEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockNetworkingEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockNetworkingEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockNetworkingEnviron)(nil).ConstraintsValidator), arg0) + return &MockNetworkingEnvironConstraintsValidatorCall{Call: call} +} + +// MockNetworkingEnvironConstraintsValidatorCall wrap *gomock.Call +type MockNetworkingEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockNetworkingEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -1612,9 +3364,33 @@ func (m *MockNetworkingEnviron) ControllerInstances(arg0 envcontext.ProviderCall } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockNetworkingEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockNetworkingEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockNetworkingEnvironControllerInstancesCall{Call: call} +} + +// MockNetworkingEnvironControllerInstancesCall wrap *gomock.Call +type MockNetworkingEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockNetworkingEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -1626,9 +3402,33 @@ func (m *MockNetworkingEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 } // Create indicates an expected call of Create. -func (mr *MockNetworkingEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Create(arg0, arg1 any) *MockNetworkingEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkingEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkingEnviron)(nil).Create), arg0, arg1) + return &MockNetworkingEnvironCreateCall{Call: call} +} + +// MockNetworkingEnvironCreateCall wrap *gomock.Call +type MockNetworkingEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironCreateCall) Return(arg0 error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockNetworkingEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -1640,9 +3440,33 @@ func (m *MockNetworkingEnviron) Destroy(arg0 envcontext.ProviderCallContext) err } // Destroy indicates an expected call of Destroy. -func (mr *MockNetworkingEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Destroy(arg0 any) *MockNetworkingEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockNetworkingEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockNetworkingEnviron)(nil).Destroy), arg0) + return &MockNetworkingEnvironDestroyCall{Call: call} +} + +// MockNetworkingEnvironDestroyCall wrap *gomock.Call +type MockNetworkingEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironDestroyCall) Return(arg0 error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockNetworkingEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -1654,9 +3478,33 @@ func (m *MockNetworkingEnviron) DestroyController(arg0 envcontext.ProviderCallCo } // DestroyController indicates an expected call of DestroyController. -func (mr *MockNetworkingEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockNetworkingEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockNetworkingEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockNetworkingEnviron)(nil).DestroyController), arg0, arg1) + return &MockNetworkingEnvironDestroyControllerCall{Call: call} +} + +// MockNetworkingEnvironDestroyControllerCall wrap *gomock.Call +type MockNetworkingEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironDestroyControllerCall) Return(arg0 error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockNetworkingEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -1669,9 +3517,33 @@ func (m *MockNetworkingEnviron) InstanceTypes(arg0 envcontext.ProviderCallContex } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockNetworkingEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockNetworkingEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockNetworkingEnvironInstanceTypesCall{Call: call} +} + +// MockNetworkingEnvironInstanceTypesCall wrap *gomock.Call +type MockNetworkingEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockNetworkingEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -1684,9 +3556,33 @@ func (m *MockNetworkingEnviron) Instances(arg0 envcontext.ProviderCallContext, a } // Instances indicates an expected call of Instances. -func (mr *MockNetworkingEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Instances(arg0, arg1 any) *MockNetworkingEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockNetworkingEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockNetworkingEnviron)(nil).Instances), arg0, arg1) + return &MockNetworkingEnvironInstancesCall{Call: call} +} + +// MockNetworkingEnvironInstancesCall wrap *gomock.Call +type MockNetworkingEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockNetworkingEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInterfaces mocks base method. @@ -1699,9 +3595,33 @@ func (m *MockNetworkingEnviron) NetworkInterfaces(arg0 envcontext.ProviderCallCo } // NetworkInterfaces indicates an expected call of NetworkInterfaces. -func (mr *MockNetworkingEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *MockNetworkingEnvironNetworkInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).NetworkInterfaces), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).NetworkInterfaces), arg0, arg1) + return &MockNetworkingEnvironNetworkInterfacesCall{Call: call} +} + +// MockNetworkingEnvironNetworkInterfacesCall wrap *gomock.Call +type MockNetworkingEnvironNetworkInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironNetworkInterfacesCall) Return(arg0 []network.InterfaceInfos, arg1 error) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironNetworkInterfacesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironNetworkInterfacesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingEnvironNetworkInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -1713,9 +3633,33 @@ func (m *MockNetworkingEnviron) PrecheckInstance(arg0 envcontext.ProviderCallCon } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockNetworkingEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockNetworkingEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockNetworkingEnvironPrecheckInstanceCall{Call: call} +} + +// MockNetworkingEnvironPrecheckInstanceCall wrap *gomock.Call +type MockNetworkingEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironPrecheckInstanceCall) Return(arg0 error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockNetworkingEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -1727,9 +3671,33 @@ func (m *MockNetworkingEnviron) PrepareForBootstrap(arg0 environs.BootstrapConte } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockNetworkingEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockNetworkingEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockNetworkingEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockNetworkingEnvironPrepareForBootstrapCall{Call: call} +} + +// MockNetworkingEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockNetworkingEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironPrepareForBootstrapCall) Return(arg0 error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockNetworkingEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -1741,9 +3709,33 @@ func (m *MockNetworkingEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockNetworkingEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Provider() *MockNetworkingEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockNetworkingEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockNetworkingEnviron)(nil).Provider)) + return &MockNetworkingEnvironProviderCall{Call: call} +} + +// MockNetworkingEnvironProviderCall wrap *gomock.Call +type MockNetworkingEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockNetworkingEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderSpaceInfo mocks base method. @@ -1756,9 +3748,33 @@ func (m *MockNetworkingEnviron) ProviderSpaceInfo(arg0 envcontext.ProviderCallCo } // ProviderSpaceInfo indicates an expected call of ProviderSpaceInfo. -func (mr *MockNetworkingEnvironMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ProviderSpaceInfo(arg0, arg1 any) *MockNetworkingEnvironProviderSpaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockNetworkingEnviron)(nil).ProviderSpaceInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderSpaceInfo", reflect.TypeOf((*MockNetworkingEnviron)(nil).ProviderSpaceInfo), arg0, arg1) + return &MockNetworkingEnvironProviderSpaceInfoCall{Call: call} +} + +// MockNetworkingEnvironProviderSpaceInfoCall wrap *gomock.Call +type MockNetworkingEnvironProviderSpaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironProviderSpaceInfoCall) Return(arg0 *environs.ProviderSpaceInfo, arg1 error) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironProviderSpaceInfoCall) Do(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironProviderSpaceInfoCall) DoAndReturn(f func(envcontext.ProviderCallContext, *network.SpaceInfo) (*environs.ProviderSpaceInfo, error)) *MockNetworkingEnvironProviderSpaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -1770,9 +3786,33 @@ func (m *MockNetworkingEnviron) ReleaseContainerAddresses(arg0 envcontext.Provid } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) ReleaseContainerAddresses(arg0, arg1 any) *MockNetworkingEnvironReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).ReleaseContainerAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).ReleaseContainerAddresses), arg0, arg1) + return &MockNetworkingEnvironReleaseContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironReleaseContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) Return(arg0 error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) Do(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironReleaseContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []network.ProviderInterfaceInfo) error) *MockNetworkingEnvironReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -1784,9 +3824,33 @@ func (m *MockNetworkingEnviron) SetConfig(arg0 context.Context, arg1 *config.Con } // SetConfig indicates an expected call of SetConfig. -func (mr *MockNetworkingEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockNetworkingEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockNetworkingEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockNetworkingEnviron)(nil).SetConfig), arg0, arg1) + return &MockNetworkingEnvironSetConfigCall{Call: call} +} + +// MockNetworkingEnvironSetConfigCall wrap *gomock.Call +type MockNetworkingEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSetConfigCall) Return(arg0 error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockNetworkingEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -1799,9 +3863,33 @@ func (m *MockNetworkingEnviron) Spaces(arg0 envcontext.ProviderCallContext) (net } // Spaces indicates an expected call of Spaces. -func (mr *MockNetworkingEnvironMockRecorder) Spaces(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Spaces(arg0 any) *MockNetworkingEnvironSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).Spaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).Spaces), arg0) + return &MockNetworkingEnvironSpacesCall{Call: call} +} + +// MockNetworkingEnvironSpacesCall wrap *gomock.Call +type MockNetworkingEnvironSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSpacesCall) Do(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.SpaceInfos, error)) *MockNetworkingEnvironSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -1814,9 +3902,33 @@ func (m *MockNetworkingEnviron) StartInstance(arg0 envcontext.ProviderCallContex } // StartInstance indicates an expected call of StartInstance. -func (mr *MockNetworkingEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockNetworkingEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockNetworkingEnviron)(nil).StartInstance), arg0, arg1) + return &MockNetworkingEnvironStartInstanceCall{Call: call} +} + +// MockNetworkingEnvironStartInstanceCall wrap *gomock.Call +type MockNetworkingEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockNetworkingEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -1832,10 +3944,34 @@ func (m *MockNetworkingEnviron) StopInstances(arg0 envcontext.ProviderCallContex } // StopInstances indicates an expected call of StopInstances. -func (mr *MockNetworkingEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockNetworkingEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockNetworkingEnviron)(nil).StopInstances), varargs...) + return &MockNetworkingEnvironStopInstancesCall{Call: call} +} + +// MockNetworkingEnvironStopInstancesCall wrap *gomock.Call +type MockNetworkingEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStopInstancesCall) Return(arg0 error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockNetworkingEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -1848,9 +3984,33 @@ func (m *MockNetworkingEnviron) StorageProvider(arg0 storage.ProviderType) (stor } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockNetworkingEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StorageProvider(arg0 any) *MockNetworkingEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProvider), arg0) + return &MockNetworkingEnvironStorageProviderCall{Call: call} +} + +// MockNetworkingEnvironStorageProviderCall wrap *gomock.Call +type MockNetworkingEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockNetworkingEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -1863,9 +4023,33 @@ func (m *MockNetworkingEnviron) StorageProviderTypes() ([]storage.ProviderType, } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockNetworkingEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) StorageProviderTypes() *MockNetworkingEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockNetworkingEnviron)(nil).StorageProviderTypes)) + return &MockNetworkingEnvironStorageProviderTypesCall{Call: call} +} + +// MockNetworkingEnvironStorageProviderTypesCall wrap *gomock.Call +type MockNetworkingEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockNetworkingEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -1878,9 +4062,33 @@ func (m *MockNetworkingEnviron) Subnets(arg0 envcontext.ProviderCallContext, arg } // Subnets indicates an expected call of Subnets. -func (mr *MockNetworkingEnvironMockRecorder) Subnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) Subnets(arg0, arg1, arg2 any) *MockNetworkingEnvironSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).Subnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).Subnets), arg0, arg1, arg2) + return &MockNetworkingEnvironSubnetsCall{Call: call} +} + +// MockNetworkingEnvironSubnetsCall wrap *gomock.Call +type MockNetworkingEnvironSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSubnetsCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSubnetsCall) Do(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext, instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingEnvironSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SuperSubnets mocks base method. @@ -1893,9 +4101,33 @@ func (m *MockNetworkingEnviron) SuperSubnets(arg0 envcontext.ProviderCallContext } // SuperSubnets indicates an expected call of SuperSubnets. -func (mr *MockNetworkingEnvironMockRecorder) SuperSubnets(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SuperSubnets(arg0 any) *MockNetworkingEnvironSuperSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).SuperSubnets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuperSubnets", reflect.TypeOf((*MockNetworkingEnviron)(nil).SuperSubnets), arg0) + return &MockNetworkingEnvironSuperSubnetsCall{Call: call} +} + +// MockNetworkingEnvironSuperSubnetsCall wrap *gomock.Call +type MockNetworkingEnvironSuperSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSuperSubnetsCall) Return(arg0 []string, arg1 error) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSuperSubnetsCall) Do(f func(envcontext.ProviderCallContext) ([]string, error)) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSuperSubnetsCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]string, error)) *MockNetworkingEnvironSuperSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsContainerAddresses mocks base method. @@ -1908,9 +4140,33 @@ func (m *MockNetworkingEnviron) SupportsContainerAddresses(arg0 envcontext.Provi } // SupportsContainerAddresses indicates an expected call of SupportsContainerAddresses. -func (mr *MockNetworkingEnvironMockRecorder) SupportsContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsContainerAddresses(arg0 any) *MockNetworkingEnvironSupportsContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsContainerAddresses", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsContainerAddresses), arg0) + return &MockNetworkingEnvironSupportsContainerAddressesCall{Call: call} +} + +// MockNetworkingEnvironSupportsContainerAddressesCall wrap *gomock.Call +type MockNetworkingEnvironSupportsContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsContainerAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaceDiscovery mocks base method. @@ -1923,9 +4179,33 @@ func (m *MockNetworkingEnviron) SupportsSpaceDiscovery(arg0 envcontext.ProviderC } // SupportsSpaceDiscovery indicates an expected call of SupportsSpaceDiscovery. -func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaceDiscovery(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaceDiscovery(arg0 any) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaceDiscovery), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaceDiscovery", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaceDiscovery), arg0) + return &MockNetworkingEnvironSupportsSpaceDiscoveryCall{Call: call} +} + +// MockNetworkingEnvironSupportsSpaceDiscoveryCall wrap *gomock.Call +type MockNetworkingEnvironSupportsSpaceDiscoveryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsSpaceDiscoveryCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpaceDiscoveryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsSpaces mocks base method. @@ -1938,7 +4218,31 @@ func (m *MockNetworkingEnviron) SupportsSpaces(arg0 envcontext.ProviderCallConte } // SupportsSpaces indicates an expected call of SupportsSpaces. -func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkingEnvironMockRecorder) SupportsSpaces(arg0 any) *MockNetworkingEnvironSupportsSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSpaces", reflect.TypeOf((*MockNetworkingEnviron)(nil).SupportsSpaces), arg0) + return &MockNetworkingEnvironSupportsSpacesCall{Call: call} +} + +// MockNetworkingEnvironSupportsSpacesCall wrap *gomock.Call +type MockNetworkingEnvironSupportsSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironSupportsSpacesCall) Return(arg0 bool, arg1 error) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironSupportsSpacesCall) Do(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironSupportsSpacesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (bool, error)) *MockNetworkingEnvironSupportsSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/generate/schemagen/gen/describeapi_mock.go b/generate/schemagen/gen/describeapi_mock.go index d5bf42a7331..95c4b135236 100644 --- a/generate/schemagen/gen/describeapi_mock.go +++ b/generate/schemagen/gen/describeapi_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package gen -destination describeapi_mock.go -write_package_comment=false github.com/juju/juju/generate/schemagen/gen APIServer,Registry,PackageRegistry,Linker +// mockgen -typed -package gen -destination describeapi_mock.go -write_package_comment=false github.com/juju/juju/generate/schemagen/gen APIServer,Registry,PackageRegistry,Linker package gen import ( @@ -46,9 +46,33 @@ func (m *MockAPIServer) AdminFacadeDetails() []facade.Details { } // AdminFacadeDetails indicates an expected call of AdminFacadeDetails. -func (mr *MockAPIServerMockRecorder) AdminFacadeDetails() *gomock.Call { +func (mr *MockAPIServerMockRecorder) AdminFacadeDetails() *MockAPIServerAdminFacadeDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminFacadeDetails", reflect.TypeOf((*MockAPIServer)(nil).AdminFacadeDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminFacadeDetails", reflect.TypeOf((*MockAPIServer)(nil).AdminFacadeDetails)) + return &MockAPIServerAdminFacadeDetailsCall{Call: call} +} + +// MockAPIServerAdminFacadeDetailsCall wrap *gomock.Call +type MockAPIServerAdminFacadeDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIServerAdminFacadeDetailsCall) Return(arg0 []facade.Details) *MockAPIServerAdminFacadeDetailsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIServerAdminFacadeDetailsCall) Do(f func() []facade.Details) *MockAPIServerAdminFacadeDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIServerAdminFacadeDetailsCall) DoAndReturn(f func() []facade.Details) *MockAPIServerAdminFacadeDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllFacades mocks base method. @@ -60,9 +84,33 @@ func (m *MockAPIServer) AllFacades() Registry { } // AllFacades indicates an expected call of AllFacades. -func (mr *MockAPIServerMockRecorder) AllFacades() *gomock.Call { +func (mr *MockAPIServerMockRecorder) AllFacades() *MockAPIServerAllFacadesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllFacades", reflect.TypeOf((*MockAPIServer)(nil).AllFacades)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllFacades", reflect.TypeOf((*MockAPIServer)(nil).AllFacades)) + return &MockAPIServerAllFacadesCall{Call: call} +} + +// MockAPIServerAllFacadesCall wrap *gomock.Call +type MockAPIServerAllFacadesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIServerAllFacadesCall) Return(arg0 Registry) *MockAPIServerAllFacadesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIServerAllFacadesCall) Do(f func() Registry) *MockAPIServerAllFacadesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIServerAllFacadesCall) DoAndReturn(f func() Registry) *MockAPIServerAllFacadesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRegistry is a mock of Registry interface. @@ -98,9 +146,33 @@ func (m *MockRegistry) GetType(arg0 string, arg1 int) (reflect.Type, error) { } // GetType indicates an expected call of GetType. -func (mr *MockRegistryMockRecorder) GetType(arg0, arg1 any) *gomock.Call { +func (mr *MockRegistryMockRecorder) GetType(arg0, arg1 any) *MockRegistryGetTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetType", reflect.TypeOf((*MockRegistry)(nil).GetType), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetType", reflect.TypeOf((*MockRegistry)(nil).GetType), arg0, arg1) + return &MockRegistryGetTypeCall{Call: call} +} + +// MockRegistryGetTypeCall wrap *gomock.Call +type MockRegistryGetTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryGetTypeCall) Return(arg0 reflect.Type, arg1 error) *MockRegistryGetTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryGetTypeCall) Do(f func(string, int) (reflect.Type, error)) *MockRegistryGetTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryGetTypeCall) DoAndReturn(f func(string, int) (reflect.Type, error)) *MockRegistryGetTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -112,9 +184,33 @@ func (m *MockRegistry) List() []facade.Description { } // List indicates an expected call of List. -func (mr *MockRegistryMockRecorder) List() *gomock.Call { +func (mr *MockRegistryMockRecorder) List() *MockRegistryListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRegistry)(nil).List)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRegistry)(nil).List)) + return &MockRegistryListCall{Call: call} +} + +// MockRegistryListCall wrap *gomock.Call +type MockRegistryListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryListCall) Return(arg0 []facade.Description) *MockRegistryListCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryListCall) Do(f func() []facade.Description) *MockRegistryListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryListCall) DoAndReturn(f func() []facade.Description) *MockRegistryListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListDetails mocks base method. @@ -126,9 +222,33 @@ func (m *MockRegistry) ListDetails() []facade.Details { } // ListDetails indicates an expected call of ListDetails. -func (mr *MockRegistryMockRecorder) ListDetails() *gomock.Call { +func (mr *MockRegistryMockRecorder) ListDetails() *MockRegistryListDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDetails", reflect.TypeOf((*MockRegistry)(nil).ListDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDetails", reflect.TypeOf((*MockRegistry)(nil).ListDetails)) + return &MockRegistryListDetailsCall{Call: call} +} + +// MockRegistryListDetailsCall wrap *gomock.Call +type MockRegistryListDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryListDetailsCall) Return(arg0 []facade.Details) *MockRegistryListDetailsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryListDetailsCall) Do(f func() []facade.Details) *MockRegistryListDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryListDetailsCall) DoAndReturn(f func() []facade.Details) *MockRegistryListDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPackageRegistry is a mock of PackageRegistry interface. @@ -164,9 +284,33 @@ func (m *MockPackageRegistry) LoadPackage() (*packages.Package, error) { } // LoadPackage indicates an expected call of LoadPackage. -func (mr *MockPackageRegistryMockRecorder) LoadPackage() *gomock.Call { +func (mr *MockPackageRegistryMockRecorder) LoadPackage() *MockPackageRegistryLoadPackageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadPackage", reflect.TypeOf((*MockPackageRegistry)(nil).LoadPackage)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadPackage", reflect.TypeOf((*MockPackageRegistry)(nil).LoadPackage)) + return &MockPackageRegistryLoadPackageCall{Call: call} +} + +// MockPackageRegistryLoadPackageCall wrap *gomock.Call +type MockPackageRegistryLoadPackageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPackageRegistryLoadPackageCall) Return(arg0 *packages.Package, arg1 error) *MockPackageRegistryLoadPackageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPackageRegistryLoadPackageCall) Do(f func() (*packages.Package, error)) *MockPackageRegistryLoadPackageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPackageRegistryLoadPackageCall) DoAndReturn(f func() (*packages.Package, error)) *MockPackageRegistryLoadPackageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinker is a mock of Linker interface. @@ -201,7 +345,31 @@ func (m *MockLinker) Links(arg0 string, arg1 facade.MultiModelFactory) []string } // Links indicates an expected call of Links. -func (mr *MockLinkerMockRecorder) Links(arg0, arg1 any) *gomock.Call { +func (mr *MockLinkerMockRecorder) Links(arg0, arg1 any) *MockLinkerLinksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Links", reflect.TypeOf((*MockLinker)(nil).Links), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Links", reflect.TypeOf((*MockLinker)(nil).Links), arg0, arg1) + return &MockLinkerLinksCall{Call: call} +} + +// MockLinkerLinksCall wrap *gomock.Call +type MockLinkerLinksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkerLinksCall) Return(arg0 []string) *MockLinkerLinksCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkerLinksCall) Do(f func(string, facade.MultiModelFactory) []string) *MockLinkerLinksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkerLinksCall) DoAndReturn(f func(string, facade.MultiModelFactory) []string) *MockLinkerLinksCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/generate/schemagen/gen/package_test.go b/generate/schemagen/gen/package_test.go index e1deeda0a3f..c0882338134 100644 --- a/generate/schemagen/gen/package_test.go +++ b/generate/schemagen/gen/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package gen -destination describeapi_mock.go -write_package_comment=false github.com/juju/juju/generate/schemagen/gen APIServer,Registry,PackageRegistry,Linker +//go:generate go run go.uber.org/mock/mockgen -typed -package gen -destination describeapi_mock.go -write_package_comment=false github.com/juju/juju/generate/schemagen/gen APIServer,Registry,PackageRegistry,Linker func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/bootstrap/agentbinary.go b/internal/bootstrap/agentbinary.go index ecc85573c6e..e73223fc010 100644 --- a/internal/bootstrap/agentbinary.go +++ b/internal/bootstrap/agentbinary.go @@ -24,8 +24,12 @@ import ( // Logger represents the logging methods called. type Logger interface { - Warningf(message string, args ...any) - Debugf(message string, args ...any) + IsTraceEnabled() bool + + Errorf(string, ...interface{}) + Warningf(string, ...interface{}) + Debugf(string, ...interface{}) + Tracef(string, ...interface{}) } const ( diff --git a/internal/bootstrap/bootstrap_mock_test.go b/internal/bootstrap/bootstrap_mock_test.go index f23216d62f6..209d996e896 100644 --- a/internal/bootstrap/bootstrap_mock_test.go +++ b/internal/bootstrap/bootstrap_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/bootstrap AgentBinaryStorage,ControllerCharmDeployer,HTTPClient,LoggerFactory,CloudService,CloudServiceGetter,OperationApplier,Machine,MachineGetter,StateBackend,Application,Charm,Unit,Model,CharmUploader,ApplicationService +// mockgen -typed -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/bootstrap AgentBinaryStorage,ControllerCharmDeployer,HTTPClient,LoggerFactory,CloudService,CloudServiceGetter,OperationApplier,Machine,MachineGetter,StateBackend,Application,Charm,Unit,Model,CharmUploader,ApplicationService // // Package bootstrap is a generated GoMock package. @@ -63,9 +63,33 @@ func (m *MockAgentBinaryStorage) Add(arg0 context.Context, arg1 io.Reader, arg2 } // Add indicates an expected call of Add. -func (mr *MockAgentBinaryStorageMockRecorder) Add(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAgentBinaryStorageMockRecorder) Add(arg0, arg1, arg2 any) *MockAgentBinaryStorageAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockAgentBinaryStorage)(nil).Add), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockAgentBinaryStorage)(nil).Add), arg0, arg1, arg2) + return &MockAgentBinaryStorageAddCall{Call: call} +} + +// MockAgentBinaryStorageAddCall wrap *gomock.Call +type MockAgentBinaryStorageAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentBinaryStorageAddCall) Return(arg0 error) *MockAgentBinaryStorageAddCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentBinaryStorageAddCall) Do(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockAgentBinaryStorageAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentBinaryStorageAddCall) DoAndReturn(f func(context.Context, io.Reader, binarystorage.Metadata) error) *MockAgentBinaryStorageAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerCharmDeployer is a mock of ControllerCharmDeployer interface. @@ -101,9 +125,33 @@ func (m *MockControllerCharmDeployer) AddControllerApplication(arg0 context.Cont } // AddControllerApplication indicates an expected call of AddControllerApplication. -func (mr *MockControllerCharmDeployerMockRecorder) AddControllerApplication(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) AddControllerApplication(arg0, arg1, arg2, arg3 any) *MockControllerCharmDeployerAddControllerApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddControllerApplication", reflect.TypeOf((*MockControllerCharmDeployer)(nil).AddControllerApplication), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddControllerApplication", reflect.TypeOf((*MockControllerCharmDeployer)(nil).AddControllerApplication), arg0, arg1, arg2, arg3) + return &MockControllerCharmDeployerAddControllerApplicationCall{Call: call} +} + +// MockControllerCharmDeployerAddControllerApplicationCall wrap *gomock.Call +type MockControllerCharmDeployerAddControllerApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerAddControllerApplicationCall) Return(arg0 Unit, arg1 error) *MockControllerCharmDeployerAddControllerApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerAddControllerApplicationCall) Do(f func(context.Context, string, charm0.Origin, string) (Unit, error)) *MockControllerCharmDeployerAddControllerApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerAddControllerApplicationCall) DoAndReturn(f func(context.Context, string, charm0.Origin, string) (Unit, error)) *MockControllerCharmDeployerAddControllerApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CompleteProcess mocks base method. @@ -115,9 +163,33 @@ func (m *MockControllerCharmDeployer) CompleteProcess(arg0 context.Context, arg1 } // CompleteProcess indicates an expected call of CompleteProcess. -func (mr *MockControllerCharmDeployerMockRecorder) CompleteProcess(arg0, arg1 any) *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) CompleteProcess(arg0, arg1 any) *MockControllerCharmDeployerCompleteProcessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteProcess", reflect.TypeOf((*MockControllerCharmDeployer)(nil).CompleteProcess), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteProcess", reflect.TypeOf((*MockControllerCharmDeployer)(nil).CompleteProcess), arg0, arg1) + return &MockControllerCharmDeployerCompleteProcessCall{Call: call} +} + +// MockControllerCharmDeployerCompleteProcessCall wrap *gomock.Call +type MockControllerCharmDeployerCompleteProcessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerCompleteProcessCall) Return(arg0 error) *MockControllerCharmDeployerCompleteProcessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerCompleteProcessCall) Do(f func(context.Context, Unit) error) *MockControllerCharmDeployerCompleteProcessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerCompleteProcessCall) DoAndReturn(f func(context.Context, Unit) error) *MockControllerCharmDeployerCompleteProcessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerAddress mocks base method. @@ -130,9 +202,33 @@ func (m *MockControllerCharmDeployer) ControllerAddress(arg0 context.Context) (s } // ControllerAddress indicates an expected call of ControllerAddress. -func (mr *MockControllerCharmDeployerMockRecorder) ControllerAddress(arg0 any) *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) ControllerAddress(arg0 any) *MockControllerCharmDeployerControllerAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAddress", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerAddress), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAddress", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerAddress), arg0) + return &MockControllerCharmDeployerControllerAddressCall{Call: call} +} + +// MockControllerCharmDeployerControllerAddressCall wrap *gomock.Call +type MockControllerCharmDeployerControllerAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerControllerAddressCall) Return(arg0 string, arg1 error) *MockControllerCharmDeployerControllerAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerControllerAddressCall) Do(f func(context.Context) (string, error)) *MockControllerCharmDeployerControllerAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerControllerAddressCall) DoAndReturn(f func(context.Context) (string, error)) *MockControllerCharmDeployerControllerAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerCharmArch mocks base method. @@ -144,9 +240,33 @@ func (m *MockControllerCharmDeployer) ControllerCharmArch() string { } // ControllerCharmArch indicates an expected call of ControllerCharmArch. -func (mr *MockControllerCharmDeployerMockRecorder) ControllerCharmArch() *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) ControllerCharmArch() *MockControllerCharmDeployerControllerCharmArchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerCharmArch", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerCharmArch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerCharmArch", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerCharmArch)) + return &MockControllerCharmDeployerControllerCharmArchCall{Call: call} +} + +// MockControllerCharmDeployerControllerCharmArchCall wrap *gomock.Call +type MockControllerCharmDeployerControllerCharmArchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerControllerCharmArchCall) Return(arg0 string) *MockControllerCharmDeployerControllerCharmArchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerControllerCharmArchCall) Do(f func() string) *MockControllerCharmDeployerControllerCharmArchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerControllerCharmArchCall) DoAndReturn(f func() string) *MockControllerCharmDeployerControllerCharmArchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerCharmBase mocks base method. @@ -159,9 +279,33 @@ func (m *MockControllerCharmDeployer) ControllerCharmBase() (base.Base, error) { } // ControllerCharmBase indicates an expected call of ControllerCharmBase. -func (mr *MockControllerCharmDeployerMockRecorder) ControllerCharmBase() *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) ControllerCharmBase() *MockControllerCharmDeployerControllerCharmBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerCharmBase", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerCharmBase)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerCharmBase", reflect.TypeOf((*MockControllerCharmDeployer)(nil).ControllerCharmBase)) + return &MockControllerCharmDeployerControllerCharmBaseCall{Call: call} +} + +// MockControllerCharmDeployerControllerCharmBaseCall wrap *gomock.Call +type MockControllerCharmDeployerControllerCharmBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerControllerCharmBaseCall) Return(arg0 base.Base, arg1 error) *MockControllerCharmDeployerControllerCharmBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerControllerCharmBaseCall) Do(f func() (base.Base, error)) *MockControllerCharmDeployerControllerCharmBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerControllerCharmBaseCall) DoAndReturn(f func() (base.Base, error)) *MockControllerCharmDeployerControllerCharmBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeployCharmhubCharm mocks base method. @@ -175,9 +319,33 @@ func (m *MockControllerCharmDeployer) DeployCharmhubCharm(arg0 context.Context, } // DeployCharmhubCharm indicates an expected call of DeployCharmhubCharm. -func (mr *MockControllerCharmDeployerMockRecorder) DeployCharmhubCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) DeployCharmhubCharm(arg0, arg1, arg2 any) *MockControllerCharmDeployerDeployCharmhubCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployCharmhubCharm", reflect.TypeOf((*MockControllerCharmDeployer)(nil).DeployCharmhubCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployCharmhubCharm", reflect.TypeOf((*MockControllerCharmDeployer)(nil).DeployCharmhubCharm), arg0, arg1, arg2) + return &MockControllerCharmDeployerDeployCharmhubCharmCall{Call: call} +} + +// MockControllerCharmDeployerDeployCharmhubCharmCall wrap *gomock.Call +type MockControllerCharmDeployerDeployCharmhubCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerDeployCharmhubCharmCall) Return(arg0 string, arg1 *charm0.Origin, arg2 error) *MockControllerCharmDeployerDeployCharmhubCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerDeployCharmhubCharmCall) Do(f func(context.Context, string, base.Base) (string, *charm0.Origin, error)) *MockControllerCharmDeployerDeployCharmhubCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerDeployCharmhubCharmCall) DoAndReturn(f func(context.Context, string, base.Base) (string, *charm0.Origin, error)) *MockControllerCharmDeployerDeployCharmhubCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeployLocalCharm mocks base method. @@ -191,9 +359,33 @@ func (m *MockControllerCharmDeployer) DeployLocalCharm(arg0 context.Context, arg } // DeployLocalCharm indicates an expected call of DeployLocalCharm. -func (mr *MockControllerCharmDeployerMockRecorder) DeployLocalCharm(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockControllerCharmDeployerMockRecorder) DeployLocalCharm(arg0, arg1, arg2 any) *MockControllerCharmDeployerDeployLocalCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployLocalCharm", reflect.TypeOf((*MockControllerCharmDeployer)(nil).DeployLocalCharm), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployLocalCharm", reflect.TypeOf((*MockControllerCharmDeployer)(nil).DeployLocalCharm), arg0, arg1, arg2) + return &MockControllerCharmDeployerDeployLocalCharmCall{Call: call} +} + +// MockControllerCharmDeployerDeployLocalCharmCall wrap *gomock.Call +type MockControllerCharmDeployerDeployLocalCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerCharmDeployerDeployLocalCharmCall) Return(arg0 string, arg1 *charm0.Origin, arg2 error) *MockControllerCharmDeployerDeployLocalCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerCharmDeployerDeployLocalCharmCall) Do(f func(context.Context, string, base.Base) (string, *charm0.Origin, error)) *MockControllerCharmDeployerDeployLocalCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerCharmDeployerDeployLocalCharmCall) DoAndReturn(f func(context.Context, string, base.Base) (string, *charm0.Origin, error)) *MockControllerCharmDeployerDeployLocalCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockHTTPClient is a mock of HTTPClient interface. @@ -229,9 +421,33 @@ func (m *MockHTTPClient) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *MockHTTPClientDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + return &MockHTTPClientDoCall{Call: call} +} + +// MockHTTPClientDoCall wrap *gomock.Call +type MockHTTPClientDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPClientDoCall) Return(arg0 *http.Response, arg1 error) *MockHTTPClientDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPClientDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPClientDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLoggerFactory is a mock of LoggerFactory interface. @@ -266,9 +482,33 @@ func (m *MockLoggerFactory) Child(arg0 string) charmhub.Logger { } // Child indicates an expected call of Child. -func (mr *MockLoggerFactoryMockRecorder) Child(arg0 any) *gomock.Call { +func (mr *MockLoggerFactoryMockRecorder) Child(arg0 any) *MockLoggerFactoryChildCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Child", reflect.TypeOf((*MockLoggerFactory)(nil).Child), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Child", reflect.TypeOf((*MockLoggerFactory)(nil).Child), arg0) + return &MockLoggerFactoryChildCall{Call: call} +} + +// MockLoggerFactoryChildCall wrap *gomock.Call +type MockLoggerFactoryChildCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerFactoryChildCall) Return(arg0 charmhub.Logger) *MockLoggerFactoryChildCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerFactoryChildCall) Do(f func(string) charmhub.Logger) *MockLoggerFactoryChildCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerFactoryChildCall) DoAndReturn(f func(string) charmhub.Logger) *MockLoggerFactoryChildCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ChildWithTags mocks base method. @@ -284,10 +524,34 @@ func (m *MockLoggerFactory) ChildWithTags(arg0 string, arg1 ...string) charmhub. } // ChildWithTags indicates an expected call of ChildWithTags. -func (mr *MockLoggerFactoryMockRecorder) ChildWithTags(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerFactoryMockRecorder) ChildWithTags(arg0 any, arg1 ...any) *MockLoggerFactoryChildWithTagsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChildWithTags", reflect.TypeOf((*MockLoggerFactory)(nil).ChildWithTags), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChildWithTags", reflect.TypeOf((*MockLoggerFactory)(nil).ChildWithTags), varargs...) + return &MockLoggerFactoryChildWithTagsCall{Call: call} +} + +// MockLoggerFactoryChildWithTagsCall wrap *gomock.Call +type MockLoggerFactoryChildWithTagsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerFactoryChildWithTagsCall) Return(arg0 charmhub.Logger) *MockLoggerFactoryChildWithTagsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerFactoryChildWithTagsCall) Do(f func(string, ...string) charmhub.Logger) *MockLoggerFactoryChildWithTagsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerFactoryChildWithTagsCall) DoAndReturn(f func(string, ...string) charmhub.Logger) *MockLoggerFactoryChildWithTagsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForNamespace mocks base method. @@ -299,9 +563,33 @@ func (m *MockLoggerFactory) ForNamespace(arg0 string) services.LoggerFactory { } // ForNamespace indicates an expected call of ForNamespace. -func (mr *MockLoggerFactoryMockRecorder) ForNamespace(arg0 any) *gomock.Call { +func (mr *MockLoggerFactoryMockRecorder) ForNamespace(arg0 any) *MockLoggerFactoryForNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForNamespace", reflect.TypeOf((*MockLoggerFactory)(nil).ForNamespace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForNamespace", reflect.TypeOf((*MockLoggerFactory)(nil).ForNamespace), arg0) + return &MockLoggerFactoryForNamespaceCall{Call: call} +} + +// MockLoggerFactoryForNamespaceCall wrap *gomock.Call +type MockLoggerFactoryForNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerFactoryForNamespaceCall) Return(arg0 services.LoggerFactory) *MockLoggerFactoryForNamespaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerFactoryForNamespaceCall) Do(f func(string) services.LoggerFactory) *MockLoggerFactoryForNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerFactoryForNamespaceCall) DoAndReturn(f func(string) services.LoggerFactory) *MockLoggerFactoryForNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudService is a mock of CloudService interface. @@ -336,9 +624,33 @@ func (m *MockCloudService) Addresses() network.SpaceAddresses { } // Addresses indicates an expected call of Addresses. -func (mr *MockCloudServiceMockRecorder) Addresses() *gomock.Call { +func (mr *MockCloudServiceMockRecorder) Addresses() *MockCloudServiceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockCloudService)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockCloudService)(nil).Addresses)) + return &MockCloudServiceAddressesCall{Call: call} +} + +// MockCloudServiceAddressesCall wrap *gomock.Call +type MockCloudServiceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceAddressesCall) Return(arg0 network.SpaceAddresses) *MockCloudServiceAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceAddressesCall) Do(f func() network.SpaceAddresses) *MockCloudServiceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceAddressesCall) DoAndReturn(f func() network.SpaceAddresses) *MockCloudServiceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudServiceGetter is a mock of CloudServiceGetter interface. @@ -374,9 +686,33 @@ func (m *MockCloudServiceGetter) CloudService(arg0 string) (CloudService, error) } // CloudService indicates an expected call of CloudService. -func (mr *MockCloudServiceGetterMockRecorder) CloudService(arg0 any) *gomock.Call { +func (mr *MockCloudServiceGetterMockRecorder) CloudService(arg0 any) *MockCloudServiceGetterCloudServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockCloudServiceGetter)(nil).CloudService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockCloudServiceGetter)(nil).CloudService), arg0) + return &MockCloudServiceGetterCloudServiceCall{Call: call} +} + +// MockCloudServiceGetterCloudServiceCall wrap *gomock.Call +type MockCloudServiceGetterCloudServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceGetterCloudServiceCall) Return(arg0 CloudService, arg1 error) *MockCloudServiceGetterCloudServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceGetterCloudServiceCall) Do(f func(string) (CloudService, error)) *MockCloudServiceGetterCloudServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceGetterCloudServiceCall) DoAndReturn(f func(string) (CloudService, error)) *MockCloudServiceGetterCloudServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockOperationApplier is a mock of OperationApplier interface. @@ -411,9 +747,33 @@ func (m *MockOperationApplier) ApplyOperation(arg0 *state.UpdateUnitOperation) e } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockOperationApplierMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockOperationApplierMockRecorder) ApplyOperation(arg0 any) *MockOperationApplierApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockOperationApplier)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockOperationApplier)(nil).ApplyOperation), arg0) + return &MockOperationApplierApplyOperationCall{Call: call} +} + +// MockOperationApplierApplyOperationCall wrap *gomock.Call +type MockOperationApplierApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationApplierApplyOperationCall) Return(arg0 error) *MockOperationApplierApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationApplierApplyOperationCall) Do(f func(*state.UpdateUnitOperation) error) *MockOperationApplierApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationApplierApplyOperationCall) DoAndReturn(f func(*state.UpdateUnitOperation) error) *MockOperationApplierApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -446,9 +806,33 @@ func (m *MockMachine) AddPrincipal(arg0 string) { } // AddPrincipal indicates an expected call of AddPrincipal. -func (mr *MockMachineMockRecorder) AddPrincipal(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AddPrincipal(arg0 any) *MockMachineAddPrincipalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPrincipal", reflect.TypeOf((*MockMachine)(nil).AddPrincipal), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPrincipal", reflect.TypeOf((*MockMachine)(nil).AddPrincipal), arg0) + return &MockMachineAddPrincipalCall{Call: call} +} + +// MockMachineAddPrincipalCall wrap *gomock.Call +type MockMachineAddPrincipalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAddPrincipalCall) Return() *MockMachineAddPrincipalCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAddPrincipalCall) Do(f func(string)) *MockMachineAddPrincipalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAddPrincipalCall) DoAndReturn(f func(string)) *MockMachineAddPrincipalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Base mocks base method. @@ -460,9 +844,33 @@ func (m *MockMachine) Base() state.Base { } // Base indicates an expected call of Base. -func (mr *MockMachineMockRecorder) Base() *gomock.Call { +func (mr *MockMachineMockRecorder) Base() *MockMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + return &MockMachineBaseCall{Call: call} +} + +// MockMachineBaseCall wrap *gomock.Call +type MockMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBaseCall) Return(arg0 state.Base) *MockMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBaseCall) Do(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBaseCall) DoAndReturn(f func() state.Base) *MockMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clean mocks base method. @@ -474,9 +882,33 @@ func (m *MockMachine) Clean() bool { } // Clean indicates an expected call of Clean. -func (mr *MockMachineMockRecorder) Clean() *gomock.Call { +func (mr *MockMachineMockRecorder) Clean() *MockMachineCleanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clean", reflect.TypeOf((*MockMachine)(nil).Clean)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clean", reflect.TypeOf((*MockMachine)(nil).Clean)) + return &MockMachineCleanCall{Call: call} +} + +// MockMachineCleanCall wrap *gomock.Call +type MockMachineCleanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineCleanCall) Return(arg0 bool) *MockMachineCleanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineCleanCall) Do(f func() bool) *MockMachineCleanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineCleanCall) DoAndReturn(f func() bool) *MockMachineCleanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -488,9 +920,33 @@ func (m *MockMachine) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMachineMockRecorder) ContainerType() *gomock.Call { +func (mr *MockMachineMockRecorder) ContainerType() *MockMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + return &MockMachineContainerTypeCall{Call: call} +} + +// MockMachineContainerTypeCall wrap *gomock.Call +type MockMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainerTypeCall) Return(arg0 instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainerTypeCall) Do(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DocID mocks base method. @@ -502,9 +958,33 @@ func (m *MockMachine) DocID() string { } // DocID indicates an expected call of DocID. -func (mr *MockMachineMockRecorder) DocID() *gomock.Call { +func (mr *MockMachineMockRecorder) DocID() *MockMachineDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockMachine)(nil).DocID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockMachine)(nil).DocID)) + return &MockMachineDocIDCall{Call: call} +} + +// MockMachineDocIDCall wrap *gomock.Call +type MockMachineDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineDocIDCall) Return(arg0 string) *MockMachineDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineDocIDCall) Do(f func() string) *MockMachineDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineDocIDCall) DoAndReturn(f func() string) *MockMachineDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FileSystems mocks base method. @@ -516,9 +996,33 @@ func (m *MockMachine) FileSystems() []string { } // FileSystems indicates an expected call of FileSystems. -func (mr *MockMachineMockRecorder) FileSystems() *gomock.Call { +func (mr *MockMachineMockRecorder) FileSystems() *MockMachineFileSystemsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileSystems", reflect.TypeOf((*MockMachine)(nil).FileSystems)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileSystems", reflect.TypeOf((*MockMachine)(nil).FileSystems)) + return &MockMachineFileSystemsCall{Call: call} +} + +// MockMachineFileSystemsCall wrap *gomock.Call +type MockMachineFileSystemsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineFileSystemsCall) Return(arg0 []string) *MockMachineFileSystemsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineFileSystemsCall) Do(f func() []string) *MockMachineFileSystemsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineFileSystemsCall) DoAndReturn(f func() []string) *MockMachineFileSystemsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -530,9 +1034,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -544,9 +1072,33 @@ func (m *MockMachine) Jobs() []state.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockMachineMockRecorder) Jobs() *gomock.Call { +func (mr *MockMachineMockRecorder) Jobs() *MockMachineJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + return &MockMachineJobsCall{Call: call} +} + +// MockMachineJobsCall wrap *gomock.Call +type MockMachineJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineJobsCall) Return(arg0 []state.MachineJob) *MockMachineJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineJobsCall) Do(f func() []state.MachineJob) *MockMachineJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineJobsCall) DoAndReturn(f func() []state.MachineJob) *MockMachineJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -558,9 +1110,33 @@ func (m *MockMachine) Life() state.Life { } // Life indicates an expected call of Life. -func (mr *MockMachineMockRecorder) Life() *gomock.Call { +func (mr *MockMachineMockRecorder) Life() *MockMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + return &MockMachineLifeCall{Call: call} +} + +// MockMachineLifeCall wrap *gomock.Call +type MockMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineLifeCall) Return(arg0 state.Life) *MockMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineLifeCall) Do(f func() state.Life) *MockMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineLifeCall) DoAndReturn(f func() state.Life) *MockMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineTag mocks base method. @@ -572,9 +1148,33 @@ func (m *MockMachine) MachineTag() names.MachineTag { } // MachineTag indicates an expected call of MachineTag. -func (mr *MockMachineMockRecorder) MachineTag() *gomock.Call { +func (mr *MockMachineMockRecorder) MachineTag() *MockMachineMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachine)(nil).MachineTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachine)(nil).MachineTag)) + return &MockMachineMachineTagCall{Call: call} +} + +// MockMachineMachineTagCall wrap *gomock.Call +type MockMachineMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineMachineTagCall) Return(arg0 names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineMachineTagCall) Do(f func() names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -587,9 +1187,33 @@ func (m *MockMachine) PublicAddress() (network.SpaceAddress, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockMachineMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockMachineMockRecorder) PublicAddress() *MockMachinePublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockMachine)(nil).PublicAddress)) + return &MockMachinePublicAddressCall{Call: call} +} + +// MockMachinePublicAddressCall wrap *gomock.Call +type MockMachinePublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePublicAddressCall) Return(arg0 network.SpaceAddress, arg1 error) *MockMachinePublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePublicAddressCall) Do(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePublicAddressCall) DoAndReturn(f func() (network.SpaceAddress, error)) *MockMachinePublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachineGetter is a mock of MachineGetter interface. @@ -625,9 +1249,33 @@ func (m *MockMachineGetter) Machine(arg0 string) (Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockMachineGetterMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockMachineGetterMockRecorder) Machine(arg0 any) *MockMachineGetterMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockMachineGetter)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockMachineGetter)(nil).Machine), arg0) + return &MockMachineGetterMachineCall{Call: call} +} + +// MockMachineGetterMachineCall wrap *gomock.Call +type MockMachineGetterMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineGetterMachineCall) Return(arg0 Machine, arg1 error) *MockMachineGetterMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineGetterMachineCall) Do(f func(string) (Machine, error)) *MockMachineGetterMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineGetterMachineCall) DoAndReturn(f func(string) (Machine, error)) *MockMachineGetterMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStateBackend is a mock of StateBackend interface. @@ -663,9 +1311,33 @@ func (m *MockStateBackend) AddApplication(arg0 state.AddApplicationArgs, arg1 ob } // AddApplication indicates an expected call of AddApplication. -func (mr *MockStateBackendMockRecorder) AddApplication(arg0, arg1 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) AddApplication(arg0, arg1 any) *MockStateBackendAddApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockStateBackend)(nil).AddApplication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockStateBackend)(nil).AddApplication), arg0, arg1) + return &MockStateBackendAddApplicationCall{Call: call} +} + +// MockStateBackendAddApplicationCall wrap *gomock.Call +type MockStateBackendAddApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendAddApplicationCall) Return(arg0 Application, arg1 error) *MockStateBackendAddApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendAddApplicationCall) Do(f func(state.AddApplicationArgs, objectstore.ObjectStore) (Application, error)) *MockStateBackendAddApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendAddApplicationCall) DoAndReturn(f func(state.AddApplicationArgs, objectstore.ObjectStore) (Application, error)) *MockStateBackendAddApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -678,9 +1350,33 @@ func (m *MockStateBackend) Charm(arg0 string) (Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockStateBackendMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) Charm(arg0 any) *MockStateBackendCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockStateBackend)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockStateBackend)(nil).Charm), arg0) + return &MockStateBackendCharmCall{Call: call} +} + +// MockStateBackendCharmCall wrap *gomock.Call +type MockStateBackendCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendCharmCall) Return(arg0 Charm, arg1 error) *MockStateBackendCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendCharmCall) Do(f func(string) (Charm, error)) *MockStateBackendCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendCharmCall) DoAndReturn(f func(string) (Charm, error)) *MockStateBackendCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -693,9 +1389,33 @@ func (m *MockStateBackend) Model() (Model, error) { } // Model indicates an expected call of Model. -func (mr *MockStateBackendMockRecorder) Model() *gomock.Call { +func (mr *MockStateBackendMockRecorder) Model() *MockStateBackendModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockStateBackend)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockStateBackend)(nil).Model)) + return &MockStateBackendModelCall{Call: call} +} + +// MockStateBackendModelCall wrap *gomock.Call +type MockStateBackendModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendModelCall) Return(arg0 Model, arg1 error) *MockStateBackendModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendModelCall) Do(f func() (Model, error)) *MockStateBackendModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendModelCall) DoAndReturn(f func() (Model, error)) *MockStateBackendModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -708,9 +1428,33 @@ func (m *MockStateBackend) Unit(arg0 string) (Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockStateBackendMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) Unit(arg0 any) *MockStateBackendUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStateBackend)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStateBackend)(nil).Unit), arg0) + return &MockStateBackendUnitCall{Call: call} +} + +// MockStateBackendUnitCall wrap *gomock.Call +type MockStateBackendUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendUnitCall) Return(arg0 Unit, arg1 error) *MockStateBackendUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendUnitCall) Do(f func(string) (Unit, error)) *MockStateBackendUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendUnitCall) DoAndReturn(f func(string) (Unit, error)) *MockStateBackendUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -745,9 +1489,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -782,9 +1550,33 @@ func (m *MockCharm) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmMockRecorder) Manifest() *MockCharmManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharm)(nil).Manifest)) + return &MockCharmManifestCall{Call: call} +} + +// MockCharmManifestCall wrap *gomock.Call +type MockCharmManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmManifestCall) Return(arg0 *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmManifestCall) Do(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -796,9 +1588,33 @@ func (m *MockCharm) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmMockRecorder) Meta() *MockCharmMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharm)(nil).Meta)) + return &MockCharmMetaCall{Call: call} +} + +// MockCharmMetaCall wrap *gomock.Call +type MockCharmMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmMetaCall) Return(arg0 *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmMetaCall) Do(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -810,9 +1626,33 @@ func (m *MockCharm) URL() string { } // URL indicates an expected call of URL. -func (mr *MockCharmMockRecorder) URL() *gomock.Call { +func (mr *MockCharmMockRecorder) URL() *MockCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + return &MockCharmURLCall{Call: call} +} + +// MockCharmURLCall wrap *gomock.Call +type MockCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmURLCall) Return(arg0 string) *MockCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmURLCall) Do(f func() string) *MockCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmURLCall) DoAndReturn(f func() string) *MockCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -847,9 +1687,33 @@ func (m *MockUnit) AssignToMachineRef(arg0 state.MachineRef) error { } // AssignToMachineRef indicates an expected call of AssignToMachineRef. -func (mr *MockUnitMockRecorder) AssignToMachineRef(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) AssignToMachineRef(arg0 any) *MockUnitAssignToMachineRefCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignToMachineRef", reflect.TypeOf((*MockUnit)(nil).AssignToMachineRef), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignToMachineRef", reflect.TypeOf((*MockUnit)(nil).AssignToMachineRef), arg0) + return &MockUnitAssignToMachineRefCall{Call: call} +} + +// MockUnitAssignToMachineRefCall wrap *gomock.Call +type MockUnitAssignToMachineRefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignToMachineRefCall) Return(arg0 error) *MockUnitAssignToMachineRefCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignToMachineRefCall) Do(f func(state.MachineRef) error) *MockUnitAssignToMachineRefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignToMachineRefCall) DoAndReturn(f func(state.MachineRef) error) *MockUnitAssignToMachineRefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -861,9 +1725,33 @@ func (m *MockUnit) SetPassword(arg0 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockUnitMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetPassword(arg0 any) *MockUnitSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUnit)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUnit)(nil).SetPassword), arg0) + return &MockUnitSetPasswordCall{Call: call} +} + +// MockUnitSetPasswordCall wrap *gomock.Call +type MockUnitSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetPasswordCall) Return(arg0 error) *MockUnitSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetPasswordCall) Do(f func(string) error) *MockUnitSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetPasswordCall) DoAndReturn(f func(string) error) *MockUnitSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitTag mocks base method. @@ -875,9 +1763,33 @@ func (m *MockUnit) UnitTag() names.UnitTag { } // UnitTag indicates an expected call of UnitTag. -func (mr *MockUnitMockRecorder) UnitTag() *gomock.Call { +func (mr *MockUnitMockRecorder) UnitTag() *MockUnitUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitTag", reflect.TypeOf((*MockUnit)(nil).UnitTag)) + return &MockUnitUnitTagCall{Call: call} +} + +// MockUnitUnitTagCall wrap *gomock.Call +type MockUnitUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUnitTagCall) Return(arg0 names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUnitTagCall) Do(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUnitTagCall) DoAndReturn(f func() names.UnitTag) *MockUnitUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateOperation mocks base method. @@ -889,9 +1801,33 @@ func (m *MockUnit) UpdateOperation(arg0 state.UnitUpdateProperties) *state.Updat } // UpdateOperation indicates an expected call of UpdateOperation. -func (mr *MockUnitMockRecorder) UpdateOperation(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) UpdateOperation(arg0 any) *MockUnitUpdateOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOperation", reflect.TypeOf((*MockUnit)(nil).UpdateOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOperation", reflect.TypeOf((*MockUnit)(nil).UpdateOperation), arg0) + return &MockUnitUpdateOperationCall{Call: call} +} + +// MockUnitUpdateOperationCall wrap *gomock.Call +type MockUnitUpdateOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUpdateOperationCall) Return(arg0 *state.UpdateUnitOperation) *MockUnitUpdateOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUpdateOperationCall) Do(f func(state.UnitUpdateProperties) *state.UpdateUnitOperation) *MockUnitUpdateOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUpdateOperationCall) DoAndReturn(f func(state.UnitUpdateProperties) *state.UpdateUnitOperation) *MockUnitUpdateOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -927,9 +1863,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -941,9 +1901,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -955,9 +1939,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -970,9 +1978,33 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharmUploader is a mock of CharmUploader interface. @@ -1007,9 +2039,33 @@ func (m *MockCharmUploader) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockCharmUploaderMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockCharmUploaderMockRecorder) ModelUUID() *MockCharmUploaderModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockCharmUploader)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockCharmUploader)(nil).ModelUUID)) + return &MockCharmUploaderModelUUIDCall{Call: call} +} + +// MockCharmUploaderModelUUIDCall wrap *gomock.Call +type MockCharmUploaderModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmUploaderModelUUIDCall) Return(arg0 string) *MockCharmUploaderModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmUploaderModelUUIDCall) Do(f func() string) *MockCharmUploaderModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmUploaderModelUUIDCall) DoAndReturn(f func() string) *MockCharmUploaderModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -1022,9 +2078,33 @@ func (m *MockCharmUploader) PrepareCharmUpload(arg0 string) (services.UploadedCh } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockCharmUploaderMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockCharmUploaderMockRecorder) PrepareCharmUpload(arg0 any) *MockCharmUploaderPrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockCharmUploader)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockCharmUploader)(nil).PrepareCharmUpload), arg0) + return &MockCharmUploaderPrepareCharmUploadCall{Call: call} +} + +// MockCharmUploaderPrepareCharmUploadCall wrap *gomock.Call +type MockCharmUploaderPrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmUploaderPrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockCharmUploaderPrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmUploaderPrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockCharmUploaderPrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmUploaderPrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockCharmUploaderPrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareLocalCharmUpload mocks base method. @@ -1037,9 +2117,33 @@ func (m *MockCharmUploader) PrepareLocalCharmUpload(arg0 string) (*charm.URL, er } // PrepareLocalCharmUpload indicates an expected call of PrepareLocalCharmUpload. -func (mr *MockCharmUploaderMockRecorder) PrepareLocalCharmUpload(arg0 any) *gomock.Call { +func (mr *MockCharmUploaderMockRecorder) PrepareLocalCharmUpload(arg0 any) *MockCharmUploaderPrepareLocalCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareLocalCharmUpload", reflect.TypeOf((*MockCharmUploader)(nil).PrepareLocalCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareLocalCharmUpload", reflect.TypeOf((*MockCharmUploader)(nil).PrepareLocalCharmUpload), arg0) + return &MockCharmUploaderPrepareLocalCharmUploadCall{Call: call} +} + +// MockCharmUploaderPrepareLocalCharmUploadCall wrap *gomock.Call +type MockCharmUploaderPrepareLocalCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmUploaderPrepareLocalCharmUploadCall) Return(arg0 *charm.URL, arg1 error) *MockCharmUploaderPrepareLocalCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmUploaderPrepareLocalCharmUploadCall) Do(f func(string) (*charm.URL, error)) *MockCharmUploaderPrepareLocalCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmUploaderPrepareLocalCharmUploadCall) DoAndReturn(f func(string) (*charm.URL, error)) *MockCharmUploaderPrepareLocalCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -1052,9 +2156,33 @@ func (m *MockCharmUploader) UpdateUploadedCharm(arg0 state.CharmInfo) (services. } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockCharmUploaderMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockCharmUploaderMockRecorder) UpdateUploadedCharm(arg0 any) *MockCharmUploaderUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockCharmUploader)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockCharmUploader)(nil).UpdateUploadedCharm), arg0) + return &MockCharmUploaderUpdateUploadedCharmCall{Call: call} +} + +// MockCharmUploaderUpdateUploadedCharmCall wrap *gomock.Call +type MockCharmUploaderUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmUploaderUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockCharmUploaderUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmUploaderUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockCharmUploaderUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmUploaderUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockCharmUploaderUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationService is a mock of ApplicationService interface. @@ -1093,8 +2221,32 @@ func (m *MockApplicationService) CreateApplication(arg0 context.Context, arg1 st } // CreateApplication indicates an expected call of CreateApplication. -func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *MockApplicationServiceCreateApplicationCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + return &MockApplicationServiceCreateApplicationCall{Call: call} +} + +// MockApplicationServiceCreateApplicationCall wrap *gomock.Call +type MockApplicationServiceCreateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceCreateApplicationCall) Return(arg0 error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceCreateApplicationCall) Do(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceCreateApplicationCall) DoAndReturn(f func(context.Context, string, service.AddApplicationParams, ...service.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/bootstrap/charm_mock_test.go b/internal/bootstrap/charm_mock_test.go index b2f50792684..bfefbe858b2 100644 --- a/internal/bootstrap/charm_mock_test.go +++ b/internal/bootstrap/charm_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination charm_mock_test.go github.com/juju/juju/core/charm Repository +// mockgen -typed -package bootstrap -destination charm_mock_test.go github.com/juju/juju/core/charm Repository // // Package bootstrap is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockRepository) DownloadCharm(arg0 context.Context, arg1 string, arg2 c } // DownloadCharm indicates an expected call of DownloadCharm. -func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *MockRepositoryDownloadCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + return &MockRepositoryDownloadCharmCall{Call: call} +} + +// MockRepositoryDownloadCharmCall wrap *gomock.Call +type MockRepositoryDownloadCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryDownloadCharmCall) Return(arg0 charm0.CharmArchive, arg1 charm0.Origin, arg2 error) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryDownloadCharmCall) Do(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryDownloadCharmCall) DoAndReturn(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockRepositoryDownloadCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetDownloadURL mocks base method. @@ -70,9 +94,33 @@ func (m *MockRepository) GetDownloadURL(arg0 context.Context, arg1 string, arg2 } // GetDownloadURL indicates an expected call of GetDownloadURL. -func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *MockRepositoryGetDownloadURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + return &MockRepositoryGetDownloadURLCall{Call: call} +} + +// MockRepositoryGetDownloadURLCall wrap *gomock.Call +type MockRepositoryGetDownloadURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetDownloadURLCall) Return(arg0 *url.URL, arg1 charm0.Origin, arg2 error) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetDownloadURLCall) Do(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetDownloadURLCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockRepositoryGetDownloadURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetEssentialMetadata mocks base method. @@ -89,10 +137,34 @@ func (m *MockRepository) GetEssentialMetadata(arg0 context.Context, arg1 ...char } // GetEssentialMetadata indicates an expected call of GetEssentialMetadata. -func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) GetEssentialMetadata(arg0 any, arg1 ...any) *MockRepositoryGetEssentialMetadataCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEssentialMetadata", reflect.TypeOf((*MockRepository)(nil).GetEssentialMetadata), varargs...) + return &MockRepositoryGetEssentialMetadataCall{Call: call} +} + +// MockRepositoryGetEssentialMetadataCall wrap *gomock.Call +type MockRepositoryGetEssentialMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetEssentialMetadataCall) Return(arg0 []charm0.EssentialMetadata, arg1 error) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetEssentialMetadataCall) Do(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetEssentialMetadataCall) DoAndReturn(f func(context.Context, ...charm0.MetadataRequest) ([]charm0.EssentialMetadata, error)) *MockRepositoryGetEssentialMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -105,9 +177,33 @@ func (m *MockRepository) ListResources(arg0 context.Context, arg1 string, arg2 c } // ListResources indicates an expected call of ListResources. -func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ListResources(arg0, arg1, arg2 any) *MockRepositoryListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockRepository)(nil).ListResources), arg0, arg1, arg2) + return &MockRepositoryListResourcesCall{Call: call} +} + +// MockRepositoryListResourcesCall wrap *gomock.Call +type MockRepositoryListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryListResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryListResourcesCall) Do(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryListResourcesCall) DoAndReturn(f func(context.Context, string, charm0.Origin) ([]resource.Resource, error)) *MockRepositoryListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveForDeploy mocks base method. @@ -120,9 +216,33 @@ func (m *MockRepository) ResolveForDeploy(arg0 context.Context, arg1 charm0.Char } // ResolveForDeploy indicates an expected call of ResolveForDeploy. -func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveForDeploy(arg0, arg1 any) *MockRepositoryResolveForDeployCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveForDeploy", reflect.TypeOf((*MockRepository)(nil).ResolveForDeploy), arg0, arg1) + return &MockRepositoryResolveForDeployCall{Call: call} +} + +// MockRepositoryResolveForDeployCall wrap *gomock.Call +type MockRepositoryResolveForDeployCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveForDeployCall) Return(arg0 charm0.ResolvedDataForDeploy, arg1 error) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveForDeployCall) Do(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveForDeployCall) DoAndReturn(f func(context.Context, charm0.CharmID) (charm0.ResolvedDataForDeploy, error)) *MockRepositoryResolveForDeployCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveResources mocks base method. @@ -135,9 +255,33 @@ func (m *MockRepository) ResolveResources(arg0 context.Context, arg1 []resource. } // ResolveResources indicates an expected call of ResolveResources. -func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveResources(arg0, arg1, arg2 any) *MockRepositoryResolveResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveResources", reflect.TypeOf((*MockRepository)(nil).ResolveResources), arg0, arg1, arg2) + return &MockRepositoryResolveResourcesCall{Call: call} +} + +// MockRepositoryResolveResourcesCall wrap *gomock.Call +type MockRepositoryResolveResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveResourcesCall) Return(arg0 []resource.Resource, arg1 error) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveResourcesCall) Do(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveResourcesCall) DoAndReturn(f func(context.Context, []resource.Resource, charm0.CharmID) ([]resource.Resource, error)) *MockRepositoryResolveResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveWithPreferredChannel mocks base method. @@ -152,7 +296,31 @@ func (m *MockRepository) ResolveWithPreferredChannel(arg0 context.Context, arg1 } // ResolveWithPreferredChannel indicates an expected call of ResolveWithPreferredChannel. -func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *MockRepositoryResolveWithPreferredChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + return &MockRepositoryResolveWithPreferredChannelCall{Call: call} +} + +// MockRepositoryResolveWithPreferredChannelCall wrap *gomock.Call +type MockRepositoryResolveWithPreferredChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryResolveWithPreferredChannelCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []charm0.Platform, arg3 error) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryResolveWithPreferredChannelCall) Do(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryResolveWithPreferredChannelCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/bootstrap/downloader_mock_test.go b/internal/bootstrap/downloader_mock_test.go index 882b6e2025a..938cfea52d9 100644 --- a/internal/bootstrap/downloader_mock_test.go +++ b/internal/bootstrap/downloader_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination downloader_mock_test.go github.com/juju/juju/apiserver/facades/client/charms/interfaces Downloader +// mockgen -typed -package bootstrap -destination downloader_mock_test.go github.com/juju/juju/apiserver/facades/client/charms/interfaces Downloader // // Package bootstrap is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockDownloader) DownloadAndStore(arg0 context.Context, arg1 *charm.URL, } // DownloadAndStore indicates an expected call of DownloadAndStore. -func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 any) *MockDownloaderDownloadAndStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndStore", reflect.TypeOf((*MockDownloader)(nil).DownloadAndStore), arg0, arg1, arg2, arg3) + return &MockDownloaderDownloadAndStoreCall{Call: call} +} + +// MockDownloaderDownloadAndStoreCall wrap *gomock.Call +type MockDownloaderDownloadAndStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDownloaderDownloadAndStoreCall) Return(arg0 charm0.Origin, arg1 error) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDownloaderDownloadAndStoreCall) Do(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDownloaderDownloadAndStoreCall) DoAndReturn(f func(context.Context, *charm.URL, charm0.Origin, bool) (charm0.Origin, error)) *MockDownloaderDownloadAndStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/bootstrap/objectstore_mock_test.go b/internal/bootstrap/objectstore_mock_test.go index cdb8ba5fdec..974e8ce96b6 100644 --- a/internal/bootstrap/objectstore_mock_test.go +++ b/internal/bootstrap/objectstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore // // Package bootstrap is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/bootstrap/package_test.go b/internal/bootstrap/package_test.go index 63343b3ca25..3bb6264b78f 100644 --- a/internal/bootstrap/package_test.go +++ b/internal/bootstrap/package_test.go @@ -19,10 +19,10 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/bootstrap AgentBinaryStorage,ControllerCharmDeployer,HTTPClient,LoggerFactory,CloudService,CloudServiceGetter,OperationApplier,Machine,MachineGetter,StateBackend,Application,Charm,Unit,Model,CharmUploader,ApplicationService -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination charm_mock_test.go github.com/juju/juju/core/charm Repository -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination downloader_mock_test.go github.com/juju/juju/apiserver/facades/client/charms/interfaces Downloader +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/bootstrap AgentBinaryStorage,ControllerCharmDeployer,HTTPClient,LoggerFactory,CloudService,CloudServiceGetter,OperationApplier,Machine,MachineGetter,StateBackend,Application,Charm,Unit,Model,CharmUploader,ApplicationService +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination charm_mock_test.go github.com/juju/juju/core/charm Repository +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination downloader_mock_test.go github.com/juju/juju/apiserver/facades/client/charms/interfaces Downloader func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/changestream/eventmultiplexer/change_mock_test.go b/internal/changestream/eventmultiplexer/change_mock_test.go index 2dae0dbb66c..4abc487fc42 100644 --- a/internal/changestream/eventmultiplexer/change_mock_test.go +++ b/internal/changestream/eventmultiplexer/change_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventmultiplexer -destination change_mock_test.go github.com/juju/juju/core/changestream Term +// mockgen -typed -package eventmultiplexer -destination change_mock_test.go github.com/juju/juju/core/changestream Term // // Package eventmultiplexer is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockTerm) Changes() []changestream.ChangeEvent { } // Changes indicates an expected call of Changes. -func (mr *MockTermMockRecorder) Changes() *gomock.Call { +func (mr *MockTermMockRecorder) Changes() *MockTermChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockTerm)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockTerm)(nil).Changes)) + return &MockTermChangesCall{Call: call} +} + +// MockTermChangesCall wrap *gomock.Call +type MockTermChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTermChangesCall) Return(arg0 []changestream.ChangeEvent) *MockTermChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTermChangesCall) Do(f func() []changestream.ChangeEvent) *MockTermChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTermChangesCall) DoAndReturn(f func() []changestream.ChangeEvent) *MockTermChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -60,7 +84,31 @@ func (m *MockTerm) Done(arg0 bool, arg1 <-chan struct{}) { } // Done indicates an expected call of Done. -func (mr *MockTermMockRecorder) Done(arg0, arg1 any) *gomock.Call { +func (mr *MockTermMockRecorder) Done(arg0, arg1 any) *MockTermDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockTerm)(nil).Done), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockTerm)(nil).Done), arg0, arg1) + return &MockTermDoneCall{Call: call} +} + +// MockTermDoneCall wrap *gomock.Call +type MockTermDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTermDoneCall) Return() *MockTermDoneCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTermDoneCall) Do(f func(bool, <-chan struct{})) *MockTermDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTermDoneCall) DoAndReturn(f func(bool, <-chan struct{})) *MockTermDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/eventmultiplexer/clock_mock_test.go b/internal/changestream/eventmultiplexer/clock_mock_test.go index 07c6f371786..47b298b3500 100644 --- a/internal/changestream/eventmultiplexer/clock_mock_test.go +++ b/internal/changestream/eventmultiplexer/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventmultiplexer -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package eventmultiplexer -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package eventmultiplexer is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/eventmultiplexer/logger_mock_test.go b/internal/changestream/eventmultiplexer/logger_mock_test.go index 63b57715cd3..be65f0ea267 100644 --- a/internal/changestream/eventmultiplexer/logger_mock_test.go +++ b/internal/changestream/eventmultiplexer/logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventmultiplexer -destination logger_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Logger +// mockgen -typed -package eventmultiplexer -destination logger_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Logger // // Package eventmultiplexer is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -83,10 +131,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -98,9 +170,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -114,8 +210,32 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/eventmultiplexer/metrics_mock_test.go b/internal/changestream/eventmultiplexer/metrics_mock_test.go index e37fc799a1f..8f71427d180 100644 --- a/internal/changestream/eventmultiplexer/metrics_mock_test.go +++ b/internal/changestream/eventmultiplexer/metrics_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventmultiplexer -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer MetricsCollector +// mockgen -typed -package eventmultiplexer -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer MetricsCollector // // Package eventmultiplexer is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockMetricsCollector) DispatchDurationObserve(arg0 float64, arg1 bool) } // DispatchDurationObserve indicates an expected call of DispatchDurationObserve. -func (mr *MockMetricsCollectorMockRecorder) DispatchDurationObserve(arg0, arg1 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) DispatchDurationObserve(arg0, arg1 any) *MockMetricsCollectorDispatchDurationObserveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DispatchDurationObserve", reflect.TypeOf((*MockMetricsCollector)(nil).DispatchDurationObserve), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DispatchDurationObserve", reflect.TypeOf((*MockMetricsCollector)(nil).DispatchDurationObserve), arg0, arg1) + return &MockMetricsCollectorDispatchDurationObserveCall{Call: call} +} + +// MockMetricsCollectorDispatchDurationObserveCall wrap *gomock.Call +type MockMetricsCollectorDispatchDurationObserveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorDispatchDurationObserveCall) Return() *MockMetricsCollectorDispatchDurationObserveCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorDispatchDurationObserveCall) Do(f func(float64, bool)) *MockMetricsCollectorDispatchDurationObserveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorDispatchDurationObserveCall) DoAndReturn(f func(float64, bool)) *MockMetricsCollectorDispatchDurationObserveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubscriptionsDec mocks base method. @@ -57,9 +81,33 @@ func (m *MockMetricsCollector) SubscriptionsDec() { } // SubscriptionsDec indicates an expected call of SubscriptionsDec. -func (mr *MockMetricsCollectorMockRecorder) SubscriptionsDec() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) SubscriptionsDec() *MockMetricsCollectorSubscriptionsDecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscriptionsDec", reflect.TypeOf((*MockMetricsCollector)(nil).SubscriptionsDec)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscriptionsDec", reflect.TypeOf((*MockMetricsCollector)(nil).SubscriptionsDec)) + return &MockMetricsCollectorSubscriptionsDecCall{Call: call} +} + +// MockMetricsCollectorSubscriptionsDecCall wrap *gomock.Call +type MockMetricsCollectorSubscriptionsDecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorSubscriptionsDecCall) Return() *MockMetricsCollectorSubscriptionsDecCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorSubscriptionsDecCall) Do(f func()) *MockMetricsCollectorSubscriptionsDecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorSubscriptionsDecCall) DoAndReturn(f func()) *MockMetricsCollectorSubscriptionsDecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubscriptionsInc mocks base method. @@ -69,7 +117,31 @@ func (m *MockMetricsCollector) SubscriptionsInc() { } // SubscriptionsInc indicates an expected call of SubscriptionsInc. -func (mr *MockMetricsCollectorMockRecorder) SubscriptionsInc() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) SubscriptionsInc() *MockMetricsCollectorSubscriptionsIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscriptionsInc", reflect.TypeOf((*MockMetricsCollector)(nil).SubscriptionsInc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscriptionsInc", reflect.TypeOf((*MockMetricsCollector)(nil).SubscriptionsInc)) + return &MockMetricsCollectorSubscriptionsIncCall{Call: call} +} + +// MockMetricsCollectorSubscriptionsIncCall wrap *gomock.Call +type MockMetricsCollectorSubscriptionsIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorSubscriptionsIncCall) Return() *MockMetricsCollectorSubscriptionsIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorSubscriptionsIncCall) Do(f func()) *MockMetricsCollectorSubscriptionsIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorSubscriptionsIncCall) DoAndReturn(f func()) *MockMetricsCollectorSubscriptionsIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/eventmultiplexer/package_test.go b/internal/changestream/eventmultiplexer/package_test.go index 3f7b570622f..20a13c428f5 100644 --- a/internal/changestream/eventmultiplexer/package_test.go +++ b/internal/changestream/eventmultiplexer/package_test.go @@ -17,11 +17,11 @@ import ( jujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package eventmultiplexer -destination change_mock_test.go github.com/juju/juju/core/changestream Term -//go:generate go run go.uber.org/mock/mockgen -package eventmultiplexer -destination stream_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Stream -//go:generate go run go.uber.org/mock/mockgen -package eventmultiplexer -destination logger_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Logger -//go:generate go run go.uber.org/mock/mockgen -package eventmultiplexer -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer MetricsCollector -//go:generate go run go.uber.org/mock/mockgen -package eventmultiplexer -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package eventmultiplexer -destination change_mock_test.go github.com/juju/juju/core/changestream Term +//go:generate go run go.uber.org/mock/mockgen -typed -package eventmultiplexer -destination stream_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Stream +//go:generate go run go.uber.org/mock/mockgen -typed -package eventmultiplexer -destination logger_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package eventmultiplexer -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer MetricsCollector +//go:generate go run go.uber.org/mock/mockgen -typed -package eventmultiplexer -destination clock_mock_test.go github.com/juju/clock Clock,Timer func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/changestream/eventmultiplexer/stream_mock_test.go b/internal/changestream/eventmultiplexer/stream_mock_test.go index 83c12c78523..69234825730 100644 --- a/internal/changestream/eventmultiplexer/stream_mock_test.go +++ b/internal/changestream/eventmultiplexer/stream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package eventmultiplexer -destination stream_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Stream +// mockgen -typed -package eventmultiplexer -destination stream_mock_test.go github.com/juju/juju/internal/changestream/eventmultiplexer Stream // // Package eventmultiplexer is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockStream) Dying() <-chan struct{} { } // Dying indicates an expected call of Dying. -func (mr *MockStreamMockRecorder) Dying() *gomock.Call { +func (mr *MockStreamMockRecorder) Dying() *MockStreamDyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dying", reflect.TypeOf((*MockStream)(nil).Dying)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dying", reflect.TypeOf((*MockStream)(nil).Dying)) + return &MockStreamDyingCall{Call: call} +} + +// MockStreamDyingCall wrap *gomock.Call +type MockStreamDyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStreamDyingCall) Return(arg0 <-chan struct{}) *MockStreamDyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStreamDyingCall) Do(f func() <-chan struct{}) *MockStreamDyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStreamDyingCall) DoAndReturn(f func() <-chan struct{}) *MockStreamDyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Terms mocks base method. @@ -62,7 +86,31 @@ func (m *MockStream) Terms() <-chan changestream.Term { } // Terms indicates an expected call of Terms. -func (mr *MockStreamMockRecorder) Terms() *gomock.Call { +func (mr *MockStreamMockRecorder) Terms() *MockStreamTermsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Terms", reflect.TypeOf((*MockStream)(nil).Terms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Terms", reflect.TypeOf((*MockStream)(nil).Terms)) + return &MockStreamTermsCall{Call: call} +} + +// MockStreamTermsCall wrap *gomock.Call +type MockStreamTermsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStreamTermsCall) Return(arg0 <-chan changestream.Term) *MockStreamTermsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStreamTermsCall) Do(f func() <-chan changestream.Term) *MockStreamTermsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStreamTermsCall) DoAndReturn(f func() <-chan changestream.Term) *MockStreamTermsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/stream/clock_mock_test.go b/internal/changestream/stream/clock_mock_test.go index 4e7d7252e1a..beef743f8d2 100644 --- a/internal/changestream/stream/clock_mock_test.go +++ b/internal/changestream/stream/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stream -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package stream -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package stream is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/stream/logger_mock_test.go b/internal/changestream/stream/logger_mock_test.go index 14803aecd2f..455fea39dda 100644 --- a/internal/changestream/stream/logger_mock_test.go +++ b/internal/changestream/stream/logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stream -destination logger_mock_test.go github.com/juju/juju/internal/changestream/stream Logger +// mockgen -typed -package stream -destination logger_mock_test.go github.com/juju/juju/internal/changestream/stream Logger // // Package stream is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -83,10 +131,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -98,9 +170,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -114,8 +210,32 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/stream/metrics_mock_test.go b/internal/changestream/stream/metrics_mock_test.go index 88ef35f3f50..7b6a1d0dafe 100644 --- a/internal/changestream/stream/metrics_mock_test.go +++ b/internal/changestream/stream/metrics_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stream -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/stream MetricsCollector +// mockgen -typed -package stream -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/stream MetricsCollector // // Package stream is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockMetricsCollector) ChangesCountObserve(arg0 int) { } // ChangesCountObserve indicates an expected call of ChangesCountObserve. -func (mr *MockMetricsCollectorMockRecorder) ChangesCountObserve(arg0 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) ChangesCountObserve(arg0 any) *MockMetricsCollectorChangesCountObserveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesCountObserve", reflect.TypeOf((*MockMetricsCollector)(nil).ChangesCountObserve), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesCountObserve", reflect.TypeOf((*MockMetricsCollector)(nil).ChangesCountObserve), arg0) + return &MockMetricsCollectorChangesCountObserveCall{Call: call} +} + +// MockMetricsCollectorChangesCountObserveCall wrap *gomock.Call +type MockMetricsCollectorChangesCountObserveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorChangesCountObserveCall) Return() *MockMetricsCollectorChangesCountObserveCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorChangesCountObserveCall) Do(f func(int)) *MockMetricsCollectorChangesCountObserveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorChangesCountObserveCall) DoAndReturn(f func(int)) *MockMetricsCollectorChangesCountObserveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ChangesRequestDurationObserve mocks base method. @@ -57,9 +81,33 @@ func (m *MockMetricsCollector) ChangesRequestDurationObserve(arg0 float64) { } // ChangesRequestDurationObserve indicates an expected call of ChangesRequestDurationObserve. -func (mr *MockMetricsCollectorMockRecorder) ChangesRequestDurationObserve(arg0 any) *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) ChangesRequestDurationObserve(arg0 any) *MockMetricsCollectorChangesRequestDurationObserveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesRequestDurationObserve", reflect.TypeOf((*MockMetricsCollector)(nil).ChangesRequestDurationObserve), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesRequestDurationObserve", reflect.TypeOf((*MockMetricsCollector)(nil).ChangesRequestDurationObserve), arg0) + return &MockMetricsCollectorChangesRequestDurationObserveCall{Call: call} +} + +// MockMetricsCollectorChangesRequestDurationObserveCall wrap *gomock.Call +type MockMetricsCollectorChangesRequestDurationObserveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorChangesRequestDurationObserveCall) Return() *MockMetricsCollectorChangesRequestDurationObserveCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorChangesRequestDurationObserveCall) Do(f func(float64)) *MockMetricsCollectorChangesRequestDurationObserveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorChangesRequestDurationObserveCall) DoAndReturn(f func(float64)) *MockMetricsCollectorChangesRequestDurationObserveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatermarkInsertsInc mocks base method. @@ -69,9 +117,33 @@ func (m *MockMetricsCollector) WatermarkInsertsInc() { } // WatermarkInsertsInc indicates an expected call of WatermarkInsertsInc. -func (mr *MockMetricsCollectorMockRecorder) WatermarkInsertsInc() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) WatermarkInsertsInc() *MockMetricsCollectorWatermarkInsertsIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatermarkInsertsInc", reflect.TypeOf((*MockMetricsCollector)(nil).WatermarkInsertsInc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatermarkInsertsInc", reflect.TypeOf((*MockMetricsCollector)(nil).WatermarkInsertsInc)) + return &MockMetricsCollectorWatermarkInsertsIncCall{Call: call} +} + +// MockMetricsCollectorWatermarkInsertsIncCall wrap *gomock.Call +type MockMetricsCollectorWatermarkInsertsIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorWatermarkInsertsIncCall) Return() *MockMetricsCollectorWatermarkInsertsIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorWatermarkInsertsIncCall) Do(f func()) *MockMetricsCollectorWatermarkInsertsIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorWatermarkInsertsIncCall) DoAndReturn(f func()) *MockMetricsCollectorWatermarkInsertsIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatermarkRetriesInc mocks base method. @@ -81,7 +153,31 @@ func (m *MockMetricsCollector) WatermarkRetriesInc() { } // WatermarkRetriesInc indicates an expected call of WatermarkRetriesInc. -func (mr *MockMetricsCollectorMockRecorder) WatermarkRetriesInc() *gomock.Call { +func (mr *MockMetricsCollectorMockRecorder) WatermarkRetriesInc() *MockMetricsCollectorWatermarkRetriesIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatermarkRetriesInc", reflect.TypeOf((*MockMetricsCollector)(nil).WatermarkRetriesInc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatermarkRetriesInc", reflect.TypeOf((*MockMetricsCollector)(nil).WatermarkRetriesInc)) + return &MockMetricsCollectorWatermarkRetriesIncCall{Call: call} +} + +// MockMetricsCollectorWatermarkRetriesIncCall wrap *gomock.Call +type MockMetricsCollectorWatermarkRetriesIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetricsCollectorWatermarkRetriesIncCall) Return() *MockMetricsCollectorWatermarkRetriesIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetricsCollectorWatermarkRetriesIncCall) Do(f func()) *MockMetricsCollectorWatermarkRetriesIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetricsCollectorWatermarkRetriesIncCall) DoAndReturn(f func()) *MockMetricsCollectorWatermarkRetriesIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/changestream/stream/package_test.go b/internal/changestream/stream/package_test.go index ef1cb77d5d3..667c7666507 100644 --- a/internal/changestream/stream/package_test.go +++ b/internal/changestream/stream/package_test.go @@ -16,10 +16,10 @@ import ( databasetesting "github.com/juju/juju/internal/database/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package stream -destination stream_mock_test.go github.com/juju/juju/internal/changestream/stream FileNotifier -//go:generate go run go.uber.org/mock/mockgen -package stream -destination logger_mock_test.go github.com/juju/juju/internal/changestream/stream Logger -//go:generate go run go.uber.org/mock/mockgen -package stream -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/stream MetricsCollector -//go:generate go run go.uber.org/mock/mockgen -package stream -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package stream -destination stream_mock_test.go github.com/juju/juju/internal/changestream/stream FileNotifier +//go:generate go run go.uber.org/mock/mockgen -typed -package stream -destination logger_mock_test.go github.com/juju/juju/internal/changestream/stream Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package stream -destination metrics_mock_test.go github.com/juju/juju/internal/changestream/stream MetricsCollector +//go:generate go run go.uber.org/mock/mockgen -typed -package stream -destination clock_mock_test.go github.com/juju/clock Clock,Timer func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/changestream/stream/stream_mock_test.go b/internal/changestream/stream/stream_mock_test.go index adf3821f926..63a08757c34 100644 --- a/internal/changestream/stream/stream_mock_test.go +++ b/internal/changestream/stream/stream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package stream -destination stream_mock_test.go github.com/juju/juju/internal/changestream/stream FileNotifier +// mockgen -typed -package stream -destination stream_mock_test.go github.com/juju/juju/internal/changestream/stream FileNotifier // // Package stream is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockFileNotifier) Changes() (<-chan bool, error) { } // Changes indicates an expected call of Changes. -func (mr *MockFileNotifierMockRecorder) Changes() *gomock.Call { +func (mr *MockFileNotifierMockRecorder) Changes() *MockFileNotifierChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifier)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifier)(nil).Changes)) + return &MockFileNotifierChangesCall{Call: call} +} + +// MockFileNotifierChangesCall wrap *gomock.Call +type MockFileNotifierChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileNotifierChangesCall) Return(arg0 <-chan bool, arg1 error) *MockFileNotifierChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileNotifierChangesCall) Do(f func() (<-chan bool, error)) *MockFileNotifierChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileNotifierChangesCall) DoAndReturn(f func() (<-chan bool, error)) *MockFileNotifierChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/downloader_test.go b/internal/charm/downloader/downloader_test.go index 1c4d1a5b40d..6c7878d9787 100644 --- a/internal/charm/downloader/downloader_test.go +++ b/internal/charm/downloader/downloader_test.go @@ -230,7 +230,7 @@ func (s downloaderSuite) TestDownloadAndStore(c *gc.C) { ) s.repoGetter.EXPECT().GetCharmRepository(gomock.Any(), corecharm.CharmHub).Return(repoAdaptor{s.repo}, nil) s.repo.EXPECT().DownloadCharm(gomock.Any(), curl.Name, requestedOriginWithPlatform, gomock.Any()).DoAndReturn( - func(_ context.Context, _ string, requestedOrigin corecharm.Origin, archivePath string) (downloader.CharmArchive, corecharm.Origin, error) { + func(ctx context.Context, _ string, requestedOrigin corecharm.Origin, archivePath string) (corecharm.CharmArchive, corecharm.Origin, error) { c.Assert(os.WriteFile(archivePath, []byte("meshuggah\n"), 0644), jc.ErrorIsNil) return s.charmArchive, resolvedOrigin, nil }, diff --git a/internal/charm/downloader/mocks/charm_archive_mocks.go b/internal/charm/downloader/mocks/charm_archive_mocks.go index 98bc2a5a575..21d9e3cc13d 100644 --- a/internal/charm/downloader/mocks/charm_archive_mocks.go +++ b/internal/charm/downloader/mocks/charm_archive_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charm_archive_mocks.go github.com/juju/juju/internal/charm/downloader CharmRepository +// mockgen -typed -package mocks -destination mocks/charm_archive_mocks.go github.com/juju/juju/internal/charm/downloader CharmRepository // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockCharmRepository) DownloadCharm(arg0 context.Context, arg1 string, a } // DownloadCharm indicates an expected call of DownloadCharm. -func (mr *MockCharmRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCharmRepositoryMockRecorder) DownloadCharm(arg0, arg1, arg2, arg3 any) *MockCharmRepositoryDownloadCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockCharmRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCharm", reflect.TypeOf((*MockCharmRepository)(nil).DownloadCharm), arg0, arg1, arg2, arg3) + return &MockCharmRepositoryDownloadCharmCall{Call: call} +} + +// MockCharmRepositoryDownloadCharmCall wrap *gomock.Call +type MockCharmRepositoryDownloadCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRepositoryDownloadCharmCall) Return(arg0 charm0.CharmArchive, arg1 charm0.Origin, arg2 error) *MockCharmRepositoryDownloadCharmCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRepositoryDownloadCharmCall) Do(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockCharmRepositoryDownloadCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRepositoryDownloadCharmCall) DoAndReturn(f func(context.Context, string, charm0.Origin, string) (charm0.CharmArchive, charm0.Origin, error)) *MockCharmRepositoryDownloadCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetDownloadURL mocks base method. @@ -69,9 +93,33 @@ func (m *MockCharmRepository) GetDownloadURL(arg0 context.Context, arg1 string, } // GetDownloadURL indicates an expected call of GetDownloadURL. -func (mr *MockCharmRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmRepositoryMockRecorder) GetDownloadURL(arg0, arg1, arg2 any) *MockCharmRepositoryGetDownloadURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockCharmRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDownloadURL", reflect.TypeOf((*MockCharmRepository)(nil).GetDownloadURL), arg0, arg1, arg2) + return &MockCharmRepositoryGetDownloadURLCall{Call: call} +} + +// MockCharmRepositoryGetDownloadURLCall wrap *gomock.Call +type MockCharmRepositoryGetDownloadURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRepositoryGetDownloadURLCall) Return(arg0 *url.URL, arg1 charm0.Origin, arg2 error) *MockCharmRepositoryGetDownloadURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRepositoryGetDownloadURLCall) Do(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockCharmRepositoryGetDownloadURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRepositoryGetDownloadURLCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*url.URL, charm0.Origin, error)) *MockCharmRepositoryGetDownloadURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveWithPreferredChannel mocks base method. @@ -86,7 +134,31 @@ func (m *MockCharmRepository) ResolveWithPreferredChannel(arg0 context.Context, } // ResolveWithPreferredChannel indicates an expected call of ResolveWithPreferredChannel. -func (mr *MockCharmRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmRepositoryMockRecorder) ResolveWithPreferredChannel(arg0, arg1, arg2 any) *MockCharmRepositoryResolveWithPreferredChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockCharmRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveWithPreferredChannel", reflect.TypeOf((*MockCharmRepository)(nil).ResolveWithPreferredChannel), arg0, arg1, arg2) + return &MockCharmRepositoryResolveWithPreferredChannelCall{Call: call} +} + +// MockCharmRepositoryResolveWithPreferredChannelCall wrap *gomock.Call +type MockCharmRepositoryResolveWithPreferredChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmRepositoryResolveWithPreferredChannelCall) Return(arg0 *charm.URL, arg1 charm0.Origin, arg2 []charm0.Platform, arg3 error) *MockCharmRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmRepositoryResolveWithPreferredChannelCall) Do(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockCharmRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmRepositoryResolveWithPreferredChannelCall) DoAndReturn(f func(context.Context, string, charm0.Origin) (*charm.URL, charm0.Origin, []charm0.Platform, error)) *MockCharmRepositoryResolveWithPreferredChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/mocks/charm_mocks.go b/internal/charm/downloader/mocks/charm_mocks.go index 93c3928a5ef..24623f81f64 100644 --- a/internal/charm/downloader/mocks/charm_mocks.go +++ b/internal/charm/downloader/mocks/charm_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charm_mocks.go github.com/juju/juju/internal/charm/downloader CharmArchive +// mockgen -typed -package mocks -destination mocks/charm_mocks.go github.com/juju/juju/internal/charm/downloader CharmArchive // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCharmArchive) Actions() *charm.Actions { } // Actions indicates an expected call of Actions. -func (mr *MockCharmArchiveMockRecorder) Actions() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Actions() *MockCharmArchiveActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharmArchive)(nil).Actions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Actions", reflect.TypeOf((*MockCharmArchive)(nil).Actions)) + return &MockCharmArchiveActionsCall{Call: call} +} + +// MockCharmArchiveActionsCall wrap *gomock.Call +type MockCharmArchiveActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveActionsCall) Return(arg0 *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveActionsCall) Do(f func() *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveActionsCall) DoAndReturn(f func() *charm.Actions) *MockCharmArchiveActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -62,9 +86,33 @@ func (m *MockCharmArchive) Config() *charm.Config { } // Config indicates an expected call of Config. -func (mr *MockCharmArchiveMockRecorder) Config() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Config() *MockCharmArchiveConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharmArchive)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockCharmArchive)(nil).Config)) + return &MockCharmArchiveConfigCall{Call: call} +} + +// MockCharmArchiveConfigCall wrap *gomock.Call +type MockCharmArchiveConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveConfigCall) Return(arg0 *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveConfigCall) Do(f func() *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveConfigCall) DoAndReturn(f func() *charm.Config) *MockCharmArchiveConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfile mocks base method. @@ -76,9 +124,33 @@ func (m *MockCharmArchive) LXDProfile() *charm.LXDProfile { } // LXDProfile indicates an expected call of LXDProfile. -func (mr *MockCharmArchiveMockRecorder) LXDProfile() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) LXDProfile() *MockCharmArchiveLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharmArchive)(nil).LXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockCharmArchive)(nil).LXDProfile)) + return &MockCharmArchiveLXDProfileCall{Call: call} +} + +// MockCharmArchiveLXDProfileCall wrap *gomock.Call +type MockCharmArchiveLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveLXDProfileCall) Return(arg0 *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveLXDProfileCall) Do(f func() *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveLXDProfileCall) DoAndReturn(f func() *charm.LXDProfile) *MockCharmArchiveLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Manifest mocks base method. @@ -90,9 +162,33 @@ func (m *MockCharmArchive) Manifest() *charm.Manifest { } // Manifest indicates an expected call of Manifest. -func (mr *MockCharmArchiveMockRecorder) Manifest() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Manifest() *MockCharmArchiveManifestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmArchive)(nil).Manifest)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Manifest", reflect.TypeOf((*MockCharmArchive)(nil).Manifest)) + return &MockCharmArchiveManifestCall{Call: call} +} + +// MockCharmArchiveManifestCall wrap *gomock.Call +type MockCharmArchiveManifestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveManifestCall) Return(arg0 *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveManifestCall) Do(f func() *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveManifestCall) DoAndReturn(f func() *charm.Manifest) *MockCharmArchiveManifestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Meta mocks base method. @@ -104,9 +200,33 @@ func (m *MockCharmArchive) Meta() *charm.Meta { } // Meta indicates an expected call of Meta. -func (mr *MockCharmArchiveMockRecorder) Meta() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Meta() *MockCharmArchiveMetaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmArchive)(nil).Meta)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*MockCharmArchive)(nil).Meta)) + return &MockCharmArchiveMetaCall{Call: call} +} + +// MockCharmArchiveMetaCall wrap *gomock.Call +type MockCharmArchiveMetaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveMetaCall) Return(arg0 *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveMetaCall) Do(f func() *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveMetaCall) DoAndReturn(f func() *charm.Meta) *MockCharmArchiveMetaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revision mocks base method. @@ -118,9 +238,33 @@ func (m *MockCharmArchive) Revision() int { } // Revision indicates an expected call of Revision. -func (mr *MockCharmArchiveMockRecorder) Revision() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Revision() *MockCharmArchiveRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharmArchive)(nil).Revision)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revision", reflect.TypeOf((*MockCharmArchive)(nil).Revision)) + return &MockCharmArchiveRevisionCall{Call: call} +} + +// MockCharmArchiveRevisionCall wrap *gomock.Call +type MockCharmArchiveRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveRevisionCall) Return(arg0 int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveRevisionCall) Do(f func() int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveRevisionCall) DoAndReturn(f func() int) *MockCharmArchiveRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -132,7 +276,31 @@ func (m *MockCharmArchive) Version() string { } // Version indicates an expected call of Version. -func (mr *MockCharmArchiveMockRecorder) Version() *gomock.Call { +func (mr *MockCharmArchiveMockRecorder) Version() *MockCharmArchiveVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCharmArchive)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockCharmArchive)(nil).Version)) + return &MockCharmArchiveVersionCall{Call: call} +} + +// MockCharmArchiveVersionCall wrap *gomock.Call +type MockCharmArchiveVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveVersionCall) Return(arg0 string) *MockCharmArchiveVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveVersionCall) Do(f func() string) *MockCharmArchiveVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveVersionCall) DoAndReturn(f func() string) *MockCharmArchiveVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/mocks/logger_mocks.go b/internal/charm/downloader/mocks/logger_mocks.go index 32ac6d9b80b..19d95ea66c8 100644 --- a/internal/charm/downloader/mocks/logger_mocks.go +++ b/internal/charm/downloader/mocks/logger_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/logger_mocks.go github.com/juju/juju/internal/charm/downloader Logger +// mockgen -typed -package mocks -destination mocks/logger_mocks.go github.com/juju/juju/internal/charm/downloader Logger // // Package mocks is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -83,8 +131,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/mocks/repo_mocks.go b/internal/charm/downloader/mocks/repo_mocks.go index 3f96d1338cf..6b682796aca 100644 --- a/internal/charm/downloader/mocks/repo_mocks.go +++ b/internal/charm/downloader/mocks/repo_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/repo_mocks.go github.com/juju/juju/internal/charm/downloader RepositoryGetter +// mockgen -typed -package mocks -destination mocks/repo_mocks.go github.com/juju/juju/internal/charm/downloader RepositoryGetter // // Package mocks is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockRepositoryGetter) GetCharmRepository(arg0 context.Context, arg1 cha } // GetCharmRepository indicates an expected call of GetCharmRepository. -func (mr *MockRepositoryGetterMockRecorder) GetCharmRepository(arg0, arg1 any) *gomock.Call { +func (mr *MockRepositoryGetterMockRecorder) GetCharmRepository(arg0, arg1 any) *MockRepositoryGetterGetCharmRepositoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryGetter)(nil).GetCharmRepository), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmRepository", reflect.TypeOf((*MockRepositoryGetter)(nil).GetCharmRepository), arg0, arg1) + return &MockRepositoryGetterGetCharmRepositoryCall{Call: call} +} + +// MockRepositoryGetterGetCharmRepositoryCall wrap *gomock.Call +type MockRepositoryGetterGetCharmRepositoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRepositoryGetterGetCharmRepositoryCall) Return(arg0 downloader.CharmRepository, arg1 error) *MockRepositoryGetterGetCharmRepositoryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRepositoryGetterGetCharmRepositoryCall) Do(f func(context.Context, charm.Source) (downloader.CharmRepository, error)) *MockRepositoryGetterGetCharmRepositoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRepositoryGetterGetCharmRepositoryCall) DoAndReturn(f func(context.Context, charm.Source) (downloader.CharmRepository, error)) *MockRepositoryGetterGetCharmRepositoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/mocks/storage_mocks.go b/internal/charm/downloader/mocks/storage_mocks.go index 3b5f2695205..3421ab3be93 100644 --- a/internal/charm/downloader/mocks/storage_mocks.go +++ b/internal/charm/downloader/mocks/storage_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/storage_mocks.go github.com/juju/juju/internal/charm/downloader Storage +// mockgen -typed -package mocks -destination mocks/storage_mocks.go github.com/juju/juju/internal/charm/downloader Storage // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockStorage) PrepareToStoreCharm(arg0 string) error { } // PrepareToStoreCharm indicates an expected call of PrepareToStoreCharm. -func (mr *MockStorageMockRecorder) PrepareToStoreCharm(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) PrepareToStoreCharm(arg0 any) *MockStoragePrepareToStoreCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareToStoreCharm", reflect.TypeOf((*MockStorage)(nil).PrepareToStoreCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareToStoreCharm", reflect.TypeOf((*MockStorage)(nil).PrepareToStoreCharm), arg0) + return &MockStoragePrepareToStoreCharmCall{Call: call} +} + +// MockStoragePrepareToStoreCharmCall wrap *gomock.Call +type MockStoragePrepareToStoreCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePrepareToStoreCharmCall) Return(arg0 error) *MockStoragePrepareToStoreCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePrepareToStoreCharmCall) Do(f func(string) error) *MockStoragePrepareToStoreCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePrepareToStoreCharmCall) DoAndReturn(f func(string) error) *MockStoragePrepareToStoreCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Store mocks base method. @@ -63,7 +87,31 @@ func (m *MockStorage) Store(arg0 context.Context, arg1 string, arg2 downloader.D } // Store indicates an expected call of Store. -func (mr *MockStorageMockRecorder) Store(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Store(arg0, arg1, arg2 any) *MockStorageStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockStorage)(nil).Store), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockStorage)(nil).Store), arg0, arg1, arg2) + return &MockStorageStoreCall{Call: call} +} + +// MockStorageStoreCall wrap *gomock.Call +type MockStorageStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageStoreCall) Return(arg0 error) *MockStorageStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageStoreCall) Do(f func(context.Context, string, downloader.DownloadedCharm) error) *MockStorageStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageStoreCall) DoAndReturn(f func(context.Context, string, downloader.DownloadedCharm) error) *MockStorageStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/downloader/package_test.go b/internal/charm/downloader/package_test.go index 096e94eb730..fb355b6a9fa 100644 --- a/internal/charm/downloader/package_test.go +++ b/internal/charm/downloader/package_test.go @@ -9,11 +9,11 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/logger_mocks.go github.com/juju/juju/internal/charm/downloader Logger -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charm_mocks.go github.com/juju/juju/internal/charm/downloader CharmArchive -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charm_archive_mocks.go github.com/juju/juju/internal/charm/downloader CharmRepository -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/storage_mocks.go github.com/juju/juju/internal/charm/downloader Storage -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/repo_mocks.go github.com/juju/juju/internal/charm/downloader RepositoryGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/logger_mocks.go github.com/juju/juju/internal/charm/downloader Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charm_mocks.go github.com/juju/juju/internal/charm/downloader CharmArchive +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charm_archive_mocks.go github.com/juju/juju/internal/charm/downloader CharmRepository +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/storage_mocks.go github.com/juju/juju/internal/charm/downloader Storage +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/repo_mocks.go github.com/juju/juju/internal/charm/downloader RepositoryGetter func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/charm/repository/mocks/charmhub_client_mock.go b/internal/charm/repository/mocks/charmhub_client_mock.go index b033c4c1b6a..ba2cddc91ab 100644 --- a/internal/charm/repository/mocks/charmhub_client_mock.go +++ b/internal/charm/repository/mocks/charmhub_client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charmhub_client_mock.go github.com/juju/juju/internal/charm/repository CharmHubClient +// mockgen -typed -package mocks -destination mocks/charmhub_client_mock.go github.com/juju/juju/internal/charm/repository CharmHubClient // // Package mocks is a generated GoMock package. @@ -57,10 +57,34 @@ func (m *MockCharmHubClient) DownloadAndRead(arg0 context.Context, arg1 *url.URL } // DownloadAndRead indicates an expected call of DownloadAndRead. -func (mr *MockCharmHubClientMockRecorder) DownloadAndRead(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) DownloadAndRead(arg0, arg1, arg2 any, arg3 ...any) *MockCharmHubClientDownloadAndReadCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndRead", reflect.TypeOf((*MockCharmHubClient)(nil).DownloadAndRead), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadAndRead", reflect.TypeOf((*MockCharmHubClient)(nil).DownloadAndRead), varargs...) + return &MockCharmHubClientDownloadAndReadCall{Call: call} +} + +// MockCharmHubClientDownloadAndReadCall wrap *gomock.Call +type MockCharmHubClientDownloadAndReadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientDownloadAndReadCall) Return(arg0 *charm.CharmArchive, arg1 error) *MockCharmHubClientDownloadAndReadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientDownloadAndReadCall) Do(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) (*charm.CharmArchive, error)) *MockCharmHubClientDownloadAndReadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientDownloadAndReadCall) DoAndReturn(f func(context.Context, *url.URL, string, ...charmhub.DownloadOption) (*charm.CharmArchive, error)) *MockCharmHubClientDownloadAndReadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResourceRevisions mocks base method. @@ -73,9 +97,33 @@ func (m *MockCharmHubClient) ListResourceRevisions(arg0 context.Context, arg1, a } // ListResourceRevisions indicates an expected call of ListResourceRevisions. -func (mr *MockCharmHubClientMockRecorder) ListResourceRevisions(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) ListResourceRevisions(arg0, arg1, arg2 any) *MockCharmHubClientListResourceRevisionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceRevisions", reflect.TypeOf((*MockCharmHubClient)(nil).ListResourceRevisions), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceRevisions", reflect.TypeOf((*MockCharmHubClient)(nil).ListResourceRevisions), arg0, arg1, arg2) + return &MockCharmHubClientListResourceRevisionsCall{Call: call} +} + +// MockCharmHubClientListResourceRevisionsCall wrap *gomock.Call +type MockCharmHubClientListResourceRevisionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientListResourceRevisionsCall) Return(arg0 []transport.ResourceRevision, arg1 error) *MockCharmHubClientListResourceRevisionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientListResourceRevisionsCall) Do(f func(context.Context, string, string) ([]transport.ResourceRevision, error)) *MockCharmHubClientListResourceRevisionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientListResourceRevisionsCall) DoAndReturn(f func(context.Context, string, string) ([]transport.ResourceRevision, error)) *MockCharmHubClientListResourceRevisionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -88,7 +136,31 @@ func (m *MockCharmHubClient) Refresh(arg0 context.Context, arg1 charmhub.Refresh } // Refresh indicates an expected call of Refresh. -func (mr *MockCharmHubClientMockRecorder) Refresh(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmHubClientMockRecorder) Refresh(arg0, arg1 any) *MockCharmHubClientRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHubClient)(nil).Refresh), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHubClient)(nil).Refresh), arg0, arg1) + return &MockCharmHubClientRefreshCall{Call: call} +} + +// MockCharmHubClientRefreshCall wrap *gomock.Call +type MockCharmHubClientRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubClientRefreshCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmHubClientRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubClientRefreshCall) Do(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubClientRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubClientRefreshCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubClientRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/repository/mocks/logger_mock.go b/internal/charm/repository/mocks/logger_mock.go index 5a3788a5aa6..284862ee7a3 100644 --- a/internal/charm/repository/mocks/logger_mock.go +++ b/internal/charm/repository/mocks/logger_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/charm/repository Logger +// mockgen -typed -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/charm/repository Logger // // Package mocks is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -66,8 +90,32 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/repository/package_test.go b/internal/charm/repository/package_test.go index 4a82d7051c9..93c8721bc93 100644 --- a/internal/charm/repository/package_test.go +++ b/internal/charm/repository/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charmhub_client_mock.go github.com/juju/juju/internal/charm/repository CharmHubClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/charm/repository Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charmhub_client_mock.go github.com/juju/juju/internal/charm/repository CharmHubClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/charm/repository Logger func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/charm/services/interface_mocks_test.go b/internal/charm/services/interface_mocks_test.go index fc0d1a51755..9b712a80f69 100644 --- a/internal/charm/services/interface_mocks_test.go +++ b/internal/charm/services/interface_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package services -destination interface_mocks_test.go github.com/juju/juju/internal/charm/services StateBackend,ModelBackend,Storage,UploadedCharm +// mockgen -typed -package services -destination interface_mocks_test.go github.com/juju/juju/internal/charm/services StateBackend,ModelBackend,Storage,UploadedCharm // // Package services is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockStateBackend) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockStateBackendMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockStateBackendMockRecorder) ModelUUID() *MockStateBackendModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockStateBackend)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockStateBackend)(nil).ModelUUID)) + return &MockStateBackendModelUUIDCall{Call: call} +} + +// MockStateBackendModelUUIDCall wrap *gomock.Call +type MockStateBackendModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendModelUUIDCall) Return(arg0 string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendModelUUIDCall) Do(f func() string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendModelUUIDCall) DoAndReturn(f func() string) *MockStateBackendModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -66,9 +90,33 @@ func (m *MockStateBackend) PrepareCharmUpload(arg0 string) (UploadedCharm, error } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 any) *MockStateBackendPrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockStateBackend)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockStateBackend)(nil).PrepareCharmUpload), arg0) + return &MockStateBackendPrepareCharmUploadCall{Call: call} +} + +// MockStateBackendPrepareCharmUploadCall wrap *gomock.Call +type MockStateBackendPrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendPrepareCharmUploadCall) Return(arg0 UploadedCharm, arg1 error) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendPrepareCharmUploadCall) Do(f func(string) (UploadedCharm, error)) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendPrepareCharmUploadCall) DoAndReturn(f func(string) (UploadedCharm, error)) *MockStateBackendPrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -81,9 +129,33 @@ func (m *MockStateBackend) UpdateUploadedCharm(arg0 state.CharmInfo) (UploadedCh } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 any) *MockStateBackendUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockStateBackend)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockStateBackend)(nil).UpdateUploadedCharm), arg0) + return &MockStateBackendUpdateUploadedCharmCall{Call: call} +} + +// MockStateBackendUpdateUploadedCharmCall wrap *gomock.Call +type MockStateBackendUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateBackendUpdateUploadedCharmCall) Return(arg0 UploadedCharm, arg1 error) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateBackendUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (UploadedCharm, error)) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateBackendUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (UploadedCharm, error)) *MockStateBackendUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelBackend is a mock of ModelBackend interface. @@ -119,9 +191,33 @@ func (m *MockModelBackend) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelBackendMockRecorder) Config() *gomock.Call { +func (mr *MockModelBackendMockRecorder) Config() *MockModelBackendConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelBackend)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelBackend)(nil).Config)) + return &MockModelBackendConfigCall{Call: call} +} + +// MockModelBackendConfigCall wrap *gomock.Call +type MockModelBackendConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelBackendConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelBackendConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelBackendConfigCall) Do(f func() (*config.Config, error)) *MockModelBackendConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelBackendConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelBackendConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorage is a mock of Storage interface. @@ -156,9 +252,33 @@ func (m *MockStorage) Put(arg0 context.Context, arg1 string, arg2 io.Reader, arg } // Put indicates an expected call of Put. -func (mr *MockStorageMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockStoragePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockStorage)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockStorage)(nil).Put), arg0, arg1, arg2, arg3) + return &MockStoragePutCall{Call: call} +} + +// MockStoragePutCall wrap *gomock.Call +type MockStoragePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStoragePutCall) Return(arg0 error) *MockStoragePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStoragePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockStoragePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStoragePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockStoragePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -170,9 +290,33 @@ func (m *MockStorage) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockStorageMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Remove(arg0, arg1 any) *MockStorageRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockStorage)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockStorage)(nil).Remove), arg0, arg1) + return &MockStorageRemoveCall{Call: call} +} + +// MockStorageRemoveCall wrap *gomock.Call +type MockStorageRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageRemoveCall) Return(arg0 error) *MockStorageRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageRemoveCall) Do(f func(context.Context, string) error) *MockStorageRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockStorageRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUploadedCharm is a mock of UploadedCharm interface. @@ -207,7 +351,31 @@ func (m *MockUploadedCharm) IsUploaded() bool { } // IsUploaded indicates an expected call of IsUploaded. -func (mr *MockUploadedCharmMockRecorder) IsUploaded() *gomock.Call { +func (mr *MockUploadedCharmMockRecorder) IsUploaded() *MockUploadedCharmIsUploadedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockUploadedCharm)(nil).IsUploaded)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUploaded", reflect.TypeOf((*MockUploadedCharm)(nil).IsUploaded)) + return &MockUploadedCharmIsUploadedCall{Call: call} +} + +// MockUploadedCharmIsUploadedCall wrap *gomock.Call +type MockUploadedCharmIsUploadedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUploadedCharmIsUploadedCall) Return(arg0 bool) *MockUploadedCharmIsUploadedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUploadedCharmIsUploadedCall) Do(f func() bool) *MockUploadedCharmIsUploadedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUploadedCharmIsUploadedCall) DoAndReturn(f func() bool) *MockUploadedCharmIsUploadedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charm/services/package_test.go b/internal/charm/services/package_test.go index bbfc96919ae..8c5e0b396af 100644 --- a/internal/charm/services/package_test.go +++ b/internal/charm/services/package_test.go @@ -9,7 +9,7 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package services -destination interface_mocks_test.go github.com/juju/juju/internal/charm/services StateBackend,ModelBackend,Storage,UploadedCharm +//go:generate go run go.uber.org/mock/mockgen -typed -package services -destination interface_mocks_test.go github.com/juju/juju/internal/charm/services StateBackend,ModelBackend,Storage,UploadedCharm func TestAll(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/internal/charmhub/client_mock_test.go b/internal/charmhub/client_mock_test.go index 45d1d582680..1a5f901a2d5 100644 --- a/internal/charmhub/client_mock_test.go +++ b/internal/charmhub/client_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package charmhub -destination client_mock_test.go github.com/juju/juju/internal/charmhub HTTPClient,RESTClient,FileSystem,Logger +// mockgen -typed -package charmhub -destination client_mock_test.go github.com/juju/juju/internal/charmhub HTTPClient,RESTClient,FileSystem,Logger // // Package charmhub is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockHTTPClient) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *MockHTTPClientDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + return &MockHTTPClientDoCall{Call: call} +} + +// MockHTTPClientDoCall wrap *gomock.Call +type MockHTTPClientDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPClientDoCall) Return(arg0 *http.Response, arg1 error) *MockHTTPClientDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPClientDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPClientDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRESTClient is a mock of RESTClient interface. @@ -90,9 +114,33 @@ func (m *MockRESTClient) Get(arg0 context.Context, arg1 path.Path, arg2 any) (re } // Get indicates an expected call of Get. -func (mr *MockRESTClientMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRESTClientMockRecorder) Get(arg0, arg1, arg2 any) *MockRESTClientGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRESTClient)(nil).Get), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRESTClient)(nil).Get), arg0, arg1, arg2) + return &MockRESTClientGetCall{Call: call} +} + +// MockRESTClientGetCall wrap *gomock.Call +type MockRESTClientGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRESTClientGetCall) Return(arg0 restResponse, arg1 error) *MockRESTClientGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRESTClientGetCall) Do(f func(context.Context, path.Path, any) (restResponse, error)) *MockRESTClientGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRESTClientGetCall) DoAndReturn(f func(context.Context, path.Path, any) (restResponse, error)) *MockRESTClientGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Post mocks base method. @@ -105,9 +153,33 @@ func (m *MockRESTClient) Post(arg0 context.Context, arg1 path.Path, arg2 http.He } // Post indicates an expected call of Post. -func (mr *MockRESTClientMockRecorder) Post(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockRESTClientMockRecorder) Post(arg0, arg1, arg2, arg3, arg4 any) *MockRESTClientPostCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockRESTClient)(nil).Post), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockRESTClient)(nil).Post), arg0, arg1, arg2, arg3, arg4) + return &MockRESTClientPostCall{Call: call} +} + +// MockRESTClientPostCall wrap *gomock.Call +type MockRESTClientPostCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRESTClientPostCall) Return(arg0 restResponse, arg1 error) *MockRESTClientPostCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRESTClientPostCall) Do(f func(context.Context, path.Path, http.Header, any, any) (restResponse, error)) *MockRESTClientPostCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRESTClientPostCall) DoAndReturn(f func(context.Context, path.Path, http.Header, any, any) (restResponse, error)) *MockRESTClientPostCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFileSystem is a mock of FileSystem interface. @@ -143,9 +215,33 @@ func (m *MockFileSystem) Create(arg0 string) (*os.File, error) { } // Create indicates an expected call of Create. -func (mr *MockFileSystemMockRecorder) Create(arg0 any) *gomock.Call { +func (mr *MockFileSystemMockRecorder) Create(arg0 any) *MockFileSystemCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFileSystem)(nil).Create), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFileSystem)(nil).Create), arg0) + return &MockFileSystemCreateCall{Call: call} +} + +// MockFileSystemCreateCall wrap *gomock.Call +type MockFileSystemCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileSystemCreateCall) Return(arg0 *os.File, arg1 error) *MockFileSystemCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileSystemCreateCall) Do(f func(string) (*os.File, error)) *MockFileSystemCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileSystemCreateCall) DoAndReturn(f func(string) (*os.File, error)) *MockFileSystemCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -182,10 +278,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -199,10 +319,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -214,9 +358,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -230,10 +398,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -247,8 +439,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/charmhub/find_test.go b/internal/charmhub/find_test.go index 7188d90cc5c..d6a956ea0da 100644 --- a/internal/charmhub/find_test.go +++ b/internal/charmhub/find_test.go @@ -90,11 +90,13 @@ func (s *FindSuite) expectGet(c *gc.C, client *MockRESTClient, p path.Path, name namedPath, err = namedPath.Query("fields", defaultFindFilter()) c.Assert(err, jc.ErrorIsNil) - client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, responses *transport.FindResponses) { + client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).DoAndReturn(func(_ context.Context, _ path.Path, r any) (restResponse, error) { + responses := r.(*transport.FindResponses) responses.Results = []transport.FindResponse{{ Name: name, }} - }).Return(restResponse{StatusCode: http.StatusOK}, nil) + return restResponse{StatusCode: http.StatusOK}, nil + }) } func (s *FindSuite) expectGetFailure(client *MockRESTClient) { diff --git a/internal/charmhub/http_test.go b/internal/charmhub/http_test.go index f4fafdccc29..ed3ac688808 100644 --- a/internal/charmhub/http_test.go +++ b/internal/charmhub/http_test.go @@ -183,9 +183,10 @@ func (s *RESTSuite) TestGet(c *gc.C) { var recievedURL string mockHTTPClient := NewMockHTTPClient(ctrl) - mockHTTPClient.EXPECT().Do(gomock.Any()).Do(func(req *http.Request) { + mockHTTPClient.EXPECT().Do(gomock.Any()).DoAndReturn(func(req *http.Request) (*http.Response, error) { recievedURL = req.URL.String() - }).Return(emptyResponse(), nil) + return emptyResponse(), nil + }) base := MustMakePath(c, "http://api.foo.bar") diff --git a/internal/charmhub/info_test.go b/internal/charmhub/info_test.go index 783bd301e3b..4e70bfce0f0 100644 --- a/internal/charmhub/info_test.go +++ b/internal/charmhub/info_test.go @@ -102,7 +102,8 @@ func (s *InfoSuite) expectCharmGet(c *gc.C, client *MockRESTClient, p path.Path, namedPath, err = namedPath.Query("fields", defaultInfoFilter()) c.Assert(err, jc.ErrorIsNil) - client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, response *transport.InfoResponse) { + client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).DoAndReturn(func(_ context.Context, _ path.Path, r any) (restResponse, error) { + response := r.(*transport.InfoResponse) response.Type = "charm" response.Name = name response.DefaultRelease = transport.InfoChannelMap{ @@ -110,7 +111,8 @@ func (s *InfoSuite) expectCharmGet(c *gc.C, client *MockRESTClient, p path.Path, MetadataYAML: "YAML", }, } - }).Return(restResponse{}, nil) + return restResponse{}, nil + }) } func (s *InfoSuite) expectBundleGet(c *gc.C, client *MockRESTClient, p path.Path, name string) { @@ -119,7 +121,8 @@ func (s *InfoSuite) expectBundleGet(c *gc.C, client *MockRESTClient, p path.Path namedPath, err = namedPath.Query("fields", defaultInfoFilter()) c.Assert(err, jc.ErrorIsNil) - client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, response *transport.InfoResponse) { + client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, r any) (restResponse, error) { + response := r.(*transport.InfoResponse) response.Type = "bundle" response.Name = name response.DefaultRelease = transport.InfoChannelMap{ @@ -127,7 +130,8 @@ func (s *InfoSuite) expectBundleGet(c *gc.C, client *MockRESTClient, p path.Path BundleYAML: "YAML", }, } - }).Return(restResponse{}, nil) + return restResponse{}, nil + }) } func (s *InfoSuite) expectGetFailure(client *MockRESTClient) { @@ -140,11 +144,13 @@ func (s *InfoSuite) expectGetError(c *gc.C, client *MockRESTClient, p path.Path, namedPath, err = namedPath.Query("fields", defaultInfoFilter()) c.Assert(err, jc.ErrorIsNil) - client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, response *transport.InfoResponse) { + client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, r any) (restResponse, error) { + response := r.(*transport.InfoResponse) response.ErrorList = []transport.APIError{{ Message: "not found", }} - }).Return(restResponse{StatusCode: http.StatusNotFound}, nil) + return restResponse{StatusCode: http.StatusNotFound}, nil + }) } func (s *InfoSuite) TestInfoRequestPayload(c *gc.C) { diff --git a/internal/charmhub/package_test.go b/internal/charmhub/package_test.go index f2fab6cfeed..cc6ce18d46e 100644 --- a/internal/charmhub/package_test.go +++ b/internal/charmhub/package_test.go @@ -16,7 +16,7 @@ import ( "github.com/juju/juju/internal/charmhub/path" ) -//go:generate go run go.uber.org/mock/mockgen -package charmhub -destination client_mock_test.go github.com/juju/juju/internal/charmhub HTTPClient,RESTClient,FileSystem,Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package charmhub -destination client_mock_test.go github.com/juju/juju/internal/charmhub HTTPClient,RESTClient,FileSystem,Logger func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/charmhub/refresh_test.go b/internal/charmhub/refresh_test.go index d800528bf1e..90c3168b273 100644 --- a/internal/charmhub/refresh_test.go +++ b/internal/charmhub/refresh_test.go @@ -346,7 +346,8 @@ func (s *RefreshSuite) TestRefreshWithRequestMetrics(c *gc.C) { config := RefreshMany(config1, config2) restClient := NewMockRESTClient(ctrl) - restClient.EXPECT().Post(gomock.Any(), baseURLPath, gomock.Any(), body, gomock.Any()).Do(func(_ context.Context, _ path.Path, _ map[string][]string, _ transport.RefreshRequest, responses *transport.RefreshResponses) { + restClient.EXPECT().Post(gomock.Any(), baseURLPath, gomock.Any(), body, gomock.Any()).DoAndReturn(func(_ context.Context, _ path.Path, _ http.Header, _ any, r any) (restResponse, error) { + responses := r.(*transport.RefreshResponses) responses.Results = []transport.RefreshResponse{{ InstanceKey: "instance-key-foo", Name: id, @@ -354,7 +355,8 @@ func (s *RefreshSuite) TestRefreshWithRequestMetrics(c *gc.C) { InstanceKey: "instance-key-bar", Name: id, }} - }).Return(restResponse{StatusCode: http.StatusOK}, nil) + return restResponse{StatusCode: http.StatusOK}, nil + }) metrics := map[charmmetrics.MetricKey]map[charmmetrics.MetricKey]string{ charmmetrics.Controller: { @@ -399,12 +401,14 @@ func (s *RefreshSuite) TestRefreshFailure(c *gc.C) { } func (s *RefreshSuite) expectPost(client *MockRESTClient, p path.Path, name string, body interface{}) { - client.EXPECT().Post(gomock.Any(), p, gomock.Any(), body, gomock.Any()).Do(func(_ context.Context, _ path.Path, _ map[string][]string, _ transport.RefreshRequest, responses *transport.RefreshResponses) { + client.EXPECT().Post(gomock.Any(), p, gomock.Any(), body, gomock.Any()).Do(func(_ context.Context, _ path.Path, _ http.Header, _ any, r any) (restResponse, error) { + responses := r.(*transport.RefreshResponses) responses.Results = []transport.RefreshResponse{{ InstanceKey: "instance-key", Name: name, }} - }).Return(restResponse{StatusCode: http.StatusOK}, nil) + return restResponse{StatusCode: http.StatusOK}, nil + }) } func (s *RefreshSuite) expectPostFailure(client *MockRESTClient) { diff --git a/internal/charmhub/resources_test.go b/internal/charmhub/resources_test.go index 63965884b9d..e485a74e6aa 100644 --- a/internal/charmhub/resources_test.go +++ b/internal/charmhub/resources_test.go @@ -65,9 +65,11 @@ func (s *ResourcesSuite) expectGet(c *gc.C, client *MockRESTClient, p path.Path, namedPath, err := p.Join(charm, resource, "revisions") c.Assert(err, jc.ErrorIsNil) - client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, response *transport.ResourcesResponse) { + client.EXPECT().Get(gomock.Any(), namedPath, gomock.Any()).Do(func(_ context.Context, _ path.Path, r any) (restResponse, error) { + response := r.(*transport.ResourcesResponse) response.Revisions = make([]transport.ResourceRevision, 3) - }).Return(restResponse{}, nil) + return restResponse{}, nil + }) } func (s *ResourcesSuite) expectGetFailure(client *MockRESTClient) { diff --git a/internal/cloudconfig/cloudinit/filetransporter_mock_test.go b/internal/cloudconfig/cloudinit/filetransporter_mock_test.go index e3bc1a7d35a..3ac17498500 100644 --- a/internal/cloudconfig/cloudinit/filetransporter_mock_test.go +++ b/internal/cloudconfig/cloudinit/filetransporter_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package cloudinit_test -destination filetransporter_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit FileTransporter +// mockgen -typed -package cloudinit_test -destination filetransporter_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit FileTransporter // // Package cloudinit_test is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockFileTransporter) SendBytes(arg0 string, arg1 []byte) string { } // SendBytes indicates an expected call of SendBytes. -func (mr *MockFileTransporterMockRecorder) SendBytes(arg0, arg1 any) *gomock.Call { +func (mr *MockFileTransporterMockRecorder) SendBytes(arg0, arg1 any) *MockFileTransporterSendBytesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendBytes", reflect.TypeOf((*MockFileTransporter)(nil).SendBytes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendBytes", reflect.TypeOf((*MockFileTransporter)(nil).SendBytes), arg0, arg1) + return &MockFileTransporterSendBytesCall{Call: call} +} + +// MockFileTransporterSendBytesCall wrap *gomock.Call +type MockFileTransporterSendBytesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileTransporterSendBytesCall) Return(arg0 string) *MockFileTransporterSendBytesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileTransporterSendBytesCall) Do(f func(string, []byte) string) *MockFileTransporterSendBytesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileTransporterSendBytesCall) DoAndReturn(f func(string, []byte) string) *MockFileTransporterSendBytesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/cloudconfig/cloudinit/package_test.go b/internal/cloudconfig/cloudinit/package_test.go index 966c5a22a39..d66d00fdcff 100644 --- a/internal/cloudconfig/cloudinit/package_test.go +++ b/internal/cloudconfig/cloudinit/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package cloudinit_test -destination filetransporter_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit FileTransporter +//go:generate go run go.uber.org/mock/mockgen -typed -package cloudinit_test -destination filetransporter_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit FileTransporter func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/cloudconfig/sshinit/filetransport_test.go b/internal/cloudconfig/sshinit/filetransport_test.go index aab49228a8f..ce01bee9b8d 100644 --- a/internal/cloudconfig/sshinit/filetransport_test.go +++ b/internal/cloudconfig/sshinit/filetransport_test.go @@ -19,7 +19,7 @@ import ( "github.com/juju/juju/internal/cloudconfig/sshinit" ) -//go:generate go run go.uber.org/mock/mockgen -package sshinit_test -destination sshclient_mock_test.go github.com/juju/utils/v4/ssh Client +//go:generate go run go.uber.org/mock/mockgen -typed -package sshinit_test -destination sshclient_mock_test.go github.com/juju/utils/v4/ssh Client type sshInitSuite struct{} diff --git a/internal/cloudconfig/sshinit/sshclient_mock_test.go b/internal/cloudconfig/sshinit/sshclient_mock_test.go index 4db51384f2c..f60875f2866 100644 --- a/internal/cloudconfig/sshinit/sshclient_mock_test.go +++ b/internal/cloudconfig/sshinit/sshclient_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package sshinit_test -destination sshclient_mock_test.go github.com/juju/utils/v4/ssh Client +// mockgen -typed -package sshinit_test -destination sshclient_mock_test.go github.com/juju/utils/v4/ssh Client // // Package sshinit_test is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockClient) Command(arg0 string, arg1 []string, arg2 *ssh.Options) *ssh } // Command indicates an expected call of Command. -func (mr *MockClientMockRecorder) Command(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientMockRecorder) Command(arg0, arg1, arg2 any) *MockClientCommandCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Command", reflect.TypeOf((*MockClient)(nil).Command), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Command", reflect.TypeOf((*MockClient)(nil).Command), arg0, arg1, arg2) + return &MockClientCommandCall{Call: call} +} + +// MockClientCommandCall wrap *gomock.Call +type MockClientCommandCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCommandCall) Return(arg0 *ssh.Cmd) *MockClientCommandCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCommandCall) Do(f func(string, []string, *ssh.Options) *ssh.Cmd) *MockClientCommandCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCommandCall) DoAndReturn(f func(string, []string, *ssh.Options) *ssh.Cmd) *MockClientCommandCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Copy mocks base method. @@ -62,7 +86,31 @@ func (m *MockClient) Copy(arg0 []string, arg1 *ssh.Options) error { } // Copy indicates an expected call of Copy. -func (mr *MockClientMockRecorder) Copy(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) Copy(arg0, arg1 any) *MockClientCopyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockClient)(nil).Copy), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockClient)(nil).Copy), arg0, arg1) + return &MockClientCopyCall{Call: call} +} + +// MockClientCopyCall wrap *gomock.Call +type MockClientCopyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCopyCall) Return(arg0 error) *MockClientCopyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCopyCall) Do(f func([]string, *ssh.Options) error) *MockClientCopyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCopyCall) DoAndReturn(f func([]string, *ssh.Options) error) *MockClientCopyCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/broker/broker.go b/internal/container/broker/broker.go index a882450d08d..2fce8053b0c 100644 --- a/internal/container/broker/broker.go +++ b/internal/container/broker/broker.go @@ -25,7 +25,7 @@ import ( var logger = loggo.GetLogger("juju.container.broker") -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/apicalls_mock.go github.com/juju/juju/internal/container/broker APICalls +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/apicalls_mock.go github.com/juju/juju/internal/container/broker APICalls type APICalls interface { ContainerConfig() (params.ContainerConfig, error) PrepareContainerInterfaceInfo(names.MachineTag) (corenetwork.InterfaceInfos, error) diff --git a/internal/container/broker/mocks/apicalls_mock.go b/internal/container/broker/mocks/apicalls_mock.go index 1f65a79f61c..436eac664d7 100644 --- a/internal/container/broker/mocks/apicalls_mock.go +++ b/internal/container/broker/mocks/apicalls_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/apicalls_mock.go github.com/juju/juju/internal/container/broker APICalls +// mockgen -typed -package mocks -destination mocks/apicalls_mock.go github.com/juju/juju/internal/container/broker APICalls // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICalls) ContainerConfig() (params.ContainerConfig, error) { } // ContainerConfig indicates an expected call of ContainerConfig. -func (mr *MockAPICallsMockRecorder) ContainerConfig() *gomock.Call { +func (mr *MockAPICallsMockRecorder) ContainerConfig() *MockAPICallsContainerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockAPICalls)(nil).ContainerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockAPICalls)(nil).ContainerConfig)) + return &MockAPICallsContainerConfigCall{Call: call} +} + +// MockAPICallsContainerConfigCall wrap *gomock.Call +type MockAPICallsContainerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsContainerConfigCall) Return(arg0 params.ContainerConfig, arg1 error) *MockAPICallsContainerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsContainerConfigCall) Do(f func() (params.ContainerConfig, error)) *MockAPICallsContainerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsContainerConfigCall) DoAndReturn(f func() (params.ContainerConfig, error)) *MockAPICallsContainerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerProfileInfo mocks base method. @@ -68,9 +92,33 @@ func (m *MockAPICalls) GetContainerProfileInfo(arg0 names.MachineTag) ([]*provis } // GetContainerProfileInfo indicates an expected call of GetContainerProfileInfo. -func (mr *MockAPICallsMockRecorder) GetContainerProfileInfo(arg0 any) *gomock.Call { +func (mr *MockAPICallsMockRecorder) GetContainerProfileInfo(arg0 any) *MockAPICallsGetContainerProfileInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockAPICalls)(nil).GetContainerProfileInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockAPICalls)(nil).GetContainerProfileInfo), arg0) + return &MockAPICallsGetContainerProfileInfoCall{Call: call} +} + +// MockAPICallsGetContainerProfileInfoCall wrap *gomock.Call +type MockAPICallsGetContainerProfileInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsGetContainerProfileInfoCall) Return(arg0 []*provisioner.LXDProfileResult, arg1 error) *MockAPICallsGetContainerProfileInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsGetContainerProfileInfoCall) Do(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockAPICallsGetContainerProfileInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsGetContainerProfileInfoCall) DoAndReturn(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockAPICallsGetContainerProfileInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HostChangesForContainer mocks base method. @@ -84,9 +132,33 @@ func (m *MockAPICalls) HostChangesForContainer(arg0 names.MachineTag) ([]network } // HostChangesForContainer indicates an expected call of HostChangesForContainer. -func (mr *MockAPICallsMockRecorder) HostChangesForContainer(arg0 any) *gomock.Call { +func (mr *MockAPICallsMockRecorder) HostChangesForContainer(arg0 any) *MockAPICallsHostChangesForContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockAPICalls)(nil).HostChangesForContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockAPICalls)(nil).HostChangesForContainer), arg0) + return &MockAPICallsHostChangesForContainerCall{Call: call} +} + +// MockAPICallsHostChangesForContainerCall wrap *gomock.Call +type MockAPICallsHostChangesForContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsHostChangesForContainerCall) Return(arg0 []network0.DeviceToBridge, arg1 int, arg2 error) *MockAPICallsHostChangesForContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsHostChangesForContainerCall) Do(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockAPICallsHostChangesForContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsHostChangesForContainerCall) DoAndReturn(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockAPICallsHostChangesForContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareContainerInterfaceInfo mocks base method. @@ -99,9 +171,33 @@ func (m *MockAPICalls) PrepareContainerInterfaceInfo(arg0 names.MachineTag) (net } // PrepareContainerInterfaceInfo indicates an expected call of PrepareContainerInterfaceInfo. -func (mr *MockAPICallsMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *gomock.Call { +func (mr *MockAPICallsMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *MockAPICallsPrepareContainerInterfaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockAPICalls)(nil).PrepareContainerInterfaceInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockAPICalls)(nil).PrepareContainerInterfaceInfo), arg0) + return &MockAPICallsPrepareContainerInterfaceInfoCall{Call: call} +} + +// MockAPICallsPrepareContainerInterfaceInfoCall wrap *gomock.Call +type MockAPICallsPrepareContainerInterfaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsPrepareContainerInterfaceInfoCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockAPICallsPrepareContainerInterfaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsPrepareContainerInterfaceInfoCall) Do(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockAPICallsPrepareContainerInterfaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsPrepareContainerInterfaceInfoCall) DoAndReturn(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockAPICallsPrepareContainerInterfaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -113,9 +209,33 @@ func (m *MockAPICalls) ReleaseContainerAddresses(arg0 names.MachineTag) error { } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockAPICallsMockRecorder) ReleaseContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockAPICallsMockRecorder) ReleaseContainerAddresses(arg0 any) *MockAPICallsReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockAPICalls)(nil).ReleaseContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockAPICalls)(nil).ReleaseContainerAddresses), arg0) + return &MockAPICallsReleaseContainerAddressesCall{Call: call} +} + +// MockAPICallsReleaseContainerAddressesCall wrap *gomock.Call +type MockAPICallsReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsReleaseContainerAddressesCall) Return(arg0 error) *MockAPICallsReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsReleaseContainerAddressesCall) Do(f func(names.MachineTag) error) *MockAPICallsReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsReleaseContainerAddressesCall) DoAndReturn(f func(names.MachineTag) error) *MockAPICallsReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetHostMachineNetworkConfig mocks base method. @@ -127,7 +247,31 @@ func (m *MockAPICalls) SetHostMachineNetworkConfig(arg0 names.MachineTag, arg1 [ } // SetHostMachineNetworkConfig indicates an expected call of SetHostMachineNetworkConfig. -func (mr *MockAPICallsMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockAPICallsMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *MockAPICallsSetHostMachineNetworkConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockAPICalls)(nil).SetHostMachineNetworkConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockAPICalls)(nil).SetHostMachineNetworkConfig), arg0, arg1) + return &MockAPICallsSetHostMachineNetworkConfigCall{Call: call} +} + +// MockAPICallsSetHostMachineNetworkConfigCall wrap *gomock.Call +type MockAPICallsSetHostMachineNetworkConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallsSetHostMachineNetworkConfigCall) Return(arg0 error) *MockAPICallsSetHostMachineNetworkConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallsSetHostMachineNetworkConfigCall) Do(f func(names.MachineTag, []params.NetworkConfig) error) *MockAPICallsSetHostMachineNetworkConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallsSetHostMachineNetworkConfigCall) DoAndReturn(f func(names.MachineTag, []params.NetworkConfig) error) *MockAPICallsSetHostMachineNetworkConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/lxd/initialisation_linux.go b/internal/container/lxd/initialisation_linux.go index 874670bfb00..bbc32064d82 100644 --- a/internal/container/lxd/initialisation_linux.go +++ b/internal/container/lxd/initialisation_linux.go @@ -33,7 +33,7 @@ type containerInitialiser struct { lxdSnapChannel string } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/snap_manager_mock.go github.com/juju/juju/internal/container/lxd SnapManager +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/snap_manager_mock.go github.com/juju/juju/internal/container/lxd SnapManager // SnapManager defines an interface implemented by types that can query and/or // change the channel for installed snaps. diff --git a/internal/container/lxd/mocks/clock_mock.go b/internal/container/lxd/mocks/clock_mock.go index d7c49f0a5e2..8133ac86112 100644 --- a/internal/container/lxd/mocks/clock_mock.go +++ b/internal/container/lxd/mocks/clock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +// mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/lxd/mocks/snap_manager_mock.go b/internal/container/lxd/mocks/snap_manager_mock.go index 321ba625367..b00f9bfbda7 100644 --- a/internal/container/lxd/mocks/snap_manager_mock.go +++ b/internal/container/lxd/mocks/snap_manager_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/snap_manager_mock.go github.com/juju/juju/internal/container/lxd SnapManager +// mockgen -typed -package mocks -destination mocks/snap_manager_mock.go github.com/juju/juju/internal/container/lxd SnapManager // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockSnapManager) ChangeChannel(arg0, arg1 string) error { } // ChangeChannel indicates an expected call of ChangeChannel. -func (mr *MockSnapManagerMockRecorder) ChangeChannel(arg0, arg1 any) *gomock.Call { +func (mr *MockSnapManagerMockRecorder) ChangeChannel(arg0, arg1 any) *MockSnapManagerChangeChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeChannel", reflect.TypeOf((*MockSnapManager)(nil).ChangeChannel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeChannel", reflect.TypeOf((*MockSnapManager)(nil).ChangeChannel), arg0, arg1) + return &MockSnapManagerChangeChannelCall{Call: call} +} + +// MockSnapManagerChangeChannelCall wrap *gomock.Call +type MockSnapManagerChangeChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSnapManagerChangeChannelCall) Return(arg0 error) *MockSnapManagerChangeChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSnapManagerChangeChannelCall) Do(f func(string, string) error) *MockSnapManagerChangeChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSnapManagerChangeChannelCall) DoAndReturn(f func(string, string) error) *MockSnapManagerChangeChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstalledChannel mocks base method. @@ -61,7 +85,31 @@ func (m *MockSnapManager) InstalledChannel(arg0 string) string { } // InstalledChannel indicates an expected call of InstalledChannel. -func (mr *MockSnapManagerMockRecorder) InstalledChannel(arg0 any) *gomock.Call { +func (mr *MockSnapManagerMockRecorder) InstalledChannel(arg0 any) *MockSnapManagerInstalledChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstalledChannel", reflect.TypeOf((*MockSnapManager)(nil).InstalledChannel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstalledChannel", reflect.TypeOf((*MockSnapManager)(nil).InstalledChannel), arg0) + return &MockSnapManagerInstalledChannelCall{Call: call} +} + +// MockSnapManagerInstalledChannelCall wrap *gomock.Call +type MockSnapManagerInstalledChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSnapManagerInstalledChannelCall) Return(arg0 string) *MockSnapManagerInstalledChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSnapManagerInstalledChannelCall) Do(f func(string) string) *MockSnapManagerInstalledChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSnapManagerInstalledChannelCall) DoAndReturn(f func(string) string) *MockSnapManagerInstalledChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/lxd/package_test.go b/internal/container/lxd/package_test.go index 322bf443250..398b1b0e9ea 100644 --- a/internal/container/lxd/package_test.go +++ b/internal/container/lxd/package_test.go @@ -13,4 +13,4 @@ func Test(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock diff --git a/internal/container/lxd/testing/lxd_mock.go b/internal/container/lxd/testing/lxd_mock.go index bee4339918e..8592148194f 100644 --- a/internal/container/lxd/testing/lxd_mock.go +++ b/internal/container/lxd/testing/lxd_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination lxd_mock.go -write_package_comment=false github.com/canonical/lxd/client Operation,RemoteOperation,Server,ImageServer,InstanceServer +// mockgen -typed -package testing -destination lxd_mock.go -write_package_comment=false github.com/canonical/lxd/client Operation,RemoteOperation,Server,ImageServer,InstanceServer package testing import ( @@ -53,9 +53,33 @@ func (m *MockOperation) AddHandler(arg0 func(api.Operation)) (*lxd.EventTarget, } // AddHandler indicates an expected call of AddHandler. -func (mr *MockOperationMockRecorder) AddHandler(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) AddHandler(arg0 any) *MockOperationAddHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHandler", reflect.TypeOf((*MockOperation)(nil).AddHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHandler", reflect.TypeOf((*MockOperation)(nil).AddHandler), arg0) + return &MockOperationAddHandlerCall{Call: call} +} + +// MockOperationAddHandlerCall wrap *gomock.Call +type MockOperationAddHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationAddHandlerCall) Return(arg0 *lxd.EventTarget, arg1 error) *MockOperationAddHandlerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationAddHandlerCall) Do(f func(func(api.Operation)) (*lxd.EventTarget, error)) *MockOperationAddHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationAddHandlerCall) DoAndReturn(f func(func(api.Operation)) (*lxd.EventTarget, error)) *MockOperationAddHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cancel mocks base method. @@ -67,9 +91,33 @@ func (m *MockOperation) Cancel() error { } // Cancel indicates an expected call of Cancel. -func (mr *MockOperationMockRecorder) Cancel() *gomock.Call { +func (mr *MockOperationMockRecorder) Cancel() *MockOperationCancelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockOperation)(nil).Cancel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockOperation)(nil).Cancel)) + return &MockOperationCancelCall{Call: call} +} + +// MockOperationCancelCall wrap *gomock.Call +type MockOperationCancelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationCancelCall) Return(arg0 error) *MockOperationCancelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationCancelCall) Do(f func() error) *MockOperationCancelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationCancelCall) DoAndReturn(f func() error) *MockOperationCancelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -81,9 +129,33 @@ func (m *MockOperation) Get() api.Operation { } // Get indicates an expected call of Get. -func (mr *MockOperationMockRecorder) Get() *gomock.Call { +func (mr *MockOperationMockRecorder) Get() *MockOperationGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockOperation)(nil).Get)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockOperation)(nil).Get)) + return &MockOperationGetCall{Call: call} +} + +// MockOperationGetCall wrap *gomock.Call +type MockOperationGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationGetCall) Return(arg0 api.Operation) *MockOperationGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationGetCall) Do(f func() api.Operation) *MockOperationGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationGetCall) DoAndReturn(f func() api.Operation) *MockOperationGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetWebsocket mocks base method. @@ -96,9 +168,33 @@ func (m *MockOperation) GetWebsocket(arg0 string) (*websocket.Conn, error) { } // GetWebsocket indicates an expected call of GetWebsocket. -func (mr *MockOperationMockRecorder) GetWebsocket(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) GetWebsocket(arg0 any) *MockOperationGetWebsocketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWebsocket", reflect.TypeOf((*MockOperation)(nil).GetWebsocket), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWebsocket", reflect.TypeOf((*MockOperation)(nil).GetWebsocket), arg0) + return &MockOperationGetWebsocketCall{Call: call} +} + +// MockOperationGetWebsocketCall wrap *gomock.Call +type MockOperationGetWebsocketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationGetWebsocketCall) Return(arg0 *websocket.Conn, arg1 error) *MockOperationGetWebsocketCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationGetWebsocketCall) Do(f func(string) (*websocket.Conn, error)) *MockOperationGetWebsocketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationGetWebsocketCall) DoAndReturn(f func(string) (*websocket.Conn, error)) *MockOperationGetWebsocketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -110,9 +206,33 @@ func (m *MockOperation) Refresh() error { } // Refresh indicates an expected call of Refresh. -func (mr *MockOperationMockRecorder) Refresh() *gomock.Call { +func (mr *MockOperationMockRecorder) Refresh() *MockOperationRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockOperation)(nil).Refresh)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockOperation)(nil).Refresh)) + return &MockOperationRefreshCall{Call: call} +} + +// MockOperationRefreshCall wrap *gomock.Call +type MockOperationRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRefreshCall) Return(arg0 error) *MockOperationRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRefreshCall) Do(f func() error) *MockOperationRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRefreshCall) DoAndReturn(f func() error) *MockOperationRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveHandler mocks base method. @@ -124,9 +244,33 @@ func (m *MockOperation) RemoveHandler(arg0 *lxd.EventTarget) error { } // RemoveHandler indicates an expected call of RemoveHandler. -func (mr *MockOperationMockRecorder) RemoveHandler(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) RemoveHandler(arg0 any) *MockOperationRemoveHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveHandler", reflect.TypeOf((*MockOperation)(nil).RemoveHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveHandler", reflect.TypeOf((*MockOperation)(nil).RemoveHandler), arg0) + return &MockOperationRemoveHandlerCall{Call: call} +} + +// MockOperationRemoveHandlerCall wrap *gomock.Call +type MockOperationRemoveHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRemoveHandlerCall) Return(arg0 error) *MockOperationRemoveHandlerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRemoveHandlerCall) Do(f func(*lxd.EventTarget) error) *MockOperationRemoveHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRemoveHandlerCall) DoAndReturn(f func(*lxd.EventTarget) error) *MockOperationRemoveHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -138,9 +282,33 @@ func (m *MockOperation) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockOperationMockRecorder) Wait() *gomock.Call { +func (mr *MockOperationMockRecorder) Wait() *MockOperationWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockOperation)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockOperation)(nil).Wait)) + return &MockOperationWaitCall{Call: call} +} + +// MockOperationWaitCall wrap *gomock.Call +type MockOperationWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationWaitCall) Return(arg0 error) *MockOperationWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationWaitCall) Do(f func() error) *MockOperationWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationWaitCall) DoAndReturn(f func() error) *MockOperationWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WaitContext mocks base method. @@ -152,9 +320,33 @@ func (m *MockOperation) WaitContext(arg0 context.Context) error { } // WaitContext indicates an expected call of WaitContext. -func (mr *MockOperationMockRecorder) WaitContext(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) WaitContext(arg0 any) *MockOperationWaitContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitContext", reflect.TypeOf((*MockOperation)(nil).WaitContext), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitContext", reflect.TypeOf((*MockOperation)(nil).WaitContext), arg0) + return &MockOperationWaitContextCall{Call: call} +} + +// MockOperationWaitContextCall wrap *gomock.Call +type MockOperationWaitContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationWaitContextCall) Return(arg0 error) *MockOperationWaitContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationWaitContextCall) Do(f func(context.Context) error) *MockOperationWaitContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationWaitContextCall) DoAndReturn(f func(context.Context) error) *MockOperationWaitContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteOperation is a mock of RemoteOperation interface. @@ -190,9 +382,33 @@ func (m *MockRemoteOperation) AddHandler(arg0 func(api.Operation)) (*lxd.EventTa } // AddHandler indicates an expected call of AddHandler. -func (mr *MockRemoteOperationMockRecorder) AddHandler(arg0 any) *gomock.Call { +func (mr *MockRemoteOperationMockRecorder) AddHandler(arg0 any) *MockRemoteOperationAddHandlerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHandler", reflect.TypeOf((*MockRemoteOperation)(nil).AddHandler), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHandler", reflect.TypeOf((*MockRemoteOperation)(nil).AddHandler), arg0) + return &MockRemoteOperationAddHandlerCall{Call: call} +} + +// MockRemoteOperationAddHandlerCall wrap *gomock.Call +type MockRemoteOperationAddHandlerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteOperationAddHandlerCall) Return(arg0 *lxd.EventTarget, arg1 error) *MockRemoteOperationAddHandlerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteOperationAddHandlerCall) Do(f func(func(api.Operation)) (*lxd.EventTarget, error)) *MockRemoteOperationAddHandlerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteOperationAddHandlerCall) DoAndReturn(f func(func(api.Operation)) (*lxd.EventTarget, error)) *MockRemoteOperationAddHandlerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CancelTarget mocks base method. @@ -204,9 +420,33 @@ func (m *MockRemoteOperation) CancelTarget() error { } // CancelTarget indicates an expected call of CancelTarget. -func (mr *MockRemoteOperationMockRecorder) CancelTarget() *gomock.Call { +func (mr *MockRemoteOperationMockRecorder) CancelTarget() *MockRemoteOperationCancelTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelTarget", reflect.TypeOf((*MockRemoteOperation)(nil).CancelTarget)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelTarget", reflect.TypeOf((*MockRemoteOperation)(nil).CancelTarget)) + return &MockRemoteOperationCancelTargetCall{Call: call} +} + +// MockRemoteOperationCancelTargetCall wrap *gomock.Call +type MockRemoteOperationCancelTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteOperationCancelTargetCall) Return(arg0 error) *MockRemoteOperationCancelTargetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteOperationCancelTargetCall) Do(f func() error) *MockRemoteOperationCancelTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteOperationCancelTargetCall) DoAndReturn(f func() error) *MockRemoteOperationCancelTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetTarget mocks base method. @@ -219,9 +459,33 @@ func (m *MockRemoteOperation) GetTarget() (*api.Operation, error) { } // GetTarget indicates an expected call of GetTarget. -func (mr *MockRemoteOperationMockRecorder) GetTarget() *gomock.Call { +func (mr *MockRemoteOperationMockRecorder) GetTarget() *MockRemoteOperationGetTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTarget", reflect.TypeOf((*MockRemoteOperation)(nil).GetTarget)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTarget", reflect.TypeOf((*MockRemoteOperation)(nil).GetTarget)) + return &MockRemoteOperationGetTargetCall{Call: call} +} + +// MockRemoteOperationGetTargetCall wrap *gomock.Call +type MockRemoteOperationGetTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteOperationGetTargetCall) Return(arg0 *api.Operation, arg1 error) *MockRemoteOperationGetTargetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteOperationGetTargetCall) Do(f func() (*api.Operation, error)) *MockRemoteOperationGetTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteOperationGetTargetCall) DoAndReturn(f func() (*api.Operation, error)) *MockRemoteOperationGetTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -233,9 +497,33 @@ func (m *MockRemoteOperation) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockRemoteOperationMockRecorder) Wait() *gomock.Call { +func (mr *MockRemoteOperationMockRecorder) Wait() *MockRemoteOperationWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockRemoteOperation)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockRemoteOperation)(nil).Wait)) + return &MockRemoteOperationWaitCall{Call: call} +} + +// MockRemoteOperationWaitCall wrap *gomock.Call +type MockRemoteOperationWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteOperationWaitCall) Return(arg0 error) *MockRemoteOperationWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteOperationWaitCall) Do(f func() error) *MockRemoteOperationWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteOperationWaitCall) DoAndReturn(f func() error) *MockRemoteOperationWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServer is a mock of Server interface. @@ -268,9 +556,33 @@ func (m *MockServer) Disconnect() { } // Disconnect indicates an expected call of Disconnect. -func (mr *MockServerMockRecorder) Disconnect() *gomock.Call { +func (mr *MockServerMockRecorder) Disconnect() *MockServerDisconnectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockServer)(nil).Disconnect)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockServer)(nil).Disconnect)) + return &MockServerDisconnectCall{Call: call} +} + +// MockServerDisconnectCall wrap *gomock.Call +type MockServerDisconnectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDisconnectCall) Return() *MockServerDisconnectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDisconnectCall) Do(f func()) *MockServerDisconnectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDisconnectCall) DoAndReturn(f func()) *MockServerDisconnectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DoHTTP mocks base method. @@ -283,9 +595,33 @@ func (m *MockServer) DoHTTP(arg0 *http.Request) (*http.Response, error) { } // DoHTTP indicates an expected call of DoHTTP. -func (mr *MockServerMockRecorder) DoHTTP(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) DoHTTP(arg0 any) *MockServerDoHTTPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockServer)(nil).DoHTTP), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockServer)(nil).DoHTTP), arg0) + return &MockServerDoHTTPCall{Call: call} +} + +// MockServerDoHTTPCall wrap *gomock.Call +type MockServerDoHTTPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDoHTTPCall) Return(arg0 *http.Response, arg1 error) *MockServerDoHTTPCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDoHTTPCall) Do(f func(*http.Request) (*http.Response, error)) *MockServerDoHTTPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDoHTTPCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockServerDoHTTPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConnectionInfo mocks base method. @@ -298,9 +634,33 @@ func (m *MockServer) GetConnectionInfo() (*lxd.ConnectionInfo, error) { } // GetConnectionInfo indicates an expected call of GetConnectionInfo. -func (mr *MockServerMockRecorder) GetConnectionInfo() *gomock.Call { +func (mr *MockServerMockRecorder) GetConnectionInfo() *MockServerGetConnectionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + return &MockServerGetConnectionInfoCall{Call: call} +} + +// MockServerGetConnectionInfoCall wrap *gomock.Call +type MockServerGetConnectionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetConnectionInfoCall) Return(arg0 *lxd.ConnectionInfo, arg1 error) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetConnectionInfoCall) Do(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetConnectionInfoCall) DoAndReturn(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetHTTPClient mocks base method. @@ -313,9 +673,33 @@ func (m *MockServer) GetHTTPClient() (*http.Client, error) { } // GetHTTPClient indicates an expected call of GetHTTPClient. -func (mr *MockServerMockRecorder) GetHTTPClient() *gomock.Call { +func (mr *MockServerMockRecorder) GetHTTPClient() *MockServerGetHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockServer)(nil).GetHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockServer)(nil).GetHTTPClient)) + return &MockServerGetHTTPClientCall{Call: call} +} + +// MockServerGetHTTPClientCall wrap *gomock.Call +type MockServerGetHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetHTTPClientCall) Return(arg0 *http.Client, arg1 error) *MockServerGetHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetHTTPClientCall) Do(f func() (*http.Client, error)) *MockServerGetHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetHTTPClientCall) DoAndReturn(f func() (*http.Client, error)) *MockServerGetHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockImageServer is a mock of ImageServer interface. @@ -348,9 +732,33 @@ func (m *MockImageServer) Disconnect() { } // Disconnect indicates an expected call of Disconnect. -func (mr *MockImageServerMockRecorder) Disconnect() *gomock.Call { +func (mr *MockImageServerMockRecorder) Disconnect() *MockImageServerDisconnectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockImageServer)(nil).Disconnect)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockImageServer)(nil).Disconnect)) + return &MockImageServerDisconnectCall{Call: call} +} + +// MockImageServerDisconnectCall wrap *gomock.Call +type MockImageServerDisconnectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerDisconnectCall) Return() *MockImageServerDisconnectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerDisconnectCall) Do(f func()) *MockImageServerDisconnectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerDisconnectCall) DoAndReturn(f func()) *MockImageServerDisconnectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DoHTTP mocks base method. @@ -363,9 +771,33 @@ func (m *MockImageServer) DoHTTP(arg0 *http.Request) (*http.Response, error) { } // DoHTTP indicates an expected call of DoHTTP. -func (mr *MockImageServerMockRecorder) DoHTTP(arg0 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) DoHTTP(arg0 any) *MockImageServerDoHTTPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockImageServer)(nil).DoHTTP), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockImageServer)(nil).DoHTTP), arg0) + return &MockImageServerDoHTTPCall{Call: call} +} + +// MockImageServerDoHTTPCall wrap *gomock.Call +type MockImageServerDoHTTPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerDoHTTPCall) Return(arg0 *http.Response, arg1 error) *MockImageServerDoHTTPCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerDoHTTPCall) Do(f func(*http.Request) (*http.Response, error)) *MockImageServerDoHTTPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerDoHTTPCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockImageServerDoHTTPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExportImage mocks base method. @@ -378,9 +810,33 @@ func (m *MockImageServer) ExportImage(arg0 string, arg1 api.ImageExportPost) (lx } // ExportImage indicates an expected call of ExportImage. -func (mr *MockImageServerMockRecorder) ExportImage(arg0, arg1 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) ExportImage(arg0, arg1 any) *MockImageServerExportImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportImage", reflect.TypeOf((*MockImageServer)(nil).ExportImage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportImage", reflect.TypeOf((*MockImageServer)(nil).ExportImage), arg0, arg1) + return &MockImageServerExportImageCall{Call: call} +} + +// MockImageServerExportImageCall wrap *gomock.Call +type MockImageServerExportImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerExportImageCall) Return(arg0 lxd.Operation, arg1 error) *MockImageServerExportImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerExportImageCall) Do(f func(string, api.ImageExportPost) (lxd.Operation, error)) *MockImageServerExportImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerExportImageCall) DoAndReturn(f func(string, api.ImageExportPost) (lxd.Operation, error)) *MockImageServerExportImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConnectionInfo mocks base method. @@ -393,9 +849,33 @@ func (m *MockImageServer) GetConnectionInfo() (*lxd.ConnectionInfo, error) { } // GetConnectionInfo indicates an expected call of GetConnectionInfo. -func (mr *MockImageServerMockRecorder) GetConnectionInfo() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetConnectionInfo() *MockImageServerGetConnectionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockImageServer)(nil).GetConnectionInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockImageServer)(nil).GetConnectionInfo)) + return &MockImageServerGetConnectionInfoCall{Call: call} +} + +// MockImageServerGetConnectionInfoCall wrap *gomock.Call +type MockImageServerGetConnectionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetConnectionInfoCall) Return(arg0 *lxd.ConnectionInfo, arg1 error) *MockImageServerGetConnectionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetConnectionInfoCall) Do(f func() (*lxd.ConnectionInfo, error)) *MockImageServerGetConnectionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetConnectionInfoCall) DoAndReturn(f func() (*lxd.ConnectionInfo, error)) *MockImageServerGetConnectionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetHTTPClient mocks base method. @@ -408,9 +888,33 @@ func (m *MockImageServer) GetHTTPClient() (*http.Client, error) { } // GetHTTPClient indicates an expected call of GetHTTPClient. -func (mr *MockImageServerMockRecorder) GetHTTPClient() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetHTTPClient() *MockImageServerGetHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockImageServer)(nil).GetHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockImageServer)(nil).GetHTTPClient)) + return &MockImageServerGetHTTPClientCall{Call: call} +} + +// MockImageServerGetHTTPClientCall wrap *gomock.Call +type MockImageServerGetHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetHTTPClientCall) Return(arg0 *http.Client, arg1 error) *MockImageServerGetHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetHTTPClientCall) Do(f func() (*http.Client, error)) *MockImageServerGetHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetHTTPClientCall) DoAndReturn(f func() (*http.Client, error)) *MockImageServerGetHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImage mocks base method. @@ -424,9 +928,33 @@ func (m *MockImageServer) GetImage(arg0 string) (*api.Image, string, error) { } // GetImage indicates an expected call of GetImage. -func (mr *MockImageServerMockRecorder) GetImage(arg0 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImage(arg0 any) *MockImageServerGetImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImage", reflect.TypeOf((*MockImageServer)(nil).GetImage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImage", reflect.TypeOf((*MockImageServer)(nil).GetImage), arg0) + return &MockImageServerGetImageCall{Call: call} +} + +// MockImageServerGetImageCall wrap *gomock.Call +type MockImageServerGetImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageCall) Return(arg0 *api.Image, arg1 string, arg2 error) *MockImageServerGetImageCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageCall) Do(f func(string) (*api.Image, string, error)) *MockImageServerGetImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageCall) DoAndReturn(f func(string) (*api.Image, string, error)) *MockImageServerGetImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAlias mocks base method. @@ -440,9 +968,33 @@ func (m *MockImageServer) GetImageAlias(arg0 string) (*api.ImageAliasesEntry, st } // GetImageAlias indicates an expected call of GetImageAlias. -func (mr *MockImageServerMockRecorder) GetImageAlias(arg0 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageAlias(arg0 any) *MockImageServerGetImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAlias", reflect.TypeOf((*MockImageServer)(nil).GetImageAlias), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAlias", reflect.TypeOf((*MockImageServer)(nil).GetImageAlias), arg0) + return &MockImageServerGetImageAliasCall{Call: call} +} + +// MockImageServerGetImageAliasCall wrap *gomock.Call +type MockImageServerGetImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageAliasCall) Return(arg0 *api.ImageAliasesEntry, arg1 string, arg2 error) *MockImageServerGetImageAliasCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageAliasCall) Do(f func(string) (*api.ImageAliasesEntry, string, error)) *MockImageServerGetImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageAliasCall) DoAndReturn(f func(string) (*api.ImageAliasesEntry, string, error)) *MockImageServerGetImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasArchitectures mocks base method. @@ -455,9 +1007,33 @@ func (m *MockImageServer) GetImageAliasArchitectures(arg0, arg1 string) (map[str } // GetImageAliasArchitectures indicates an expected call of GetImageAliasArchitectures. -func (mr *MockImageServerMockRecorder) GetImageAliasArchitectures(arg0, arg1 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageAliasArchitectures(arg0, arg1 any) *MockImageServerGetImageAliasArchitecturesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasArchitectures", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasArchitectures), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasArchitectures", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasArchitectures), arg0, arg1) + return &MockImageServerGetImageAliasArchitecturesCall{Call: call} +} + +// MockImageServerGetImageAliasArchitecturesCall wrap *gomock.Call +type MockImageServerGetImageAliasArchitecturesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageAliasArchitecturesCall) Return(arg0 map[string]*api.ImageAliasesEntry, arg1 error) *MockImageServerGetImageAliasArchitecturesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageAliasArchitecturesCall) Do(f func(string, string) (map[string]*api.ImageAliasesEntry, error)) *MockImageServerGetImageAliasArchitecturesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageAliasArchitecturesCall) DoAndReturn(f func(string, string) (map[string]*api.ImageAliasesEntry, error)) *MockImageServerGetImageAliasArchitecturesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasNames mocks base method. @@ -470,9 +1046,33 @@ func (m *MockImageServer) GetImageAliasNames() ([]string, error) { } // GetImageAliasNames indicates an expected call of GetImageAliasNames. -func (mr *MockImageServerMockRecorder) GetImageAliasNames() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageAliasNames() *MockImageServerGetImageAliasNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasNames", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasNames", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasNames)) + return &MockImageServerGetImageAliasNamesCall{Call: call} +} + +// MockImageServerGetImageAliasNamesCall wrap *gomock.Call +type MockImageServerGetImageAliasNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageAliasNamesCall) Return(arg0 []string, arg1 error) *MockImageServerGetImageAliasNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageAliasNamesCall) Do(f func() ([]string, error)) *MockImageServerGetImageAliasNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageAliasNamesCall) DoAndReturn(f func() ([]string, error)) *MockImageServerGetImageAliasNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasType mocks base method. @@ -486,9 +1086,33 @@ func (m *MockImageServer) GetImageAliasType(arg0, arg1 string) (*api.ImageAliase } // GetImageAliasType indicates an expected call of GetImageAliasType. -func (mr *MockImageServerMockRecorder) GetImageAliasType(arg0, arg1 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageAliasType(arg0, arg1 any) *MockImageServerGetImageAliasTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasType", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasType), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasType", reflect.TypeOf((*MockImageServer)(nil).GetImageAliasType), arg0, arg1) + return &MockImageServerGetImageAliasTypeCall{Call: call} +} + +// MockImageServerGetImageAliasTypeCall wrap *gomock.Call +type MockImageServerGetImageAliasTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageAliasTypeCall) Return(arg0 *api.ImageAliasesEntry, arg1 string, arg2 error) *MockImageServerGetImageAliasTypeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageAliasTypeCall) Do(f func(string, string) (*api.ImageAliasesEntry, string, error)) *MockImageServerGetImageAliasTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageAliasTypeCall) DoAndReturn(f func(string, string) (*api.ImageAliasesEntry, string, error)) *MockImageServerGetImageAliasTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliases mocks base method. @@ -501,9 +1125,33 @@ func (m *MockImageServer) GetImageAliases() ([]api.ImageAliasesEntry, error) { } // GetImageAliases indicates an expected call of GetImageAliases. -func (mr *MockImageServerMockRecorder) GetImageAliases() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageAliases() *MockImageServerGetImageAliasesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliases", reflect.TypeOf((*MockImageServer)(nil).GetImageAliases)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliases", reflect.TypeOf((*MockImageServer)(nil).GetImageAliases)) + return &MockImageServerGetImageAliasesCall{Call: call} +} + +// MockImageServerGetImageAliasesCall wrap *gomock.Call +type MockImageServerGetImageAliasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageAliasesCall) Return(arg0 []api.ImageAliasesEntry, arg1 error) *MockImageServerGetImageAliasesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageAliasesCall) Do(f func() ([]api.ImageAliasesEntry, error)) *MockImageServerGetImageAliasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageAliasesCall) DoAndReturn(f func() ([]api.ImageAliasesEntry, error)) *MockImageServerGetImageAliasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageFile mocks base method. @@ -516,9 +1164,33 @@ func (m *MockImageServer) GetImageFile(arg0 string, arg1 lxd.ImageFileRequest) ( } // GetImageFile indicates an expected call of GetImageFile. -func (mr *MockImageServerMockRecorder) GetImageFile(arg0, arg1 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageFile(arg0, arg1 any) *MockImageServerGetImageFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFile", reflect.TypeOf((*MockImageServer)(nil).GetImageFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFile", reflect.TypeOf((*MockImageServer)(nil).GetImageFile), arg0, arg1) + return &MockImageServerGetImageFileCall{Call: call} +} + +// MockImageServerGetImageFileCall wrap *gomock.Call +type MockImageServerGetImageFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageFileCall) Return(arg0 *lxd.ImageFileResponse, arg1 error) *MockImageServerGetImageFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageFileCall) Do(f func(string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockImageServerGetImageFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageFileCall) DoAndReturn(f func(string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockImageServerGetImageFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageFingerprints mocks base method. @@ -531,9 +1203,33 @@ func (m *MockImageServer) GetImageFingerprints() ([]string, error) { } // GetImageFingerprints indicates an expected call of GetImageFingerprints. -func (mr *MockImageServerMockRecorder) GetImageFingerprints() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageFingerprints() *MockImageServerGetImageFingerprintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFingerprints", reflect.TypeOf((*MockImageServer)(nil).GetImageFingerprints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFingerprints", reflect.TypeOf((*MockImageServer)(nil).GetImageFingerprints)) + return &MockImageServerGetImageFingerprintsCall{Call: call} +} + +// MockImageServerGetImageFingerprintsCall wrap *gomock.Call +type MockImageServerGetImageFingerprintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageFingerprintsCall) Return(arg0 []string, arg1 error) *MockImageServerGetImageFingerprintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageFingerprintsCall) Do(f func() ([]string, error)) *MockImageServerGetImageFingerprintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageFingerprintsCall) DoAndReturn(f func() ([]string, error)) *MockImageServerGetImageFingerprintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageSecret mocks base method. @@ -546,9 +1242,33 @@ func (m *MockImageServer) GetImageSecret(arg0 string) (string, error) { } // GetImageSecret indicates an expected call of GetImageSecret. -func (mr *MockImageServerMockRecorder) GetImageSecret(arg0 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImageSecret(arg0 any) *MockImageServerGetImageSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSecret", reflect.TypeOf((*MockImageServer)(nil).GetImageSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSecret", reflect.TypeOf((*MockImageServer)(nil).GetImageSecret), arg0) + return &MockImageServerGetImageSecretCall{Call: call} +} + +// MockImageServerGetImageSecretCall wrap *gomock.Call +type MockImageServerGetImageSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImageSecretCall) Return(arg0 string, arg1 error) *MockImageServerGetImageSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImageSecretCall) Do(f func(string) (string, error)) *MockImageServerGetImageSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImageSecretCall) DoAndReturn(f func(string) (string, error)) *MockImageServerGetImageSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImages mocks base method. @@ -561,9 +1281,33 @@ func (m *MockImageServer) GetImages() ([]api.Image, error) { } // GetImages indicates an expected call of GetImages. -func (mr *MockImageServerMockRecorder) GetImages() *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImages() *MockImageServerGetImagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImages", reflect.TypeOf((*MockImageServer)(nil).GetImages)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImages", reflect.TypeOf((*MockImageServer)(nil).GetImages)) + return &MockImageServerGetImagesCall{Call: call} +} + +// MockImageServerGetImagesCall wrap *gomock.Call +type MockImageServerGetImagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImagesCall) Return(arg0 []api.Image, arg1 error) *MockImageServerGetImagesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImagesCall) Do(f func() ([]api.Image, error)) *MockImageServerGetImagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImagesCall) DoAndReturn(f func() ([]api.Image, error)) *MockImageServerGetImagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImagesWithFilter mocks base method. @@ -576,9 +1320,33 @@ func (m *MockImageServer) GetImagesWithFilter(arg0 []string) ([]api.Image, error } // GetImagesWithFilter indicates an expected call of GetImagesWithFilter. -func (mr *MockImageServerMockRecorder) GetImagesWithFilter(arg0 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetImagesWithFilter(arg0 any) *MockImageServerGetImagesWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImagesWithFilter", reflect.TypeOf((*MockImageServer)(nil).GetImagesWithFilter), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImagesWithFilter", reflect.TypeOf((*MockImageServer)(nil).GetImagesWithFilter), arg0) + return &MockImageServerGetImagesWithFilterCall{Call: call} +} + +// MockImageServerGetImagesWithFilterCall wrap *gomock.Call +type MockImageServerGetImagesWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetImagesWithFilterCall) Return(arg0 []api.Image, arg1 error) *MockImageServerGetImagesWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetImagesWithFilterCall) Do(f func([]string) ([]api.Image, error)) *MockImageServerGetImagesWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetImagesWithFilterCall) DoAndReturn(f func([]string) ([]api.Image, error)) *MockImageServerGetImagesWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPrivateImage mocks base method. @@ -592,9 +1360,33 @@ func (m *MockImageServer) GetPrivateImage(arg0, arg1 string) (*api.Image, string } // GetPrivateImage indicates an expected call of GetPrivateImage. -func (mr *MockImageServerMockRecorder) GetPrivateImage(arg0, arg1 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetPrivateImage(arg0, arg1 any) *MockImageServerGetPrivateImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImage", reflect.TypeOf((*MockImageServer)(nil).GetPrivateImage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImage", reflect.TypeOf((*MockImageServer)(nil).GetPrivateImage), arg0, arg1) + return &MockImageServerGetPrivateImageCall{Call: call} +} + +// MockImageServerGetPrivateImageCall wrap *gomock.Call +type MockImageServerGetPrivateImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetPrivateImageCall) Return(arg0 *api.Image, arg1 string, arg2 error) *MockImageServerGetPrivateImageCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetPrivateImageCall) Do(f func(string, string) (*api.Image, string, error)) *MockImageServerGetPrivateImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetPrivateImageCall) DoAndReturn(f func(string, string) (*api.Image, string, error)) *MockImageServerGetPrivateImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPrivateImageFile mocks base method. @@ -607,9 +1399,33 @@ func (m *MockImageServer) GetPrivateImageFile(arg0, arg1 string, arg2 lxd.ImageF } // GetPrivateImageFile indicates an expected call of GetPrivateImageFile. -func (mr *MockImageServerMockRecorder) GetPrivateImageFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockImageServerMockRecorder) GetPrivateImageFile(arg0, arg1, arg2 any) *MockImageServerGetPrivateImageFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImageFile", reflect.TypeOf((*MockImageServer)(nil).GetPrivateImageFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImageFile", reflect.TypeOf((*MockImageServer)(nil).GetPrivateImageFile), arg0, arg1, arg2) + return &MockImageServerGetPrivateImageFileCall{Call: call} +} + +// MockImageServerGetPrivateImageFileCall wrap *gomock.Call +type MockImageServerGetPrivateImageFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServerGetPrivateImageFileCall) Return(arg0 *lxd.ImageFileResponse, arg1 error) *MockImageServerGetPrivateImageFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServerGetPrivateImageFileCall) Do(f func(string, string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockImageServerGetPrivateImageFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServerGetPrivateImageFileCall) DoAndReturn(f func(string, string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockImageServerGetPrivateImageFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceServer is a mock of InstanceServer interface. @@ -645,9 +1461,33 @@ func (m *MockInstanceServer) ConsoleContainer(arg0 string, arg1 api.ContainerCon } // ConsoleContainer indicates an expected call of ConsoleContainer. -func (mr *MockInstanceServerMockRecorder) ConsoleContainer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ConsoleContainer(arg0, arg1, arg2 any) *MockInstanceServerConsoleContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleContainer", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleContainer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleContainer", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleContainer), arg0, arg1, arg2) + return &MockInstanceServerConsoleContainerCall{Call: call} +} + +// MockInstanceServerConsoleContainerCall wrap *gomock.Call +type MockInstanceServerConsoleContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerConsoleContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerConsoleContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerConsoleContainerCall) Do(f func(string, api.ContainerConsolePost, *lxd.ContainerConsoleArgs) (lxd.Operation, error)) *MockInstanceServerConsoleContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerConsoleContainerCall) DoAndReturn(f func(string, api.ContainerConsolePost, *lxd.ContainerConsoleArgs) (lxd.Operation, error)) *MockInstanceServerConsoleContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConsoleInstance mocks base method. @@ -660,9 +1500,33 @@ func (m *MockInstanceServer) ConsoleInstance(arg0 string, arg1 api.InstanceConso } // ConsoleInstance indicates an expected call of ConsoleInstance. -func (mr *MockInstanceServerMockRecorder) ConsoleInstance(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ConsoleInstance(arg0, arg1, arg2 any) *MockInstanceServerConsoleInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleInstance", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleInstance), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleInstance", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleInstance), arg0, arg1, arg2) + return &MockInstanceServerConsoleInstanceCall{Call: call} +} + +// MockInstanceServerConsoleInstanceCall wrap *gomock.Call +type MockInstanceServerConsoleInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerConsoleInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerConsoleInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerConsoleInstanceCall) Do(f func(string, api.InstanceConsolePost, *lxd.InstanceConsoleArgs) (lxd.Operation, error)) *MockInstanceServerConsoleInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerConsoleInstanceCall) DoAndReturn(f func(string, api.InstanceConsolePost, *lxd.InstanceConsoleArgs) (lxd.Operation, error)) *MockInstanceServerConsoleInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConsoleInstanceDynamic mocks base method. @@ -676,9 +1540,33 @@ func (m *MockInstanceServer) ConsoleInstanceDynamic(arg0 string, arg1 api.Instan } // ConsoleInstanceDynamic indicates an expected call of ConsoleInstanceDynamic. -func (mr *MockInstanceServerMockRecorder) ConsoleInstanceDynamic(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ConsoleInstanceDynamic(arg0, arg1, arg2 any) *MockInstanceServerConsoleInstanceDynamicCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleInstanceDynamic", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleInstanceDynamic), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsoleInstanceDynamic", reflect.TypeOf((*MockInstanceServer)(nil).ConsoleInstanceDynamic), arg0, arg1, arg2) + return &MockInstanceServerConsoleInstanceDynamicCall{Call: call} +} + +// MockInstanceServerConsoleInstanceDynamicCall wrap *gomock.Call +type MockInstanceServerConsoleInstanceDynamicCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerConsoleInstanceDynamicCall) Return(arg0 lxd.Operation, arg1 func(io.ReadWriteCloser) error, arg2 error) *MockInstanceServerConsoleInstanceDynamicCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerConsoleInstanceDynamicCall) Do(f func(string, api.InstanceConsolePost, *lxd.InstanceConsoleArgs) (lxd.Operation, func(io.ReadWriteCloser) error, error)) *MockInstanceServerConsoleInstanceDynamicCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerConsoleInstanceDynamicCall) DoAndReturn(f func(string, api.InstanceConsolePost, *lxd.InstanceConsoleArgs) (lxd.Operation, func(io.ReadWriteCloser) error, error)) *MockInstanceServerConsoleInstanceDynamicCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyContainer mocks base method. @@ -691,9 +1579,33 @@ func (m *MockInstanceServer) CopyContainer(arg0 lxd.InstanceServer, arg1 api.Con } // CopyContainer indicates an expected call of CopyContainer. -func (mr *MockInstanceServerMockRecorder) CopyContainer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyContainer(arg0, arg1, arg2 any) *MockInstanceServerCopyContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyContainer", reflect.TypeOf((*MockInstanceServer)(nil).CopyContainer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyContainer", reflect.TypeOf((*MockInstanceServer)(nil).CopyContainer), arg0, arg1, arg2) + return &MockInstanceServerCopyContainerCall{Call: call} +} + +// MockInstanceServerCopyContainerCall wrap *gomock.Call +type MockInstanceServerCopyContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyContainerCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyContainerCall) Do(f func(lxd.InstanceServer, api.Container, *lxd.ContainerCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyContainerCall) DoAndReturn(f func(lxd.InstanceServer, api.Container, *lxd.ContainerCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyContainerSnapshot mocks base method. @@ -706,9 +1618,33 @@ func (m *MockInstanceServer) CopyContainerSnapshot(arg0 lxd.InstanceServer, arg1 } // CopyContainerSnapshot indicates an expected call of CopyContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) CopyContainerSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyContainerSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerCopyContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CopyContainerSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CopyContainerSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerCopyContainerSnapshotCall{Call: call} +} + +// MockInstanceServerCopyContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerCopyContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyContainerSnapshotCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyContainerSnapshotCall) Do(f func(lxd.InstanceServer, string, api.ContainerSnapshot, *lxd.ContainerSnapshotCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyContainerSnapshotCall) DoAndReturn(f func(lxd.InstanceServer, string, api.ContainerSnapshot, *lxd.ContainerSnapshotCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyImage mocks base method. @@ -721,9 +1657,33 @@ func (m *MockInstanceServer) CopyImage(arg0 lxd.ImageServer, arg1 api.Image, arg } // CopyImage indicates an expected call of CopyImage. -func (mr *MockInstanceServerMockRecorder) CopyImage(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyImage(arg0, arg1, arg2 any) *MockInstanceServerCopyImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyImage", reflect.TypeOf((*MockInstanceServer)(nil).CopyImage), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyImage", reflect.TypeOf((*MockInstanceServer)(nil).CopyImage), arg0, arg1, arg2) + return &MockInstanceServerCopyImageCall{Call: call} +} + +// MockInstanceServerCopyImageCall wrap *gomock.Call +type MockInstanceServerCopyImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyImageCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyImageCall) Do(f func(lxd.ImageServer, api.Image, *lxd.ImageCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyImageCall) DoAndReturn(f func(lxd.ImageServer, api.Image, *lxd.ImageCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyInstance mocks base method. @@ -736,9 +1696,33 @@ func (m *MockInstanceServer) CopyInstance(arg0 lxd.InstanceServer, arg1 api.Inst } // CopyInstance indicates an expected call of CopyInstance. -func (mr *MockInstanceServerMockRecorder) CopyInstance(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyInstance(arg0, arg1, arg2 any) *MockInstanceServerCopyInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyInstance", reflect.TypeOf((*MockInstanceServer)(nil).CopyInstance), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyInstance", reflect.TypeOf((*MockInstanceServer)(nil).CopyInstance), arg0, arg1, arg2) + return &MockInstanceServerCopyInstanceCall{Call: call} +} + +// MockInstanceServerCopyInstanceCall wrap *gomock.Call +type MockInstanceServerCopyInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyInstanceCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyInstanceCall) Do(f func(lxd.InstanceServer, api.Instance, *lxd.InstanceCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyInstanceCall) DoAndReturn(f func(lxd.InstanceServer, api.Instance, *lxd.InstanceCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyInstanceSnapshot mocks base method. @@ -751,9 +1735,33 @@ func (m *MockInstanceServer) CopyInstanceSnapshot(arg0 lxd.InstanceServer, arg1 } // CopyInstanceSnapshot indicates an expected call of CopyInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) CopyInstanceSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyInstanceSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerCopyInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CopyInstanceSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CopyInstanceSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerCopyInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerCopyInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerCopyInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyInstanceSnapshotCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyInstanceSnapshotCall) Do(f func(lxd.InstanceServer, string, api.InstanceSnapshot, *lxd.InstanceSnapshotCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyInstanceSnapshotCall) DoAndReturn(f func(lxd.InstanceServer, string, api.InstanceSnapshot, *lxd.InstanceSnapshotCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyStoragePoolVolume mocks base method. @@ -766,9 +1774,33 @@ func (m *MockInstanceServer) CopyStoragePoolVolume(arg0 string, arg1 lxd.Instanc } // CopyStoragePoolVolume indicates an expected call of CopyStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) CopyStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CopyStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *MockInstanceServerCopyStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).CopyStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).CopyStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + return &MockInstanceServerCopyStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerCopyStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerCopyStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCopyStoragePoolVolumeCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCopyStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCopyStoragePoolVolumeCall) Do(f func(string, lxd.InstanceServer, string, api.StorageVolume, *lxd.StoragePoolVolumeCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCopyStoragePoolVolumeCall) DoAndReturn(f func(string, lxd.InstanceServer, string, api.StorageVolume, *lxd.StoragePoolVolumeCopyArgs) (lxd.RemoteOperation, error)) *MockInstanceServerCopyStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCertificate mocks base method. @@ -780,9 +1812,33 @@ func (m *MockInstanceServer) CreateCertificate(arg0 api.CertificatesPost) error } // CreateCertificate indicates an expected call of CreateCertificate. -func (mr *MockInstanceServerMockRecorder) CreateCertificate(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateCertificate(arg0 any) *MockInstanceServerCreateCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockInstanceServer)(nil).CreateCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockInstanceServer)(nil).CreateCertificate), arg0) + return &MockInstanceServerCreateCertificateCall{Call: call} +} + +// MockInstanceServerCreateCertificateCall wrap *gomock.Call +type MockInstanceServerCreateCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateCertificateCall) Return(arg0 error) *MockInstanceServerCreateCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateCertificateCall) Do(f func(api.CertificatesPost) error) *MockInstanceServerCreateCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateCertificateCall) DoAndReturn(f func(api.CertificatesPost) error) *MockInstanceServerCreateCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCertificateToken mocks base method. @@ -795,9 +1851,33 @@ func (m *MockInstanceServer) CreateCertificateToken(arg0 api.CertificatesPost) ( } // CreateCertificateToken indicates an expected call of CreateCertificateToken. -func (mr *MockInstanceServerMockRecorder) CreateCertificateToken(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateCertificateToken(arg0 any) *MockInstanceServerCreateCertificateTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificateToken", reflect.TypeOf((*MockInstanceServer)(nil).CreateCertificateToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificateToken", reflect.TypeOf((*MockInstanceServer)(nil).CreateCertificateToken), arg0) + return &MockInstanceServerCreateCertificateTokenCall{Call: call} +} + +// MockInstanceServerCreateCertificateTokenCall wrap *gomock.Call +type MockInstanceServerCreateCertificateTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateCertificateTokenCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateCertificateTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateCertificateTokenCall) Do(f func(api.CertificatesPost) (lxd.Operation, error)) *MockInstanceServerCreateCertificateTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateCertificateTokenCall) DoAndReturn(f func(api.CertificatesPost) (lxd.Operation, error)) *MockInstanceServerCreateCertificateTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateClusterGroup mocks base method. @@ -809,9 +1889,33 @@ func (m *MockInstanceServer) CreateClusterGroup(arg0 api.ClusterGroupsPost) erro } // CreateClusterGroup indicates an expected call of CreateClusterGroup. -func (mr *MockInstanceServerMockRecorder) CreateClusterGroup(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateClusterGroup(arg0 any) *MockInstanceServerCreateClusterGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).CreateClusterGroup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).CreateClusterGroup), arg0) + return &MockInstanceServerCreateClusterGroupCall{Call: call} +} + +// MockInstanceServerCreateClusterGroupCall wrap *gomock.Call +type MockInstanceServerCreateClusterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateClusterGroupCall) Return(arg0 error) *MockInstanceServerCreateClusterGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateClusterGroupCall) Do(f func(api.ClusterGroupsPost) error) *MockInstanceServerCreateClusterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateClusterGroupCall) DoAndReturn(f func(api.ClusterGroupsPost) error) *MockInstanceServerCreateClusterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateClusterMember mocks base method. @@ -824,9 +1928,33 @@ func (m *MockInstanceServer) CreateClusterMember(arg0 api.ClusterMembersPost) (l } // CreateClusterMember indicates an expected call of CreateClusterMember. -func (mr *MockInstanceServerMockRecorder) CreateClusterMember(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateClusterMember(arg0 any) *MockInstanceServerCreateClusterMemberCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).CreateClusterMember), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).CreateClusterMember), arg0) + return &MockInstanceServerCreateClusterMemberCall{Call: call} +} + +// MockInstanceServerCreateClusterMemberCall wrap *gomock.Call +type MockInstanceServerCreateClusterMemberCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateClusterMemberCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateClusterMemberCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateClusterMemberCall) Do(f func(api.ClusterMembersPost) (lxd.Operation, error)) *MockInstanceServerCreateClusterMemberCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateClusterMemberCall) DoAndReturn(f func(api.ClusterMembersPost) (lxd.Operation, error)) *MockInstanceServerCreateClusterMemberCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainer mocks base method. @@ -839,9 +1967,33 @@ func (m *MockInstanceServer) CreateContainer(arg0 api.ContainersPost) (lxd.Opera } // CreateContainer indicates an expected call of CreateContainer. -func (mr *MockInstanceServerMockRecorder) CreateContainer(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainer(arg0 any) *MockInstanceServerCreateContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainer), arg0) + return &MockInstanceServerCreateContainerCall{Call: call} +} + +// MockInstanceServerCreateContainerCall wrap *gomock.Call +type MockInstanceServerCreateContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerCall) Do(f func(api.ContainersPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerCall) DoAndReturn(f func(api.ContainersPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerBackup mocks base method. @@ -854,9 +2006,33 @@ func (m *MockInstanceServer) CreateContainerBackup(arg0 string, arg1 api.Contain } // CreateContainerBackup indicates an expected call of CreateContainerBackup. -func (mr *MockInstanceServerMockRecorder) CreateContainerBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerBackup(arg0, arg1 any) *MockInstanceServerCreateContainerBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerBackup), arg0, arg1) + return &MockInstanceServerCreateContainerBackupCall{Call: call} +} + +// MockInstanceServerCreateContainerBackupCall wrap *gomock.Call +type MockInstanceServerCreateContainerBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateContainerBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerBackupCall) Do(f func(string, api.ContainerBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerBackupCall) DoAndReturn(f func(string, api.ContainerBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerFile mocks base method. @@ -868,9 +2044,33 @@ func (m *MockInstanceServer) CreateContainerFile(arg0, arg1 string, arg2 lxd.Con } // CreateContainerFile indicates an expected call of CreateContainerFile. -func (mr *MockInstanceServerMockRecorder) CreateContainerFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerFile(arg0, arg1, arg2 any) *MockInstanceServerCreateContainerFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFile), arg0, arg1, arg2) + return &MockInstanceServerCreateContainerFileCall{Call: call} +} + +// MockInstanceServerCreateContainerFileCall wrap *gomock.Call +type MockInstanceServerCreateContainerFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerFileCall) Return(arg0 error) *MockInstanceServerCreateContainerFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerFileCall) Do(f func(string, string, lxd.ContainerFileArgs) error) *MockInstanceServerCreateContainerFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerFileCall) DoAndReturn(f func(string, string, lxd.ContainerFileArgs) error) *MockInstanceServerCreateContainerFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerFromBackup mocks base method. @@ -883,9 +2083,33 @@ func (m *MockInstanceServer) CreateContainerFromBackup(arg0 lxd.ContainerBackupA } // CreateContainerFromBackup indicates an expected call of CreateContainerFromBackup. -func (mr *MockInstanceServerMockRecorder) CreateContainerFromBackup(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerFromBackup(arg0 any) *MockInstanceServerCreateContainerFromBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFromBackup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFromBackup), arg0) + return &MockInstanceServerCreateContainerFromBackupCall{Call: call} +} + +// MockInstanceServerCreateContainerFromBackupCall wrap *gomock.Call +type MockInstanceServerCreateContainerFromBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerFromBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateContainerFromBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerFromBackupCall) Do(f func(lxd.ContainerBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateContainerFromBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerFromBackupCall) DoAndReturn(f func(lxd.ContainerBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateContainerFromBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerFromImage mocks base method. @@ -898,9 +2122,33 @@ func (m *MockInstanceServer) CreateContainerFromImage(arg0 lxd.ImageServer, arg1 } // CreateContainerFromImage indicates an expected call of CreateContainerFromImage. -func (mr *MockInstanceServerMockRecorder) CreateContainerFromImage(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerFromImage(arg0, arg1, arg2 any) *MockInstanceServerCreateContainerFromImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFromImage), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerFromImage), arg0, arg1, arg2) + return &MockInstanceServerCreateContainerFromImageCall{Call: call} +} + +// MockInstanceServerCreateContainerFromImageCall wrap *gomock.Call +type MockInstanceServerCreateContainerFromImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerFromImageCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCreateContainerFromImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerFromImageCall) Do(f func(lxd.ImageServer, api.Image, api.ContainersPost) (lxd.RemoteOperation, error)) *MockInstanceServerCreateContainerFromImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerFromImageCall) DoAndReturn(f func(lxd.ImageServer, api.Image, api.ContainersPost) (lxd.RemoteOperation, error)) *MockInstanceServerCreateContainerFromImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerSnapshot mocks base method. @@ -913,9 +2161,33 @@ func (m *MockInstanceServer) CreateContainerSnapshot(arg0 string, arg1 api.Conta } // CreateContainerSnapshot indicates an expected call of CreateContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) CreateContainerSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerSnapshot(arg0, arg1 any) *MockInstanceServerCreateContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerSnapshot), arg0, arg1) + return &MockInstanceServerCreateContainerSnapshotCall{Call: call} +} + +// MockInstanceServerCreateContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerCreateContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerSnapshotCall) Do(f func(string, api.ContainerSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerSnapshotCall) DoAndReturn(f func(string, api.ContainerSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerTemplateFile mocks base method. @@ -927,9 +2199,33 @@ func (m *MockInstanceServer) CreateContainerTemplateFile(arg0, arg1 string, arg2 } // CreateContainerTemplateFile indicates an expected call of CreateContainerTemplateFile. -func (mr *MockInstanceServerMockRecorder) CreateContainerTemplateFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateContainerTemplateFile(arg0, arg1, arg2 any) *MockInstanceServerCreateContainerTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerTemplateFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateContainerTemplateFile), arg0, arg1, arg2) + return &MockInstanceServerCreateContainerTemplateFileCall{Call: call} +} + +// MockInstanceServerCreateContainerTemplateFileCall wrap *gomock.Call +type MockInstanceServerCreateContainerTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateContainerTemplateFileCall) Return(arg0 error) *MockInstanceServerCreateContainerTemplateFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateContainerTemplateFileCall) Do(f func(string, string, io.ReadSeeker) error) *MockInstanceServerCreateContainerTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateContainerTemplateFileCall) DoAndReturn(f func(string, string, io.ReadSeeker) error) *MockInstanceServerCreateContainerTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateImage mocks base method. @@ -942,9 +2238,33 @@ func (m *MockInstanceServer) CreateImage(arg0 api.ImagesPost, arg1 *lxd.ImageCre } // CreateImage indicates an expected call of CreateImage. -func (mr *MockInstanceServerMockRecorder) CreateImage(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateImage(arg0, arg1 any) *MockInstanceServerCreateImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateImage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateImage), arg0, arg1) + return &MockInstanceServerCreateImageCall{Call: call} +} + +// MockInstanceServerCreateImageCall wrap *gomock.Call +type MockInstanceServerCreateImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateImageCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateImageCall) Do(f func(api.ImagesPost, *lxd.ImageCreateArgs) (lxd.Operation, error)) *MockInstanceServerCreateImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateImageCall) DoAndReturn(f func(api.ImagesPost, *lxd.ImageCreateArgs) (lxd.Operation, error)) *MockInstanceServerCreateImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateImageAlias mocks base method. @@ -956,9 +2276,33 @@ func (m *MockInstanceServer) CreateImageAlias(arg0 api.ImageAliasesPost) error { } // CreateImageAlias indicates an expected call of CreateImageAlias. -func (mr *MockInstanceServerMockRecorder) CreateImageAlias(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateImageAlias(arg0 any) *MockInstanceServerCreateImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).CreateImageAlias), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).CreateImageAlias), arg0) + return &MockInstanceServerCreateImageAliasCall{Call: call} +} + +// MockInstanceServerCreateImageAliasCall wrap *gomock.Call +type MockInstanceServerCreateImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateImageAliasCall) Return(arg0 error) *MockInstanceServerCreateImageAliasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateImageAliasCall) Do(f func(api.ImageAliasesPost) error) *MockInstanceServerCreateImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateImageAliasCall) DoAndReturn(f func(api.ImageAliasesPost) error) *MockInstanceServerCreateImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateImageSecret mocks base method. @@ -971,9 +2315,33 @@ func (m *MockInstanceServer) CreateImageSecret(arg0 string) (lxd.Operation, erro } // CreateImageSecret indicates an expected call of CreateImageSecret. -func (mr *MockInstanceServerMockRecorder) CreateImageSecret(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateImageSecret(arg0 any) *MockInstanceServerCreateImageSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImageSecret", reflect.TypeOf((*MockInstanceServer)(nil).CreateImageSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImageSecret", reflect.TypeOf((*MockInstanceServer)(nil).CreateImageSecret), arg0) + return &MockInstanceServerCreateImageSecretCall{Call: call} +} + +// MockInstanceServerCreateImageSecretCall wrap *gomock.Call +type MockInstanceServerCreateImageSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateImageSecretCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateImageSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateImageSecretCall) Do(f func(string) (lxd.Operation, error)) *MockInstanceServerCreateImageSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateImageSecretCall) DoAndReturn(f func(string) (lxd.Operation, error)) *MockInstanceServerCreateImageSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstance mocks base method. @@ -986,9 +2354,33 @@ func (m *MockInstanceServer) CreateInstance(arg0 api.InstancesPost) (lxd.Operati } // CreateInstance indicates an expected call of CreateInstance. -func (mr *MockInstanceServerMockRecorder) CreateInstance(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstance(arg0 any) *MockInstanceServerCreateInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstance", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstance", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstance), arg0) + return &MockInstanceServerCreateInstanceCall{Call: call} +} + +// MockInstanceServerCreateInstanceCall wrap *gomock.Call +type MockInstanceServerCreateInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceCall) Do(f func(api.InstancesPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceCall) DoAndReturn(f func(api.InstancesPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceBackup mocks base method. @@ -1001,9 +2393,33 @@ func (m *MockInstanceServer) CreateInstanceBackup(arg0 string, arg1 api.Instance } // CreateInstanceBackup indicates an expected call of CreateInstanceBackup. -func (mr *MockInstanceServerMockRecorder) CreateInstanceBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceBackup(arg0, arg1 any) *MockInstanceServerCreateInstanceBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceBackup), arg0, arg1) + return &MockInstanceServerCreateInstanceBackupCall{Call: call} +} + +// MockInstanceServerCreateInstanceBackupCall wrap *gomock.Call +type MockInstanceServerCreateInstanceBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateInstanceBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceBackupCall) Do(f func(string, api.InstanceBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceBackupCall) DoAndReturn(f func(string, api.InstanceBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceFile mocks base method. @@ -1015,9 +2431,33 @@ func (m *MockInstanceServer) CreateInstanceFile(arg0, arg1 string, arg2 lxd.Inst } // CreateInstanceFile indicates an expected call of CreateInstanceFile. -func (mr *MockInstanceServerMockRecorder) CreateInstanceFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceFile(arg0, arg1, arg2 any) *MockInstanceServerCreateInstanceFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFile), arg0, arg1, arg2) + return &MockInstanceServerCreateInstanceFileCall{Call: call} +} + +// MockInstanceServerCreateInstanceFileCall wrap *gomock.Call +type MockInstanceServerCreateInstanceFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceFileCall) Return(arg0 error) *MockInstanceServerCreateInstanceFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceFileCall) Do(f func(string, string, lxd.InstanceFileArgs) error) *MockInstanceServerCreateInstanceFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceFileCall) DoAndReturn(f func(string, string, lxd.InstanceFileArgs) error) *MockInstanceServerCreateInstanceFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceFromBackup mocks base method. @@ -1030,9 +2470,33 @@ func (m *MockInstanceServer) CreateInstanceFromBackup(arg0 lxd.InstanceBackupArg } // CreateInstanceFromBackup indicates an expected call of CreateInstanceFromBackup. -func (mr *MockInstanceServerMockRecorder) CreateInstanceFromBackup(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceFromBackup(arg0 any) *MockInstanceServerCreateInstanceFromBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFromBackup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFromBackup), arg0) + return &MockInstanceServerCreateInstanceFromBackupCall{Call: call} +} + +// MockInstanceServerCreateInstanceFromBackupCall wrap *gomock.Call +type MockInstanceServerCreateInstanceFromBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceFromBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateInstanceFromBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceFromBackupCall) Do(f func(lxd.InstanceBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateInstanceFromBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceFromBackupCall) DoAndReturn(f func(lxd.InstanceBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateInstanceFromBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceFromImage mocks base method. @@ -1045,9 +2509,33 @@ func (m *MockInstanceServer) CreateInstanceFromImage(arg0 lxd.ImageServer, arg1 } // CreateInstanceFromImage indicates an expected call of CreateInstanceFromImage. -func (mr *MockInstanceServerMockRecorder) CreateInstanceFromImage(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceFromImage(arg0, arg1, arg2 any) *MockInstanceServerCreateInstanceFromImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFromImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFromImage), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceFromImage", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceFromImage), arg0, arg1, arg2) + return &MockInstanceServerCreateInstanceFromImageCall{Call: call} +} + +// MockInstanceServerCreateInstanceFromImageCall wrap *gomock.Call +type MockInstanceServerCreateInstanceFromImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceFromImageCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerCreateInstanceFromImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceFromImageCall) Do(f func(lxd.ImageServer, api.Image, api.InstancesPost) (lxd.RemoteOperation, error)) *MockInstanceServerCreateInstanceFromImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceFromImageCall) DoAndReturn(f func(lxd.ImageServer, api.Image, api.InstancesPost) (lxd.RemoteOperation, error)) *MockInstanceServerCreateInstanceFromImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceSnapshot mocks base method. @@ -1060,9 +2548,33 @@ func (m *MockInstanceServer) CreateInstanceSnapshot(arg0 string, arg1 api.Instan } // CreateInstanceSnapshot indicates an expected call of CreateInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) CreateInstanceSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceSnapshot(arg0, arg1 any) *MockInstanceServerCreateInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceSnapshot), arg0, arg1) + return &MockInstanceServerCreateInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerCreateInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerCreateInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceSnapshotCall) Do(f func(string, api.InstanceSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceSnapshotCall) DoAndReturn(f func(string, api.InstanceSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateInstanceTemplateFile mocks base method. @@ -1074,9 +2586,33 @@ func (m *MockInstanceServer) CreateInstanceTemplateFile(arg0, arg1 string, arg2 } // CreateInstanceTemplateFile indicates an expected call of CreateInstanceTemplateFile. -func (mr *MockInstanceServerMockRecorder) CreateInstanceTemplateFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateInstanceTemplateFile(arg0, arg1, arg2 any) *MockInstanceServerCreateInstanceTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceTemplateFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).CreateInstanceTemplateFile), arg0, arg1, arg2) + return &MockInstanceServerCreateInstanceTemplateFileCall{Call: call} +} + +// MockInstanceServerCreateInstanceTemplateFileCall wrap *gomock.Call +type MockInstanceServerCreateInstanceTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateInstanceTemplateFileCall) Return(arg0 error) *MockInstanceServerCreateInstanceTemplateFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateInstanceTemplateFileCall) Do(f func(string, string, io.ReadSeeker) error) *MockInstanceServerCreateInstanceTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateInstanceTemplateFileCall) DoAndReturn(f func(string, string, io.ReadSeeker) error) *MockInstanceServerCreateInstanceTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetwork mocks base method. @@ -1088,9 +2624,33 @@ func (m *MockInstanceServer) CreateNetwork(arg0 api.NetworksPost) error { } // CreateNetwork indicates an expected call of CreateNetwork. -func (mr *MockInstanceServerMockRecorder) CreateNetwork(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetwork(arg0 any) *MockInstanceServerCreateNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetwork", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetwork), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetwork", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetwork), arg0) + return &MockInstanceServerCreateNetworkCall{Call: call} +} + +// MockInstanceServerCreateNetworkCall wrap *gomock.Call +type MockInstanceServerCreateNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkCall) Return(arg0 error) *MockInstanceServerCreateNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkCall) Do(f func(api.NetworksPost) error) *MockInstanceServerCreateNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkCall) DoAndReturn(f func(api.NetworksPost) error) *MockInstanceServerCreateNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkACL mocks base method. @@ -1102,9 +2662,33 @@ func (m *MockInstanceServer) CreateNetworkACL(arg0 api.NetworkACLsPost) error { } // CreateNetworkACL indicates an expected call of CreateNetworkACL. -func (mr *MockInstanceServerMockRecorder) CreateNetworkACL(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkACL(arg0 any) *MockInstanceServerCreateNetworkACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkACL), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkACL), arg0) + return &MockInstanceServerCreateNetworkACLCall{Call: call} +} + +// MockInstanceServerCreateNetworkACLCall wrap *gomock.Call +type MockInstanceServerCreateNetworkACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkACLCall) Return(arg0 error) *MockInstanceServerCreateNetworkACLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkACLCall) Do(f func(api.NetworkACLsPost) error) *MockInstanceServerCreateNetworkACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkACLCall) DoAndReturn(f func(api.NetworkACLsPost) error) *MockInstanceServerCreateNetworkACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkForward mocks base method. @@ -1116,9 +2700,33 @@ func (m *MockInstanceServer) CreateNetworkForward(arg0 string, arg1 api.NetworkF } // CreateNetworkForward indicates an expected call of CreateNetworkForward. -func (mr *MockInstanceServerMockRecorder) CreateNetworkForward(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkForward(arg0, arg1 any) *MockInstanceServerCreateNetworkForwardCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkForward), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkForward), arg0, arg1) + return &MockInstanceServerCreateNetworkForwardCall{Call: call} +} + +// MockInstanceServerCreateNetworkForwardCall wrap *gomock.Call +type MockInstanceServerCreateNetworkForwardCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkForwardCall) Return(arg0 error) *MockInstanceServerCreateNetworkForwardCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkForwardCall) Do(f func(string, api.NetworkForwardsPost) error) *MockInstanceServerCreateNetworkForwardCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkForwardCall) DoAndReturn(f func(string, api.NetworkForwardsPost) error) *MockInstanceServerCreateNetworkForwardCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkLoadBalancer mocks base method. @@ -1130,9 +2738,33 @@ func (m *MockInstanceServer) CreateNetworkLoadBalancer(arg0 string, arg1 api.Net } // CreateNetworkLoadBalancer indicates an expected call of CreateNetworkLoadBalancer. -func (mr *MockInstanceServerMockRecorder) CreateNetworkLoadBalancer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkLoadBalancer(arg0, arg1 any) *MockInstanceServerCreateNetworkLoadBalancerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkLoadBalancer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkLoadBalancer), arg0, arg1) + return &MockInstanceServerCreateNetworkLoadBalancerCall{Call: call} +} + +// MockInstanceServerCreateNetworkLoadBalancerCall wrap *gomock.Call +type MockInstanceServerCreateNetworkLoadBalancerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkLoadBalancerCall) Return(arg0 error) *MockInstanceServerCreateNetworkLoadBalancerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkLoadBalancerCall) Do(f func(string, api.NetworkLoadBalancersPost) error) *MockInstanceServerCreateNetworkLoadBalancerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkLoadBalancerCall) DoAndReturn(f func(string, api.NetworkLoadBalancersPost) error) *MockInstanceServerCreateNetworkLoadBalancerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkPeer mocks base method. @@ -1144,9 +2776,33 @@ func (m *MockInstanceServer) CreateNetworkPeer(arg0 string, arg1 api.NetworkPeer } // CreateNetworkPeer indicates an expected call of CreateNetworkPeer. -func (mr *MockInstanceServerMockRecorder) CreateNetworkPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkPeer(arg0, arg1 any) *MockInstanceServerCreateNetworkPeerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkPeer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkPeer), arg0, arg1) + return &MockInstanceServerCreateNetworkPeerCall{Call: call} +} + +// MockInstanceServerCreateNetworkPeerCall wrap *gomock.Call +type MockInstanceServerCreateNetworkPeerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkPeerCall) Return(arg0 error) *MockInstanceServerCreateNetworkPeerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkPeerCall) Do(f func(string, api.NetworkPeersPost) error) *MockInstanceServerCreateNetworkPeerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkPeerCall) DoAndReturn(f func(string, api.NetworkPeersPost) error) *MockInstanceServerCreateNetworkPeerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkZone mocks base method. @@ -1158,9 +2814,33 @@ func (m *MockInstanceServer) CreateNetworkZone(arg0 api.NetworkZonesPost) error } // CreateNetworkZone indicates an expected call of CreateNetworkZone. -func (mr *MockInstanceServerMockRecorder) CreateNetworkZone(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkZone(arg0 any) *MockInstanceServerCreateNetworkZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkZone), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkZone), arg0) + return &MockInstanceServerCreateNetworkZoneCall{Call: call} +} + +// MockInstanceServerCreateNetworkZoneCall wrap *gomock.Call +type MockInstanceServerCreateNetworkZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkZoneCall) Return(arg0 error) *MockInstanceServerCreateNetworkZoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkZoneCall) Do(f func(api.NetworkZonesPost) error) *MockInstanceServerCreateNetworkZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkZoneCall) DoAndReturn(f func(api.NetworkZonesPost) error) *MockInstanceServerCreateNetworkZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateNetworkZoneRecord mocks base method. @@ -1172,9 +2852,33 @@ func (m *MockInstanceServer) CreateNetworkZoneRecord(arg0 string, arg1 api.Netwo } // CreateNetworkZoneRecord indicates an expected call of CreateNetworkZoneRecord. -func (mr *MockInstanceServerMockRecorder) CreateNetworkZoneRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateNetworkZoneRecord(arg0, arg1 any) *MockInstanceServerCreateNetworkZoneRecordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkZoneRecord), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).CreateNetworkZoneRecord), arg0, arg1) + return &MockInstanceServerCreateNetworkZoneRecordCall{Call: call} +} + +// MockInstanceServerCreateNetworkZoneRecordCall wrap *gomock.Call +type MockInstanceServerCreateNetworkZoneRecordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateNetworkZoneRecordCall) Return(arg0 error) *MockInstanceServerCreateNetworkZoneRecordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateNetworkZoneRecordCall) Do(f func(string, api.NetworkZoneRecordsPost) error) *MockInstanceServerCreateNetworkZoneRecordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateNetworkZoneRecordCall) DoAndReturn(f func(string, api.NetworkZoneRecordsPost) error) *MockInstanceServerCreateNetworkZoneRecordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProfile mocks base method. @@ -1186,9 +2890,33 @@ func (m *MockInstanceServer) CreateProfile(arg0 api.ProfilesPost) error { } // CreateProfile indicates an expected call of CreateProfile. -func (mr *MockInstanceServerMockRecorder) CreateProfile(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateProfile(arg0 any) *MockInstanceServerCreateProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockInstanceServer)(nil).CreateProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockInstanceServer)(nil).CreateProfile), arg0) + return &MockInstanceServerCreateProfileCall{Call: call} +} + +// MockInstanceServerCreateProfileCall wrap *gomock.Call +type MockInstanceServerCreateProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateProfileCall) Return(arg0 error) *MockInstanceServerCreateProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateProfileCall) Do(f func(api.ProfilesPost) error) *MockInstanceServerCreateProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateProfileCall) DoAndReturn(f func(api.ProfilesPost) error) *MockInstanceServerCreateProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProject mocks base method. @@ -1200,9 +2928,33 @@ func (m *MockInstanceServer) CreateProject(arg0 api.ProjectsPost) error { } // CreateProject indicates an expected call of CreateProject. -func (mr *MockInstanceServerMockRecorder) CreateProject(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateProject(arg0 any) *MockInstanceServerCreateProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProject", reflect.TypeOf((*MockInstanceServer)(nil).CreateProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProject", reflect.TypeOf((*MockInstanceServer)(nil).CreateProject), arg0) + return &MockInstanceServerCreateProjectCall{Call: call} +} + +// MockInstanceServerCreateProjectCall wrap *gomock.Call +type MockInstanceServerCreateProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateProjectCall) Return(arg0 error) *MockInstanceServerCreateProjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateProjectCall) Do(f func(api.ProjectsPost) error) *MockInstanceServerCreateProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateProjectCall) DoAndReturn(f func(api.ProjectsPost) error) *MockInstanceServerCreateProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePool mocks base method. @@ -1214,9 +2966,33 @@ func (m *MockInstanceServer) CreateStoragePool(arg0 api.StoragePoolsPost) error } // CreateStoragePool indicates an expected call of CreateStoragePool. -func (mr *MockInstanceServerMockRecorder) CreateStoragePool(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePool(arg0 any) *MockInstanceServerCreateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePool), arg0) + return &MockInstanceServerCreateStoragePoolCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolCall) Return(arg0 error) *MockInstanceServerCreateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolCall) Do(f func(api.StoragePoolsPost) error) *MockInstanceServerCreateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolCall) DoAndReturn(f func(api.StoragePoolsPost) error) *MockInstanceServerCreateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolBucket mocks base method. @@ -1229,9 +3005,33 @@ func (m *MockInstanceServer) CreateStoragePoolBucket(arg0 string, arg1 api.Stora } // CreateStoragePoolBucket indicates an expected call of CreateStoragePoolBucket. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolBucket(arg0, arg1 any) *MockInstanceServerCreateStoragePoolBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolBucket), arg0, arg1) + return &MockInstanceServerCreateStoragePoolBucketCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolBucketCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolBucketCall) Return(arg0 *api.StorageBucketKey, arg1 error) *MockInstanceServerCreateStoragePoolBucketCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolBucketCall) Do(f func(string, api.StorageBucketsPost) (*api.StorageBucketKey, error)) *MockInstanceServerCreateStoragePoolBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolBucketCall) DoAndReturn(f func(string, api.StorageBucketsPost) (*api.StorageBucketKey, error)) *MockInstanceServerCreateStoragePoolBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolBucketKey mocks base method. @@ -1244,9 +3044,33 @@ func (m *MockInstanceServer) CreateStoragePoolBucketKey(arg0, arg1 string, arg2 } // CreateStoragePoolBucketKey indicates an expected call of CreateStoragePoolBucketKey. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolBucketKey(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolBucketKey(arg0, arg1, arg2 any) *MockInstanceServerCreateStoragePoolBucketKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolBucketKey), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolBucketKey), arg0, arg1, arg2) + return &MockInstanceServerCreateStoragePoolBucketKeyCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolBucketKeyCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolBucketKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolBucketKeyCall) Return(arg0 *api.StorageBucketKey, arg1 error) *MockInstanceServerCreateStoragePoolBucketKeyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolBucketKeyCall) Do(f func(string, string, api.StorageBucketKeysPost) (*api.StorageBucketKey, error)) *MockInstanceServerCreateStoragePoolBucketKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolBucketKeyCall) DoAndReturn(f func(string, string, api.StorageBucketKeysPost) (*api.StorageBucketKey, error)) *MockInstanceServerCreateStoragePoolBucketKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolVolume mocks base method. @@ -1258,9 +3082,33 @@ func (m *MockInstanceServer) CreateStoragePoolVolume(arg0 string, arg1 api.Stora } // CreateStoragePoolVolume indicates an expected call of CreateStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolume(arg0, arg1 any) *MockInstanceServerCreateStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolume), arg0, arg1) + return &MockInstanceServerCreateStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolVolumeCall) Return(arg0 error) *MockInstanceServerCreateStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolVolumeCall) Do(f func(string, api.StorageVolumesPost) error) *MockInstanceServerCreateStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolVolumeCall) DoAndReturn(f func(string, api.StorageVolumesPost) error) *MockInstanceServerCreateStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolVolumeBackup mocks base method. @@ -1273,9 +3121,33 @@ func (m *MockInstanceServer) CreateStoragePoolVolumeBackup(arg0, arg1 string, ar } // CreateStoragePoolVolumeBackup indicates an expected call of CreateStoragePoolVolumeBackup. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeBackup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeBackup(arg0, arg1, arg2 any) *MockInstanceServerCreateStoragePoolVolumeBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeBackup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeBackup), arg0, arg1, arg2) + return &MockInstanceServerCreateStoragePoolVolumeBackupCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolVolumeBackupCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolVolumeBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolVolumeBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateStoragePoolVolumeBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolVolumeBackupCall) Do(f func(string, string, api.StoragePoolVolumeBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolVolumeBackupCall) DoAndReturn(f func(string, string, api.StoragePoolVolumeBackupsPost) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolVolumeFromBackup mocks base method. @@ -1288,9 +3160,33 @@ func (m *MockInstanceServer) CreateStoragePoolVolumeFromBackup(arg0 string, arg1 } // CreateStoragePoolVolumeFromBackup indicates an expected call of CreateStoragePoolVolumeFromBackup. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeFromBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeFromBackup(arg0, arg1 any) *MockInstanceServerCreateStoragePoolVolumeFromBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeFromBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeFromBackup", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeFromBackup), arg0, arg1) + return &MockInstanceServerCreateStoragePoolVolumeFromBackupCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolVolumeFromBackupCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolVolumeFromBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolVolumeFromBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateStoragePoolVolumeFromBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolVolumeFromBackupCall) Do(f func(string, lxd.StoragePoolVolumeBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeFromBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolVolumeFromBackupCall) DoAndReturn(f func(string, lxd.StoragePoolVolumeBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeFromBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolVolumeFromISO mocks base method. @@ -1303,9 +3199,33 @@ func (m *MockInstanceServer) CreateStoragePoolVolumeFromISO(arg0 string, arg1 lx } // CreateStoragePoolVolumeFromISO indicates an expected call of CreateStoragePoolVolumeFromISO. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeFromISO(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeFromISO(arg0, arg1 any) *MockInstanceServerCreateStoragePoolVolumeFromISOCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeFromISO", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeFromISO), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeFromISO", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeFromISO), arg0, arg1) + return &MockInstanceServerCreateStoragePoolVolumeFromISOCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolVolumeFromISOCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolVolumeFromISOCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolVolumeFromISOCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateStoragePoolVolumeFromISOCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolVolumeFromISOCall) Do(f func(string, lxd.StoragePoolVolumeBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeFromISOCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolVolumeFromISOCall) DoAndReturn(f func(string, lxd.StoragePoolVolumeBackupArgs) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeFromISOCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateStoragePoolVolumeSnapshot mocks base method. @@ -1318,9 +3238,33 @@ func (m *MockInstanceServer) CreateStoragePoolVolumeSnapshot(arg0, arg1, arg2 st } // CreateStoragePoolVolumeSnapshot indicates an expected call of CreateStoragePoolVolumeSnapshot. -func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) CreateStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerCreateStoragePoolVolumeSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).CreateStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerCreateStoragePoolVolumeSnapshotCall{Call: call} +} + +// MockInstanceServerCreateStoragePoolVolumeSnapshotCall wrap *gomock.Call +type MockInstanceServerCreateStoragePoolVolumeSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerCreateStoragePoolVolumeSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerCreateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerCreateStoragePoolVolumeSnapshotCall) Do(f func(string, string, string, api.StorageVolumeSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerCreateStoragePoolVolumeSnapshotCall) DoAndReturn(f func(string, string, string, api.StorageVolumeSnapshotsPost) (lxd.Operation, error)) *MockInstanceServerCreateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCertificate mocks base method. @@ -1332,9 +3276,33 @@ func (m *MockInstanceServer) DeleteCertificate(arg0 string) error { } // DeleteCertificate indicates an expected call of DeleteCertificate. -func (mr *MockInstanceServerMockRecorder) DeleteCertificate(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteCertificate(arg0 any) *MockInstanceServerDeleteCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockInstanceServer)(nil).DeleteCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockInstanceServer)(nil).DeleteCertificate), arg0) + return &MockInstanceServerDeleteCertificateCall{Call: call} +} + +// MockInstanceServerDeleteCertificateCall wrap *gomock.Call +type MockInstanceServerDeleteCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteCertificateCall) Return(arg0 error) *MockInstanceServerDeleteCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteCertificateCall) Do(f func(string) error) *MockInstanceServerDeleteCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteCertificateCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteClusterGroup mocks base method. @@ -1346,9 +3314,33 @@ func (m *MockInstanceServer) DeleteClusterGroup(arg0 string) error { } // DeleteClusterGroup indicates an expected call of DeleteClusterGroup. -func (mr *MockInstanceServerMockRecorder) DeleteClusterGroup(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteClusterGroup(arg0 any) *MockInstanceServerDeleteClusterGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteClusterGroup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteClusterGroup), arg0) + return &MockInstanceServerDeleteClusterGroupCall{Call: call} +} + +// MockInstanceServerDeleteClusterGroupCall wrap *gomock.Call +type MockInstanceServerDeleteClusterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteClusterGroupCall) Return(arg0 error) *MockInstanceServerDeleteClusterGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteClusterGroupCall) Do(f func(string) error) *MockInstanceServerDeleteClusterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteClusterGroupCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteClusterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteClusterMember mocks base method. @@ -1360,9 +3352,33 @@ func (m *MockInstanceServer) DeleteClusterMember(arg0 string, arg1 bool) error { } // DeleteClusterMember indicates an expected call of DeleteClusterMember. -func (mr *MockInstanceServerMockRecorder) DeleteClusterMember(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteClusterMember(arg0, arg1 any) *MockInstanceServerDeleteClusterMemberCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).DeleteClusterMember), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).DeleteClusterMember), arg0, arg1) + return &MockInstanceServerDeleteClusterMemberCall{Call: call} +} + +// MockInstanceServerDeleteClusterMemberCall wrap *gomock.Call +type MockInstanceServerDeleteClusterMemberCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteClusterMemberCall) Return(arg0 error) *MockInstanceServerDeleteClusterMemberCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteClusterMemberCall) Do(f func(string, bool) error) *MockInstanceServerDeleteClusterMemberCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteClusterMemberCall) DoAndReturn(f func(string, bool) error) *MockInstanceServerDeleteClusterMemberCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainer mocks base method. @@ -1375,9 +3391,33 @@ func (m *MockInstanceServer) DeleteContainer(arg0 string) (lxd.Operation, error) } // DeleteContainer indicates an expected call of DeleteContainer. -func (mr *MockInstanceServerMockRecorder) DeleteContainer(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainer(arg0 any) *MockInstanceServerDeleteContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainer), arg0) + return &MockInstanceServerDeleteContainerCall{Call: call} +} + +// MockInstanceServerDeleteContainerCall wrap *gomock.Call +type MockInstanceServerDeleteContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerCall) Do(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerCall) DoAndReturn(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerBackup mocks base method. @@ -1390,9 +3430,33 @@ func (m *MockInstanceServer) DeleteContainerBackup(arg0, arg1 string) (lxd.Opera } // DeleteContainerBackup indicates an expected call of DeleteContainerBackup. -func (mr *MockInstanceServerMockRecorder) DeleteContainerBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerBackup(arg0, arg1 any) *MockInstanceServerDeleteContainerBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerBackup), arg0, arg1) + return &MockInstanceServerDeleteContainerBackupCall{Call: call} +} + +// MockInstanceServerDeleteContainerBackupCall wrap *gomock.Call +type MockInstanceServerDeleteContainerBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteContainerBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerBackupCall) Do(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerBackupCall) DoAndReturn(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerConsoleLog mocks base method. @@ -1404,9 +3468,33 @@ func (m *MockInstanceServer) DeleteContainerConsoleLog(arg0 string, arg1 *lxd.Co } // DeleteContainerConsoleLog indicates an expected call of DeleteContainerConsoleLog. -func (mr *MockInstanceServerMockRecorder) DeleteContainerConsoleLog(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerConsoleLog(arg0, arg1 any) *MockInstanceServerDeleteContainerConsoleLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerConsoleLog), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerConsoleLog), arg0, arg1) + return &MockInstanceServerDeleteContainerConsoleLogCall{Call: call} +} + +// MockInstanceServerDeleteContainerConsoleLogCall wrap *gomock.Call +type MockInstanceServerDeleteContainerConsoleLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerConsoleLogCall) Return(arg0 error) *MockInstanceServerDeleteContainerConsoleLogCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerConsoleLogCall) Do(f func(string, *lxd.ContainerConsoleLogArgs) error) *MockInstanceServerDeleteContainerConsoleLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerConsoleLogCall) DoAndReturn(f func(string, *lxd.ContainerConsoleLogArgs) error) *MockInstanceServerDeleteContainerConsoleLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerFile mocks base method. @@ -1418,9 +3506,33 @@ func (m *MockInstanceServer) DeleteContainerFile(arg0, arg1 string) error { } // DeleteContainerFile indicates an expected call of DeleteContainerFile. -func (mr *MockInstanceServerMockRecorder) DeleteContainerFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerFile(arg0, arg1 any) *MockInstanceServerDeleteContainerFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerFile), arg0, arg1) + return &MockInstanceServerDeleteContainerFileCall{Call: call} +} + +// MockInstanceServerDeleteContainerFileCall wrap *gomock.Call +type MockInstanceServerDeleteContainerFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerFileCall) Return(arg0 error) *MockInstanceServerDeleteContainerFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerFileCall) Do(f func(string, string) error) *MockInstanceServerDeleteContainerFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerFileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteContainerFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerLogfile mocks base method. @@ -1432,9 +3544,33 @@ func (m *MockInstanceServer) DeleteContainerLogfile(arg0, arg1 string) error { } // DeleteContainerLogfile indicates an expected call of DeleteContainerLogfile. -func (mr *MockInstanceServerMockRecorder) DeleteContainerLogfile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerLogfile(arg0, arg1 any) *MockInstanceServerDeleteContainerLogfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerLogfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerLogfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerLogfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerLogfile), arg0, arg1) + return &MockInstanceServerDeleteContainerLogfileCall{Call: call} +} + +// MockInstanceServerDeleteContainerLogfileCall wrap *gomock.Call +type MockInstanceServerDeleteContainerLogfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerLogfileCall) Return(arg0 error) *MockInstanceServerDeleteContainerLogfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerLogfileCall) Do(f func(string, string) error) *MockInstanceServerDeleteContainerLogfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerLogfileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteContainerLogfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerSnapshot mocks base method. @@ -1447,9 +3583,33 @@ func (m *MockInstanceServer) DeleteContainerSnapshot(arg0, arg1 string) (lxd.Ope } // DeleteContainerSnapshot indicates an expected call of DeleteContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) DeleteContainerSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerSnapshot(arg0, arg1 any) *MockInstanceServerDeleteContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerSnapshot), arg0, arg1) + return &MockInstanceServerDeleteContainerSnapshotCall{Call: call} +} + +// MockInstanceServerDeleteContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerDeleteContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerSnapshotCall) Do(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerSnapshotCall) DoAndReturn(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteContainerTemplateFile mocks base method. @@ -1461,9 +3621,33 @@ func (m *MockInstanceServer) DeleteContainerTemplateFile(arg0, arg1 string) erro } // DeleteContainerTemplateFile indicates an expected call of DeleteContainerTemplateFile. -func (mr *MockInstanceServerMockRecorder) DeleteContainerTemplateFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteContainerTemplateFile(arg0, arg1 any) *MockInstanceServerDeleteContainerTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerTemplateFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteContainerTemplateFile), arg0, arg1) + return &MockInstanceServerDeleteContainerTemplateFileCall{Call: call} +} + +// MockInstanceServerDeleteContainerTemplateFileCall wrap *gomock.Call +type MockInstanceServerDeleteContainerTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteContainerTemplateFileCall) Return(arg0 error) *MockInstanceServerDeleteContainerTemplateFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteContainerTemplateFileCall) Do(f func(string, string) error) *MockInstanceServerDeleteContainerTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteContainerTemplateFileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteContainerTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteImage mocks base method. @@ -1476,9 +3660,33 @@ func (m *MockInstanceServer) DeleteImage(arg0 string) (lxd.Operation, error) { } // DeleteImage indicates an expected call of DeleteImage. -func (mr *MockInstanceServerMockRecorder) DeleteImage(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteImage(arg0 any) *MockInstanceServerDeleteImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteImage", reflect.TypeOf((*MockInstanceServer)(nil).DeleteImage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteImage", reflect.TypeOf((*MockInstanceServer)(nil).DeleteImage), arg0) + return &MockInstanceServerDeleteImageCall{Call: call} +} + +// MockInstanceServerDeleteImageCall wrap *gomock.Call +type MockInstanceServerDeleteImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteImageCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteImageCall) Do(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteImageCall) DoAndReturn(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteImageAlias mocks base method. @@ -1490,9 +3698,33 @@ func (m *MockInstanceServer) DeleteImageAlias(arg0 string) error { } // DeleteImageAlias indicates an expected call of DeleteImageAlias. -func (mr *MockInstanceServerMockRecorder) DeleteImageAlias(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteImageAlias(arg0 any) *MockInstanceServerDeleteImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).DeleteImageAlias), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).DeleteImageAlias), arg0) + return &MockInstanceServerDeleteImageAliasCall{Call: call} +} + +// MockInstanceServerDeleteImageAliasCall wrap *gomock.Call +type MockInstanceServerDeleteImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteImageAliasCall) Return(arg0 error) *MockInstanceServerDeleteImageAliasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteImageAliasCall) Do(f func(string) error) *MockInstanceServerDeleteImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteImageAliasCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstance mocks base method. @@ -1505,9 +3737,33 @@ func (m *MockInstanceServer) DeleteInstance(arg0 string) (lxd.Operation, error) } // DeleteInstance indicates an expected call of DeleteInstance. -func (mr *MockInstanceServerMockRecorder) DeleteInstance(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstance(arg0 any) *MockInstanceServerDeleteInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstance", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstance", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstance), arg0) + return &MockInstanceServerDeleteInstanceCall{Call: call} +} + +// MockInstanceServerDeleteInstanceCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceCall) Do(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceCall) DoAndReturn(f func(string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceBackup mocks base method. @@ -1520,9 +3776,33 @@ func (m *MockInstanceServer) DeleteInstanceBackup(arg0, arg1 string) (lxd.Operat } // DeleteInstanceBackup indicates an expected call of DeleteInstanceBackup. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceBackup(arg0, arg1 any) *MockInstanceServerDeleteInstanceBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceBackup), arg0, arg1) + return &MockInstanceServerDeleteInstanceBackupCall{Call: call} +} + +// MockInstanceServerDeleteInstanceBackupCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteInstanceBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceBackupCall) Do(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceBackupCall) DoAndReturn(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceConsoleLog mocks base method. @@ -1534,9 +3814,33 @@ func (m *MockInstanceServer) DeleteInstanceConsoleLog(arg0 string, arg1 *lxd.Ins } // DeleteInstanceConsoleLog indicates an expected call of DeleteInstanceConsoleLog. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceConsoleLog(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceConsoleLog(arg0, arg1 any) *MockInstanceServerDeleteInstanceConsoleLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceConsoleLog), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceConsoleLog), arg0, arg1) + return &MockInstanceServerDeleteInstanceConsoleLogCall{Call: call} +} + +// MockInstanceServerDeleteInstanceConsoleLogCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceConsoleLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceConsoleLogCall) Return(arg0 error) *MockInstanceServerDeleteInstanceConsoleLogCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceConsoleLogCall) Do(f func(string, *lxd.InstanceConsoleLogArgs) error) *MockInstanceServerDeleteInstanceConsoleLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceConsoleLogCall) DoAndReturn(f func(string, *lxd.InstanceConsoleLogArgs) error) *MockInstanceServerDeleteInstanceConsoleLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceFile mocks base method. @@ -1548,9 +3852,33 @@ func (m *MockInstanceServer) DeleteInstanceFile(arg0, arg1 string) error { } // DeleteInstanceFile indicates an expected call of DeleteInstanceFile. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceFile(arg0, arg1 any) *MockInstanceServerDeleteInstanceFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceFile), arg0, arg1) + return &MockInstanceServerDeleteInstanceFileCall{Call: call} +} + +// MockInstanceServerDeleteInstanceFileCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceFileCall) Return(arg0 error) *MockInstanceServerDeleteInstanceFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceFileCall) Do(f func(string, string) error) *MockInstanceServerDeleteInstanceFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceFileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteInstanceFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceLogfile mocks base method. @@ -1562,9 +3890,33 @@ func (m *MockInstanceServer) DeleteInstanceLogfile(arg0, arg1 string) error { } // DeleteInstanceLogfile indicates an expected call of DeleteInstanceLogfile. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceLogfile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceLogfile(arg0, arg1 any) *MockInstanceServerDeleteInstanceLogfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceLogfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceLogfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceLogfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceLogfile), arg0, arg1) + return &MockInstanceServerDeleteInstanceLogfileCall{Call: call} +} + +// MockInstanceServerDeleteInstanceLogfileCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceLogfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceLogfileCall) Return(arg0 error) *MockInstanceServerDeleteInstanceLogfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceLogfileCall) Do(f func(string, string) error) *MockInstanceServerDeleteInstanceLogfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceLogfileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteInstanceLogfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceSnapshot mocks base method. @@ -1577,9 +3929,33 @@ func (m *MockInstanceServer) DeleteInstanceSnapshot(arg0, arg1 string) (lxd.Oper } // DeleteInstanceSnapshot indicates an expected call of DeleteInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceSnapshot(arg0, arg1 any) *MockInstanceServerDeleteInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceSnapshot), arg0, arg1) + return &MockInstanceServerDeleteInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerDeleteInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceSnapshotCall) Do(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceSnapshotCall) DoAndReturn(f func(string, string) (lxd.Operation, error)) *MockInstanceServerDeleteInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInstanceTemplateFile mocks base method. @@ -1591,9 +3967,33 @@ func (m *MockInstanceServer) DeleteInstanceTemplateFile(arg0, arg1 string) error } // DeleteInstanceTemplateFile indicates an expected call of DeleteInstanceTemplateFile. -func (mr *MockInstanceServerMockRecorder) DeleteInstanceTemplateFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteInstanceTemplateFile(arg0, arg1 any) *MockInstanceServerDeleteInstanceTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceTemplateFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteInstanceTemplateFile), arg0, arg1) + return &MockInstanceServerDeleteInstanceTemplateFileCall{Call: call} +} + +// MockInstanceServerDeleteInstanceTemplateFileCall wrap *gomock.Call +type MockInstanceServerDeleteInstanceTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteInstanceTemplateFileCall) Return(arg0 error) *MockInstanceServerDeleteInstanceTemplateFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteInstanceTemplateFileCall) Do(f func(string, string) error) *MockInstanceServerDeleteInstanceTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteInstanceTemplateFileCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteInstanceTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetwork mocks base method. @@ -1605,9 +4005,33 @@ func (m *MockInstanceServer) DeleteNetwork(arg0 string) error { } // DeleteNetwork indicates an expected call of DeleteNetwork. -func (mr *MockInstanceServerMockRecorder) DeleteNetwork(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetwork(arg0 any) *MockInstanceServerDeleteNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetwork", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetwork), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetwork", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetwork), arg0) + return &MockInstanceServerDeleteNetworkCall{Call: call} +} + +// MockInstanceServerDeleteNetworkCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkCall) Return(arg0 error) *MockInstanceServerDeleteNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkCall) Do(f func(string) error) *MockInstanceServerDeleteNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkACL mocks base method. @@ -1619,9 +4043,33 @@ func (m *MockInstanceServer) DeleteNetworkACL(arg0 string) error { } // DeleteNetworkACL indicates an expected call of DeleteNetworkACL. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkACL(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkACL(arg0 any) *MockInstanceServerDeleteNetworkACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkACL), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkACL), arg0) + return &MockInstanceServerDeleteNetworkACLCall{Call: call} +} + +// MockInstanceServerDeleteNetworkACLCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkACLCall) Return(arg0 error) *MockInstanceServerDeleteNetworkACLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkACLCall) Do(f func(string) error) *MockInstanceServerDeleteNetworkACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkACLCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteNetworkACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkForward mocks base method. @@ -1633,9 +4081,33 @@ func (m *MockInstanceServer) DeleteNetworkForward(arg0, arg1 string) error { } // DeleteNetworkForward indicates an expected call of DeleteNetworkForward. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkForward(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkForward(arg0, arg1 any) *MockInstanceServerDeleteNetworkForwardCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkForward), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkForward), arg0, arg1) + return &MockInstanceServerDeleteNetworkForwardCall{Call: call} +} + +// MockInstanceServerDeleteNetworkForwardCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkForwardCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkForwardCall) Return(arg0 error) *MockInstanceServerDeleteNetworkForwardCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkForwardCall) Do(f func(string, string) error) *MockInstanceServerDeleteNetworkForwardCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkForwardCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteNetworkForwardCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkLoadBalancer mocks base method. @@ -1647,9 +4119,33 @@ func (m *MockInstanceServer) DeleteNetworkLoadBalancer(arg0, arg1 string) error } // DeleteNetworkLoadBalancer indicates an expected call of DeleteNetworkLoadBalancer. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkLoadBalancer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkLoadBalancer(arg0, arg1 any) *MockInstanceServerDeleteNetworkLoadBalancerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkLoadBalancer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkLoadBalancer), arg0, arg1) + return &MockInstanceServerDeleteNetworkLoadBalancerCall{Call: call} +} + +// MockInstanceServerDeleteNetworkLoadBalancerCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkLoadBalancerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkLoadBalancerCall) Return(arg0 error) *MockInstanceServerDeleteNetworkLoadBalancerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkLoadBalancerCall) Do(f func(string, string) error) *MockInstanceServerDeleteNetworkLoadBalancerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkLoadBalancerCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteNetworkLoadBalancerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkPeer mocks base method. @@ -1661,9 +4157,33 @@ func (m *MockInstanceServer) DeleteNetworkPeer(arg0, arg1 string) error { } // DeleteNetworkPeer indicates an expected call of DeleteNetworkPeer. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkPeer(arg0, arg1 any) *MockInstanceServerDeleteNetworkPeerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkPeer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkPeer), arg0, arg1) + return &MockInstanceServerDeleteNetworkPeerCall{Call: call} +} + +// MockInstanceServerDeleteNetworkPeerCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkPeerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkPeerCall) Return(arg0 error) *MockInstanceServerDeleteNetworkPeerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkPeerCall) Do(f func(string, string) error) *MockInstanceServerDeleteNetworkPeerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkPeerCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteNetworkPeerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkZone mocks base method. @@ -1675,9 +4195,33 @@ func (m *MockInstanceServer) DeleteNetworkZone(arg0 string) error { } // DeleteNetworkZone indicates an expected call of DeleteNetworkZone. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkZone(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkZone(arg0 any) *MockInstanceServerDeleteNetworkZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkZone), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkZone), arg0) + return &MockInstanceServerDeleteNetworkZoneCall{Call: call} +} + +// MockInstanceServerDeleteNetworkZoneCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkZoneCall) Return(arg0 error) *MockInstanceServerDeleteNetworkZoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkZoneCall) Do(f func(string) error) *MockInstanceServerDeleteNetworkZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkZoneCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteNetworkZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteNetworkZoneRecord mocks base method. @@ -1689,9 +4233,33 @@ func (m *MockInstanceServer) DeleteNetworkZoneRecord(arg0, arg1 string) error { } // DeleteNetworkZoneRecord indicates an expected call of DeleteNetworkZoneRecord. -func (mr *MockInstanceServerMockRecorder) DeleteNetworkZoneRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteNetworkZoneRecord(arg0, arg1 any) *MockInstanceServerDeleteNetworkZoneRecordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkZoneRecord), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).DeleteNetworkZoneRecord), arg0, arg1) + return &MockInstanceServerDeleteNetworkZoneRecordCall{Call: call} +} + +// MockInstanceServerDeleteNetworkZoneRecordCall wrap *gomock.Call +type MockInstanceServerDeleteNetworkZoneRecordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteNetworkZoneRecordCall) Return(arg0 error) *MockInstanceServerDeleteNetworkZoneRecordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteNetworkZoneRecordCall) Do(f func(string, string) error) *MockInstanceServerDeleteNetworkZoneRecordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteNetworkZoneRecordCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteNetworkZoneRecordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteOperation mocks base method. @@ -1703,9 +4271,33 @@ func (m *MockInstanceServer) DeleteOperation(arg0 string) error { } // DeleteOperation indicates an expected call of DeleteOperation. -func (mr *MockInstanceServerMockRecorder) DeleteOperation(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteOperation(arg0 any) *MockInstanceServerDeleteOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockInstanceServer)(nil).DeleteOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockInstanceServer)(nil).DeleteOperation), arg0) + return &MockInstanceServerDeleteOperationCall{Call: call} +} + +// MockInstanceServerDeleteOperationCall wrap *gomock.Call +type MockInstanceServerDeleteOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteOperationCall) Return(arg0 error) *MockInstanceServerDeleteOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteOperationCall) Do(f func(string) error) *MockInstanceServerDeleteOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteOperationCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteProfile mocks base method. @@ -1717,9 +4309,33 @@ func (m *MockInstanceServer) DeleteProfile(arg0 string) error { } // DeleteProfile indicates an expected call of DeleteProfile. -func (mr *MockInstanceServerMockRecorder) DeleteProfile(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteProfile(arg0 any) *MockInstanceServerDeleteProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockInstanceServer)(nil).DeleteProfile), arg0) + return &MockInstanceServerDeleteProfileCall{Call: call} +} + +// MockInstanceServerDeleteProfileCall wrap *gomock.Call +type MockInstanceServerDeleteProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteProfileCall) Return(arg0 error) *MockInstanceServerDeleteProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteProfileCall) Do(f func(string) error) *MockInstanceServerDeleteProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteProfileCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteProject mocks base method. @@ -1731,9 +4347,33 @@ func (m *MockInstanceServer) DeleteProject(arg0 string) error { } // DeleteProject indicates an expected call of DeleteProject. -func (mr *MockInstanceServerMockRecorder) DeleteProject(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteProject(arg0 any) *MockInstanceServerDeleteProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProject", reflect.TypeOf((*MockInstanceServer)(nil).DeleteProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProject", reflect.TypeOf((*MockInstanceServer)(nil).DeleteProject), arg0) + return &MockInstanceServerDeleteProjectCall{Call: call} +} + +// MockInstanceServerDeleteProjectCall wrap *gomock.Call +type MockInstanceServerDeleteProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteProjectCall) Return(arg0 error) *MockInstanceServerDeleteProjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteProjectCall) Do(f func(string) error) *MockInstanceServerDeleteProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteProjectCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePool mocks base method. @@ -1745,9 +4385,33 @@ func (m *MockInstanceServer) DeleteStoragePool(arg0 string) error { } // DeleteStoragePool indicates an expected call of DeleteStoragePool. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePool(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePool(arg0 any) *MockInstanceServerDeleteStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePool), arg0) + return &MockInstanceServerDeleteStoragePoolCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolCall) Return(arg0 error) *MockInstanceServerDeleteStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolCall) Do(f func(string) error) *MockInstanceServerDeleteStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolBucket mocks base method. @@ -1759,9 +4423,33 @@ func (m *MockInstanceServer) DeleteStoragePoolBucket(arg0, arg1 string) error { } // DeleteStoragePoolBucket indicates an expected call of DeleteStoragePoolBucket. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolBucket(arg0, arg1 any) *MockInstanceServerDeleteStoragePoolBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolBucket), arg0, arg1) + return &MockInstanceServerDeleteStoragePoolBucketCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolBucketCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolBucketCall) Return(arg0 error) *MockInstanceServerDeleteStoragePoolBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolBucketCall) Do(f func(string, string) error) *MockInstanceServerDeleteStoragePoolBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolBucketCall) DoAndReturn(f func(string, string) error) *MockInstanceServerDeleteStoragePoolBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolBucketKey mocks base method. @@ -1773,9 +4461,33 @@ func (m *MockInstanceServer) DeleteStoragePoolBucketKey(arg0, arg1, arg2 string) } // DeleteStoragePoolBucketKey indicates an expected call of DeleteStoragePoolBucketKey. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolBucketKey(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolBucketKey(arg0, arg1, arg2 any) *MockInstanceServerDeleteStoragePoolBucketKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolBucketKey), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolBucketKey), arg0, arg1, arg2) + return &MockInstanceServerDeleteStoragePoolBucketKeyCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolBucketKeyCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolBucketKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolBucketKeyCall) Return(arg0 error) *MockInstanceServerDeleteStoragePoolBucketKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolBucketKeyCall) Do(f func(string, string, string) error) *MockInstanceServerDeleteStoragePoolBucketKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolBucketKeyCall) DoAndReturn(f func(string, string, string) error) *MockInstanceServerDeleteStoragePoolBucketKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolVolume mocks base method. @@ -1787,9 +4499,33 @@ func (m *MockInstanceServer) DeleteStoragePoolVolume(arg0, arg1, arg2 string) er } // DeleteStoragePoolVolume indicates an expected call of DeleteStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *MockInstanceServerDeleteStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + return &MockInstanceServerDeleteStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolVolumeCall) Return(arg0 error) *MockInstanceServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolVolumeCall) Do(f func(string, string, string) error) *MockInstanceServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) error) *MockInstanceServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolVolumeBackup mocks base method. @@ -1802,9 +4538,33 @@ func (m *MockInstanceServer) DeleteStoragePoolVolumeBackup(arg0, arg1, arg2 stri } // DeleteStoragePoolVolumeBackup indicates an expected call of DeleteStoragePoolVolumeBackup. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolumeBackup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolumeBackup(arg0, arg1, arg2 any) *MockInstanceServerDeleteStoragePoolVolumeBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolumeBackup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolumeBackup), arg0, arg1, arg2) + return &MockInstanceServerDeleteStoragePoolVolumeBackupCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolVolumeBackupCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolVolumeBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolVolumeBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteStoragePoolVolumeBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolVolumeBackupCall) Do(f func(string, string, string) (lxd.Operation, error)) *MockInstanceServerDeleteStoragePoolVolumeBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolVolumeBackupCall) DoAndReturn(f func(string, string, string) (lxd.Operation, error)) *MockInstanceServerDeleteStoragePoolVolumeBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolVolumeSnapshot mocks base method. @@ -1817,9 +4577,33 @@ func (m *MockInstanceServer) DeleteStoragePoolVolumeSnapshot(arg0, arg1, arg2, a } // DeleteStoragePoolVolumeSnapshot indicates an expected call of DeleteStoragePoolVolumeSnapshot. -func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).DeleteStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerDeleteStoragePoolVolumeSnapshotCall{Call: call} +} + +// MockInstanceServerDeleteStoragePoolVolumeSnapshotCall wrap *gomock.Call +type MockInstanceServerDeleteStoragePoolVolumeSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall) Do(f func(string, string, string, string) (lxd.Operation, error)) *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall) DoAndReturn(f func(string, string, string, string) (lxd.Operation, error)) *MockInstanceServerDeleteStoragePoolVolumeSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteWarning mocks base method. @@ -1831,9 +4615,33 @@ func (m *MockInstanceServer) DeleteWarning(arg0 string) error { } // DeleteWarning indicates an expected call of DeleteWarning. -func (mr *MockInstanceServerMockRecorder) DeleteWarning(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DeleteWarning(arg0 any) *MockInstanceServerDeleteWarningCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWarning", reflect.TypeOf((*MockInstanceServer)(nil).DeleteWarning), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWarning", reflect.TypeOf((*MockInstanceServer)(nil).DeleteWarning), arg0) + return &MockInstanceServerDeleteWarningCall{Call: call} +} + +// MockInstanceServerDeleteWarningCall wrap *gomock.Call +type MockInstanceServerDeleteWarningCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDeleteWarningCall) Return(arg0 error) *MockInstanceServerDeleteWarningCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDeleteWarningCall) Do(f func(string) error) *MockInstanceServerDeleteWarningCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDeleteWarningCall) DoAndReturn(f func(string) error) *MockInstanceServerDeleteWarningCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Disconnect mocks base method. @@ -1843,9 +4651,33 @@ func (m *MockInstanceServer) Disconnect() { } // Disconnect indicates an expected call of Disconnect. -func (mr *MockInstanceServerMockRecorder) Disconnect() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) Disconnect() *MockInstanceServerDisconnectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockInstanceServer)(nil).Disconnect)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockInstanceServer)(nil).Disconnect)) + return &MockInstanceServerDisconnectCall{Call: call} +} + +// MockInstanceServerDisconnectCall wrap *gomock.Call +type MockInstanceServerDisconnectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDisconnectCall) Return() *MockInstanceServerDisconnectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDisconnectCall) Do(f func()) *MockInstanceServerDisconnectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDisconnectCall) DoAndReturn(f func()) *MockInstanceServerDisconnectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DoHTTP mocks base method. @@ -1858,9 +4690,33 @@ func (m *MockInstanceServer) DoHTTP(arg0 *http.Request) (*http.Response, error) } // DoHTTP indicates an expected call of DoHTTP. -func (mr *MockInstanceServerMockRecorder) DoHTTP(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) DoHTTP(arg0 any) *MockInstanceServerDoHTTPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockInstanceServer)(nil).DoHTTP), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoHTTP", reflect.TypeOf((*MockInstanceServer)(nil).DoHTTP), arg0) + return &MockInstanceServerDoHTTPCall{Call: call} +} + +// MockInstanceServerDoHTTPCall wrap *gomock.Call +type MockInstanceServerDoHTTPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerDoHTTPCall) Return(arg0 *http.Response, arg1 error) *MockInstanceServerDoHTTPCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerDoHTTPCall) Do(f func(*http.Request) (*http.Response, error)) *MockInstanceServerDoHTTPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerDoHTTPCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockInstanceServerDoHTTPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExecContainer mocks base method. @@ -1873,9 +4729,33 @@ func (m *MockInstanceServer) ExecContainer(arg0 string, arg1 api.ContainerExecPo } // ExecContainer indicates an expected call of ExecContainer. -func (mr *MockInstanceServerMockRecorder) ExecContainer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ExecContainer(arg0, arg1, arg2 any) *MockInstanceServerExecContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecContainer", reflect.TypeOf((*MockInstanceServer)(nil).ExecContainer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecContainer", reflect.TypeOf((*MockInstanceServer)(nil).ExecContainer), arg0, arg1, arg2) + return &MockInstanceServerExecContainerCall{Call: call} +} + +// MockInstanceServerExecContainerCall wrap *gomock.Call +type MockInstanceServerExecContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerExecContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerExecContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerExecContainerCall) Do(f func(string, api.ContainerExecPost, *lxd.ContainerExecArgs) (lxd.Operation, error)) *MockInstanceServerExecContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerExecContainerCall) DoAndReturn(f func(string, api.ContainerExecPost, *lxd.ContainerExecArgs) (lxd.Operation, error)) *MockInstanceServerExecContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExecInstance mocks base method. @@ -1888,9 +4768,33 @@ func (m *MockInstanceServer) ExecInstance(arg0 string, arg1 api.InstanceExecPost } // ExecInstance indicates an expected call of ExecInstance. -func (mr *MockInstanceServerMockRecorder) ExecInstance(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ExecInstance(arg0, arg1, arg2 any) *MockInstanceServerExecInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecInstance", reflect.TypeOf((*MockInstanceServer)(nil).ExecInstance), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecInstance", reflect.TypeOf((*MockInstanceServer)(nil).ExecInstance), arg0, arg1, arg2) + return &MockInstanceServerExecInstanceCall{Call: call} +} + +// MockInstanceServerExecInstanceCall wrap *gomock.Call +type MockInstanceServerExecInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerExecInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerExecInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerExecInstanceCall) Do(f func(string, api.InstanceExecPost, *lxd.InstanceExecArgs) (lxd.Operation, error)) *MockInstanceServerExecInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerExecInstanceCall) DoAndReturn(f func(string, api.InstanceExecPost, *lxd.InstanceExecArgs) (lxd.Operation, error)) *MockInstanceServerExecInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExportImage mocks base method. @@ -1903,9 +4807,33 @@ func (m *MockInstanceServer) ExportImage(arg0 string, arg1 api.ImageExportPost) } // ExportImage indicates an expected call of ExportImage. -func (mr *MockInstanceServerMockRecorder) ExportImage(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) ExportImage(arg0, arg1 any) *MockInstanceServerExportImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportImage", reflect.TypeOf((*MockInstanceServer)(nil).ExportImage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportImage", reflect.TypeOf((*MockInstanceServer)(nil).ExportImage), arg0, arg1) + return &MockInstanceServerExportImageCall{Call: call} +} + +// MockInstanceServerExportImageCall wrap *gomock.Call +type MockInstanceServerExportImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerExportImageCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerExportImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerExportImageCall) Do(f func(string, api.ImageExportPost) (lxd.Operation, error)) *MockInstanceServerExportImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerExportImageCall) DoAndReturn(f func(string, api.ImageExportPost) (lxd.Operation, error)) *MockInstanceServerExportImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCertificate mocks base method. @@ -1919,9 +4847,33 @@ func (m *MockInstanceServer) GetCertificate(arg0 string) (*api.Certificate, stri } // GetCertificate indicates an expected call of GetCertificate. -func (mr *MockInstanceServerMockRecorder) GetCertificate(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetCertificate(arg0 any) *MockInstanceServerGetCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificate), arg0) + return &MockInstanceServerGetCertificateCall{Call: call} +} + +// MockInstanceServerGetCertificateCall wrap *gomock.Call +type MockInstanceServerGetCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetCertificateCall) Return(arg0 *api.Certificate, arg1 string, arg2 error) *MockInstanceServerGetCertificateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetCertificateCall) Do(f func(string) (*api.Certificate, string, error)) *MockInstanceServerGetCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetCertificateCall) DoAndReturn(f func(string) (*api.Certificate, string, error)) *MockInstanceServerGetCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCertificateFingerprints mocks base method. @@ -1934,9 +4886,33 @@ func (m *MockInstanceServer) GetCertificateFingerprints() ([]string, error) { } // GetCertificateFingerprints indicates an expected call of GetCertificateFingerprints. -func (mr *MockInstanceServerMockRecorder) GetCertificateFingerprints() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetCertificateFingerprints() *MockInstanceServerGetCertificateFingerprintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificateFingerprints", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificateFingerprints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificateFingerprints", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificateFingerprints)) + return &MockInstanceServerGetCertificateFingerprintsCall{Call: call} +} + +// MockInstanceServerGetCertificateFingerprintsCall wrap *gomock.Call +type MockInstanceServerGetCertificateFingerprintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetCertificateFingerprintsCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetCertificateFingerprintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetCertificateFingerprintsCall) Do(f func() ([]string, error)) *MockInstanceServerGetCertificateFingerprintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetCertificateFingerprintsCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetCertificateFingerprintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCertificates mocks base method. @@ -1949,9 +4925,33 @@ func (m *MockInstanceServer) GetCertificates() ([]api.Certificate, error) { } // GetCertificates indicates an expected call of GetCertificates. -func (mr *MockInstanceServerMockRecorder) GetCertificates() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetCertificates() *MockInstanceServerGetCertificatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificates", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificates)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificates", reflect.TypeOf((*MockInstanceServer)(nil).GetCertificates)) + return &MockInstanceServerGetCertificatesCall{Call: call} +} + +// MockInstanceServerGetCertificatesCall wrap *gomock.Call +type MockInstanceServerGetCertificatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetCertificatesCall) Return(arg0 []api.Certificate, arg1 error) *MockInstanceServerGetCertificatesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetCertificatesCall) Do(f func() ([]api.Certificate, error)) *MockInstanceServerGetCertificatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetCertificatesCall) DoAndReturn(f func() ([]api.Certificate, error)) *MockInstanceServerGetCertificatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCluster mocks base method. @@ -1965,9 +4965,33 @@ func (m *MockInstanceServer) GetCluster() (*api.Cluster, string, error) { } // GetCluster indicates an expected call of GetCluster. -func (mr *MockInstanceServerMockRecorder) GetCluster() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetCluster() *MockInstanceServerGetClusterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCluster", reflect.TypeOf((*MockInstanceServer)(nil).GetCluster)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCluster", reflect.TypeOf((*MockInstanceServer)(nil).GetCluster)) + return &MockInstanceServerGetClusterCall{Call: call} +} + +// MockInstanceServerGetClusterCall wrap *gomock.Call +type MockInstanceServerGetClusterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterCall) Return(arg0 *api.Cluster, arg1 string, arg2 error) *MockInstanceServerGetClusterCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterCall) Do(f func() (*api.Cluster, string, error)) *MockInstanceServerGetClusterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterCall) DoAndReturn(f func() (*api.Cluster, string, error)) *MockInstanceServerGetClusterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterGroup mocks base method. @@ -1981,9 +5005,33 @@ func (m *MockInstanceServer) GetClusterGroup(arg0 string) (*api.ClusterGroup, st } // GetClusterGroup indicates an expected call of GetClusterGroup. -func (mr *MockInstanceServerMockRecorder) GetClusterGroup(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterGroup(arg0 any) *MockInstanceServerGetClusterGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroup), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroup), arg0) + return &MockInstanceServerGetClusterGroupCall{Call: call} +} + +// MockInstanceServerGetClusterGroupCall wrap *gomock.Call +type MockInstanceServerGetClusterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterGroupCall) Return(arg0 *api.ClusterGroup, arg1 string, arg2 error) *MockInstanceServerGetClusterGroupCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterGroupCall) Do(f func(string) (*api.ClusterGroup, string, error)) *MockInstanceServerGetClusterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterGroupCall) DoAndReturn(f func(string) (*api.ClusterGroup, string, error)) *MockInstanceServerGetClusterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterGroupNames mocks base method. @@ -1996,9 +5044,33 @@ func (m *MockInstanceServer) GetClusterGroupNames() ([]string, error) { } // GetClusterGroupNames indicates an expected call of GetClusterGroupNames. -func (mr *MockInstanceServerMockRecorder) GetClusterGroupNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterGroupNames() *MockInstanceServerGetClusterGroupNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroupNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroupNames)) + return &MockInstanceServerGetClusterGroupNamesCall{Call: call} +} + +// MockInstanceServerGetClusterGroupNamesCall wrap *gomock.Call +type MockInstanceServerGetClusterGroupNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterGroupNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetClusterGroupNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterGroupNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetClusterGroupNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterGroupNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetClusterGroupNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterGroups mocks base method. @@ -2011,9 +5083,33 @@ func (m *MockInstanceServer) GetClusterGroups() ([]api.ClusterGroup, error) { } // GetClusterGroups indicates an expected call of GetClusterGroups. -func (mr *MockInstanceServerMockRecorder) GetClusterGroups() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterGroups() *MockInstanceServerGetClusterGroupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroups", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterGroups", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterGroups)) + return &MockInstanceServerGetClusterGroupsCall{Call: call} +} + +// MockInstanceServerGetClusterGroupsCall wrap *gomock.Call +type MockInstanceServerGetClusterGroupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterGroupsCall) Return(arg0 []api.ClusterGroup, arg1 error) *MockInstanceServerGetClusterGroupsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterGroupsCall) Do(f func() ([]api.ClusterGroup, error)) *MockInstanceServerGetClusterGroupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterGroupsCall) DoAndReturn(f func() ([]api.ClusterGroup, error)) *MockInstanceServerGetClusterGroupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMember mocks base method. @@ -2027,9 +5123,33 @@ func (m *MockInstanceServer) GetClusterMember(arg0 string) (*api.ClusterMember, } // GetClusterMember indicates an expected call of GetClusterMember. -func (mr *MockInstanceServerMockRecorder) GetClusterMember(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterMember(arg0 any) *MockInstanceServerGetClusterMemberCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMember), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMember), arg0) + return &MockInstanceServerGetClusterMemberCall{Call: call} +} + +// MockInstanceServerGetClusterMemberCall wrap *gomock.Call +type MockInstanceServerGetClusterMemberCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterMemberCall) Return(arg0 *api.ClusterMember, arg1 string, arg2 error) *MockInstanceServerGetClusterMemberCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterMemberCall) Do(f func(string) (*api.ClusterMember, string, error)) *MockInstanceServerGetClusterMemberCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterMemberCall) DoAndReturn(f func(string) (*api.ClusterMember, string, error)) *MockInstanceServerGetClusterMemberCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMemberNames mocks base method. @@ -2042,9 +5162,33 @@ func (m *MockInstanceServer) GetClusterMemberNames() ([]string, error) { } // GetClusterMemberNames indicates an expected call of GetClusterMemberNames. -func (mr *MockInstanceServerMockRecorder) GetClusterMemberNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterMemberNames() *MockInstanceServerGetClusterMemberNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMemberNames", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMemberNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMemberNames", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMemberNames)) + return &MockInstanceServerGetClusterMemberNamesCall{Call: call} +} + +// MockInstanceServerGetClusterMemberNamesCall wrap *gomock.Call +type MockInstanceServerGetClusterMemberNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterMemberNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetClusterMemberNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterMemberNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetClusterMemberNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterMemberNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetClusterMemberNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMemberState mocks base method. @@ -2058,9 +5202,33 @@ func (m *MockInstanceServer) GetClusterMemberState(arg0 string) (*api.ClusterMem } // GetClusterMemberState indicates an expected call of GetClusterMemberState. -func (mr *MockInstanceServerMockRecorder) GetClusterMemberState(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterMemberState(arg0 any) *MockInstanceServerGetClusterMemberStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMemberState", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMemberState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMemberState", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMemberState), arg0) + return &MockInstanceServerGetClusterMemberStateCall{Call: call} +} + +// MockInstanceServerGetClusterMemberStateCall wrap *gomock.Call +type MockInstanceServerGetClusterMemberStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterMemberStateCall) Return(arg0 *api.ClusterMemberState, arg1 string, arg2 error) *MockInstanceServerGetClusterMemberStateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterMemberStateCall) Do(f func(string) (*api.ClusterMemberState, string, error)) *MockInstanceServerGetClusterMemberStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterMemberStateCall) DoAndReturn(f func(string) (*api.ClusterMemberState, string, error)) *MockInstanceServerGetClusterMemberStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMembers mocks base method. @@ -2073,9 +5241,33 @@ func (m *MockInstanceServer) GetClusterMembers() ([]api.ClusterMember, error) { } // GetClusterMembers indicates an expected call of GetClusterMembers. -func (mr *MockInstanceServerMockRecorder) GetClusterMembers() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetClusterMembers() *MockInstanceServerGetClusterMembersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMembers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockInstanceServer)(nil).GetClusterMembers)) + return &MockInstanceServerGetClusterMembersCall{Call: call} +} + +// MockInstanceServerGetClusterMembersCall wrap *gomock.Call +type MockInstanceServerGetClusterMembersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetClusterMembersCall) Return(arg0 []api.ClusterMember, arg1 error) *MockInstanceServerGetClusterMembersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetClusterMembersCall) Do(f func() ([]api.ClusterMember, error)) *MockInstanceServerGetClusterMembersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetClusterMembersCall) DoAndReturn(f func() ([]api.ClusterMember, error)) *MockInstanceServerGetClusterMembersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConnectionInfo mocks base method. @@ -2088,9 +5280,33 @@ func (m *MockInstanceServer) GetConnectionInfo() (*lxd.ConnectionInfo, error) { } // GetConnectionInfo indicates an expected call of GetConnectionInfo. -func (mr *MockInstanceServerMockRecorder) GetConnectionInfo() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetConnectionInfo() *MockInstanceServerGetConnectionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockInstanceServer)(nil).GetConnectionInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockInstanceServer)(nil).GetConnectionInfo)) + return &MockInstanceServerGetConnectionInfoCall{Call: call} +} + +// MockInstanceServerGetConnectionInfoCall wrap *gomock.Call +type MockInstanceServerGetConnectionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetConnectionInfoCall) Return(arg0 *lxd.ConnectionInfo, arg1 error) *MockInstanceServerGetConnectionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetConnectionInfoCall) Do(f func() (*lxd.ConnectionInfo, error)) *MockInstanceServerGetConnectionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetConnectionInfoCall) DoAndReturn(f func() (*lxd.ConnectionInfo, error)) *MockInstanceServerGetConnectionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainer mocks base method. @@ -2104,9 +5320,33 @@ func (m *MockInstanceServer) GetContainer(arg0 string) (*api.Container, string, } // GetContainer indicates an expected call of GetContainer. -func (mr *MockInstanceServerMockRecorder) GetContainer(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainer(arg0 any) *MockInstanceServerGetContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainer", reflect.TypeOf((*MockInstanceServer)(nil).GetContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainer", reflect.TypeOf((*MockInstanceServer)(nil).GetContainer), arg0) + return &MockInstanceServerGetContainerCall{Call: call} +} + +// MockInstanceServerGetContainerCall wrap *gomock.Call +type MockInstanceServerGetContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerCall) Return(arg0 *api.Container, arg1 string, arg2 error) *MockInstanceServerGetContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerCall) Do(f func(string) (*api.Container, string, error)) *MockInstanceServerGetContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerCall) DoAndReturn(f func(string) (*api.Container, string, error)) *MockInstanceServerGetContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerBackup mocks base method. @@ -2120,9 +5360,33 @@ func (m *MockInstanceServer) GetContainerBackup(arg0, arg1 string) (*api.Contain } // GetContainerBackup indicates an expected call of GetContainerBackup. -func (mr *MockInstanceServerMockRecorder) GetContainerBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerBackup(arg0, arg1 any) *MockInstanceServerGetContainerBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackup), arg0, arg1) + return &MockInstanceServerGetContainerBackupCall{Call: call} +} + +// MockInstanceServerGetContainerBackupCall wrap *gomock.Call +type MockInstanceServerGetContainerBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerBackupCall) Return(arg0 *api.ContainerBackup, arg1 string, arg2 error) *MockInstanceServerGetContainerBackupCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerBackupCall) Do(f func(string, string) (*api.ContainerBackup, string, error)) *MockInstanceServerGetContainerBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerBackupCall) DoAndReturn(f func(string, string) (*api.ContainerBackup, string, error)) *MockInstanceServerGetContainerBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerBackupFile mocks base method. @@ -2135,9 +5399,33 @@ func (m *MockInstanceServer) GetContainerBackupFile(arg0, arg1 string, arg2 *lxd } // GetContainerBackupFile indicates an expected call of GetContainerBackupFile. -func (mr *MockInstanceServerMockRecorder) GetContainerBackupFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerBackupFile(arg0, arg1, arg2 any) *MockInstanceServerGetContainerBackupFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackupFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackupFile), arg0, arg1, arg2) + return &MockInstanceServerGetContainerBackupFileCall{Call: call} +} + +// MockInstanceServerGetContainerBackupFileCall wrap *gomock.Call +type MockInstanceServerGetContainerBackupFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerBackupFileCall) Return(arg0 *lxd.BackupFileResponse, arg1 error) *MockInstanceServerGetContainerBackupFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerBackupFileCall) Do(f func(string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetContainerBackupFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerBackupFileCall) DoAndReturn(f func(string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetContainerBackupFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerBackupNames mocks base method. @@ -2150,9 +5438,33 @@ func (m *MockInstanceServer) GetContainerBackupNames(arg0 string) ([]string, err } // GetContainerBackupNames indicates an expected call of GetContainerBackupNames. -func (mr *MockInstanceServerMockRecorder) GetContainerBackupNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerBackupNames(arg0 any) *MockInstanceServerGetContainerBackupNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackupNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackupNames), arg0) + return &MockInstanceServerGetContainerBackupNamesCall{Call: call} +} + +// MockInstanceServerGetContainerBackupNamesCall wrap *gomock.Call +type MockInstanceServerGetContainerBackupNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerBackupNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetContainerBackupNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerBackupNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetContainerBackupNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerBackupNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetContainerBackupNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerBackups mocks base method. @@ -2165,9 +5477,33 @@ func (m *MockInstanceServer) GetContainerBackups(arg0 string) ([]api.ContainerBa } // GetContainerBackups indicates an expected call of GetContainerBackups. -func (mr *MockInstanceServerMockRecorder) GetContainerBackups(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerBackups(arg0 any) *MockInstanceServerGetContainerBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackups), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerBackups), arg0) + return &MockInstanceServerGetContainerBackupsCall{Call: call} +} + +// MockInstanceServerGetContainerBackupsCall wrap *gomock.Call +type MockInstanceServerGetContainerBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerBackupsCall) Return(arg0 []api.ContainerBackup, arg1 error) *MockInstanceServerGetContainerBackupsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerBackupsCall) Do(f func(string) ([]api.ContainerBackup, error)) *MockInstanceServerGetContainerBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerBackupsCall) DoAndReturn(f func(string) ([]api.ContainerBackup, error)) *MockInstanceServerGetContainerBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerConsoleLog mocks base method. @@ -2180,9 +5516,33 @@ func (m *MockInstanceServer) GetContainerConsoleLog(arg0 string, arg1 *lxd.Conta } // GetContainerConsoleLog indicates an expected call of GetContainerConsoleLog. -func (mr *MockInstanceServerMockRecorder) GetContainerConsoleLog(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerConsoleLog(arg0, arg1 any) *MockInstanceServerGetContainerConsoleLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerConsoleLog), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerConsoleLog), arg0, arg1) + return &MockInstanceServerGetContainerConsoleLogCall{Call: call} +} + +// MockInstanceServerGetContainerConsoleLogCall wrap *gomock.Call +type MockInstanceServerGetContainerConsoleLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerConsoleLogCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetContainerConsoleLogCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerConsoleLogCall) Do(f func(string, *lxd.ContainerConsoleLogArgs) (io.ReadCloser, error)) *MockInstanceServerGetContainerConsoleLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerConsoleLogCall) DoAndReturn(f func(string, *lxd.ContainerConsoleLogArgs) (io.ReadCloser, error)) *MockInstanceServerGetContainerConsoleLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerFile mocks base method. @@ -2196,9 +5556,33 @@ func (m *MockInstanceServer) GetContainerFile(arg0, arg1 string) (io.ReadCloser, } // GetContainerFile indicates an expected call of GetContainerFile. -func (mr *MockInstanceServerMockRecorder) GetContainerFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerFile(arg0, arg1 any) *MockInstanceServerGetContainerFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerFile), arg0, arg1) + return &MockInstanceServerGetContainerFileCall{Call: call} +} + +// MockInstanceServerGetContainerFileCall wrap *gomock.Call +type MockInstanceServerGetContainerFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerFileCall) Return(arg0 io.ReadCloser, arg1 *lxd.ContainerFileResponse, arg2 error) *MockInstanceServerGetContainerFileCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerFileCall) Do(f func(string, string) (io.ReadCloser, *lxd.ContainerFileResponse, error)) *MockInstanceServerGetContainerFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerFileCall) DoAndReturn(f func(string, string) (io.ReadCloser, *lxd.ContainerFileResponse, error)) *MockInstanceServerGetContainerFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerLogfile mocks base method. @@ -2211,9 +5595,33 @@ func (m *MockInstanceServer) GetContainerLogfile(arg0, arg1 string) (io.ReadClos } // GetContainerLogfile indicates an expected call of GetContainerLogfile. -func (mr *MockInstanceServerMockRecorder) GetContainerLogfile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerLogfile(arg0, arg1 any) *MockInstanceServerGetContainerLogfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerLogfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerLogfile), arg0, arg1) + return &MockInstanceServerGetContainerLogfileCall{Call: call} +} + +// MockInstanceServerGetContainerLogfileCall wrap *gomock.Call +type MockInstanceServerGetContainerLogfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerLogfileCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetContainerLogfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerLogfileCall) Do(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetContainerLogfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerLogfileCall) DoAndReturn(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetContainerLogfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerLogfiles mocks base method. @@ -2226,9 +5634,33 @@ func (m *MockInstanceServer) GetContainerLogfiles(arg0 string) ([]string, error) } // GetContainerLogfiles indicates an expected call of GetContainerLogfiles. -func (mr *MockInstanceServerMockRecorder) GetContainerLogfiles(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerLogfiles(arg0 any) *MockInstanceServerGetContainerLogfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerLogfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerLogfiles), arg0) + return &MockInstanceServerGetContainerLogfilesCall{Call: call} +} + +// MockInstanceServerGetContainerLogfilesCall wrap *gomock.Call +type MockInstanceServerGetContainerLogfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerLogfilesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetContainerLogfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerLogfilesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetContainerLogfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerLogfilesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetContainerLogfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerMetadata mocks base method. @@ -2242,9 +5674,33 @@ func (m *MockInstanceServer) GetContainerMetadata(arg0 string) (*api.ImageMetada } // GetContainerMetadata indicates an expected call of GetContainerMetadata. -func (mr *MockInstanceServerMockRecorder) GetContainerMetadata(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerMetadata(arg0 any) *MockInstanceServerGetContainerMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerMetadata", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerMetadata", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerMetadata), arg0) + return &MockInstanceServerGetContainerMetadataCall{Call: call} +} + +// MockInstanceServerGetContainerMetadataCall wrap *gomock.Call +type MockInstanceServerGetContainerMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerMetadataCall) Return(arg0 *api.ImageMetadata, arg1 string, arg2 error) *MockInstanceServerGetContainerMetadataCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerMetadataCall) Do(f func(string) (*api.ImageMetadata, string, error)) *MockInstanceServerGetContainerMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerMetadataCall) DoAndReturn(f func(string) (*api.ImageMetadata, string, error)) *MockInstanceServerGetContainerMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerNames mocks base method. @@ -2257,9 +5713,33 @@ func (m *MockInstanceServer) GetContainerNames() ([]string, error) { } // GetContainerNames indicates an expected call of GetContainerNames. -func (mr *MockInstanceServerMockRecorder) GetContainerNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerNames() *MockInstanceServerGetContainerNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerNames)) + return &MockInstanceServerGetContainerNamesCall{Call: call} +} + +// MockInstanceServerGetContainerNamesCall wrap *gomock.Call +type MockInstanceServerGetContainerNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetContainerNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetContainerNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetContainerNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerSnapshot mocks base method. @@ -2273,9 +5753,33 @@ func (m *MockInstanceServer) GetContainerSnapshot(arg0, arg1 string) (*api.Conta } // GetContainerSnapshot indicates an expected call of GetContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) GetContainerSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerSnapshot(arg0, arg1 any) *MockInstanceServerGetContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshot), arg0, arg1) + return &MockInstanceServerGetContainerSnapshotCall{Call: call} +} + +// MockInstanceServerGetContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerGetContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerSnapshotCall) Return(arg0 *api.ContainerSnapshot, arg1 string, arg2 error) *MockInstanceServerGetContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerSnapshotCall) Do(f func(string, string) (*api.ContainerSnapshot, string, error)) *MockInstanceServerGetContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerSnapshotCall) DoAndReturn(f func(string, string) (*api.ContainerSnapshot, string, error)) *MockInstanceServerGetContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerSnapshotNames mocks base method. @@ -2288,9 +5792,33 @@ func (m *MockInstanceServer) GetContainerSnapshotNames(arg0 string) ([]string, e } // GetContainerSnapshotNames indicates an expected call of GetContainerSnapshotNames. -func (mr *MockInstanceServerMockRecorder) GetContainerSnapshotNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerSnapshotNames(arg0 any) *MockInstanceServerGetContainerSnapshotNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshotNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshotNames), arg0) + return &MockInstanceServerGetContainerSnapshotNamesCall{Call: call} +} + +// MockInstanceServerGetContainerSnapshotNamesCall wrap *gomock.Call +type MockInstanceServerGetContainerSnapshotNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerSnapshotNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetContainerSnapshotNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerSnapshotNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetContainerSnapshotNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerSnapshotNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetContainerSnapshotNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerSnapshots mocks base method. @@ -2303,9 +5831,33 @@ func (m *MockInstanceServer) GetContainerSnapshots(arg0 string) ([]api.Container } // GetContainerSnapshots indicates an expected call of GetContainerSnapshots. -func (mr *MockInstanceServerMockRecorder) GetContainerSnapshots(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerSnapshots(arg0 any) *MockInstanceServerGetContainerSnapshotsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshots), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerSnapshots), arg0) + return &MockInstanceServerGetContainerSnapshotsCall{Call: call} +} + +// MockInstanceServerGetContainerSnapshotsCall wrap *gomock.Call +type MockInstanceServerGetContainerSnapshotsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerSnapshotsCall) Return(arg0 []api.ContainerSnapshot, arg1 error) *MockInstanceServerGetContainerSnapshotsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerSnapshotsCall) Do(f func(string) ([]api.ContainerSnapshot, error)) *MockInstanceServerGetContainerSnapshotsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerSnapshotsCall) DoAndReturn(f func(string) ([]api.ContainerSnapshot, error)) *MockInstanceServerGetContainerSnapshotsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerState mocks base method. @@ -2319,9 +5871,33 @@ func (m *MockInstanceServer) GetContainerState(arg0 string) (*api.ContainerState } // GetContainerState indicates an expected call of GetContainerState. -func (mr *MockInstanceServerMockRecorder) GetContainerState(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerState(arg0 any) *MockInstanceServerGetContainerStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerState", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerState", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerState), arg0) + return &MockInstanceServerGetContainerStateCall{Call: call} +} + +// MockInstanceServerGetContainerStateCall wrap *gomock.Call +type MockInstanceServerGetContainerStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerStateCall) Return(arg0 *api.ContainerState, arg1 string, arg2 error) *MockInstanceServerGetContainerStateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerStateCall) Do(f func(string) (*api.ContainerState, string, error)) *MockInstanceServerGetContainerStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerStateCall) DoAndReturn(f func(string) (*api.ContainerState, string, error)) *MockInstanceServerGetContainerStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerTemplateFile mocks base method. @@ -2334,9 +5910,33 @@ func (m *MockInstanceServer) GetContainerTemplateFile(arg0, arg1 string) (io.Rea } // GetContainerTemplateFile indicates an expected call of GetContainerTemplateFile. -func (mr *MockInstanceServerMockRecorder) GetContainerTemplateFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerTemplateFile(arg0, arg1 any) *MockInstanceServerGetContainerTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerTemplateFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerTemplateFile), arg0, arg1) + return &MockInstanceServerGetContainerTemplateFileCall{Call: call} +} + +// MockInstanceServerGetContainerTemplateFileCall wrap *gomock.Call +type MockInstanceServerGetContainerTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerTemplateFileCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetContainerTemplateFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerTemplateFileCall) Do(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetContainerTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerTemplateFileCall) DoAndReturn(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetContainerTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerTemplateFiles mocks base method. @@ -2349,9 +5949,33 @@ func (m *MockInstanceServer) GetContainerTemplateFiles(arg0 string) ([]string, e } // GetContainerTemplateFiles indicates an expected call of GetContainerTemplateFiles. -func (mr *MockInstanceServerMockRecorder) GetContainerTemplateFiles(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainerTemplateFiles(arg0 any) *MockInstanceServerGetContainerTemplateFilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerTemplateFiles", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerTemplateFiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerTemplateFiles", reflect.TypeOf((*MockInstanceServer)(nil).GetContainerTemplateFiles), arg0) + return &MockInstanceServerGetContainerTemplateFilesCall{Call: call} +} + +// MockInstanceServerGetContainerTemplateFilesCall wrap *gomock.Call +type MockInstanceServerGetContainerTemplateFilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainerTemplateFilesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetContainerTemplateFilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainerTemplateFilesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetContainerTemplateFilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainerTemplateFilesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetContainerTemplateFilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainers mocks base method. @@ -2364,9 +5988,33 @@ func (m *MockInstanceServer) GetContainers() ([]api.Container, error) { } // GetContainers indicates an expected call of GetContainers. -func (mr *MockInstanceServerMockRecorder) GetContainers() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainers() *MockInstanceServerGetContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainers", reflect.TypeOf((*MockInstanceServer)(nil).GetContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainers", reflect.TypeOf((*MockInstanceServer)(nil).GetContainers)) + return &MockInstanceServerGetContainersCall{Call: call} +} + +// MockInstanceServerGetContainersCall wrap *gomock.Call +type MockInstanceServerGetContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainersCall) Return(arg0 []api.Container, arg1 error) *MockInstanceServerGetContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainersCall) Do(f func() ([]api.Container, error)) *MockInstanceServerGetContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainersCall) DoAndReturn(f func() ([]api.Container, error)) *MockInstanceServerGetContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainersFull mocks base method. @@ -2379,9 +6027,33 @@ func (m *MockInstanceServer) GetContainersFull() ([]api.ContainerFull, error) { } // GetContainersFull indicates an expected call of GetContainersFull. -func (mr *MockInstanceServerMockRecorder) GetContainersFull() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetContainersFull() *MockInstanceServerGetContainersFullCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainersFull", reflect.TypeOf((*MockInstanceServer)(nil).GetContainersFull)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainersFull", reflect.TypeOf((*MockInstanceServer)(nil).GetContainersFull)) + return &MockInstanceServerGetContainersFullCall{Call: call} +} + +// MockInstanceServerGetContainersFullCall wrap *gomock.Call +type MockInstanceServerGetContainersFullCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetContainersFullCall) Return(arg0 []api.ContainerFull, arg1 error) *MockInstanceServerGetContainersFullCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetContainersFullCall) Do(f func() ([]api.ContainerFull, error)) *MockInstanceServerGetContainersFullCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetContainersFullCall) DoAndReturn(f func() ([]api.ContainerFull, error)) *MockInstanceServerGetContainersFullCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetEvents mocks base method. @@ -2394,9 +6066,33 @@ func (m *MockInstanceServer) GetEvents() (*lxd.EventListener, error) { } // GetEvents indicates an expected call of GetEvents. -func (mr *MockInstanceServerMockRecorder) GetEvents() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetEvents() *MockInstanceServerGetEventsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEvents", reflect.TypeOf((*MockInstanceServer)(nil).GetEvents)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEvents", reflect.TypeOf((*MockInstanceServer)(nil).GetEvents)) + return &MockInstanceServerGetEventsCall{Call: call} +} + +// MockInstanceServerGetEventsCall wrap *gomock.Call +type MockInstanceServerGetEventsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetEventsCall) Return(arg0 *lxd.EventListener, arg1 error) *MockInstanceServerGetEventsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetEventsCall) Do(f func() (*lxd.EventListener, error)) *MockInstanceServerGetEventsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetEventsCall) DoAndReturn(f func() (*lxd.EventListener, error)) *MockInstanceServerGetEventsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetEventsAllProjects mocks base method. @@ -2409,9 +6105,33 @@ func (m *MockInstanceServer) GetEventsAllProjects() (*lxd.EventListener, error) } // GetEventsAllProjects indicates an expected call of GetEventsAllProjects. -func (mr *MockInstanceServerMockRecorder) GetEventsAllProjects() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetEventsAllProjects() *MockInstanceServerGetEventsAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetEventsAllProjects)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetEventsAllProjects)) + return &MockInstanceServerGetEventsAllProjectsCall{Call: call} +} + +// MockInstanceServerGetEventsAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetEventsAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetEventsAllProjectsCall) Return(arg0 *lxd.EventListener, arg1 error) *MockInstanceServerGetEventsAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetEventsAllProjectsCall) Do(f func() (*lxd.EventListener, error)) *MockInstanceServerGetEventsAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetEventsAllProjectsCall) DoAndReturn(f func() (*lxd.EventListener, error)) *MockInstanceServerGetEventsAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetHTTPClient mocks base method. @@ -2424,9 +6144,33 @@ func (m *MockInstanceServer) GetHTTPClient() (*http.Client, error) { } // GetHTTPClient indicates an expected call of GetHTTPClient. -func (mr *MockInstanceServerMockRecorder) GetHTTPClient() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetHTTPClient() *MockInstanceServerGetHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockInstanceServer)(nil).GetHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPClient", reflect.TypeOf((*MockInstanceServer)(nil).GetHTTPClient)) + return &MockInstanceServerGetHTTPClientCall{Call: call} +} + +// MockInstanceServerGetHTTPClientCall wrap *gomock.Call +type MockInstanceServerGetHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetHTTPClientCall) Return(arg0 *http.Client, arg1 error) *MockInstanceServerGetHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetHTTPClientCall) Do(f func() (*http.Client, error)) *MockInstanceServerGetHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetHTTPClientCall) DoAndReturn(f func() (*http.Client, error)) *MockInstanceServerGetHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImage mocks base method. @@ -2440,9 +6184,33 @@ func (m *MockInstanceServer) GetImage(arg0 string) (*api.Image, string, error) { } // GetImage indicates an expected call of GetImage. -func (mr *MockInstanceServerMockRecorder) GetImage(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImage(arg0 any) *MockInstanceServerGetImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImage", reflect.TypeOf((*MockInstanceServer)(nil).GetImage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImage", reflect.TypeOf((*MockInstanceServer)(nil).GetImage), arg0) + return &MockInstanceServerGetImageCall{Call: call} +} + +// MockInstanceServerGetImageCall wrap *gomock.Call +type MockInstanceServerGetImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageCall) Return(arg0 *api.Image, arg1 string, arg2 error) *MockInstanceServerGetImageCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageCall) Do(f func(string) (*api.Image, string, error)) *MockInstanceServerGetImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageCall) DoAndReturn(f func(string) (*api.Image, string, error)) *MockInstanceServerGetImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAlias mocks base method. @@ -2456,9 +6224,33 @@ func (m *MockInstanceServer) GetImageAlias(arg0 string) (*api.ImageAliasesEntry, } // GetImageAlias indicates an expected call of GetImageAlias. -func (mr *MockInstanceServerMockRecorder) GetImageAlias(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageAlias(arg0 any) *MockInstanceServerGetImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAlias), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAlias), arg0) + return &MockInstanceServerGetImageAliasCall{Call: call} +} + +// MockInstanceServerGetImageAliasCall wrap *gomock.Call +type MockInstanceServerGetImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageAliasCall) Return(arg0 *api.ImageAliasesEntry, arg1 string, arg2 error) *MockInstanceServerGetImageAliasCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageAliasCall) Do(f func(string) (*api.ImageAliasesEntry, string, error)) *MockInstanceServerGetImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageAliasCall) DoAndReturn(f func(string) (*api.ImageAliasesEntry, string, error)) *MockInstanceServerGetImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasArchitectures mocks base method. @@ -2471,9 +6263,33 @@ func (m *MockInstanceServer) GetImageAliasArchitectures(arg0, arg1 string) (map[ } // GetImageAliasArchitectures indicates an expected call of GetImageAliasArchitectures. -func (mr *MockInstanceServerMockRecorder) GetImageAliasArchitectures(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageAliasArchitectures(arg0, arg1 any) *MockInstanceServerGetImageAliasArchitecturesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasArchitectures", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasArchitectures), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasArchitectures", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasArchitectures), arg0, arg1) + return &MockInstanceServerGetImageAliasArchitecturesCall{Call: call} +} + +// MockInstanceServerGetImageAliasArchitecturesCall wrap *gomock.Call +type MockInstanceServerGetImageAliasArchitecturesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageAliasArchitecturesCall) Return(arg0 map[string]*api.ImageAliasesEntry, arg1 error) *MockInstanceServerGetImageAliasArchitecturesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageAliasArchitecturesCall) Do(f func(string, string) (map[string]*api.ImageAliasesEntry, error)) *MockInstanceServerGetImageAliasArchitecturesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageAliasArchitecturesCall) DoAndReturn(f func(string, string) (map[string]*api.ImageAliasesEntry, error)) *MockInstanceServerGetImageAliasArchitecturesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasNames mocks base method. @@ -2486,9 +6302,33 @@ func (m *MockInstanceServer) GetImageAliasNames() ([]string, error) { } // GetImageAliasNames indicates an expected call of GetImageAliasNames. -func (mr *MockInstanceServerMockRecorder) GetImageAliasNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageAliasNames() *MockInstanceServerGetImageAliasNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasNames", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasNames", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasNames)) + return &MockInstanceServerGetImageAliasNamesCall{Call: call} +} + +// MockInstanceServerGetImageAliasNamesCall wrap *gomock.Call +type MockInstanceServerGetImageAliasNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageAliasNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetImageAliasNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageAliasNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetImageAliasNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageAliasNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetImageAliasNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliasType mocks base method. @@ -2502,9 +6342,33 @@ func (m *MockInstanceServer) GetImageAliasType(arg0, arg1 string) (*api.ImageAli } // GetImageAliasType indicates an expected call of GetImageAliasType. -func (mr *MockInstanceServerMockRecorder) GetImageAliasType(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageAliasType(arg0, arg1 any) *MockInstanceServerGetImageAliasTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasType", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasType), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliasType", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliasType), arg0, arg1) + return &MockInstanceServerGetImageAliasTypeCall{Call: call} +} + +// MockInstanceServerGetImageAliasTypeCall wrap *gomock.Call +type MockInstanceServerGetImageAliasTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageAliasTypeCall) Return(arg0 *api.ImageAliasesEntry, arg1 string, arg2 error) *MockInstanceServerGetImageAliasTypeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageAliasTypeCall) Do(f func(string, string) (*api.ImageAliasesEntry, string, error)) *MockInstanceServerGetImageAliasTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageAliasTypeCall) DoAndReturn(f func(string, string) (*api.ImageAliasesEntry, string, error)) *MockInstanceServerGetImageAliasTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageAliases mocks base method. @@ -2517,9 +6381,33 @@ func (m *MockInstanceServer) GetImageAliases() ([]api.ImageAliasesEntry, error) } // GetImageAliases indicates an expected call of GetImageAliases. -func (mr *MockInstanceServerMockRecorder) GetImageAliases() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageAliases() *MockInstanceServerGetImageAliasesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliases", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliases)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageAliases", reflect.TypeOf((*MockInstanceServer)(nil).GetImageAliases)) + return &MockInstanceServerGetImageAliasesCall{Call: call} +} + +// MockInstanceServerGetImageAliasesCall wrap *gomock.Call +type MockInstanceServerGetImageAliasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageAliasesCall) Return(arg0 []api.ImageAliasesEntry, arg1 error) *MockInstanceServerGetImageAliasesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageAliasesCall) Do(f func() ([]api.ImageAliasesEntry, error)) *MockInstanceServerGetImageAliasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageAliasesCall) DoAndReturn(f func() ([]api.ImageAliasesEntry, error)) *MockInstanceServerGetImageAliasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageFile mocks base method. @@ -2532,9 +6420,33 @@ func (m *MockInstanceServer) GetImageFile(arg0 string, arg1 lxd.ImageFileRequest } // GetImageFile indicates an expected call of GetImageFile. -func (mr *MockInstanceServerMockRecorder) GetImageFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageFile(arg0, arg1 any) *MockInstanceServerGetImageFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFile", reflect.TypeOf((*MockInstanceServer)(nil).GetImageFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFile", reflect.TypeOf((*MockInstanceServer)(nil).GetImageFile), arg0, arg1) + return &MockInstanceServerGetImageFileCall{Call: call} +} + +// MockInstanceServerGetImageFileCall wrap *gomock.Call +type MockInstanceServerGetImageFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageFileCall) Return(arg0 *lxd.ImageFileResponse, arg1 error) *MockInstanceServerGetImageFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageFileCall) Do(f func(string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockInstanceServerGetImageFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageFileCall) DoAndReturn(f func(string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockInstanceServerGetImageFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageFingerprints mocks base method. @@ -2547,9 +6459,33 @@ func (m *MockInstanceServer) GetImageFingerprints() ([]string, error) { } // GetImageFingerprints indicates an expected call of GetImageFingerprints. -func (mr *MockInstanceServerMockRecorder) GetImageFingerprints() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageFingerprints() *MockInstanceServerGetImageFingerprintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFingerprints", reflect.TypeOf((*MockInstanceServer)(nil).GetImageFingerprints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageFingerprints", reflect.TypeOf((*MockInstanceServer)(nil).GetImageFingerprints)) + return &MockInstanceServerGetImageFingerprintsCall{Call: call} +} + +// MockInstanceServerGetImageFingerprintsCall wrap *gomock.Call +type MockInstanceServerGetImageFingerprintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageFingerprintsCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetImageFingerprintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageFingerprintsCall) Do(f func() ([]string, error)) *MockInstanceServerGetImageFingerprintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageFingerprintsCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetImageFingerprintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImageSecret mocks base method. @@ -2562,9 +6498,33 @@ func (m *MockInstanceServer) GetImageSecret(arg0 string) (string, error) { } // GetImageSecret indicates an expected call of GetImageSecret. -func (mr *MockInstanceServerMockRecorder) GetImageSecret(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImageSecret(arg0 any) *MockInstanceServerGetImageSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSecret", reflect.TypeOf((*MockInstanceServer)(nil).GetImageSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSecret", reflect.TypeOf((*MockInstanceServer)(nil).GetImageSecret), arg0) + return &MockInstanceServerGetImageSecretCall{Call: call} +} + +// MockInstanceServerGetImageSecretCall wrap *gomock.Call +type MockInstanceServerGetImageSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImageSecretCall) Return(arg0 string, arg1 error) *MockInstanceServerGetImageSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImageSecretCall) Do(f func(string) (string, error)) *MockInstanceServerGetImageSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImageSecretCall) DoAndReturn(f func(string) (string, error)) *MockInstanceServerGetImageSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImages mocks base method. @@ -2577,9 +6537,33 @@ func (m *MockInstanceServer) GetImages() ([]api.Image, error) { } // GetImages indicates an expected call of GetImages. -func (mr *MockInstanceServerMockRecorder) GetImages() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImages() *MockInstanceServerGetImagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImages", reflect.TypeOf((*MockInstanceServer)(nil).GetImages)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImages", reflect.TypeOf((*MockInstanceServer)(nil).GetImages)) + return &MockInstanceServerGetImagesCall{Call: call} +} + +// MockInstanceServerGetImagesCall wrap *gomock.Call +type MockInstanceServerGetImagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImagesCall) Return(arg0 []api.Image, arg1 error) *MockInstanceServerGetImagesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImagesCall) Do(f func() ([]api.Image, error)) *MockInstanceServerGetImagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImagesCall) DoAndReturn(f func() ([]api.Image, error)) *MockInstanceServerGetImagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetImagesWithFilter mocks base method. @@ -2592,9 +6576,33 @@ func (m *MockInstanceServer) GetImagesWithFilter(arg0 []string) ([]api.Image, er } // GetImagesWithFilter indicates an expected call of GetImagesWithFilter. -func (mr *MockInstanceServerMockRecorder) GetImagesWithFilter(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetImagesWithFilter(arg0 any) *MockInstanceServerGetImagesWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImagesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetImagesWithFilter), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImagesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetImagesWithFilter), arg0) + return &MockInstanceServerGetImagesWithFilterCall{Call: call} +} + +// MockInstanceServerGetImagesWithFilterCall wrap *gomock.Call +type MockInstanceServerGetImagesWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetImagesWithFilterCall) Return(arg0 []api.Image, arg1 error) *MockInstanceServerGetImagesWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetImagesWithFilterCall) Do(f func([]string) ([]api.Image, error)) *MockInstanceServerGetImagesWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetImagesWithFilterCall) DoAndReturn(f func([]string) ([]api.Image, error)) *MockInstanceServerGetImagesWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstance mocks base method. @@ -2608,9 +6616,33 @@ func (m *MockInstanceServer) GetInstance(arg0 string) (*api.Instance, string, er } // GetInstance indicates an expected call of GetInstance. -func (mr *MockInstanceServerMockRecorder) GetInstance(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstance(arg0 any) *MockInstanceServerGetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockInstanceServer)(nil).GetInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockInstanceServer)(nil).GetInstance), arg0) + return &MockInstanceServerGetInstanceCall{Call: call} +} + +// MockInstanceServerGetInstanceCall wrap *gomock.Call +type MockInstanceServerGetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceCall) Return(arg0 *api.Instance, arg1 string, arg2 error) *MockInstanceServerGetInstanceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceCall) Do(f func(string) (*api.Instance, string, error)) *MockInstanceServerGetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceCall) DoAndReturn(f func(string) (*api.Instance, string, error)) *MockInstanceServerGetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceBackup mocks base method. @@ -2624,9 +6656,33 @@ func (m *MockInstanceServer) GetInstanceBackup(arg0, arg1 string) (*api.Instance } // GetInstanceBackup indicates an expected call of GetInstanceBackup. -func (mr *MockInstanceServerMockRecorder) GetInstanceBackup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceBackup(arg0, arg1 any) *MockInstanceServerGetInstanceBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackup), arg0, arg1) + return &MockInstanceServerGetInstanceBackupCall{Call: call} +} + +// MockInstanceServerGetInstanceBackupCall wrap *gomock.Call +type MockInstanceServerGetInstanceBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceBackupCall) Return(arg0 *api.InstanceBackup, arg1 string, arg2 error) *MockInstanceServerGetInstanceBackupCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceBackupCall) Do(f func(string, string) (*api.InstanceBackup, string, error)) *MockInstanceServerGetInstanceBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceBackupCall) DoAndReturn(f func(string, string) (*api.InstanceBackup, string, error)) *MockInstanceServerGetInstanceBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceBackupFile mocks base method. @@ -2639,9 +6695,33 @@ func (m *MockInstanceServer) GetInstanceBackupFile(arg0, arg1 string, arg2 *lxd. } // GetInstanceBackupFile indicates an expected call of GetInstanceBackupFile. -func (mr *MockInstanceServerMockRecorder) GetInstanceBackupFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceBackupFile(arg0, arg1, arg2 any) *MockInstanceServerGetInstanceBackupFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackupFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackupFile), arg0, arg1, arg2) + return &MockInstanceServerGetInstanceBackupFileCall{Call: call} +} + +// MockInstanceServerGetInstanceBackupFileCall wrap *gomock.Call +type MockInstanceServerGetInstanceBackupFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceBackupFileCall) Return(arg0 *lxd.BackupFileResponse, arg1 error) *MockInstanceServerGetInstanceBackupFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceBackupFileCall) Do(f func(string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetInstanceBackupFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceBackupFileCall) DoAndReturn(f func(string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetInstanceBackupFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceBackupNames mocks base method. @@ -2654,9 +6734,33 @@ func (m *MockInstanceServer) GetInstanceBackupNames(arg0 string) ([]string, erro } // GetInstanceBackupNames indicates an expected call of GetInstanceBackupNames. -func (mr *MockInstanceServerMockRecorder) GetInstanceBackupNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceBackupNames(arg0 any) *MockInstanceServerGetInstanceBackupNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackupNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackupNames), arg0) + return &MockInstanceServerGetInstanceBackupNamesCall{Call: call} +} + +// MockInstanceServerGetInstanceBackupNamesCall wrap *gomock.Call +type MockInstanceServerGetInstanceBackupNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceBackupNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetInstanceBackupNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceBackupNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetInstanceBackupNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceBackupNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetInstanceBackupNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceBackups mocks base method. @@ -2669,9 +6773,33 @@ func (m *MockInstanceServer) GetInstanceBackups(arg0 string) ([]api.InstanceBack } // GetInstanceBackups indicates an expected call of GetInstanceBackups. -func (mr *MockInstanceServerMockRecorder) GetInstanceBackups(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceBackups(arg0 any) *MockInstanceServerGetInstanceBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackups), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceBackups), arg0) + return &MockInstanceServerGetInstanceBackupsCall{Call: call} +} + +// MockInstanceServerGetInstanceBackupsCall wrap *gomock.Call +type MockInstanceServerGetInstanceBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceBackupsCall) Return(arg0 []api.InstanceBackup, arg1 error) *MockInstanceServerGetInstanceBackupsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceBackupsCall) Do(f func(string) ([]api.InstanceBackup, error)) *MockInstanceServerGetInstanceBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceBackupsCall) DoAndReturn(f func(string) ([]api.InstanceBackup, error)) *MockInstanceServerGetInstanceBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceConsoleLog mocks base method. @@ -2684,9 +6812,33 @@ func (m *MockInstanceServer) GetInstanceConsoleLog(arg0 string, arg1 *lxd.Instan } // GetInstanceConsoleLog indicates an expected call of GetInstanceConsoleLog. -func (mr *MockInstanceServerMockRecorder) GetInstanceConsoleLog(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceConsoleLog(arg0, arg1 any) *MockInstanceServerGetInstanceConsoleLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceConsoleLog), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceConsoleLog", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceConsoleLog), arg0, arg1) + return &MockInstanceServerGetInstanceConsoleLogCall{Call: call} +} + +// MockInstanceServerGetInstanceConsoleLogCall wrap *gomock.Call +type MockInstanceServerGetInstanceConsoleLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceConsoleLogCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetInstanceConsoleLogCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceConsoleLogCall) Do(f func(string, *lxd.InstanceConsoleLogArgs) (io.ReadCloser, error)) *MockInstanceServerGetInstanceConsoleLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceConsoleLogCall) DoAndReturn(f func(string, *lxd.InstanceConsoleLogArgs) (io.ReadCloser, error)) *MockInstanceServerGetInstanceConsoleLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceFile mocks base method. @@ -2700,9 +6852,33 @@ func (m *MockInstanceServer) GetInstanceFile(arg0, arg1 string) (io.ReadCloser, } // GetInstanceFile indicates an expected call of GetInstanceFile. -func (mr *MockInstanceServerMockRecorder) GetInstanceFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceFile(arg0, arg1 any) *MockInstanceServerGetInstanceFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFile), arg0, arg1) + return &MockInstanceServerGetInstanceFileCall{Call: call} +} + +// MockInstanceServerGetInstanceFileCall wrap *gomock.Call +type MockInstanceServerGetInstanceFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceFileCall) Return(arg0 io.ReadCloser, arg1 *lxd.InstanceFileResponse, arg2 error) *MockInstanceServerGetInstanceFileCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceFileCall) Do(f func(string, string) (io.ReadCloser, *lxd.InstanceFileResponse, error)) *MockInstanceServerGetInstanceFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceFileCall) DoAndReturn(f func(string, string) (io.ReadCloser, *lxd.InstanceFileResponse, error)) *MockInstanceServerGetInstanceFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceFileSFTP mocks base method. @@ -2715,9 +6891,33 @@ func (m *MockInstanceServer) GetInstanceFileSFTP(arg0 string) (*sftp.Client, err } // GetInstanceFileSFTP indicates an expected call of GetInstanceFileSFTP. -func (mr *MockInstanceServerMockRecorder) GetInstanceFileSFTP(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceFileSFTP(arg0 any) *MockInstanceServerGetInstanceFileSFTPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFileSFTP", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFileSFTP), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFileSFTP", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFileSFTP), arg0) + return &MockInstanceServerGetInstanceFileSFTPCall{Call: call} +} + +// MockInstanceServerGetInstanceFileSFTPCall wrap *gomock.Call +type MockInstanceServerGetInstanceFileSFTPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceFileSFTPCall) Return(arg0 *sftp.Client, arg1 error) *MockInstanceServerGetInstanceFileSFTPCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceFileSFTPCall) Do(f func(string) (*sftp.Client, error)) *MockInstanceServerGetInstanceFileSFTPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceFileSFTPCall) DoAndReturn(f func(string) (*sftp.Client, error)) *MockInstanceServerGetInstanceFileSFTPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceFileSFTPConn mocks base method. @@ -2730,9 +6930,33 @@ func (m *MockInstanceServer) GetInstanceFileSFTPConn(arg0 string) (net.Conn, err } // GetInstanceFileSFTPConn indicates an expected call of GetInstanceFileSFTPConn. -func (mr *MockInstanceServerMockRecorder) GetInstanceFileSFTPConn(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceFileSFTPConn(arg0 any) *MockInstanceServerGetInstanceFileSFTPConnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFileSFTPConn", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFileSFTPConn), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFileSFTPConn", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFileSFTPConn), arg0) + return &MockInstanceServerGetInstanceFileSFTPConnCall{Call: call} +} + +// MockInstanceServerGetInstanceFileSFTPConnCall wrap *gomock.Call +type MockInstanceServerGetInstanceFileSFTPConnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceFileSFTPConnCall) Return(arg0 net.Conn, arg1 error) *MockInstanceServerGetInstanceFileSFTPConnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceFileSFTPConnCall) Do(f func(string) (net.Conn, error)) *MockInstanceServerGetInstanceFileSFTPConnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceFileSFTPConnCall) DoAndReturn(f func(string) (net.Conn, error)) *MockInstanceServerGetInstanceFileSFTPConnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceFull mocks base method. @@ -2746,9 +6970,33 @@ func (m *MockInstanceServer) GetInstanceFull(arg0 string) (*api.InstanceFull, st } // GetInstanceFull indicates an expected call of GetInstanceFull. -func (mr *MockInstanceServerMockRecorder) GetInstanceFull(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceFull(arg0 any) *MockInstanceServerGetInstanceFullCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFull", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFull), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceFull", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceFull), arg0) + return &MockInstanceServerGetInstanceFullCall{Call: call} +} + +// MockInstanceServerGetInstanceFullCall wrap *gomock.Call +type MockInstanceServerGetInstanceFullCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceFullCall) Return(arg0 *api.InstanceFull, arg1 string, arg2 error) *MockInstanceServerGetInstanceFullCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceFullCall) Do(f func(string) (*api.InstanceFull, string, error)) *MockInstanceServerGetInstanceFullCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceFullCall) DoAndReturn(f func(string) (*api.InstanceFull, string, error)) *MockInstanceServerGetInstanceFullCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceLogfile mocks base method. @@ -2761,9 +7009,33 @@ func (m *MockInstanceServer) GetInstanceLogfile(arg0, arg1 string) (io.ReadClose } // GetInstanceLogfile indicates an expected call of GetInstanceLogfile. -func (mr *MockInstanceServerMockRecorder) GetInstanceLogfile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceLogfile(arg0, arg1 any) *MockInstanceServerGetInstanceLogfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceLogfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceLogfile), arg0, arg1) + return &MockInstanceServerGetInstanceLogfileCall{Call: call} +} + +// MockInstanceServerGetInstanceLogfileCall wrap *gomock.Call +type MockInstanceServerGetInstanceLogfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceLogfileCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetInstanceLogfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceLogfileCall) Do(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetInstanceLogfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceLogfileCall) DoAndReturn(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetInstanceLogfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceLogfiles mocks base method. @@ -2776,9 +7048,33 @@ func (m *MockInstanceServer) GetInstanceLogfiles(arg0 string) ([]string, error) } // GetInstanceLogfiles indicates an expected call of GetInstanceLogfiles. -func (mr *MockInstanceServerMockRecorder) GetInstanceLogfiles(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceLogfiles(arg0 any) *MockInstanceServerGetInstanceLogfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceLogfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceLogfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceLogfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceLogfiles), arg0) + return &MockInstanceServerGetInstanceLogfilesCall{Call: call} +} + +// MockInstanceServerGetInstanceLogfilesCall wrap *gomock.Call +type MockInstanceServerGetInstanceLogfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceLogfilesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetInstanceLogfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceLogfilesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetInstanceLogfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceLogfilesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetInstanceLogfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceMetadata mocks base method. @@ -2792,9 +7088,33 @@ func (m *MockInstanceServer) GetInstanceMetadata(arg0 string) (*api.ImageMetadat } // GetInstanceMetadata indicates an expected call of GetInstanceMetadata. -func (mr *MockInstanceServerMockRecorder) GetInstanceMetadata(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceMetadata(arg0 any) *MockInstanceServerGetInstanceMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceMetadata", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceMetadata", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceMetadata), arg0) + return &MockInstanceServerGetInstanceMetadataCall{Call: call} +} + +// MockInstanceServerGetInstanceMetadataCall wrap *gomock.Call +type MockInstanceServerGetInstanceMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceMetadataCall) Return(arg0 *api.ImageMetadata, arg1 string, arg2 error) *MockInstanceServerGetInstanceMetadataCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceMetadataCall) Do(f func(string) (*api.ImageMetadata, string, error)) *MockInstanceServerGetInstanceMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceMetadataCall) DoAndReturn(f func(string) (*api.ImageMetadata, string, error)) *MockInstanceServerGetInstanceMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceNames mocks base method. @@ -2807,9 +7127,33 @@ func (m *MockInstanceServer) GetInstanceNames(arg0 api.InstanceType) ([]string, } // GetInstanceNames indicates an expected call of GetInstanceNames. -func (mr *MockInstanceServerMockRecorder) GetInstanceNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceNames(arg0 any) *MockInstanceServerGetInstanceNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceNames), arg0) + return &MockInstanceServerGetInstanceNamesCall{Call: call} +} + +// MockInstanceServerGetInstanceNamesCall wrap *gomock.Call +type MockInstanceServerGetInstanceNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetInstanceNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceNamesCall) Do(f func(api.InstanceType) ([]string, error)) *MockInstanceServerGetInstanceNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceNamesCall) DoAndReturn(f func(api.InstanceType) ([]string, error)) *MockInstanceServerGetInstanceNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceNamesAllProjects mocks base method. @@ -2822,9 +7166,33 @@ func (m *MockInstanceServer) GetInstanceNamesAllProjects(arg0 api.InstanceType) } // GetInstanceNamesAllProjects indicates an expected call of GetInstanceNamesAllProjects. -func (mr *MockInstanceServerMockRecorder) GetInstanceNamesAllProjects(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceNamesAllProjects(arg0 any) *MockInstanceServerGetInstanceNamesAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceNamesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceNamesAllProjects), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceNamesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceNamesAllProjects), arg0) + return &MockInstanceServerGetInstanceNamesAllProjectsCall{Call: call} +} + +// MockInstanceServerGetInstanceNamesAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetInstanceNamesAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceNamesAllProjectsCall) Return(arg0 map[string][]string, arg1 error) *MockInstanceServerGetInstanceNamesAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceNamesAllProjectsCall) Do(f func(api.InstanceType) (map[string][]string, error)) *MockInstanceServerGetInstanceNamesAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceNamesAllProjectsCall) DoAndReturn(f func(api.InstanceType) (map[string][]string, error)) *MockInstanceServerGetInstanceNamesAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceSnapshot mocks base method. @@ -2838,9 +7206,33 @@ func (m *MockInstanceServer) GetInstanceSnapshot(arg0, arg1 string) (*api.Instan } // GetInstanceSnapshot indicates an expected call of GetInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshot(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshot(arg0, arg1 any) *MockInstanceServerGetInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshot), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshot), arg0, arg1) + return &MockInstanceServerGetInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerGetInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerGetInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceSnapshotCall) Return(arg0 *api.InstanceSnapshot, arg1 string, arg2 error) *MockInstanceServerGetInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceSnapshotCall) Do(f func(string, string) (*api.InstanceSnapshot, string, error)) *MockInstanceServerGetInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceSnapshotCall) DoAndReturn(f func(string, string) (*api.InstanceSnapshot, string, error)) *MockInstanceServerGetInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceSnapshotNames mocks base method. @@ -2853,9 +7245,33 @@ func (m *MockInstanceServer) GetInstanceSnapshotNames(arg0 string) ([]string, er } // GetInstanceSnapshotNames indicates an expected call of GetInstanceSnapshotNames. -func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshotNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshotNames(arg0 any) *MockInstanceServerGetInstanceSnapshotNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshotNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshotNames), arg0) + return &MockInstanceServerGetInstanceSnapshotNamesCall{Call: call} +} + +// MockInstanceServerGetInstanceSnapshotNamesCall wrap *gomock.Call +type MockInstanceServerGetInstanceSnapshotNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceSnapshotNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetInstanceSnapshotNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceSnapshotNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetInstanceSnapshotNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceSnapshotNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetInstanceSnapshotNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceSnapshots mocks base method. @@ -2868,9 +7284,33 @@ func (m *MockInstanceServer) GetInstanceSnapshots(arg0 string) ([]api.InstanceSn } // GetInstanceSnapshots indicates an expected call of GetInstanceSnapshots. -func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshots(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceSnapshots(arg0 any) *MockInstanceServerGetInstanceSnapshotsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshots), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceSnapshots), arg0) + return &MockInstanceServerGetInstanceSnapshotsCall{Call: call} +} + +// MockInstanceServerGetInstanceSnapshotsCall wrap *gomock.Call +type MockInstanceServerGetInstanceSnapshotsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceSnapshotsCall) Return(arg0 []api.InstanceSnapshot, arg1 error) *MockInstanceServerGetInstanceSnapshotsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceSnapshotsCall) Do(f func(string) ([]api.InstanceSnapshot, error)) *MockInstanceServerGetInstanceSnapshotsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceSnapshotsCall) DoAndReturn(f func(string) ([]api.InstanceSnapshot, error)) *MockInstanceServerGetInstanceSnapshotsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceState mocks base method. @@ -2884,9 +7324,33 @@ func (m *MockInstanceServer) GetInstanceState(arg0 string) (*api.InstanceState, } // GetInstanceState indicates an expected call of GetInstanceState. -func (mr *MockInstanceServerMockRecorder) GetInstanceState(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceState(arg0 any) *MockInstanceServerGetInstanceStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceState), arg0) + return &MockInstanceServerGetInstanceStateCall{Call: call} +} + +// MockInstanceServerGetInstanceStateCall wrap *gomock.Call +type MockInstanceServerGetInstanceStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceStateCall) Return(arg0 *api.InstanceState, arg1 string, arg2 error) *MockInstanceServerGetInstanceStateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceStateCall) Do(f func(string) (*api.InstanceState, string, error)) *MockInstanceServerGetInstanceStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceStateCall) DoAndReturn(f func(string) (*api.InstanceState, string, error)) *MockInstanceServerGetInstanceStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceTemplateFile mocks base method. @@ -2899,9 +7363,33 @@ func (m *MockInstanceServer) GetInstanceTemplateFile(arg0, arg1 string) (io.Read } // GetInstanceTemplateFile indicates an expected call of GetInstanceTemplateFile. -func (mr *MockInstanceServerMockRecorder) GetInstanceTemplateFile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceTemplateFile(arg0, arg1 any) *MockInstanceServerGetInstanceTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceTemplateFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceTemplateFile), arg0, arg1) + return &MockInstanceServerGetInstanceTemplateFileCall{Call: call} +} + +// MockInstanceServerGetInstanceTemplateFileCall wrap *gomock.Call +type MockInstanceServerGetInstanceTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceTemplateFileCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetInstanceTemplateFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceTemplateFileCall) Do(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetInstanceTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceTemplateFileCall) DoAndReturn(f func(string, string) (io.ReadCloser, error)) *MockInstanceServerGetInstanceTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceTemplateFiles mocks base method. @@ -2914,9 +7402,33 @@ func (m *MockInstanceServer) GetInstanceTemplateFiles(arg0 string) ([]string, er } // GetInstanceTemplateFiles indicates an expected call of GetInstanceTemplateFiles. -func (mr *MockInstanceServerMockRecorder) GetInstanceTemplateFiles(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstanceTemplateFiles(arg0 any) *MockInstanceServerGetInstanceTemplateFilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTemplateFiles", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceTemplateFiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTemplateFiles", reflect.TypeOf((*MockInstanceServer)(nil).GetInstanceTemplateFiles), arg0) + return &MockInstanceServerGetInstanceTemplateFilesCall{Call: call} +} + +// MockInstanceServerGetInstanceTemplateFilesCall wrap *gomock.Call +type MockInstanceServerGetInstanceTemplateFilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstanceTemplateFilesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetInstanceTemplateFilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstanceTemplateFilesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetInstanceTemplateFilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstanceTemplateFilesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetInstanceTemplateFilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstances mocks base method. @@ -2929,9 +7441,33 @@ func (m *MockInstanceServer) GetInstances(arg0 api.InstanceType) ([]api.Instance } // GetInstances indicates an expected call of GetInstances. -func (mr *MockInstanceServerMockRecorder) GetInstances(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstances(arg0 any) *MockInstanceServerGetInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstances", reflect.TypeOf((*MockInstanceServer)(nil).GetInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstances", reflect.TypeOf((*MockInstanceServer)(nil).GetInstances), arg0) + return &MockInstanceServerGetInstancesCall{Call: call} +} + +// MockInstanceServerGetInstancesCall wrap *gomock.Call +type MockInstanceServerGetInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesCall) Return(arg0 []api.Instance, arg1 error) *MockInstanceServerGetInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesCall) Do(f func(api.InstanceType) ([]api.Instance, error)) *MockInstanceServerGetInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesCall) DoAndReturn(f func(api.InstanceType) ([]api.Instance, error)) *MockInstanceServerGetInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesAllProjects mocks base method. @@ -2944,9 +7480,33 @@ func (m *MockInstanceServer) GetInstancesAllProjects(arg0 api.InstanceType) ([]a } // GetInstancesAllProjects indicates an expected call of GetInstancesAllProjects. -func (mr *MockInstanceServerMockRecorder) GetInstancesAllProjects(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesAllProjects(arg0 any) *MockInstanceServerGetInstancesAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesAllProjects), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesAllProjects), arg0) + return &MockInstanceServerGetInstancesAllProjectsCall{Call: call} +} + +// MockInstanceServerGetInstancesAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetInstancesAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesAllProjectsCall) Return(arg0 []api.Instance, arg1 error) *MockInstanceServerGetInstancesAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesAllProjectsCall) Do(f func(api.InstanceType) ([]api.Instance, error)) *MockInstanceServerGetInstancesAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesAllProjectsCall) DoAndReturn(f func(api.InstanceType) ([]api.Instance, error)) *MockInstanceServerGetInstancesAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesAllProjectsWithFilter mocks base method. @@ -2959,9 +7519,33 @@ func (m *MockInstanceServer) GetInstancesAllProjectsWithFilter(arg0 api.Instance } // GetInstancesAllProjectsWithFilter indicates an expected call of GetInstancesAllProjectsWithFilter. -func (mr *MockInstanceServerMockRecorder) GetInstancesAllProjectsWithFilter(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesAllProjectsWithFilter(arg0, arg1 any) *MockInstanceServerGetInstancesAllProjectsWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesAllProjectsWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesAllProjectsWithFilter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesAllProjectsWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesAllProjectsWithFilter), arg0, arg1) + return &MockInstanceServerGetInstancesAllProjectsWithFilterCall{Call: call} +} + +// MockInstanceServerGetInstancesAllProjectsWithFilterCall wrap *gomock.Call +type MockInstanceServerGetInstancesAllProjectsWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesAllProjectsWithFilterCall) Return(arg0 []api.Instance, arg1 error) *MockInstanceServerGetInstancesAllProjectsWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesAllProjectsWithFilterCall) Do(f func(api.InstanceType, []string) ([]api.Instance, error)) *MockInstanceServerGetInstancesAllProjectsWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesAllProjectsWithFilterCall) DoAndReturn(f func(api.InstanceType, []string) ([]api.Instance, error)) *MockInstanceServerGetInstancesAllProjectsWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesFull mocks base method. @@ -2974,9 +7558,33 @@ func (m *MockInstanceServer) GetInstancesFull(arg0 api.InstanceType) ([]api.Inst } // GetInstancesFull indicates an expected call of GetInstancesFull. -func (mr *MockInstanceServerMockRecorder) GetInstancesFull(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesFull(arg0 any) *MockInstanceServerGetInstancesFullCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFull", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFull), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFull", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFull), arg0) + return &MockInstanceServerGetInstancesFullCall{Call: call} +} + +// MockInstanceServerGetInstancesFullCall wrap *gomock.Call +type MockInstanceServerGetInstancesFullCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesFullCall) Return(arg0 []api.InstanceFull, arg1 error) *MockInstanceServerGetInstancesFullCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesFullCall) Do(f func(api.InstanceType) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesFullCall) DoAndReturn(f func(api.InstanceType) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesFullAllProjects mocks base method. @@ -2989,9 +7597,33 @@ func (m *MockInstanceServer) GetInstancesFullAllProjects(arg0 api.InstanceType) } // GetInstancesFullAllProjects indicates an expected call of GetInstancesFullAllProjects. -func (mr *MockInstanceServerMockRecorder) GetInstancesFullAllProjects(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesFullAllProjects(arg0 any) *MockInstanceServerGetInstancesFullAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullAllProjects), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullAllProjects), arg0) + return &MockInstanceServerGetInstancesFullAllProjectsCall{Call: call} +} + +// MockInstanceServerGetInstancesFullAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetInstancesFullAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesFullAllProjectsCall) Return(arg0 []api.InstanceFull, arg1 error) *MockInstanceServerGetInstancesFullAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesFullAllProjectsCall) Do(f func(api.InstanceType) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesFullAllProjectsCall) DoAndReturn(f func(api.InstanceType) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesFullAllProjectsWithFilter mocks base method. @@ -3004,9 +7636,33 @@ func (m *MockInstanceServer) GetInstancesFullAllProjectsWithFilter(arg0 api.Inst } // GetInstancesFullAllProjectsWithFilter indicates an expected call of GetInstancesFullAllProjectsWithFilter. -func (mr *MockInstanceServerMockRecorder) GetInstancesFullAllProjectsWithFilter(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesFullAllProjectsWithFilter(arg0, arg1 any) *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullAllProjectsWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullAllProjectsWithFilter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullAllProjectsWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullAllProjectsWithFilter), arg0, arg1) + return &MockInstanceServerGetInstancesFullAllProjectsWithFilterCall{Call: call} +} + +// MockInstanceServerGetInstancesFullAllProjectsWithFilterCall wrap *gomock.Call +type MockInstanceServerGetInstancesFullAllProjectsWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall) Return(arg0 []api.InstanceFull, arg1 error) *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall) Do(f func(api.InstanceType, []string) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall) DoAndReturn(f func(api.InstanceType, []string) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullAllProjectsWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesFullWithFilter mocks base method. @@ -3019,9 +7675,33 @@ func (m *MockInstanceServer) GetInstancesFullWithFilter(arg0 api.InstanceType, a } // GetInstancesFullWithFilter indicates an expected call of GetInstancesFullWithFilter. -func (mr *MockInstanceServerMockRecorder) GetInstancesFullWithFilter(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesFullWithFilter(arg0, arg1 any) *MockInstanceServerGetInstancesFullWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullWithFilter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesFullWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesFullWithFilter), arg0, arg1) + return &MockInstanceServerGetInstancesFullWithFilterCall{Call: call} +} + +// MockInstanceServerGetInstancesFullWithFilterCall wrap *gomock.Call +type MockInstanceServerGetInstancesFullWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesFullWithFilterCall) Return(arg0 []api.InstanceFull, arg1 error) *MockInstanceServerGetInstancesFullWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesFullWithFilterCall) Do(f func(api.InstanceType, []string) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesFullWithFilterCall) DoAndReturn(f func(api.InstanceType, []string) ([]api.InstanceFull, error)) *MockInstanceServerGetInstancesFullWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstancesWithFilter mocks base method. @@ -3034,9 +7714,33 @@ func (m *MockInstanceServer) GetInstancesWithFilter(arg0 api.InstanceType, arg1 } // GetInstancesWithFilter indicates an expected call of GetInstancesWithFilter. -func (mr *MockInstanceServerMockRecorder) GetInstancesWithFilter(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetInstancesWithFilter(arg0, arg1 any) *MockInstanceServerGetInstancesWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesWithFilter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstancesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetInstancesWithFilter), arg0, arg1) + return &MockInstanceServerGetInstancesWithFilterCall{Call: call} +} + +// MockInstanceServerGetInstancesWithFilterCall wrap *gomock.Call +type MockInstanceServerGetInstancesWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetInstancesWithFilterCall) Return(arg0 []api.Instance, arg1 error) *MockInstanceServerGetInstancesWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetInstancesWithFilterCall) Do(f func(api.InstanceType, []string) ([]api.Instance, error)) *MockInstanceServerGetInstancesWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetInstancesWithFilterCall) DoAndReturn(f func(api.InstanceType, []string) ([]api.Instance, error)) *MockInstanceServerGetInstancesWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetMetrics mocks base method. @@ -3049,9 +7753,33 @@ func (m *MockInstanceServer) GetMetrics() (string, error) { } // GetMetrics indicates an expected call of GetMetrics. -func (mr *MockInstanceServerMockRecorder) GetMetrics() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetMetrics() *MockInstanceServerGetMetricsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockInstanceServer)(nil).GetMetrics)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockInstanceServer)(nil).GetMetrics)) + return &MockInstanceServerGetMetricsCall{Call: call} +} + +// MockInstanceServerGetMetricsCall wrap *gomock.Call +type MockInstanceServerGetMetricsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetMetricsCall) Return(arg0 string, arg1 error) *MockInstanceServerGetMetricsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetMetricsCall) Do(f func() (string, error)) *MockInstanceServerGetMetricsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetMetricsCall) DoAndReturn(f func() (string, error)) *MockInstanceServerGetMetricsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetwork mocks base method. @@ -3065,9 +7793,33 @@ func (m *MockInstanceServer) GetNetwork(arg0 string) (*api.Network, string, erro } // GetNetwork indicates an expected call of GetNetwork. -func (mr *MockInstanceServerMockRecorder) GetNetwork(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetwork(arg0 any) *MockInstanceServerGetNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetwork", reflect.TypeOf((*MockInstanceServer)(nil).GetNetwork), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetwork", reflect.TypeOf((*MockInstanceServer)(nil).GetNetwork), arg0) + return &MockInstanceServerGetNetworkCall{Call: call} +} + +// MockInstanceServerGetNetworkCall wrap *gomock.Call +type MockInstanceServerGetNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkCall) Return(arg0 *api.Network, arg1 string, arg2 error) *MockInstanceServerGetNetworkCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkCall) Do(f func(string) (*api.Network, string, error)) *MockInstanceServerGetNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkCall) DoAndReturn(f func(string) (*api.Network, string, error)) *MockInstanceServerGetNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkACL mocks base method. @@ -3081,9 +7833,33 @@ func (m *MockInstanceServer) GetNetworkACL(arg0 string) (*api.NetworkACL, string } // GetNetworkACL indicates an expected call of GetNetworkACL. -func (mr *MockInstanceServerMockRecorder) GetNetworkACL(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkACL(arg0 any) *MockInstanceServerGetNetworkACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACL), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACL), arg0) + return &MockInstanceServerGetNetworkACLCall{Call: call} +} + +// MockInstanceServerGetNetworkACLCall wrap *gomock.Call +type MockInstanceServerGetNetworkACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkACLCall) Return(arg0 *api.NetworkACL, arg1 string, arg2 error) *MockInstanceServerGetNetworkACLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkACLCall) Do(f func(string) (*api.NetworkACL, string, error)) *MockInstanceServerGetNetworkACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkACLCall) DoAndReturn(f func(string) (*api.NetworkACL, string, error)) *MockInstanceServerGetNetworkACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkACLLogfile mocks base method. @@ -3096,9 +7872,33 @@ func (m *MockInstanceServer) GetNetworkACLLogfile(arg0 string) (io.ReadCloser, e } // GetNetworkACLLogfile indicates an expected call of GetNetworkACLLogfile. -func (mr *MockInstanceServerMockRecorder) GetNetworkACLLogfile(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkACLLogfile(arg0 any) *MockInstanceServerGetNetworkACLLogfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLLogfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLLogfile", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLLogfile), arg0) + return &MockInstanceServerGetNetworkACLLogfileCall{Call: call} +} + +// MockInstanceServerGetNetworkACLLogfileCall wrap *gomock.Call +type MockInstanceServerGetNetworkACLLogfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkACLLogfileCall) Return(arg0 io.ReadCloser, arg1 error) *MockInstanceServerGetNetworkACLLogfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkACLLogfileCall) Do(f func(string) (io.ReadCloser, error)) *MockInstanceServerGetNetworkACLLogfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkACLLogfileCall) DoAndReturn(f func(string) (io.ReadCloser, error)) *MockInstanceServerGetNetworkACLLogfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkACLNames mocks base method. @@ -3111,9 +7911,33 @@ func (m *MockInstanceServer) GetNetworkACLNames() ([]string, error) { } // GetNetworkACLNames indicates an expected call of GetNetworkACLNames. -func (mr *MockInstanceServerMockRecorder) GetNetworkACLNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkACLNames() *MockInstanceServerGetNetworkACLNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLNames)) + return &MockInstanceServerGetNetworkACLNamesCall{Call: call} +} + +// MockInstanceServerGetNetworkACLNamesCall wrap *gomock.Call +type MockInstanceServerGetNetworkACLNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkACLNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkACLNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkACLNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetNetworkACLNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkACLNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetNetworkACLNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkACLs mocks base method. @@ -3126,9 +7950,33 @@ func (m *MockInstanceServer) GetNetworkACLs() ([]api.NetworkACL, error) { } // GetNetworkACLs indicates an expected call of GetNetworkACLs. -func (mr *MockInstanceServerMockRecorder) GetNetworkACLs() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkACLs() *MockInstanceServerGetNetworkACLsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLs", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkACLs", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkACLs)) + return &MockInstanceServerGetNetworkACLsCall{Call: call} +} + +// MockInstanceServerGetNetworkACLsCall wrap *gomock.Call +type MockInstanceServerGetNetworkACLsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkACLsCall) Return(arg0 []api.NetworkACL, arg1 error) *MockInstanceServerGetNetworkACLsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkACLsCall) Do(f func() ([]api.NetworkACL, error)) *MockInstanceServerGetNetworkACLsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkACLsCall) DoAndReturn(f func() ([]api.NetworkACL, error)) *MockInstanceServerGetNetworkACLsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkAllocations mocks base method. @@ -3141,9 +7989,33 @@ func (m *MockInstanceServer) GetNetworkAllocations(arg0 bool) ([]api.NetworkAllo } // GetNetworkAllocations indicates an expected call of GetNetworkAllocations. -func (mr *MockInstanceServerMockRecorder) GetNetworkAllocations(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkAllocations(arg0 any) *MockInstanceServerGetNetworkAllocationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkAllocations", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkAllocations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkAllocations", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkAllocations), arg0) + return &MockInstanceServerGetNetworkAllocationsCall{Call: call} +} + +// MockInstanceServerGetNetworkAllocationsCall wrap *gomock.Call +type MockInstanceServerGetNetworkAllocationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkAllocationsCall) Return(arg0 []api.NetworkAllocations, arg1 error) *MockInstanceServerGetNetworkAllocationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkAllocationsCall) Do(f func(bool) ([]api.NetworkAllocations, error)) *MockInstanceServerGetNetworkAllocationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkAllocationsCall) DoAndReturn(f func(bool) ([]api.NetworkAllocations, error)) *MockInstanceServerGetNetworkAllocationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkForward mocks base method. @@ -3157,9 +8029,33 @@ func (m *MockInstanceServer) GetNetworkForward(arg0, arg1 string) (*api.NetworkF } // GetNetworkForward indicates an expected call of GetNetworkForward. -func (mr *MockInstanceServerMockRecorder) GetNetworkForward(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkForward(arg0, arg1 any) *MockInstanceServerGetNetworkForwardCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForward), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForward), arg0, arg1) + return &MockInstanceServerGetNetworkForwardCall{Call: call} +} + +// MockInstanceServerGetNetworkForwardCall wrap *gomock.Call +type MockInstanceServerGetNetworkForwardCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkForwardCall) Return(arg0 *api.NetworkForward, arg1 string, arg2 error) *MockInstanceServerGetNetworkForwardCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkForwardCall) Do(f func(string, string) (*api.NetworkForward, string, error)) *MockInstanceServerGetNetworkForwardCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkForwardCall) DoAndReturn(f func(string, string) (*api.NetworkForward, string, error)) *MockInstanceServerGetNetworkForwardCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkForwardAddresses mocks base method. @@ -3172,9 +8068,33 @@ func (m *MockInstanceServer) GetNetworkForwardAddresses(arg0 string) ([]string, } // GetNetworkForwardAddresses indicates an expected call of GetNetworkForwardAddresses. -func (mr *MockInstanceServerMockRecorder) GetNetworkForwardAddresses(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkForwardAddresses(arg0 any) *MockInstanceServerGetNetworkForwardAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForwardAddresses", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForwardAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForwardAddresses", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForwardAddresses), arg0) + return &MockInstanceServerGetNetworkForwardAddressesCall{Call: call} +} + +// MockInstanceServerGetNetworkForwardAddressesCall wrap *gomock.Call +type MockInstanceServerGetNetworkForwardAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkForwardAddressesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkForwardAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkForwardAddressesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetNetworkForwardAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkForwardAddressesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetNetworkForwardAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkForwards mocks base method. @@ -3187,9 +8107,33 @@ func (m *MockInstanceServer) GetNetworkForwards(arg0 string) ([]api.NetworkForwa } // GetNetworkForwards indicates an expected call of GetNetworkForwards. -func (mr *MockInstanceServerMockRecorder) GetNetworkForwards(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkForwards(arg0 any) *MockInstanceServerGetNetworkForwardsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForwards", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForwards), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkForwards", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkForwards), arg0) + return &MockInstanceServerGetNetworkForwardsCall{Call: call} +} + +// MockInstanceServerGetNetworkForwardsCall wrap *gomock.Call +type MockInstanceServerGetNetworkForwardsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkForwardsCall) Return(arg0 []api.NetworkForward, arg1 error) *MockInstanceServerGetNetworkForwardsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkForwardsCall) Do(f func(string) ([]api.NetworkForward, error)) *MockInstanceServerGetNetworkForwardsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkForwardsCall) DoAndReturn(f func(string) ([]api.NetworkForward, error)) *MockInstanceServerGetNetworkForwardsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkLeases mocks base method. @@ -3202,9 +8146,33 @@ func (m *MockInstanceServer) GetNetworkLeases(arg0 string) ([]api.NetworkLease, } // GetNetworkLeases indicates an expected call of GetNetworkLeases. -func (mr *MockInstanceServerMockRecorder) GetNetworkLeases(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkLeases(arg0 any) *MockInstanceServerGetNetworkLeasesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLeases", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLeases), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLeases", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLeases), arg0) + return &MockInstanceServerGetNetworkLeasesCall{Call: call} +} + +// MockInstanceServerGetNetworkLeasesCall wrap *gomock.Call +type MockInstanceServerGetNetworkLeasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkLeasesCall) Return(arg0 []api.NetworkLease, arg1 error) *MockInstanceServerGetNetworkLeasesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkLeasesCall) Do(f func(string) ([]api.NetworkLease, error)) *MockInstanceServerGetNetworkLeasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkLeasesCall) DoAndReturn(f func(string) ([]api.NetworkLease, error)) *MockInstanceServerGetNetworkLeasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkLoadBalancer mocks base method. @@ -3218,9 +8186,33 @@ func (m *MockInstanceServer) GetNetworkLoadBalancer(arg0, arg1 string) (*api.Net } // GetNetworkLoadBalancer indicates an expected call of GetNetworkLoadBalancer. -func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancer(arg0, arg1 any) *MockInstanceServerGetNetworkLoadBalancerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancer), arg0, arg1) + return &MockInstanceServerGetNetworkLoadBalancerCall{Call: call} +} + +// MockInstanceServerGetNetworkLoadBalancerCall wrap *gomock.Call +type MockInstanceServerGetNetworkLoadBalancerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkLoadBalancerCall) Return(arg0 *api.NetworkLoadBalancer, arg1 string, arg2 error) *MockInstanceServerGetNetworkLoadBalancerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkLoadBalancerCall) Do(f func(string, string) (*api.NetworkLoadBalancer, string, error)) *MockInstanceServerGetNetworkLoadBalancerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkLoadBalancerCall) DoAndReturn(f func(string, string) (*api.NetworkLoadBalancer, string, error)) *MockInstanceServerGetNetworkLoadBalancerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkLoadBalancerAddresses mocks base method. @@ -3233,9 +8225,33 @@ func (m *MockInstanceServer) GetNetworkLoadBalancerAddresses(arg0 string) ([]str } // GetNetworkLoadBalancerAddresses indicates an expected call of GetNetworkLoadBalancerAddresses. -func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancerAddresses(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancerAddresses(arg0 any) *MockInstanceServerGetNetworkLoadBalancerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancerAddresses", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancerAddresses", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancerAddresses), arg0) + return &MockInstanceServerGetNetworkLoadBalancerAddressesCall{Call: call} +} + +// MockInstanceServerGetNetworkLoadBalancerAddressesCall wrap *gomock.Call +type MockInstanceServerGetNetworkLoadBalancerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkLoadBalancerAddressesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkLoadBalancerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkLoadBalancerAddressesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetNetworkLoadBalancerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkLoadBalancerAddressesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetNetworkLoadBalancerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkLoadBalancers mocks base method. @@ -3248,9 +8264,33 @@ func (m *MockInstanceServer) GetNetworkLoadBalancers(arg0 string) ([]api.Network } // GetNetworkLoadBalancers indicates an expected call of GetNetworkLoadBalancers. -func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancers(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkLoadBalancers(arg0 any) *MockInstanceServerGetNetworkLoadBalancersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancers", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkLoadBalancers", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkLoadBalancers), arg0) + return &MockInstanceServerGetNetworkLoadBalancersCall{Call: call} +} + +// MockInstanceServerGetNetworkLoadBalancersCall wrap *gomock.Call +type MockInstanceServerGetNetworkLoadBalancersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkLoadBalancersCall) Return(arg0 []api.NetworkLoadBalancer, arg1 error) *MockInstanceServerGetNetworkLoadBalancersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkLoadBalancersCall) Do(f func(string) ([]api.NetworkLoadBalancer, error)) *MockInstanceServerGetNetworkLoadBalancersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkLoadBalancersCall) DoAndReturn(f func(string) ([]api.NetworkLoadBalancer, error)) *MockInstanceServerGetNetworkLoadBalancersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkNames mocks base method. @@ -3263,9 +8303,33 @@ func (m *MockInstanceServer) GetNetworkNames() ([]string, error) { } // GetNetworkNames indicates an expected call of GetNetworkNames. -func (mr *MockInstanceServerMockRecorder) GetNetworkNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkNames() *MockInstanceServerGetNetworkNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkNames)) + return &MockInstanceServerGetNetworkNamesCall{Call: call} +} + +// MockInstanceServerGetNetworkNamesCall wrap *gomock.Call +type MockInstanceServerGetNetworkNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetNetworkNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetNetworkNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkPeer mocks base method. @@ -3279,9 +8343,33 @@ func (m *MockInstanceServer) GetNetworkPeer(arg0, arg1 string) (*api.NetworkPeer } // GetNetworkPeer indicates an expected call of GetNetworkPeer. -func (mr *MockInstanceServerMockRecorder) GetNetworkPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkPeer(arg0, arg1 any) *MockInstanceServerGetNetworkPeerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeer), arg0, arg1) + return &MockInstanceServerGetNetworkPeerCall{Call: call} +} + +// MockInstanceServerGetNetworkPeerCall wrap *gomock.Call +type MockInstanceServerGetNetworkPeerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkPeerCall) Return(arg0 *api.NetworkPeer, arg1 string, arg2 error) *MockInstanceServerGetNetworkPeerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkPeerCall) Do(f func(string, string) (*api.NetworkPeer, string, error)) *MockInstanceServerGetNetworkPeerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkPeerCall) DoAndReturn(f func(string, string) (*api.NetworkPeer, string, error)) *MockInstanceServerGetNetworkPeerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkPeerNames mocks base method. @@ -3294,9 +8382,33 @@ func (m *MockInstanceServer) GetNetworkPeerNames(arg0 string) ([]string, error) } // GetNetworkPeerNames indicates an expected call of GetNetworkPeerNames. -func (mr *MockInstanceServerMockRecorder) GetNetworkPeerNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkPeerNames(arg0 any) *MockInstanceServerGetNetworkPeerNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeerNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeerNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeerNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeerNames), arg0) + return &MockInstanceServerGetNetworkPeerNamesCall{Call: call} +} + +// MockInstanceServerGetNetworkPeerNamesCall wrap *gomock.Call +type MockInstanceServerGetNetworkPeerNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkPeerNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkPeerNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkPeerNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetNetworkPeerNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkPeerNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetNetworkPeerNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkPeers mocks base method. @@ -3309,9 +8421,33 @@ func (m *MockInstanceServer) GetNetworkPeers(arg0 string) ([]api.NetworkPeer, er } // GetNetworkPeers indicates an expected call of GetNetworkPeers. -func (mr *MockInstanceServerMockRecorder) GetNetworkPeers(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkPeers(arg0 any) *MockInstanceServerGetNetworkPeersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeers", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPeers", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkPeers), arg0) + return &MockInstanceServerGetNetworkPeersCall{Call: call} +} + +// MockInstanceServerGetNetworkPeersCall wrap *gomock.Call +type MockInstanceServerGetNetworkPeersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkPeersCall) Return(arg0 []api.NetworkPeer, arg1 error) *MockInstanceServerGetNetworkPeersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkPeersCall) Do(f func(string) ([]api.NetworkPeer, error)) *MockInstanceServerGetNetworkPeersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkPeersCall) DoAndReturn(f func(string) ([]api.NetworkPeer, error)) *MockInstanceServerGetNetworkPeersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkState mocks base method. @@ -3324,9 +8460,33 @@ func (m *MockInstanceServer) GetNetworkState(arg0 string) (*api.NetworkState, er } // GetNetworkState indicates an expected call of GetNetworkState. -func (mr *MockInstanceServerMockRecorder) GetNetworkState(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkState(arg0 any) *MockInstanceServerGetNetworkStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkState), arg0) + return &MockInstanceServerGetNetworkStateCall{Call: call} +} + +// MockInstanceServerGetNetworkStateCall wrap *gomock.Call +type MockInstanceServerGetNetworkStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkStateCall) Return(arg0 *api.NetworkState, arg1 error) *MockInstanceServerGetNetworkStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkStateCall) Do(f func(string) (*api.NetworkState, error)) *MockInstanceServerGetNetworkStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkStateCall) DoAndReturn(f func(string) (*api.NetworkState, error)) *MockInstanceServerGetNetworkStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZone mocks base method. @@ -3340,9 +8500,33 @@ func (m *MockInstanceServer) GetNetworkZone(arg0 string) (*api.NetworkZone, stri } // GetNetworkZone indicates an expected call of GetNetworkZone. -func (mr *MockInstanceServerMockRecorder) GetNetworkZone(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZone(arg0 any) *MockInstanceServerGetNetworkZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZone), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZone), arg0) + return &MockInstanceServerGetNetworkZoneCall{Call: call} +} + +// MockInstanceServerGetNetworkZoneCall wrap *gomock.Call +type MockInstanceServerGetNetworkZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZoneCall) Return(arg0 *api.NetworkZone, arg1 string, arg2 error) *MockInstanceServerGetNetworkZoneCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZoneCall) Do(f func(string) (*api.NetworkZone, string, error)) *MockInstanceServerGetNetworkZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZoneCall) DoAndReturn(f func(string) (*api.NetworkZone, string, error)) *MockInstanceServerGetNetworkZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZoneNames mocks base method. @@ -3355,9 +8539,33 @@ func (m *MockInstanceServer) GetNetworkZoneNames() ([]string, error) { } // GetNetworkZoneNames indicates an expected call of GetNetworkZoneNames. -func (mr *MockInstanceServerMockRecorder) GetNetworkZoneNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZoneNames() *MockInstanceServerGetNetworkZoneNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneNames)) + return &MockInstanceServerGetNetworkZoneNamesCall{Call: call} +} + +// MockInstanceServerGetNetworkZoneNamesCall wrap *gomock.Call +type MockInstanceServerGetNetworkZoneNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZoneNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkZoneNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZoneNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetNetworkZoneNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZoneNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetNetworkZoneNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZoneRecord mocks base method. @@ -3371,9 +8579,33 @@ func (m *MockInstanceServer) GetNetworkZoneRecord(arg0, arg1 string) (*api.Netwo } // GetNetworkZoneRecord indicates an expected call of GetNetworkZoneRecord. -func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecord(arg0, arg1 any) *MockInstanceServerGetNetworkZoneRecordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecord), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecord), arg0, arg1) + return &MockInstanceServerGetNetworkZoneRecordCall{Call: call} +} + +// MockInstanceServerGetNetworkZoneRecordCall wrap *gomock.Call +type MockInstanceServerGetNetworkZoneRecordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZoneRecordCall) Return(arg0 *api.NetworkZoneRecord, arg1 string, arg2 error) *MockInstanceServerGetNetworkZoneRecordCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZoneRecordCall) Do(f func(string, string) (*api.NetworkZoneRecord, string, error)) *MockInstanceServerGetNetworkZoneRecordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZoneRecordCall) DoAndReturn(f func(string, string) (*api.NetworkZoneRecord, string, error)) *MockInstanceServerGetNetworkZoneRecordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZoneRecordNames mocks base method. @@ -3386,9 +8618,33 @@ func (m *MockInstanceServer) GetNetworkZoneRecordNames(arg0 string) ([]string, e } // GetNetworkZoneRecordNames indicates an expected call of GetNetworkZoneRecordNames. -func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecordNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecordNames(arg0 any) *MockInstanceServerGetNetworkZoneRecordNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecordNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecordNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecordNames", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecordNames), arg0) + return &MockInstanceServerGetNetworkZoneRecordNamesCall{Call: call} +} + +// MockInstanceServerGetNetworkZoneRecordNamesCall wrap *gomock.Call +type MockInstanceServerGetNetworkZoneRecordNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZoneRecordNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetNetworkZoneRecordNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZoneRecordNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetNetworkZoneRecordNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZoneRecordNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetNetworkZoneRecordNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZoneRecords mocks base method. @@ -3401,9 +8657,33 @@ func (m *MockInstanceServer) GetNetworkZoneRecords(arg0 string) ([]api.NetworkZo } // GetNetworkZoneRecords indicates an expected call of GetNetworkZoneRecords. -func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecords(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZoneRecords(arg0 any) *MockInstanceServerGetNetworkZoneRecordsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecords", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecords), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZoneRecords", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZoneRecords), arg0) + return &MockInstanceServerGetNetworkZoneRecordsCall{Call: call} +} + +// MockInstanceServerGetNetworkZoneRecordsCall wrap *gomock.Call +type MockInstanceServerGetNetworkZoneRecordsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZoneRecordsCall) Return(arg0 []api.NetworkZoneRecord, arg1 error) *MockInstanceServerGetNetworkZoneRecordsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZoneRecordsCall) Do(f func(string) ([]api.NetworkZoneRecord, error)) *MockInstanceServerGetNetworkZoneRecordsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZoneRecordsCall) DoAndReturn(f func(string) ([]api.NetworkZoneRecord, error)) *MockInstanceServerGetNetworkZoneRecordsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkZones mocks base method. @@ -3416,9 +8696,33 @@ func (m *MockInstanceServer) GetNetworkZones() ([]api.NetworkZone, error) { } // GetNetworkZones indicates an expected call of GetNetworkZones. -func (mr *MockInstanceServerMockRecorder) GetNetworkZones() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworkZones() *MockInstanceServerGetNetworkZonesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZones", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZones)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkZones", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworkZones)) + return &MockInstanceServerGetNetworkZonesCall{Call: call} +} + +// MockInstanceServerGetNetworkZonesCall wrap *gomock.Call +type MockInstanceServerGetNetworkZonesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworkZonesCall) Return(arg0 []api.NetworkZone, arg1 error) *MockInstanceServerGetNetworkZonesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworkZonesCall) Do(f func() ([]api.NetworkZone, error)) *MockInstanceServerGetNetworkZonesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworkZonesCall) DoAndReturn(f func() ([]api.NetworkZone, error)) *MockInstanceServerGetNetworkZonesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworks mocks base method. @@ -3431,9 +8735,33 @@ func (m *MockInstanceServer) GetNetworks() ([]api.Network, error) { } // GetNetworks indicates an expected call of GetNetworks. -func (mr *MockInstanceServerMockRecorder) GetNetworks() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetNetworks() *MockInstanceServerGetNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockInstanceServer)(nil).GetNetworks)) + return &MockInstanceServerGetNetworksCall{Call: call} +} + +// MockInstanceServerGetNetworksCall wrap *gomock.Call +type MockInstanceServerGetNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetNetworksCall) Return(arg0 []api.Network, arg1 error) *MockInstanceServerGetNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetNetworksCall) Do(f func() ([]api.Network, error)) *MockInstanceServerGetNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetNetworksCall) DoAndReturn(f func() ([]api.Network, error)) *MockInstanceServerGetNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperation mocks base method. @@ -3447,9 +8775,33 @@ func (m *MockInstanceServer) GetOperation(arg0 string) (*api.Operation, string, } // GetOperation indicates an expected call of GetOperation. -func (mr *MockInstanceServerMockRecorder) GetOperation(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperation(arg0 any) *MockInstanceServerGetOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockInstanceServer)(nil).GetOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockInstanceServer)(nil).GetOperation), arg0) + return &MockInstanceServerGetOperationCall{Call: call} +} + +// MockInstanceServerGetOperationCall wrap *gomock.Call +type MockInstanceServerGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationCall) Return(arg0 *api.Operation, arg1 string, arg2 error) *MockInstanceServerGetOperationCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationCall) Do(f func(string) (*api.Operation, string, error)) *MockInstanceServerGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationCall) DoAndReturn(f func(string) (*api.Operation, string, error)) *MockInstanceServerGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperationUUIDs mocks base method. @@ -3462,9 +8814,33 @@ func (m *MockInstanceServer) GetOperationUUIDs() ([]string, error) { } // GetOperationUUIDs indicates an expected call of GetOperationUUIDs. -func (mr *MockInstanceServerMockRecorder) GetOperationUUIDs() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperationUUIDs() *MockInstanceServerGetOperationUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationUUIDs", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationUUIDs", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationUUIDs)) + return &MockInstanceServerGetOperationUUIDsCall{Call: call} +} + +// MockInstanceServerGetOperationUUIDsCall wrap *gomock.Call +type MockInstanceServerGetOperationUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationUUIDsCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetOperationUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationUUIDsCall) Do(f func() ([]string, error)) *MockInstanceServerGetOperationUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetOperationUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperationWait mocks base method. @@ -3478,9 +8854,33 @@ func (m *MockInstanceServer) GetOperationWait(arg0 string, arg1 int) (*api.Opera } // GetOperationWait indicates an expected call of GetOperationWait. -func (mr *MockInstanceServerMockRecorder) GetOperationWait(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperationWait(arg0, arg1 any) *MockInstanceServerGetOperationWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWait", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWait), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWait", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWait), arg0, arg1) + return &MockInstanceServerGetOperationWaitCall{Call: call} +} + +// MockInstanceServerGetOperationWaitCall wrap *gomock.Call +type MockInstanceServerGetOperationWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationWaitCall) Return(arg0 *api.Operation, arg1 string, arg2 error) *MockInstanceServerGetOperationWaitCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationWaitCall) Do(f func(string, int) (*api.Operation, string, error)) *MockInstanceServerGetOperationWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationWaitCall) DoAndReturn(f func(string, int) (*api.Operation, string, error)) *MockInstanceServerGetOperationWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperationWaitSecret mocks base method. @@ -3494,9 +8894,33 @@ func (m *MockInstanceServer) GetOperationWaitSecret(arg0, arg1 string, arg2 int) } // GetOperationWaitSecret indicates an expected call of GetOperationWaitSecret. -func (mr *MockInstanceServerMockRecorder) GetOperationWaitSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperationWaitSecret(arg0, arg1, arg2 any) *MockInstanceServerGetOperationWaitSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWaitSecret", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWaitSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWaitSecret", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWaitSecret), arg0, arg1, arg2) + return &MockInstanceServerGetOperationWaitSecretCall{Call: call} +} + +// MockInstanceServerGetOperationWaitSecretCall wrap *gomock.Call +type MockInstanceServerGetOperationWaitSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationWaitSecretCall) Return(arg0 *api.Operation, arg1 string, arg2 error) *MockInstanceServerGetOperationWaitSecretCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationWaitSecretCall) Do(f func(string, string, int) (*api.Operation, string, error)) *MockInstanceServerGetOperationWaitSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationWaitSecretCall) DoAndReturn(f func(string, string, int) (*api.Operation, string, error)) *MockInstanceServerGetOperationWaitSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperationWebsocket mocks base method. @@ -3509,9 +8933,33 @@ func (m *MockInstanceServer) GetOperationWebsocket(arg0, arg1 string) (*websocke } // GetOperationWebsocket indicates an expected call of GetOperationWebsocket. -func (mr *MockInstanceServerMockRecorder) GetOperationWebsocket(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperationWebsocket(arg0, arg1 any) *MockInstanceServerGetOperationWebsocketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWebsocket", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWebsocket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationWebsocket", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationWebsocket), arg0, arg1) + return &MockInstanceServerGetOperationWebsocketCall{Call: call} +} + +// MockInstanceServerGetOperationWebsocketCall wrap *gomock.Call +type MockInstanceServerGetOperationWebsocketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationWebsocketCall) Return(arg0 *websocket.Conn, arg1 error) *MockInstanceServerGetOperationWebsocketCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationWebsocketCall) Do(f func(string, string) (*websocket.Conn, error)) *MockInstanceServerGetOperationWebsocketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationWebsocketCall) DoAndReturn(f func(string, string) (*websocket.Conn, error)) *MockInstanceServerGetOperationWebsocketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperations mocks base method. @@ -3524,9 +8972,33 @@ func (m *MockInstanceServer) GetOperations() ([]api.Operation, error) { } // GetOperations indicates an expected call of GetOperations. -func (mr *MockInstanceServerMockRecorder) GetOperations() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperations() *MockInstanceServerGetOperationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperations", reflect.TypeOf((*MockInstanceServer)(nil).GetOperations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperations", reflect.TypeOf((*MockInstanceServer)(nil).GetOperations)) + return &MockInstanceServerGetOperationsCall{Call: call} +} + +// MockInstanceServerGetOperationsCall wrap *gomock.Call +type MockInstanceServerGetOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationsCall) Return(arg0 []api.Operation, arg1 error) *MockInstanceServerGetOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationsCall) Do(f func() ([]api.Operation, error)) *MockInstanceServerGetOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationsCall) DoAndReturn(f func() ([]api.Operation, error)) *MockInstanceServerGetOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOperationsAllProjects mocks base method. @@ -3539,9 +9011,33 @@ func (m *MockInstanceServer) GetOperationsAllProjects() ([]api.Operation, error) } // GetOperationsAllProjects indicates an expected call of GetOperationsAllProjects. -func (mr *MockInstanceServerMockRecorder) GetOperationsAllProjects() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetOperationsAllProjects() *MockInstanceServerGetOperationsAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationsAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationsAllProjects)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperationsAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetOperationsAllProjects)) + return &MockInstanceServerGetOperationsAllProjectsCall{Call: call} +} + +// MockInstanceServerGetOperationsAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetOperationsAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetOperationsAllProjectsCall) Return(arg0 []api.Operation, arg1 error) *MockInstanceServerGetOperationsAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetOperationsAllProjectsCall) Do(f func() ([]api.Operation, error)) *MockInstanceServerGetOperationsAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetOperationsAllProjectsCall) DoAndReturn(f func() ([]api.Operation, error)) *MockInstanceServerGetOperationsAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPrivateImage mocks base method. @@ -3555,9 +9051,33 @@ func (m *MockInstanceServer) GetPrivateImage(arg0, arg1 string) (*api.Image, str } // GetPrivateImage indicates an expected call of GetPrivateImage. -func (mr *MockInstanceServerMockRecorder) GetPrivateImage(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetPrivateImage(arg0, arg1 any) *MockInstanceServerGetPrivateImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImage", reflect.TypeOf((*MockInstanceServer)(nil).GetPrivateImage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImage", reflect.TypeOf((*MockInstanceServer)(nil).GetPrivateImage), arg0, arg1) + return &MockInstanceServerGetPrivateImageCall{Call: call} +} + +// MockInstanceServerGetPrivateImageCall wrap *gomock.Call +type MockInstanceServerGetPrivateImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetPrivateImageCall) Return(arg0 *api.Image, arg1 string, arg2 error) *MockInstanceServerGetPrivateImageCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetPrivateImageCall) Do(f func(string, string) (*api.Image, string, error)) *MockInstanceServerGetPrivateImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetPrivateImageCall) DoAndReturn(f func(string, string) (*api.Image, string, error)) *MockInstanceServerGetPrivateImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPrivateImageFile mocks base method. @@ -3570,9 +9090,33 @@ func (m *MockInstanceServer) GetPrivateImageFile(arg0, arg1 string, arg2 lxd.Ima } // GetPrivateImageFile indicates an expected call of GetPrivateImageFile. -func (mr *MockInstanceServerMockRecorder) GetPrivateImageFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetPrivateImageFile(arg0, arg1, arg2 any) *MockInstanceServerGetPrivateImageFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImageFile", reflect.TypeOf((*MockInstanceServer)(nil).GetPrivateImageFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateImageFile", reflect.TypeOf((*MockInstanceServer)(nil).GetPrivateImageFile), arg0, arg1, arg2) + return &MockInstanceServerGetPrivateImageFileCall{Call: call} +} + +// MockInstanceServerGetPrivateImageFileCall wrap *gomock.Call +type MockInstanceServerGetPrivateImageFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetPrivateImageFileCall) Return(arg0 *lxd.ImageFileResponse, arg1 error) *MockInstanceServerGetPrivateImageFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetPrivateImageFileCall) Do(f func(string, string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockInstanceServerGetPrivateImageFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetPrivateImageFileCall) DoAndReturn(f func(string, string, lxd.ImageFileRequest) (*lxd.ImageFileResponse, error)) *MockInstanceServerGetPrivateImageFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProfile mocks base method. @@ -3586,9 +9130,33 @@ func (m *MockInstanceServer) GetProfile(arg0 string) (*api.Profile, string, erro } // GetProfile indicates an expected call of GetProfile. -func (mr *MockInstanceServerMockRecorder) GetProfile(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProfile(arg0 any) *MockInstanceServerGetProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockInstanceServer)(nil).GetProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockInstanceServer)(nil).GetProfile), arg0) + return &MockInstanceServerGetProfileCall{Call: call} +} + +// MockInstanceServerGetProfileCall wrap *gomock.Call +type MockInstanceServerGetProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProfileCall) Return(arg0 *api.Profile, arg1 string, arg2 error) *MockInstanceServerGetProfileCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProfileCall) Do(f func(string) (*api.Profile, string, error)) *MockInstanceServerGetProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProfileCall) DoAndReturn(f func(string) (*api.Profile, string, error)) *MockInstanceServerGetProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProfileNames mocks base method. @@ -3601,9 +9169,33 @@ func (m *MockInstanceServer) GetProfileNames() ([]string, error) { } // GetProfileNames indicates an expected call of GetProfileNames. -func (mr *MockInstanceServerMockRecorder) GetProfileNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProfileNames() *MockInstanceServerGetProfileNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileNames", reflect.TypeOf((*MockInstanceServer)(nil).GetProfileNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileNames", reflect.TypeOf((*MockInstanceServer)(nil).GetProfileNames)) + return &MockInstanceServerGetProfileNamesCall{Call: call} +} + +// MockInstanceServerGetProfileNamesCall wrap *gomock.Call +type MockInstanceServerGetProfileNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProfileNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetProfileNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProfileNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetProfileNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProfileNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetProfileNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProfiles mocks base method. @@ -3616,9 +9208,33 @@ func (m *MockInstanceServer) GetProfiles() ([]api.Profile, error) { } // GetProfiles indicates an expected call of GetProfiles. -func (mr *MockInstanceServerMockRecorder) GetProfiles() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProfiles() *MockInstanceServerGetProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetProfiles)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfiles", reflect.TypeOf((*MockInstanceServer)(nil).GetProfiles)) + return &MockInstanceServerGetProfilesCall{Call: call} +} + +// MockInstanceServerGetProfilesCall wrap *gomock.Call +type MockInstanceServerGetProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProfilesCall) Return(arg0 []api.Profile, arg1 error) *MockInstanceServerGetProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProfilesCall) Do(f func() ([]api.Profile, error)) *MockInstanceServerGetProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProfilesCall) DoAndReturn(f func() ([]api.Profile, error)) *MockInstanceServerGetProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProject mocks base method. @@ -3632,9 +9248,33 @@ func (m *MockInstanceServer) GetProject(arg0 string) (*api.Project, string, erro } // GetProject indicates an expected call of GetProject. -func (mr *MockInstanceServerMockRecorder) GetProject(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProject(arg0 any) *MockInstanceServerGetProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProject", reflect.TypeOf((*MockInstanceServer)(nil).GetProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProject", reflect.TypeOf((*MockInstanceServer)(nil).GetProject), arg0) + return &MockInstanceServerGetProjectCall{Call: call} +} + +// MockInstanceServerGetProjectCall wrap *gomock.Call +type MockInstanceServerGetProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProjectCall) Return(arg0 *api.Project, arg1 string, arg2 error) *MockInstanceServerGetProjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProjectCall) Do(f func(string) (*api.Project, string, error)) *MockInstanceServerGetProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProjectCall) DoAndReturn(f func(string) (*api.Project, string, error)) *MockInstanceServerGetProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProjectNames mocks base method. @@ -3647,9 +9287,33 @@ func (m *MockInstanceServer) GetProjectNames() ([]string, error) { } // GetProjectNames indicates an expected call of GetProjectNames. -func (mr *MockInstanceServerMockRecorder) GetProjectNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProjectNames() *MockInstanceServerGetProjectNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectNames", reflect.TypeOf((*MockInstanceServer)(nil).GetProjectNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectNames", reflect.TypeOf((*MockInstanceServer)(nil).GetProjectNames)) + return &MockInstanceServerGetProjectNamesCall{Call: call} +} + +// MockInstanceServerGetProjectNamesCall wrap *gomock.Call +type MockInstanceServerGetProjectNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProjectNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetProjectNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProjectNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetProjectNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProjectNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetProjectNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProjectState mocks base method. @@ -3662,9 +9326,33 @@ func (m *MockInstanceServer) GetProjectState(arg0 string) (*api.ProjectState, er } // GetProjectState indicates an expected call of GetProjectState. -func (mr *MockInstanceServerMockRecorder) GetProjectState(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProjectState(arg0 any) *MockInstanceServerGetProjectStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectState", reflect.TypeOf((*MockInstanceServer)(nil).GetProjectState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectState", reflect.TypeOf((*MockInstanceServer)(nil).GetProjectState), arg0) + return &MockInstanceServerGetProjectStateCall{Call: call} +} + +// MockInstanceServerGetProjectStateCall wrap *gomock.Call +type MockInstanceServerGetProjectStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProjectStateCall) Return(arg0 *api.ProjectState, arg1 error) *MockInstanceServerGetProjectStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProjectStateCall) Do(f func(string) (*api.ProjectState, error)) *MockInstanceServerGetProjectStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProjectStateCall) DoAndReturn(f func(string) (*api.ProjectState, error)) *MockInstanceServerGetProjectStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProjects mocks base method. @@ -3677,9 +9365,33 @@ func (m *MockInstanceServer) GetProjects() ([]api.Project, error) { } // GetProjects indicates an expected call of GetProjects. -func (mr *MockInstanceServerMockRecorder) GetProjects() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetProjects() *MockInstanceServerGetProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetProjects)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetProjects)) + return &MockInstanceServerGetProjectsCall{Call: call} +} + +// MockInstanceServerGetProjectsCall wrap *gomock.Call +type MockInstanceServerGetProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetProjectsCall) Return(arg0 []api.Project, arg1 error) *MockInstanceServerGetProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetProjectsCall) Do(f func() ([]api.Project, error)) *MockInstanceServerGetProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetProjectsCall) DoAndReturn(f func() ([]api.Project, error)) *MockInstanceServerGetProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetServer mocks base method. @@ -3693,9 +9405,33 @@ func (m *MockInstanceServer) GetServer() (*api.Server, string, error) { } // GetServer indicates an expected call of GetServer. -func (mr *MockInstanceServerMockRecorder) GetServer() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetServer() *MockInstanceServerGetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockInstanceServer)(nil).GetServer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockInstanceServer)(nil).GetServer)) + return &MockInstanceServerGetServerCall{Call: call} +} + +// MockInstanceServerGetServerCall wrap *gomock.Call +type MockInstanceServerGetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetServerCall) Return(arg0 *api.Server, arg1 string, arg2 error) *MockInstanceServerGetServerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetServerCall) Do(f func() (*api.Server, string, error)) *MockInstanceServerGetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetServerCall) DoAndReturn(f func() (*api.Server, string, error)) *MockInstanceServerGetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetServerResources mocks base method. @@ -3708,9 +9444,33 @@ func (m *MockInstanceServer) GetServerResources() (*api.Resources, error) { } // GetServerResources indicates an expected call of GetServerResources. -func (mr *MockInstanceServerMockRecorder) GetServerResources() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetServerResources() *MockInstanceServerGetServerResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerResources", reflect.TypeOf((*MockInstanceServer)(nil).GetServerResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerResources", reflect.TypeOf((*MockInstanceServer)(nil).GetServerResources)) + return &MockInstanceServerGetServerResourcesCall{Call: call} +} + +// MockInstanceServerGetServerResourcesCall wrap *gomock.Call +type MockInstanceServerGetServerResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetServerResourcesCall) Return(arg0 *api.Resources, arg1 error) *MockInstanceServerGetServerResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetServerResourcesCall) Do(f func() (*api.Resources, error)) *MockInstanceServerGetServerResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetServerResourcesCall) DoAndReturn(f func() (*api.Resources, error)) *MockInstanceServerGetServerResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePool mocks base method. @@ -3724,9 +9484,33 @@ func (m *MockInstanceServer) GetStoragePool(arg0 string) (*api.StoragePool, stri } // GetStoragePool indicates an expected call of GetStoragePool. -func (mr *MockInstanceServerMockRecorder) GetStoragePool(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePool(arg0 any) *MockInstanceServerGetStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePool), arg0) + return &MockInstanceServerGetStoragePoolCall{Call: call} +} + +// MockInstanceServerGetStoragePoolCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolCall) Return(arg0 *api.StoragePool, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolCall) Do(f func(string) (*api.StoragePool, string, error)) *MockInstanceServerGetStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolCall) DoAndReturn(f func(string) (*api.StoragePool, string, error)) *MockInstanceServerGetStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBucket mocks base method. @@ -3740,9 +9524,33 @@ func (m *MockInstanceServer) GetStoragePoolBucket(arg0, arg1 string) (*api.Stora } // GetStoragePoolBucket indicates an expected call of GetStoragePoolBucket. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucket(arg0, arg1 any) *MockInstanceServerGetStoragePoolBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucket), arg0, arg1) + return &MockInstanceServerGetStoragePoolBucketCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketCall) Return(arg0 *api.StorageBucket, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolBucketCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketCall) Do(f func(string, string) (*api.StorageBucket, string, error)) *MockInstanceServerGetStoragePoolBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketCall) DoAndReturn(f func(string, string) (*api.StorageBucket, string, error)) *MockInstanceServerGetStoragePoolBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBucketKey mocks base method. @@ -3756,9 +9564,33 @@ func (m *MockInstanceServer) GetStoragePoolBucketKey(arg0, arg1, arg2 string) (* } // GetStoragePoolBucketKey indicates an expected call of GetStoragePoolBucketKey. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKey(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKey(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolBucketKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKey), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKey), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolBucketKeyCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketKeyCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketKeyCall) Return(arg0 *api.StorageBucketKey, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolBucketKeyCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketKeyCall) Do(f func(string, string, string) (*api.StorageBucketKey, string, error)) *MockInstanceServerGetStoragePoolBucketKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketKeyCall) DoAndReturn(f func(string, string, string) (*api.StorageBucketKey, string, error)) *MockInstanceServerGetStoragePoolBucketKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBucketKeyNames mocks base method. @@ -3771,9 +9603,33 @@ func (m *MockInstanceServer) GetStoragePoolBucketKeyNames(arg0, arg1 string) ([] } // GetStoragePoolBucketKeyNames indicates an expected call of GetStoragePoolBucketKeyNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKeyNames(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKeyNames(arg0, arg1 any) *MockInstanceServerGetStoragePoolBucketKeyNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKeyNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKeyNames), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKeyNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKeyNames), arg0, arg1) + return &MockInstanceServerGetStoragePoolBucketKeyNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketKeyNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketKeyNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketKeyNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolBucketKeyNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketKeyNamesCall) Do(f func(string, string) ([]string, error)) *MockInstanceServerGetStoragePoolBucketKeyNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketKeyNamesCall) DoAndReturn(f func(string, string) ([]string, error)) *MockInstanceServerGetStoragePoolBucketKeyNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBucketKeys mocks base method. @@ -3786,9 +9642,33 @@ func (m *MockInstanceServer) GetStoragePoolBucketKeys(arg0, arg1 string) ([]api. } // GetStoragePoolBucketKeys indicates an expected call of GetStoragePoolBucketKeys. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKeys(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketKeys(arg0, arg1 any) *MockInstanceServerGetStoragePoolBucketKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKeys", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKeys), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketKeys", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketKeys), arg0, arg1) + return &MockInstanceServerGetStoragePoolBucketKeysCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketKeysCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketKeysCall) Return(arg0 []api.StorageBucketKey, arg1 error) *MockInstanceServerGetStoragePoolBucketKeysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketKeysCall) Do(f func(string, string) ([]api.StorageBucketKey, error)) *MockInstanceServerGetStoragePoolBucketKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketKeysCall) DoAndReturn(f func(string, string) ([]api.StorageBucketKey, error)) *MockInstanceServerGetStoragePoolBucketKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBucketNames mocks base method. @@ -3801,9 +9681,33 @@ func (m *MockInstanceServer) GetStoragePoolBucketNames(arg0 string) ([]string, e } // GetStoragePoolBucketNames indicates an expected call of GetStoragePoolBucketNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBucketNames(arg0 any) *MockInstanceServerGetStoragePoolBucketNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBucketNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBucketNames), arg0) + return &MockInstanceServerGetStoragePoolBucketNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolBucketNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetStoragePoolBucketNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetStoragePoolBucketNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolBuckets mocks base method. @@ -3816,9 +9720,33 @@ func (m *MockInstanceServer) GetStoragePoolBuckets(arg0 string) ([]api.StorageBu } // GetStoragePoolBuckets indicates an expected call of GetStoragePoolBuckets. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolBuckets(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolBuckets(arg0 any) *MockInstanceServerGetStoragePoolBucketsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBuckets", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBuckets), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolBuckets", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolBuckets), arg0) + return &MockInstanceServerGetStoragePoolBucketsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolBucketsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolBucketsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolBucketsCall) Return(arg0 []api.StorageBucket, arg1 error) *MockInstanceServerGetStoragePoolBucketsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolBucketsCall) Do(f func(string) ([]api.StorageBucket, error)) *MockInstanceServerGetStoragePoolBucketsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolBucketsCall) DoAndReturn(f func(string) ([]api.StorageBucket, error)) *MockInstanceServerGetStoragePoolBucketsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolNames mocks base method. @@ -3831,9 +9759,33 @@ func (m *MockInstanceServer) GetStoragePoolNames() ([]string, error) { } // GetStoragePoolNames indicates an expected call of GetStoragePoolNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolNames() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolNames() *MockInstanceServerGetStoragePoolNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolNames)) + return &MockInstanceServerGetStoragePoolNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolNamesCall) Do(f func() ([]string, error)) *MockInstanceServerGetStoragePoolNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolNamesCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetStoragePoolNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolResources mocks base method. @@ -3846,9 +9798,33 @@ func (m *MockInstanceServer) GetStoragePoolResources(arg0 string) (*api.Resource } // GetStoragePoolResources indicates an expected call of GetStoragePoolResources. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolResources(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolResources(arg0 any) *MockInstanceServerGetStoragePoolResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolResources", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolResources", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolResources), arg0) + return &MockInstanceServerGetStoragePoolResourcesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolResourcesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolResourcesCall) Return(arg0 *api.ResourcesStoragePool, arg1 error) *MockInstanceServerGetStoragePoolResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolResourcesCall) Do(f func(string) (*api.ResourcesStoragePool, error)) *MockInstanceServerGetStoragePoolResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolResourcesCall) DoAndReturn(f func(string) (*api.ResourcesStoragePool, error)) *MockInstanceServerGetStoragePoolResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolume mocks base method. @@ -3862,9 +9838,33 @@ func (m *MockInstanceServer) GetStoragePoolVolume(arg0, arg1, arg2 string) (*api } // GetStoragePoolVolume indicates an expected call of GetStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeCall) Return(arg0 *api.StorageVolume, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeCall) Do(f func(string, string, string) (*api.StorageVolume, string, error)) *MockInstanceServerGetStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) (*api.StorageVolume, string, error)) *MockInstanceServerGetStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeBackup mocks base method. @@ -3878,9 +9878,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeBackup(arg0, arg1, arg2 string) } // GetStoragePoolVolumeBackup indicates an expected call of GetStoragePoolVolumeBackup. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackup(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolVolumeBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackup), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolVolumeBackupCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeBackupCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeBackupCall) Return(arg0 *api.StoragePoolVolumeBackup, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolVolumeBackupCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeBackupCall) Do(f func(string, string, string) (*api.StoragePoolVolumeBackup, string, error)) *MockInstanceServerGetStoragePoolVolumeBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeBackupCall) DoAndReturn(f func(string, string, string) (*api.StoragePoolVolumeBackup, string, error)) *MockInstanceServerGetStoragePoolVolumeBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeBackupFile mocks base method. @@ -3893,9 +9917,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeBackupFile(arg0, arg1, arg2 str } // GetStoragePoolVolumeBackupFile indicates an expected call of GetStoragePoolVolumeBackupFile. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackupFile(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackupFile(arg0, arg1, arg2, arg3 any) *MockInstanceServerGetStoragePoolVolumeBackupFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackupFile), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackupFile", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackupFile), arg0, arg1, arg2, arg3) + return &MockInstanceServerGetStoragePoolVolumeBackupFileCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeBackupFileCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeBackupFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeBackupFileCall) Return(arg0 *lxd.BackupFileResponse, arg1 error) *MockInstanceServerGetStoragePoolVolumeBackupFileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeBackupFileCall) Do(f func(string, string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetStoragePoolVolumeBackupFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeBackupFileCall) DoAndReturn(f func(string, string, string, *lxd.BackupFileRequest) (*lxd.BackupFileResponse, error)) *MockInstanceServerGetStoragePoolVolumeBackupFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeBackupNames mocks base method. @@ -3908,9 +9956,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeBackupNames(arg0, arg1 string) } // GetStoragePoolVolumeBackupNames indicates an expected call of GetStoragePoolVolumeBackupNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackupNames(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackupNames(arg0, arg1 any) *MockInstanceServerGetStoragePoolVolumeBackupNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackupNames), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackupNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackupNames), arg0, arg1) + return &MockInstanceServerGetStoragePoolVolumeBackupNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeBackupNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeBackupNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeBackupNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolVolumeBackupNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeBackupNamesCall) Do(f func(string, string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeBackupNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeBackupNamesCall) DoAndReturn(f func(string, string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeBackupNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeBackups mocks base method. @@ -3923,9 +9995,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeBackups(arg0, arg1 string) ([]a } // GetStoragePoolVolumeBackups indicates an expected call of GetStoragePoolVolumeBackups. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackups(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeBackups(arg0, arg1 any) *MockInstanceServerGetStoragePoolVolumeBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackups), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeBackups", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeBackups), arg0, arg1) + return &MockInstanceServerGetStoragePoolVolumeBackupsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeBackupsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeBackupsCall) Return(arg0 []api.StoragePoolVolumeBackup, arg1 error) *MockInstanceServerGetStoragePoolVolumeBackupsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeBackupsCall) Do(f func(string, string) ([]api.StoragePoolVolumeBackup, error)) *MockInstanceServerGetStoragePoolVolumeBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeBackupsCall) DoAndReturn(f func(string, string) ([]api.StoragePoolVolumeBackup, error)) *MockInstanceServerGetStoragePoolVolumeBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeNames mocks base method. @@ -3938,9 +10034,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeNames(arg0 string) ([]string, e } // GetStoragePoolVolumeNames indicates an expected call of GetStoragePoolVolumeNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeNames(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeNames(arg0 any) *MockInstanceServerGetStoragePoolVolumeNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeNames), arg0) + return &MockInstanceServerGetStoragePoolVolumeNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolVolumeNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeNamesCall) Do(f func(string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeNamesAllProjects mocks base method. @@ -3953,9 +10073,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeNamesAllProjects(arg0 string) ( } // GetStoragePoolVolumeNamesAllProjects indicates an expected call of GetStoragePoolVolumeNamesAllProjects. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeNamesAllProjects(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeNamesAllProjects(arg0 any) *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeNamesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeNamesAllProjects), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeNamesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeNamesAllProjects), arg0) + return &MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall) Return(arg0 map[string][]string, arg1 error) *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall) Do(f func(string) (map[string][]string, error)) *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall) DoAndReturn(f func(string) (map[string][]string, error)) *MockInstanceServerGetStoragePoolVolumeNamesAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeSnapshot mocks base method. @@ -3969,9 +10113,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 } // GetStoragePoolVolumeSnapshot indicates an expected call of GetStoragePoolVolumeSnapshot. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerGetStoragePoolVolumeSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerGetStoragePoolVolumeSnapshotCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeSnapshotCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotCall) Return(arg0 *api.StorageVolumeSnapshot, arg1 string, arg2 error) *MockInstanceServerGetStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotCall) Do(f func(string, string, string, string) (*api.StorageVolumeSnapshot, string, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotCall) DoAndReturn(f func(string, string, string, string) (*api.StorageVolumeSnapshot, string, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeSnapshotNames mocks base method. @@ -3984,9 +10152,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeSnapshotNames(arg0, arg1, arg2 } // GetStoragePoolVolumeSnapshotNames indicates an expected call of GetStoragePoolVolumeSnapshotNames. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshotNames(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshotNames(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshotNames), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshotNames", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshotNames), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall) Do(f func(string, string, string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall) DoAndReturn(f func(string, string, string) ([]string, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeSnapshots mocks base method. @@ -3999,9 +10191,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeSnapshots(arg0, arg1, arg2 stri } // GetStoragePoolVolumeSnapshots indicates an expected call of GetStoragePoolVolumeSnapshots. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshots(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeSnapshots(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolVolumeSnapshotsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshots), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeSnapshots", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeSnapshots), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolVolumeSnapshotsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeSnapshotsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeSnapshotsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotsCall) Return(arg0 []api.StorageVolumeSnapshot, arg1 error) *MockInstanceServerGetStoragePoolVolumeSnapshotsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotsCall) Do(f func(string, string, string) ([]api.StorageVolumeSnapshot, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeSnapshotsCall) DoAndReturn(f func(string, string, string) ([]api.StorageVolumeSnapshot, error)) *MockInstanceServerGetStoragePoolVolumeSnapshotsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumeState mocks base method. @@ -4014,9 +10230,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumeState(arg0, arg1, arg2 string) } // GetStoragePoolVolumeState indicates an expected call of GetStoragePoolVolumeState. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumeState(arg0, arg1, arg2 any) *MockInstanceServerGetStoragePoolVolumeStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeState", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeState), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumeState", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumeState), arg0, arg1, arg2) + return &MockInstanceServerGetStoragePoolVolumeStateCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumeStateCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumeStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumeStateCall) Return(arg0 *api.StorageVolumeState, arg1 error) *MockInstanceServerGetStoragePoolVolumeStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumeStateCall) Do(f func(string, string, string) (*api.StorageVolumeState, error)) *MockInstanceServerGetStoragePoolVolumeStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumeStateCall) DoAndReturn(f func(string, string, string) (*api.StorageVolumeState, error)) *MockInstanceServerGetStoragePoolVolumeStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumes mocks base method. @@ -4029,9 +10269,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumes(arg0 string) ([]api.StorageVo } // GetStoragePoolVolumes indicates an expected call of GetStoragePoolVolumes. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumes(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumes(arg0 any) *MockInstanceServerGetStoragePoolVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumes), arg0) + return &MockInstanceServerGetStoragePoolVolumesCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumesCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumesCall) Return(arg0 []api.StorageVolume, arg1 error) *MockInstanceServerGetStoragePoolVolumesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumesCall) Do(f func(string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumesCall) DoAndReturn(f func(string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumesAllProjects mocks base method. @@ -4044,9 +10308,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumesAllProjects(arg0 string) ([]ap } // GetStoragePoolVolumesAllProjects indicates an expected call of GetStoragePoolVolumesAllProjects. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesAllProjects(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesAllProjects(arg0 any) *MockInstanceServerGetStoragePoolVolumesAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesAllProjects), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesAllProjects), arg0) + return &MockInstanceServerGetStoragePoolVolumesAllProjectsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumesAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumesAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumesAllProjectsCall) Return(arg0 []api.StorageVolume, arg1 error) *MockInstanceServerGetStoragePoolVolumesAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumesAllProjectsCall) Do(f func(string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumesAllProjectsCall) DoAndReturn(f func(string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumesWithFilter mocks base method. @@ -4059,9 +10347,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumesWithFilter(arg0 string, arg1 [ } // GetStoragePoolVolumesWithFilter indicates an expected call of GetStoragePoolVolumesWithFilter. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesWithFilter(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesWithFilter(arg0, arg1 any) *MockInstanceServerGetStoragePoolVolumesWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesWithFilter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesWithFilter", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesWithFilter), arg0, arg1) + return &MockInstanceServerGetStoragePoolVolumesWithFilterCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumesWithFilterCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumesWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterCall) Return(arg0 []api.StorageVolume, arg1 error) *MockInstanceServerGetStoragePoolVolumesWithFilterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterCall) Do(f func(string, []string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterCall) DoAndReturn(f func(string, []string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumesWithFilterAllProjects mocks base method. @@ -4074,9 +10386,33 @@ func (m *MockInstanceServer) GetStoragePoolVolumesWithFilterAllProjects(arg0 str } // GetStoragePoolVolumesWithFilterAllProjects indicates an expected call of GetStoragePoolVolumesWithFilterAllProjects. -func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesWithFilterAllProjects(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePoolVolumesWithFilterAllProjects(arg0, arg1 any) *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesWithFilterAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesWithFilterAllProjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumesWithFilterAllProjects", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePoolVolumesWithFilterAllProjects), arg0, arg1) + return &MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall) Return(arg0 []api.StorageVolume, arg1 error) *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall) Do(f func(string, []string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall) DoAndReturn(f func(string, []string) ([]api.StorageVolume, error)) *MockInstanceServerGetStoragePoolVolumesWithFilterAllProjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePools mocks base method. @@ -4089,9 +10425,33 @@ func (m *MockInstanceServer) GetStoragePools() ([]api.StoragePool, error) { } // GetStoragePools indicates an expected call of GetStoragePools. -func (mr *MockInstanceServerMockRecorder) GetStoragePools() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetStoragePools() *MockInstanceServerGetStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockInstanceServer)(nil).GetStoragePools)) + return &MockInstanceServerGetStoragePoolsCall{Call: call} +} + +// MockInstanceServerGetStoragePoolsCall wrap *gomock.Call +type MockInstanceServerGetStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetStoragePoolsCall) Return(arg0 []api.StoragePool, arg1 error) *MockInstanceServerGetStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetStoragePoolsCall) Do(f func() ([]api.StoragePool, error)) *MockInstanceServerGetStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetStoragePoolsCall) DoAndReturn(f func() ([]api.StoragePool, error)) *MockInstanceServerGetStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetWarning mocks base method. @@ -4105,9 +10465,33 @@ func (m *MockInstanceServer) GetWarning(arg0 string) (*api.Warning, string, erro } // GetWarning indicates an expected call of GetWarning. -func (mr *MockInstanceServerMockRecorder) GetWarning(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetWarning(arg0 any) *MockInstanceServerGetWarningCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarning", reflect.TypeOf((*MockInstanceServer)(nil).GetWarning), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarning", reflect.TypeOf((*MockInstanceServer)(nil).GetWarning), arg0) + return &MockInstanceServerGetWarningCall{Call: call} +} + +// MockInstanceServerGetWarningCall wrap *gomock.Call +type MockInstanceServerGetWarningCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetWarningCall) Return(arg0 *api.Warning, arg1 string, arg2 error) *MockInstanceServerGetWarningCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetWarningCall) Do(f func(string) (*api.Warning, string, error)) *MockInstanceServerGetWarningCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetWarningCall) DoAndReturn(f func(string) (*api.Warning, string, error)) *MockInstanceServerGetWarningCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetWarningUUIDs mocks base method. @@ -4120,9 +10504,33 @@ func (m *MockInstanceServer) GetWarningUUIDs() ([]string, error) { } // GetWarningUUIDs indicates an expected call of GetWarningUUIDs. -func (mr *MockInstanceServerMockRecorder) GetWarningUUIDs() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetWarningUUIDs() *MockInstanceServerGetWarningUUIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarningUUIDs", reflect.TypeOf((*MockInstanceServer)(nil).GetWarningUUIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarningUUIDs", reflect.TypeOf((*MockInstanceServer)(nil).GetWarningUUIDs)) + return &MockInstanceServerGetWarningUUIDsCall{Call: call} +} + +// MockInstanceServerGetWarningUUIDsCall wrap *gomock.Call +type MockInstanceServerGetWarningUUIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetWarningUUIDsCall) Return(arg0 []string, arg1 error) *MockInstanceServerGetWarningUUIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetWarningUUIDsCall) Do(f func() ([]string, error)) *MockInstanceServerGetWarningUUIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetWarningUUIDsCall) DoAndReturn(f func() ([]string, error)) *MockInstanceServerGetWarningUUIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetWarnings mocks base method. @@ -4135,9 +10543,33 @@ func (m *MockInstanceServer) GetWarnings() ([]api.Warning, error) { } // GetWarnings indicates an expected call of GetWarnings. -func (mr *MockInstanceServerMockRecorder) GetWarnings() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) GetWarnings() *MockInstanceServerGetWarningsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarnings", reflect.TypeOf((*MockInstanceServer)(nil).GetWarnings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWarnings", reflect.TypeOf((*MockInstanceServer)(nil).GetWarnings)) + return &MockInstanceServerGetWarningsCall{Call: call} +} + +// MockInstanceServerGetWarningsCall wrap *gomock.Call +type MockInstanceServerGetWarningsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerGetWarningsCall) Return(arg0 []api.Warning, arg1 error) *MockInstanceServerGetWarningsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerGetWarningsCall) Do(f func() ([]api.Warning, error)) *MockInstanceServerGetWarningsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerGetWarningsCall) DoAndReturn(f func() ([]api.Warning, error)) *MockInstanceServerGetWarningsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasExtension mocks base method. @@ -4149,9 +10581,33 @@ func (m *MockInstanceServer) HasExtension(arg0 string) bool { } // HasExtension indicates an expected call of HasExtension. -func (mr *MockInstanceServerMockRecorder) HasExtension(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) HasExtension(arg0 any) *MockInstanceServerHasExtensionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockInstanceServer)(nil).HasExtension), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockInstanceServer)(nil).HasExtension), arg0) + return &MockInstanceServerHasExtensionCall{Call: call} +} + +// MockInstanceServerHasExtensionCall wrap *gomock.Call +type MockInstanceServerHasExtensionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerHasExtensionCall) Return(arg0 bool) *MockInstanceServerHasExtensionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerHasExtensionCall) Do(f func(string) bool) *MockInstanceServerHasExtensionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerHasExtensionCall) DoAndReturn(f func(string) bool) *MockInstanceServerHasExtensionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsClustered mocks base method. @@ -4163,9 +10619,33 @@ func (m *MockInstanceServer) IsClustered() bool { } // IsClustered indicates an expected call of IsClustered. -func (mr *MockInstanceServerMockRecorder) IsClustered() *gomock.Call { +func (mr *MockInstanceServerMockRecorder) IsClustered() *MockInstanceServerIsClusteredCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockInstanceServer)(nil).IsClustered)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockInstanceServer)(nil).IsClustered)) + return &MockInstanceServerIsClusteredCall{Call: call} +} + +// MockInstanceServerIsClusteredCall wrap *gomock.Call +type MockInstanceServerIsClusteredCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerIsClusteredCall) Return(arg0 bool) *MockInstanceServerIsClusteredCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerIsClusteredCall) Do(f func() bool) *MockInstanceServerIsClusteredCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerIsClusteredCall) DoAndReturn(f func() bool) *MockInstanceServerIsClusteredCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrateContainer mocks base method. @@ -4178,9 +10658,33 @@ func (m *MockInstanceServer) MigrateContainer(arg0 string, arg1 api.ContainerPos } // MigrateContainer indicates an expected call of MigrateContainer. -func (mr *MockInstanceServerMockRecorder) MigrateContainer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MigrateContainer(arg0, arg1 any) *MockInstanceServerMigrateContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateContainer", reflect.TypeOf((*MockInstanceServer)(nil).MigrateContainer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateContainer", reflect.TypeOf((*MockInstanceServer)(nil).MigrateContainer), arg0, arg1) + return &MockInstanceServerMigrateContainerCall{Call: call} +} + +// MockInstanceServerMigrateContainerCall wrap *gomock.Call +type MockInstanceServerMigrateContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMigrateContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerMigrateContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMigrateContainerCall) Do(f func(string, api.ContainerPost) (lxd.Operation, error)) *MockInstanceServerMigrateContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMigrateContainerCall) DoAndReturn(f func(string, api.ContainerPost) (lxd.Operation, error)) *MockInstanceServerMigrateContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrateContainerSnapshot mocks base method. @@ -4193,9 +10697,33 @@ func (m *MockInstanceServer) MigrateContainerSnapshot(arg0, arg1 string, arg2 ap } // MigrateContainerSnapshot indicates an expected call of MigrateContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) MigrateContainerSnapshot(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MigrateContainerSnapshot(arg0, arg1, arg2 any) *MockInstanceServerMigrateContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).MigrateContainerSnapshot), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).MigrateContainerSnapshot), arg0, arg1, arg2) + return &MockInstanceServerMigrateContainerSnapshotCall{Call: call} +} + +// MockInstanceServerMigrateContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerMigrateContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMigrateContainerSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerMigrateContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMigrateContainerSnapshotCall) Do(f func(string, string, api.ContainerSnapshotPost) (lxd.Operation, error)) *MockInstanceServerMigrateContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMigrateContainerSnapshotCall) DoAndReturn(f func(string, string, api.ContainerSnapshotPost) (lxd.Operation, error)) *MockInstanceServerMigrateContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrateInstance mocks base method. @@ -4208,9 +10736,33 @@ func (m *MockInstanceServer) MigrateInstance(arg0 string, arg1 api.InstancePost) } // MigrateInstance indicates an expected call of MigrateInstance. -func (mr *MockInstanceServerMockRecorder) MigrateInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MigrateInstance(arg0, arg1 any) *MockInstanceServerMigrateInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateInstance", reflect.TypeOf((*MockInstanceServer)(nil).MigrateInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateInstance", reflect.TypeOf((*MockInstanceServer)(nil).MigrateInstance), arg0, arg1) + return &MockInstanceServerMigrateInstanceCall{Call: call} +} + +// MockInstanceServerMigrateInstanceCall wrap *gomock.Call +type MockInstanceServerMigrateInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMigrateInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerMigrateInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMigrateInstanceCall) Do(f func(string, api.InstancePost) (lxd.Operation, error)) *MockInstanceServerMigrateInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMigrateInstanceCall) DoAndReturn(f func(string, api.InstancePost) (lxd.Operation, error)) *MockInstanceServerMigrateInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrateInstanceSnapshot mocks base method. @@ -4223,9 +10775,33 @@ func (m *MockInstanceServer) MigrateInstanceSnapshot(arg0, arg1 string, arg2 api } // MigrateInstanceSnapshot indicates an expected call of MigrateInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) MigrateInstanceSnapshot(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MigrateInstanceSnapshot(arg0, arg1, arg2 any) *MockInstanceServerMigrateInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).MigrateInstanceSnapshot), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).MigrateInstanceSnapshot), arg0, arg1, arg2) + return &MockInstanceServerMigrateInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerMigrateInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerMigrateInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMigrateInstanceSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerMigrateInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMigrateInstanceSnapshotCall) Do(f func(string, string, api.InstanceSnapshotPost) (lxd.Operation, error)) *MockInstanceServerMigrateInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMigrateInstanceSnapshotCall) DoAndReturn(f func(string, string, api.InstanceSnapshotPost) (lxd.Operation, error)) *MockInstanceServerMigrateInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrateStoragePoolVolume mocks base method. @@ -4238,9 +10814,33 @@ func (m *MockInstanceServer) MigrateStoragePoolVolume(arg0 string, arg1 api.Stor } // MigrateStoragePoolVolume indicates an expected call of MigrateStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) MigrateStoragePoolVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MigrateStoragePoolVolume(arg0, arg1 any) *MockInstanceServerMigrateStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).MigrateStoragePoolVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).MigrateStoragePoolVolume), arg0, arg1) + return &MockInstanceServerMigrateStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerMigrateStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerMigrateStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMigrateStoragePoolVolumeCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerMigrateStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMigrateStoragePoolVolumeCall) Do(f func(string, api.StorageVolumePost) (lxd.Operation, error)) *MockInstanceServerMigrateStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMigrateStoragePoolVolumeCall) DoAndReturn(f func(string, api.StorageVolumePost) (lxd.Operation, error)) *MockInstanceServerMigrateStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MoveStoragePoolVolume mocks base method. @@ -4253,9 +10853,33 @@ func (m *MockInstanceServer) MoveStoragePoolVolume(arg0 string, arg1 lxd.Instanc } // MoveStoragePoolVolume indicates an expected call of MoveStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) MoveStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) MoveStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *MockInstanceServerMoveStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).MoveStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).MoveStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + return &MockInstanceServerMoveStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerMoveStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerMoveStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerMoveStoragePoolVolumeCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerMoveStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerMoveStoragePoolVolumeCall) Do(f func(string, lxd.InstanceServer, string, api.StorageVolume, *lxd.StoragePoolVolumeMoveArgs) (lxd.RemoteOperation, error)) *MockInstanceServerMoveStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerMoveStoragePoolVolumeCall) DoAndReturn(f func(string, lxd.InstanceServer, string, api.StorageVolume, *lxd.StoragePoolVolumeMoveArgs) (lxd.RemoteOperation, error)) *MockInstanceServerMoveStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawOperation mocks base method. @@ -4269,9 +10893,33 @@ func (m *MockInstanceServer) RawOperation(arg0, arg1 string, arg2 any, arg3 stri } // RawOperation indicates an expected call of RawOperation. -func (mr *MockInstanceServerMockRecorder) RawOperation(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RawOperation(arg0, arg1, arg2, arg3 any) *MockInstanceServerRawOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawOperation", reflect.TypeOf((*MockInstanceServer)(nil).RawOperation), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawOperation", reflect.TypeOf((*MockInstanceServer)(nil).RawOperation), arg0, arg1, arg2, arg3) + return &MockInstanceServerRawOperationCall{Call: call} +} + +// MockInstanceServerRawOperationCall wrap *gomock.Call +type MockInstanceServerRawOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRawOperationCall) Return(arg0 lxd.Operation, arg1 string, arg2 error) *MockInstanceServerRawOperationCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRawOperationCall) Do(f func(string, string, any, string) (lxd.Operation, string, error)) *MockInstanceServerRawOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRawOperationCall) DoAndReturn(f func(string, string, any, string) (lxd.Operation, string, error)) *MockInstanceServerRawOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawQuery mocks base method. @@ -4285,9 +10933,33 @@ func (m *MockInstanceServer) RawQuery(arg0, arg1 string, arg2 any, arg3 string) } // RawQuery indicates an expected call of RawQuery. -func (mr *MockInstanceServerMockRecorder) RawQuery(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RawQuery(arg0, arg1, arg2, arg3 any) *MockInstanceServerRawQueryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawQuery", reflect.TypeOf((*MockInstanceServer)(nil).RawQuery), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawQuery", reflect.TypeOf((*MockInstanceServer)(nil).RawQuery), arg0, arg1, arg2, arg3) + return &MockInstanceServerRawQueryCall{Call: call} +} + +// MockInstanceServerRawQueryCall wrap *gomock.Call +type MockInstanceServerRawQueryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRawQueryCall) Return(arg0 *api.Response, arg1 string, arg2 error) *MockInstanceServerRawQueryCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRawQueryCall) Do(f func(string, string, any, string) (*api.Response, string, error)) *MockInstanceServerRawQueryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRawQueryCall) DoAndReturn(f func(string, string, any, string) (*api.Response, string, error)) *MockInstanceServerRawQueryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RawWebsocket mocks base method. @@ -4300,9 +10972,33 @@ func (m *MockInstanceServer) RawWebsocket(arg0 string) (*websocket.Conn, error) } // RawWebsocket indicates an expected call of RawWebsocket. -func (mr *MockInstanceServerMockRecorder) RawWebsocket(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RawWebsocket(arg0 any) *MockInstanceServerRawWebsocketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawWebsocket", reflect.TypeOf((*MockInstanceServer)(nil).RawWebsocket), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawWebsocket", reflect.TypeOf((*MockInstanceServer)(nil).RawWebsocket), arg0) + return &MockInstanceServerRawWebsocketCall{Call: call} +} + +// MockInstanceServerRawWebsocketCall wrap *gomock.Call +type MockInstanceServerRawWebsocketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRawWebsocketCall) Return(arg0 *websocket.Conn, arg1 error) *MockInstanceServerRawWebsocketCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRawWebsocketCall) Do(f func(string) (*websocket.Conn, error)) *MockInstanceServerRawWebsocketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRawWebsocketCall) DoAndReturn(f func(string) (*websocket.Conn, error)) *MockInstanceServerRawWebsocketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RebuildInstance mocks base method. @@ -4315,9 +11011,33 @@ func (m *MockInstanceServer) RebuildInstance(arg0 string, arg1 api.InstanceRebui } // RebuildInstance indicates an expected call of RebuildInstance. -func (mr *MockInstanceServerMockRecorder) RebuildInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RebuildInstance(arg0, arg1 any) *MockInstanceServerRebuildInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildInstance", reflect.TypeOf((*MockInstanceServer)(nil).RebuildInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildInstance", reflect.TypeOf((*MockInstanceServer)(nil).RebuildInstance), arg0, arg1) + return &MockInstanceServerRebuildInstanceCall{Call: call} +} + +// MockInstanceServerRebuildInstanceCall wrap *gomock.Call +type MockInstanceServerRebuildInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRebuildInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRebuildInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRebuildInstanceCall) Do(f func(string, api.InstanceRebuildPost) (lxd.Operation, error)) *MockInstanceServerRebuildInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRebuildInstanceCall) DoAndReturn(f func(string, api.InstanceRebuildPost) (lxd.Operation, error)) *MockInstanceServerRebuildInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RebuildInstanceFromImage mocks base method. @@ -4330,9 +11050,33 @@ func (m *MockInstanceServer) RebuildInstanceFromImage(arg0 lxd.ImageServer, arg1 } // RebuildInstanceFromImage indicates an expected call of RebuildInstanceFromImage. -func (mr *MockInstanceServerMockRecorder) RebuildInstanceFromImage(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RebuildInstanceFromImage(arg0, arg1, arg2, arg3 any) *MockInstanceServerRebuildInstanceFromImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildInstanceFromImage", reflect.TypeOf((*MockInstanceServer)(nil).RebuildInstanceFromImage), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildInstanceFromImage", reflect.TypeOf((*MockInstanceServer)(nil).RebuildInstanceFromImage), arg0, arg1, arg2, arg3) + return &MockInstanceServerRebuildInstanceFromImageCall{Call: call} +} + +// MockInstanceServerRebuildInstanceFromImageCall wrap *gomock.Call +type MockInstanceServerRebuildInstanceFromImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRebuildInstanceFromImageCall) Return(arg0 lxd.RemoteOperation, arg1 error) *MockInstanceServerRebuildInstanceFromImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRebuildInstanceFromImageCall) Do(f func(lxd.ImageServer, api.Image, string, api.InstanceRebuildPost) (lxd.RemoteOperation, error)) *MockInstanceServerRebuildInstanceFromImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRebuildInstanceFromImageCall) DoAndReturn(f func(lxd.ImageServer, api.Image, string, api.InstanceRebuildPost) (lxd.RemoteOperation, error)) *MockInstanceServerRebuildInstanceFromImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RefreshImage mocks base method. @@ -4345,9 +11089,33 @@ func (m *MockInstanceServer) RefreshImage(arg0 string) (lxd.Operation, error) { } // RefreshImage indicates an expected call of RefreshImage. -func (mr *MockInstanceServerMockRecorder) RefreshImage(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RefreshImage(arg0 any) *MockInstanceServerRefreshImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshImage", reflect.TypeOf((*MockInstanceServer)(nil).RefreshImage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshImage", reflect.TypeOf((*MockInstanceServer)(nil).RefreshImage), arg0) + return &MockInstanceServerRefreshImageCall{Call: call} +} + +// MockInstanceServerRefreshImageCall wrap *gomock.Call +type MockInstanceServerRefreshImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRefreshImageCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRefreshImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRefreshImageCall) Do(f func(string) (lxd.Operation, error)) *MockInstanceServerRefreshImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRefreshImageCall) DoAndReturn(f func(string) (lxd.Operation, error)) *MockInstanceServerRefreshImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameClusterGroup mocks base method. @@ -4359,9 +11127,33 @@ func (m *MockInstanceServer) RenameClusterGroup(arg0 string, arg1 api.ClusterGro } // RenameClusterGroup indicates an expected call of RenameClusterGroup. -func (mr *MockInstanceServerMockRecorder) RenameClusterGroup(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameClusterGroup(arg0, arg1 any) *MockInstanceServerRenameClusterGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).RenameClusterGroup), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).RenameClusterGroup), arg0, arg1) + return &MockInstanceServerRenameClusterGroupCall{Call: call} +} + +// MockInstanceServerRenameClusterGroupCall wrap *gomock.Call +type MockInstanceServerRenameClusterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameClusterGroupCall) Return(arg0 error) *MockInstanceServerRenameClusterGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameClusterGroupCall) Do(f func(string, api.ClusterGroupPost) error) *MockInstanceServerRenameClusterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameClusterGroupCall) DoAndReturn(f func(string, api.ClusterGroupPost) error) *MockInstanceServerRenameClusterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameClusterMember mocks base method. @@ -4373,9 +11165,33 @@ func (m *MockInstanceServer) RenameClusterMember(arg0 string, arg1 api.ClusterMe } // RenameClusterMember indicates an expected call of RenameClusterMember. -func (mr *MockInstanceServerMockRecorder) RenameClusterMember(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameClusterMember(arg0, arg1 any) *MockInstanceServerRenameClusterMemberCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).RenameClusterMember), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).RenameClusterMember), arg0, arg1) + return &MockInstanceServerRenameClusterMemberCall{Call: call} +} + +// MockInstanceServerRenameClusterMemberCall wrap *gomock.Call +type MockInstanceServerRenameClusterMemberCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameClusterMemberCall) Return(arg0 error) *MockInstanceServerRenameClusterMemberCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameClusterMemberCall) Do(f func(string, api.ClusterMemberPost) error) *MockInstanceServerRenameClusterMemberCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameClusterMemberCall) DoAndReturn(f func(string, api.ClusterMemberPost) error) *MockInstanceServerRenameClusterMemberCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameContainer mocks base method. @@ -4388,9 +11204,33 @@ func (m *MockInstanceServer) RenameContainer(arg0 string, arg1 api.ContainerPost } // RenameContainer indicates an expected call of RenameContainer. -func (mr *MockInstanceServerMockRecorder) RenameContainer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameContainer(arg0, arg1 any) *MockInstanceServerRenameContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainer", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainer", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainer), arg0, arg1) + return &MockInstanceServerRenameContainerCall{Call: call} +} + +// MockInstanceServerRenameContainerCall wrap *gomock.Call +type MockInstanceServerRenameContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameContainerCall) Do(f func(string, api.ContainerPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameContainerCall) DoAndReturn(f func(string, api.ContainerPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameContainerBackup mocks base method. @@ -4403,9 +11243,33 @@ func (m *MockInstanceServer) RenameContainerBackup(arg0, arg1 string, arg2 api.C } // RenameContainerBackup indicates an expected call of RenameContainerBackup. -func (mr *MockInstanceServerMockRecorder) RenameContainerBackup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameContainerBackup(arg0, arg1, arg2 any) *MockInstanceServerRenameContainerBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainerBackup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainerBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainerBackup), arg0, arg1, arg2) + return &MockInstanceServerRenameContainerBackupCall{Call: call} +} + +// MockInstanceServerRenameContainerBackupCall wrap *gomock.Call +type MockInstanceServerRenameContainerBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameContainerBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameContainerBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameContainerBackupCall) Do(f func(string, string, api.ContainerBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameContainerBackupCall) DoAndReturn(f func(string, string, api.ContainerBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameContainerSnapshot mocks base method. @@ -4418,9 +11282,33 @@ func (m *MockInstanceServer) RenameContainerSnapshot(arg0, arg1 string, arg2 api } // RenameContainerSnapshot indicates an expected call of RenameContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) RenameContainerSnapshot(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameContainerSnapshot(arg0, arg1, arg2 any) *MockInstanceServerRenameContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainerSnapshot), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameContainerSnapshot), arg0, arg1, arg2) + return &MockInstanceServerRenameContainerSnapshotCall{Call: call} +} + +// MockInstanceServerRenameContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerRenameContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameContainerSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameContainerSnapshotCall) Do(f func(string, string, api.ContainerSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameContainerSnapshotCall) DoAndReturn(f func(string, string, api.ContainerSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameImageAlias mocks base method. @@ -4432,9 +11320,33 @@ func (m *MockInstanceServer) RenameImageAlias(arg0 string, arg1 api.ImageAliases } // RenameImageAlias indicates an expected call of RenameImageAlias. -func (mr *MockInstanceServerMockRecorder) RenameImageAlias(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameImageAlias(arg0, arg1 any) *MockInstanceServerRenameImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).RenameImageAlias), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).RenameImageAlias), arg0, arg1) + return &MockInstanceServerRenameImageAliasCall{Call: call} +} + +// MockInstanceServerRenameImageAliasCall wrap *gomock.Call +type MockInstanceServerRenameImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameImageAliasCall) Return(arg0 error) *MockInstanceServerRenameImageAliasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameImageAliasCall) Do(f func(string, api.ImageAliasesEntryPost) error) *MockInstanceServerRenameImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameImageAliasCall) DoAndReturn(f func(string, api.ImageAliasesEntryPost) error) *MockInstanceServerRenameImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameInstance mocks base method. @@ -4447,9 +11359,33 @@ func (m *MockInstanceServer) RenameInstance(arg0 string, arg1 api.InstancePost) } // RenameInstance indicates an expected call of RenameInstance. -func (mr *MockInstanceServerMockRecorder) RenameInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameInstance(arg0, arg1 any) *MockInstanceServerRenameInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstance", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstance", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstance), arg0, arg1) + return &MockInstanceServerRenameInstanceCall{Call: call} +} + +// MockInstanceServerRenameInstanceCall wrap *gomock.Call +type MockInstanceServerRenameInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameInstanceCall) Do(f func(string, api.InstancePost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameInstanceCall) DoAndReturn(f func(string, api.InstancePost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameInstanceBackup mocks base method. @@ -4462,9 +11398,33 @@ func (m *MockInstanceServer) RenameInstanceBackup(arg0, arg1 string, arg2 api.In } // RenameInstanceBackup indicates an expected call of RenameInstanceBackup. -func (mr *MockInstanceServerMockRecorder) RenameInstanceBackup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameInstanceBackup(arg0, arg1, arg2 any) *MockInstanceServerRenameInstanceBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstanceBackup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstanceBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstanceBackup), arg0, arg1, arg2) + return &MockInstanceServerRenameInstanceBackupCall{Call: call} +} + +// MockInstanceServerRenameInstanceBackupCall wrap *gomock.Call +type MockInstanceServerRenameInstanceBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameInstanceBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameInstanceBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameInstanceBackupCall) Do(f func(string, string, api.InstanceBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameInstanceBackupCall) DoAndReturn(f func(string, string, api.InstanceBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameInstanceSnapshot mocks base method. @@ -4477,9 +11437,33 @@ func (m *MockInstanceServer) RenameInstanceSnapshot(arg0, arg1 string, arg2 api. } // RenameInstanceSnapshot indicates an expected call of RenameInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) RenameInstanceSnapshot(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameInstanceSnapshot(arg0, arg1, arg2 any) *MockInstanceServerRenameInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstanceSnapshot), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameInstanceSnapshot), arg0, arg1, arg2) + return &MockInstanceServerRenameInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerRenameInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerRenameInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameInstanceSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameInstanceSnapshotCall) Do(f func(string, string, api.InstanceSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameInstanceSnapshotCall) DoAndReturn(f func(string, string, api.InstanceSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameNetwork mocks base method. @@ -4491,9 +11475,33 @@ func (m *MockInstanceServer) RenameNetwork(arg0 string, arg1 api.NetworkPost) er } // RenameNetwork indicates an expected call of RenameNetwork. -func (mr *MockInstanceServerMockRecorder) RenameNetwork(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameNetwork(arg0, arg1 any) *MockInstanceServerRenameNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameNetwork", reflect.TypeOf((*MockInstanceServer)(nil).RenameNetwork), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameNetwork", reflect.TypeOf((*MockInstanceServer)(nil).RenameNetwork), arg0, arg1) + return &MockInstanceServerRenameNetworkCall{Call: call} +} + +// MockInstanceServerRenameNetworkCall wrap *gomock.Call +type MockInstanceServerRenameNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameNetworkCall) Return(arg0 error) *MockInstanceServerRenameNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameNetworkCall) Do(f func(string, api.NetworkPost) error) *MockInstanceServerRenameNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameNetworkCall) DoAndReturn(f func(string, api.NetworkPost) error) *MockInstanceServerRenameNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameNetworkACL mocks base method. @@ -4505,9 +11513,33 @@ func (m *MockInstanceServer) RenameNetworkACL(arg0 string, arg1 api.NetworkACLPo } // RenameNetworkACL indicates an expected call of RenameNetworkACL. -func (mr *MockInstanceServerMockRecorder) RenameNetworkACL(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameNetworkACL(arg0, arg1 any) *MockInstanceServerRenameNetworkACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).RenameNetworkACL), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).RenameNetworkACL), arg0, arg1) + return &MockInstanceServerRenameNetworkACLCall{Call: call} +} + +// MockInstanceServerRenameNetworkACLCall wrap *gomock.Call +type MockInstanceServerRenameNetworkACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameNetworkACLCall) Return(arg0 error) *MockInstanceServerRenameNetworkACLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameNetworkACLCall) Do(f func(string, api.NetworkACLPost) error) *MockInstanceServerRenameNetworkACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameNetworkACLCall) DoAndReturn(f func(string, api.NetworkACLPost) error) *MockInstanceServerRenameNetworkACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameProfile mocks base method. @@ -4519,9 +11551,33 @@ func (m *MockInstanceServer) RenameProfile(arg0 string, arg1 api.ProfilePost) er } // RenameProfile indicates an expected call of RenameProfile. -func (mr *MockInstanceServerMockRecorder) RenameProfile(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameProfile(arg0, arg1 any) *MockInstanceServerRenameProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameProfile", reflect.TypeOf((*MockInstanceServer)(nil).RenameProfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameProfile", reflect.TypeOf((*MockInstanceServer)(nil).RenameProfile), arg0, arg1) + return &MockInstanceServerRenameProfileCall{Call: call} +} + +// MockInstanceServerRenameProfileCall wrap *gomock.Call +type MockInstanceServerRenameProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameProfileCall) Return(arg0 error) *MockInstanceServerRenameProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameProfileCall) Do(f func(string, api.ProfilePost) error) *MockInstanceServerRenameProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameProfileCall) DoAndReturn(f func(string, api.ProfilePost) error) *MockInstanceServerRenameProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameProject mocks base method. @@ -4534,9 +11590,33 @@ func (m *MockInstanceServer) RenameProject(arg0 string, arg1 api.ProjectPost) (l } // RenameProject indicates an expected call of RenameProject. -func (mr *MockInstanceServerMockRecorder) RenameProject(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameProject(arg0, arg1 any) *MockInstanceServerRenameProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameProject", reflect.TypeOf((*MockInstanceServer)(nil).RenameProject), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameProject", reflect.TypeOf((*MockInstanceServer)(nil).RenameProject), arg0, arg1) + return &MockInstanceServerRenameProjectCall{Call: call} +} + +// MockInstanceServerRenameProjectCall wrap *gomock.Call +type MockInstanceServerRenameProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameProjectCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameProjectCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameProjectCall) Do(f func(string, api.ProjectPost) (lxd.Operation, error)) *MockInstanceServerRenameProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameProjectCall) DoAndReturn(f func(string, api.ProjectPost) (lxd.Operation, error)) *MockInstanceServerRenameProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameStoragePoolVolume mocks base method. @@ -4548,9 +11628,33 @@ func (m *MockInstanceServer) RenameStoragePoolVolume(arg0, arg1, arg2 string, ar } // RenameStoragePoolVolume indicates an expected call of RenameStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolume(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolume(arg0, arg1, arg2, arg3 any) *MockInstanceServerRenameStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolume), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolume), arg0, arg1, arg2, arg3) + return &MockInstanceServerRenameStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerRenameStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerRenameStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameStoragePoolVolumeCall) Return(arg0 error) *MockInstanceServerRenameStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameStoragePoolVolumeCall) Do(f func(string, string, string, api.StorageVolumePost) error) *MockInstanceServerRenameStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameStoragePoolVolumeCall) DoAndReturn(f func(string, string, string, api.StorageVolumePost) error) *MockInstanceServerRenameStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameStoragePoolVolumeBackup mocks base method. @@ -4563,9 +11667,33 @@ func (m *MockInstanceServer) RenameStoragePoolVolumeBackup(arg0, arg1, arg2 stri } // RenameStoragePoolVolumeBackup indicates an expected call of RenameStoragePoolVolumeBackup. -func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolumeBackup(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolumeBackup(arg0, arg1, arg2, arg3 any) *MockInstanceServerRenameStoragePoolVolumeBackupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolumeBackup), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolumeBackup", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolumeBackup), arg0, arg1, arg2, arg3) + return &MockInstanceServerRenameStoragePoolVolumeBackupCall{Call: call} +} + +// MockInstanceServerRenameStoragePoolVolumeBackupCall wrap *gomock.Call +type MockInstanceServerRenameStoragePoolVolumeBackupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameStoragePoolVolumeBackupCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameStoragePoolVolumeBackupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameStoragePoolVolumeBackupCall) Do(f func(string, string, string, api.StoragePoolVolumeBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameStoragePoolVolumeBackupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameStoragePoolVolumeBackupCall) DoAndReturn(f func(string, string, string, api.StoragePoolVolumeBackupPost) (lxd.Operation, error)) *MockInstanceServerRenameStoragePoolVolumeBackupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RenameStoragePoolVolumeSnapshot mocks base method. @@ -4578,9 +11706,33 @@ func (m *MockInstanceServer) RenameStoragePoolVolumeSnapshot(arg0, arg1, arg2, a } // RenameStoragePoolVolumeSnapshot indicates an expected call of RenameStoragePoolVolumeSnapshot. -func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RenameStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3, arg4 any) *MockInstanceServerRenameStoragePoolVolumeSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).RenameStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3, arg4) + return &MockInstanceServerRenameStoragePoolVolumeSnapshotCall{Call: call} +} + +// MockInstanceServerRenameStoragePoolVolumeSnapshotCall wrap *gomock.Call +type MockInstanceServerRenameStoragePoolVolumeSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRenameStoragePoolVolumeSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerRenameStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRenameStoragePoolVolumeSnapshotCall) Do(f func(string, string, string, string, api.StorageVolumeSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRenameStoragePoolVolumeSnapshotCall) DoAndReturn(f func(string, string, string, string, api.StorageVolumeSnapshotPost) (lxd.Operation, error)) *MockInstanceServerRenameStoragePoolVolumeSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RequireAuthenticated mocks base method. @@ -4590,9 +11742,33 @@ func (m *MockInstanceServer) RequireAuthenticated(arg0 bool) { } // RequireAuthenticated indicates an expected call of RequireAuthenticated. -func (mr *MockInstanceServerMockRecorder) RequireAuthenticated(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) RequireAuthenticated(arg0 any) *MockInstanceServerRequireAuthenticatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequireAuthenticated", reflect.TypeOf((*MockInstanceServer)(nil).RequireAuthenticated), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequireAuthenticated", reflect.TypeOf((*MockInstanceServer)(nil).RequireAuthenticated), arg0) + return &MockInstanceServerRequireAuthenticatedCall{Call: call} +} + +// MockInstanceServerRequireAuthenticatedCall wrap *gomock.Call +type MockInstanceServerRequireAuthenticatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerRequireAuthenticatedCall) Return() *MockInstanceServerRequireAuthenticatedCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerRequireAuthenticatedCall) Do(f func(bool)) *MockInstanceServerRequireAuthenticatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerRequireAuthenticatedCall) DoAndReturn(f func(bool)) *MockInstanceServerRequireAuthenticatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SendEvent mocks base method. @@ -4604,9 +11780,33 @@ func (m *MockInstanceServer) SendEvent(arg0 api.Event) error { } // SendEvent indicates an expected call of SendEvent. -func (mr *MockInstanceServerMockRecorder) SendEvent(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) SendEvent(arg0 any) *MockInstanceServerSendEventCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendEvent", reflect.TypeOf((*MockInstanceServer)(nil).SendEvent), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendEvent", reflect.TypeOf((*MockInstanceServer)(nil).SendEvent), arg0) + return &MockInstanceServerSendEventCall{Call: call} +} + +// MockInstanceServerSendEventCall wrap *gomock.Call +type MockInstanceServerSendEventCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerSendEventCall) Return(arg0 error) *MockInstanceServerSendEventCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerSendEventCall) Do(f func(api.Event) error) *MockInstanceServerSendEventCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerSendEventCall) DoAndReturn(f func(api.Event) error) *MockInstanceServerSendEventCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetContainerMetadata mocks base method. @@ -4618,9 +11818,33 @@ func (m *MockInstanceServer) SetContainerMetadata(arg0 string, arg1 api.ImageMet } // SetContainerMetadata indicates an expected call of SetContainerMetadata. -func (mr *MockInstanceServerMockRecorder) SetContainerMetadata(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) SetContainerMetadata(arg0, arg1, arg2 any) *MockInstanceServerSetContainerMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetContainerMetadata", reflect.TypeOf((*MockInstanceServer)(nil).SetContainerMetadata), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetContainerMetadata", reflect.TypeOf((*MockInstanceServer)(nil).SetContainerMetadata), arg0, arg1, arg2) + return &MockInstanceServerSetContainerMetadataCall{Call: call} +} + +// MockInstanceServerSetContainerMetadataCall wrap *gomock.Call +type MockInstanceServerSetContainerMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerSetContainerMetadataCall) Return(arg0 error) *MockInstanceServerSetContainerMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerSetContainerMetadataCall) Do(f func(string, api.ImageMetadata, string) error) *MockInstanceServerSetContainerMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerSetContainerMetadataCall) DoAndReturn(f func(string, api.ImageMetadata, string) error) *MockInstanceServerSetContainerMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCertificate mocks base method. @@ -4632,9 +11856,33 @@ func (m *MockInstanceServer) UpdateCertificate(arg0 string, arg1 api.Certificate } // UpdateCertificate indicates an expected call of UpdateCertificate. -func (mr *MockInstanceServerMockRecorder) UpdateCertificate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateCertificate(arg0, arg1, arg2 any) *MockInstanceServerUpdateCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCertificate", reflect.TypeOf((*MockInstanceServer)(nil).UpdateCertificate), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCertificate", reflect.TypeOf((*MockInstanceServer)(nil).UpdateCertificate), arg0, arg1, arg2) + return &MockInstanceServerUpdateCertificateCall{Call: call} +} + +// MockInstanceServerUpdateCertificateCall wrap *gomock.Call +type MockInstanceServerUpdateCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateCertificateCall) Return(arg0 error) *MockInstanceServerUpdateCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateCertificateCall) Do(f func(string, api.CertificatePut, string) error) *MockInstanceServerUpdateCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateCertificateCall) DoAndReturn(f func(string, api.CertificatePut, string) error) *MockInstanceServerUpdateCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateCluster mocks base method. @@ -4647,9 +11895,33 @@ func (m *MockInstanceServer) UpdateCluster(arg0 api.ClusterPut, arg1 string) (lx } // UpdateCluster indicates an expected call of UpdateCluster. -func (mr *MockInstanceServerMockRecorder) UpdateCluster(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateCluster(arg0, arg1 any) *MockInstanceServerUpdateClusterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCluster", reflect.TypeOf((*MockInstanceServer)(nil).UpdateCluster), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCluster", reflect.TypeOf((*MockInstanceServer)(nil).UpdateCluster), arg0, arg1) + return &MockInstanceServerUpdateClusterCall{Call: call} +} + +// MockInstanceServerUpdateClusterCall wrap *gomock.Call +type MockInstanceServerUpdateClusterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateClusterCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateClusterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateClusterCall) Do(f func(api.ClusterPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateClusterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateClusterCall) DoAndReturn(f func(api.ClusterPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateClusterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateClusterCertificate mocks base method. @@ -4661,9 +11933,33 @@ func (m *MockInstanceServer) UpdateClusterCertificate(arg0 api.ClusterCertificat } // UpdateClusterCertificate indicates an expected call of UpdateClusterCertificate. -func (mr *MockInstanceServerMockRecorder) UpdateClusterCertificate(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateClusterCertificate(arg0, arg1 any) *MockInstanceServerUpdateClusterCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterCertificate", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterCertificate), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterCertificate", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterCertificate), arg0, arg1) + return &MockInstanceServerUpdateClusterCertificateCall{Call: call} +} + +// MockInstanceServerUpdateClusterCertificateCall wrap *gomock.Call +type MockInstanceServerUpdateClusterCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateClusterCertificateCall) Return(arg0 error) *MockInstanceServerUpdateClusterCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateClusterCertificateCall) Do(f func(api.ClusterCertificatePut, string) error) *MockInstanceServerUpdateClusterCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateClusterCertificateCall) DoAndReturn(f func(api.ClusterCertificatePut, string) error) *MockInstanceServerUpdateClusterCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateClusterGroup mocks base method. @@ -4675,9 +11971,33 @@ func (m *MockInstanceServer) UpdateClusterGroup(arg0 string, arg1 api.ClusterGro } // UpdateClusterGroup indicates an expected call of UpdateClusterGroup. -func (mr *MockInstanceServerMockRecorder) UpdateClusterGroup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateClusterGroup(arg0, arg1, arg2 any) *MockInstanceServerUpdateClusterGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterGroup), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterGroup", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterGroup), arg0, arg1, arg2) + return &MockInstanceServerUpdateClusterGroupCall{Call: call} +} + +// MockInstanceServerUpdateClusterGroupCall wrap *gomock.Call +type MockInstanceServerUpdateClusterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateClusterGroupCall) Return(arg0 error) *MockInstanceServerUpdateClusterGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateClusterGroupCall) Do(f func(string, api.ClusterGroupPut, string) error) *MockInstanceServerUpdateClusterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateClusterGroupCall) DoAndReturn(f func(string, api.ClusterGroupPut, string) error) *MockInstanceServerUpdateClusterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateClusterMember mocks base method. @@ -4689,9 +12009,33 @@ func (m *MockInstanceServer) UpdateClusterMember(arg0 string, arg1 api.ClusterMe } // UpdateClusterMember indicates an expected call of UpdateClusterMember. -func (mr *MockInstanceServerMockRecorder) UpdateClusterMember(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateClusterMember(arg0, arg1, arg2 any) *MockInstanceServerUpdateClusterMemberCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterMember), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterMember", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterMember), arg0, arg1, arg2) + return &MockInstanceServerUpdateClusterMemberCall{Call: call} +} + +// MockInstanceServerUpdateClusterMemberCall wrap *gomock.Call +type MockInstanceServerUpdateClusterMemberCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateClusterMemberCall) Return(arg0 error) *MockInstanceServerUpdateClusterMemberCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateClusterMemberCall) Do(f func(string, api.ClusterMemberPut, string) error) *MockInstanceServerUpdateClusterMemberCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateClusterMemberCall) DoAndReturn(f func(string, api.ClusterMemberPut, string) error) *MockInstanceServerUpdateClusterMemberCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateClusterMemberState mocks base method. @@ -4704,9 +12048,33 @@ func (m *MockInstanceServer) UpdateClusterMemberState(arg0 string, arg1 api.Clus } // UpdateClusterMemberState indicates an expected call of UpdateClusterMemberState. -func (mr *MockInstanceServerMockRecorder) UpdateClusterMemberState(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateClusterMemberState(arg0, arg1 any) *MockInstanceServerUpdateClusterMemberStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterMemberState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterMemberState), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterMemberState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateClusterMemberState), arg0, arg1) + return &MockInstanceServerUpdateClusterMemberStateCall{Call: call} +} + +// MockInstanceServerUpdateClusterMemberStateCall wrap *gomock.Call +type MockInstanceServerUpdateClusterMemberStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateClusterMemberStateCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateClusterMemberStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateClusterMemberStateCall) Do(f func(string, api.ClusterMemberStatePost) (lxd.Operation, error)) *MockInstanceServerUpdateClusterMemberStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateClusterMemberStateCall) DoAndReturn(f func(string, api.ClusterMemberStatePost) (lxd.Operation, error)) *MockInstanceServerUpdateClusterMemberStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainer mocks base method. @@ -4719,9 +12087,33 @@ func (m *MockInstanceServer) UpdateContainer(arg0 string, arg1 api.ContainerPut, } // UpdateContainer indicates an expected call of UpdateContainer. -func (mr *MockInstanceServerMockRecorder) UpdateContainer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateContainer(arg0, arg1, arg2 any) *MockInstanceServerUpdateContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainer), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainer), arg0, arg1, arg2) + return &MockInstanceServerUpdateContainerCall{Call: call} +} + +// MockInstanceServerUpdateContainerCall wrap *gomock.Call +type MockInstanceServerUpdateContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateContainerCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateContainerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateContainerCall) Do(f func(string, api.ContainerPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateContainerCall) DoAndReturn(f func(string, api.ContainerPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerSnapshot mocks base method. @@ -4734,9 +12126,33 @@ func (m *MockInstanceServer) UpdateContainerSnapshot(arg0, arg1 string, arg2 api } // UpdateContainerSnapshot indicates an expected call of UpdateContainerSnapshot. -func (mr *MockInstanceServerMockRecorder) UpdateContainerSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateContainerSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateContainerSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateContainerSnapshotCall{Call: call} +} + +// MockInstanceServerUpdateContainerSnapshotCall wrap *gomock.Call +type MockInstanceServerUpdateContainerSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateContainerSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateContainerSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateContainerSnapshotCall) Do(f func(string, string, api.ContainerSnapshotPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateContainerSnapshotCall) DoAndReturn(f func(string, string, api.ContainerSnapshotPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerState mocks base method. @@ -4749,9 +12165,33 @@ func (m *MockInstanceServer) UpdateContainerState(arg0 string, arg1 api.Containe } // UpdateContainerState indicates an expected call of UpdateContainerState. -func (mr *MockInstanceServerMockRecorder) UpdateContainerState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateContainerState(arg0, arg1, arg2 any) *MockInstanceServerUpdateContainerStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerState), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerState), arg0, arg1, arg2) + return &MockInstanceServerUpdateContainerStateCall{Call: call} +} + +// MockInstanceServerUpdateContainerStateCall wrap *gomock.Call +type MockInstanceServerUpdateContainerStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateContainerStateCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateContainerStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateContainerStateCall) Do(f func(string, api.ContainerStatePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateContainerStateCall) DoAndReturn(f func(string, api.ContainerStatePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateContainerStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerTemplateFile mocks base method. @@ -4763,9 +12203,33 @@ func (m *MockInstanceServer) UpdateContainerTemplateFile(arg0, arg1 string, arg2 } // UpdateContainerTemplateFile indicates an expected call of UpdateContainerTemplateFile. -func (mr *MockInstanceServerMockRecorder) UpdateContainerTemplateFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateContainerTemplateFile(arg0, arg1, arg2 any) *MockInstanceServerUpdateContainerTemplateFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerTemplateFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerTemplateFile", reflect.TypeOf((*MockInstanceServer)(nil).UpdateContainerTemplateFile), arg0, arg1, arg2) + return &MockInstanceServerUpdateContainerTemplateFileCall{Call: call} +} + +// MockInstanceServerUpdateContainerTemplateFileCall wrap *gomock.Call +type MockInstanceServerUpdateContainerTemplateFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateContainerTemplateFileCall) Return(arg0 error) *MockInstanceServerUpdateContainerTemplateFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateContainerTemplateFileCall) Do(f func(string, string, io.ReadSeeker) error) *MockInstanceServerUpdateContainerTemplateFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateContainerTemplateFileCall) DoAndReturn(f func(string, string, io.ReadSeeker) error) *MockInstanceServerUpdateContainerTemplateFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateImage mocks base method. @@ -4777,9 +12241,33 @@ func (m *MockInstanceServer) UpdateImage(arg0 string, arg1 api.ImagePut, arg2 st } // UpdateImage indicates an expected call of UpdateImage. -func (mr *MockInstanceServerMockRecorder) UpdateImage(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateImage(arg0, arg1, arg2 any) *MockInstanceServerUpdateImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateImage", reflect.TypeOf((*MockInstanceServer)(nil).UpdateImage), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateImage", reflect.TypeOf((*MockInstanceServer)(nil).UpdateImage), arg0, arg1, arg2) + return &MockInstanceServerUpdateImageCall{Call: call} +} + +// MockInstanceServerUpdateImageCall wrap *gomock.Call +type MockInstanceServerUpdateImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateImageCall) Return(arg0 error) *MockInstanceServerUpdateImageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateImageCall) Do(f func(string, api.ImagePut, string) error) *MockInstanceServerUpdateImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateImageCall) DoAndReturn(f func(string, api.ImagePut, string) error) *MockInstanceServerUpdateImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateImageAlias mocks base method. @@ -4791,9 +12279,33 @@ func (m *MockInstanceServer) UpdateImageAlias(arg0 string, arg1 api.ImageAliases } // UpdateImageAlias indicates an expected call of UpdateImageAlias. -func (mr *MockInstanceServerMockRecorder) UpdateImageAlias(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateImageAlias(arg0, arg1, arg2 any) *MockInstanceServerUpdateImageAliasCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).UpdateImageAlias), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateImageAlias", reflect.TypeOf((*MockInstanceServer)(nil).UpdateImageAlias), arg0, arg1, arg2) + return &MockInstanceServerUpdateImageAliasCall{Call: call} +} + +// MockInstanceServerUpdateImageAliasCall wrap *gomock.Call +type MockInstanceServerUpdateImageAliasCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateImageAliasCall) Return(arg0 error) *MockInstanceServerUpdateImageAliasCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateImageAliasCall) Do(f func(string, api.ImageAliasesEntryPut, string) error) *MockInstanceServerUpdateImageAliasCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateImageAliasCall) DoAndReturn(f func(string, api.ImageAliasesEntryPut, string) error) *MockInstanceServerUpdateImageAliasCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateInstance mocks base method. @@ -4806,9 +12318,33 @@ func (m *MockInstanceServer) UpdateInstance(arg0 string, arg1 api.InstancePut, a } // UpdateInstance indicates an expected call of UpdateInstance. -func (mr *MockInstanceServerMockRecorder) UpdateInstance(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateInstance(arg0, arg1, arg2 any) *MockInstanceServerUpdateInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstance", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstance), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstance", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstance), arg0, arg1, arg2) + return &MockInstanceServerUpdateInstanceCall{Call: call} +} + +// MockInstanceServerUpdateInstanceCall wrap *gomock.Call +type MockInstanceServerUpdateInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateInstanceCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateInstanceCall) Do(f func(string, api.InstancePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateInstanceCall) DoAndReturn(f func(string, api.InstancePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateInstanceMetadata mocks base method. @@ -4820,9 +12356,33 @@ func (m *MockInstanceServer) UpdateInstanceMetadata(arg0 string, arg1 api.ImageM } // UpdateInstanceMetadata indicates an expected call of UpdateInstanceMetadata. -func (mr *MockInstanceServerMockRecorder) UpdateInstanceMetadata(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateInstanceMetadata(arg0, arg1, arg2 any) *MockInstanceServerUpdateInstanceMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceMetadata", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceMetadata), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceMetadata", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceMetadata), arg0, arg1, arg2) + return &MockInstanceServerUpdateInstanceMetadataCall{Call: call} +} + +// MockInstanceServerUpdateInstanceMetadataCall wrap *gomock.Call +type MockInstanceServerUpdateInstanceMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateInstanceMetadataCall) Return(arg0 error) *MockInstanceServerUpdateInstanceMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateInstanceMetadataCall) Do(f func(string, api.ImageMetadata, string) error) *MockInstanceServerUpdateInstanceMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateInstanceMetadataCall) DoAndReturn(f func(string, api.ImageMetadata, string) error) *MockInstanceServerUpdateInstanceMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateInstanceSnapshot mocks base method. @@ -4835,9 +12395,33 @@ func (m *MockInstanceServer) UpdateInstanceSnapshot(arg0, arg1 string, arg2 api. } // UpdateInstanceSnapshot indicates an expected call of UpdateInstanceSnapshot. -func (mr *MockInstanceServerMockRecorder) UpdateInstanceSnapshot(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateInstanceSnapshot(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateInstanceSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceSnapshot), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceSnapshot), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateInstanceSnapshotCall{Call: call} +} + +// MockInstanceServerUpdateInstanceSnapshotCall wrap *gomock.Call +type MockInstanceServerUpdateInstanceSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateInstanceSnapshotCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateInstanceSnapshotCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateInstanceSnapshotCall) Do(f func(string, string, api.InstanceSnapshotPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateInstanceSnapshotCall) DoAndReturn(f func(string, string, api.InstanceSnapshotPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateInstanceState mocks base method. @@ -4850,9 +12434,33 @@ func (m *MockInstanceServer) UpdateInstanceState(arg0 string, arg1 api.InstanceS } // UpdateInstanceState indicates an expected call of UpdateInstanceState. -func (mr *MockInstanceServerMockRecorder) UpdateInstanceState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateInstanceState(arg0, arg1, arg2 any) *MockInstanceServerUpdateInstanceStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceState), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstanceState", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstanceState), arg0, arg1, arg2) + return &MockInstanceServerUpdateInstanceStateCall{Call: call} +} + +// MockInstanceServerUpdateInstanceStateCall wrap *gomock.Call +type MockInstanceServerUpdateInstanceStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateInstanceStateCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateInstanceStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateInstanceStateCall) Do(f func(string, api.InstanceStatePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateInstanceStateCall) DoAndReturn(f func(string, api.InstanceStatePut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstanceStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateInstances mocks base method. @@ -4865,9 +12473,33 @@ func (m *MockInstanceServer) UpdateInstances(arg0 api.InstancesPut, arg1 string) } // UpdateInstances indicates an expected call of UpdateInstances. -func (mr *MockInstanceServerMockRecorder) UpdateInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateInstances(arg0, arg1 any) *MockInstanceServerUpdateInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstances", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstances", reflect.TypeOf((*MockInstanceServer)(nil).UpdateInstances), arg0, arg1) + return &MockInstanceServerUpdateInstancesCall{Call: call} +} + +// MockInstanceServerUpdateInstancesCall wrap *gomock.Call +type MockInstanceServerUpdateInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateInstancesCall) Return(arg0 lxd.Operation, arg1 error) *MockInstanceServerUpdateInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateInstancesCall) Do(f func(api.InstancesPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateInstancesCall) DoAndReturn(f func(api.InstancesPut, string) (lxd.Operation, error)) *MockInstanceServerUpdateInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetwork mocks base method. @@ -4879,9 +12511,33 @@ func (m *MockInstanceServer) UpdateNetwork(arg0 string, arg1 api.NetworkPut, arg } // UpdateNetwork indicates an expected call of UpdateNetwork. -func (mr *MockInstanceServerMockRecorder) UpdateNetwork(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetwork(arg0, arg1, arg2 any) *MockInstanceServerUpdateNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetwork", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetwork), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetwork", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetwork), arg0, arg1, arg2) + return &MockInstanceServerUpdateNetworkCall{Call: call} +} + +// MockInstanceServerUpdateNetworkCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkCall) Return(arg0 error) *MockInstanceServerUpdateNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkCall) Do(f func(string, api.NetworkPut, string) error) *MockInstanceServerUpdateNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkCall) DoAndReturn(f func(string, api.NetworkPut, string) error) *MockInstanceServerUpdateNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkACL mocks base method. @@ -4893,9 +12549,33 @@ func (m *MockInstanceServer) UpdateNetworkACL(arg0 string, arg1 api.NetworkACLPu } // UpdateNetworkACL indicates an expected call of UpdateNetworkACL. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkACL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkACL(arg0, arg1, arg2 any) *MockInstanceServerUpdateNetworkACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkACL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkACL", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkACL), arg0, arg1, arg2) + return &MockInstanceServerUpdateNetworkACLCall{Call: call} +} + +// MockInstanceServerUpdateNetworkACLCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkACLCall) Return(arg0 error) *MockInstanceServerUpdateNetworkACLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkACLCall) Do(f func(string, api.NetworkACLPut, string) error) *MockInstanceServerUpdateNetworkACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkACLCall) DoAndReturn(f func(string, api.NetworkACLPut, string) error) *MockInstanceServerUpdateNetworkACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkForward mocks base method. @@ -4907,9 +12587,33 @@ func (m *MockInstanceServer) UpdateNetworkForward(arg0, arg1 string, arg2 api.Ne } // UpdateNetworkForward indicates an expected call of UpdateNetworkForward. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkForward(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkForward(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateNetworkForwardCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkForward), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkForward", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkForward), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateNetworkForwardCall{Call: call} +} + +// MockInstanceServerUpdateNetworkForwardCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkForwardCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkForwardCall) Return(arg0 error) *MockInstanceServerUpdateNetworkForwardCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkForwardCall) Do(f func(string, string, api.NetworkForwardPut, string) error) *MockInstanceServerUpdateNetworkForwardCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkForwardCall) DoAndReturn(f func(string, string, api.NetworkForwardPut, string) error) *MockInstanceServerUpdateNetworkForwardCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkLoadBalancer mocks base method. @@ -4921,9 +12625,33 @@ func (m *MockInstanceServer) UpdateNetworkLoadBalancer(arg0, arg1 string, arg2 a } // UpdateNetworkLoadBalancer indicates an expected call of UpdateNetworkLoadBalancer. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkLoadBalancer(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkLoadBalancer(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateNetworkLoadBalancerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkLoadBalancer), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkLoadBalancer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkLoadBalancer), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateNetworkLoadBalancerCall{Call: call} +} + +// MockInstanceServerUpdateNetworkLoadBalancerCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkLoadBalancerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkLoadBalancerCall) Return(arg0 error) *MockInstanceServerUpdateNetworkLoadBalancerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkLoadBalancerCall) Do(f func(string, string, api.NetworkLoadBalancerPut, string) error) *MockInstanceServerUpdateNetworkLoadBalancerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkLoadBalancerCall) DoAndReturn(f func(string, string, api.NetworkLoadBalancerPut, string) error) *MockInstanceServerUpdateNetworkLoadBalancerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkPeer mocks base method. @@ -4935,9 +12663,33 @@ func (m *MockInstanceServer) UpdateNetworkPeer(arg0, arg1 string, arg2 api.Netwo } // UpdateNetworkPeer indicates an expected call of UpdateNetworkPeer. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkPeer(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkPeer(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateNetworkPeerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkPeer), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkPeer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkPeer), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateNetworkPeerCall{Call: call} +} + +// MockInstanceServerUpdateNetworkPeerCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkPeerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkPeerCall) Return(arg0 error) *MockInstanceServerUpdateNetworkPeerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkPeerCall) Do(f func(string, string, api.NetworkPeerPut, string) error) *MockInstanceServerUpdateNetworkPeerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkPeerCall) DoAndReturn(f func(string, string, api.NetworkPeerPut, string) error) *MockInstanceServerUpdateNetworkPeerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkZone mocks base method. @@ -4949,9 +12701,33 @@ func (m *MockInstanceServer) UpdateNetworkZone(arg0 string, arg1 api.NetworkZone } // UpdateNetworkZone indicates an expected call of UpdateNetworkZone. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkZone(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkZone(arg0, arg1, arg2 any) *MockInstanceServerUpdateNetworkZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkZone), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkZone", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkZone), arg0, arg1, arg2) + return &MockInstanceServerUpdateNetworkZoneCall{Call: call} +} + +// MockInstanceServerUpdateNetworkZoneCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkZoneCall) Return(arg0 error) *MockInstanceServerUpdateNetworkZoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkZoneCall) Do(f func(string, api.NetworkZonePut, string) error) *MockInstanceServerUpdateNetworkZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkZoneCall) DoAndReturn(f func(string, api.NetworkZonePut, string) error) *MockInstanceServerUpdateNetworkZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateNetworkZoneRecord mocks base method. @@ -4963,9 +12739,33 @@ func (m *MockInstanceServer) UpdateNetworkZoneRecord(arg0, arg1 string, arg2 api } // UpdateNetworkZoneRecord indicates an expected call of UpdateNetworkZoneRecord. -func (mr *MockInstanceServerMockRecorder) UpdateNetworkZoneRecord(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateNetworkZoneRecord(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateNetworkZoneRecordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkZoneRecord), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkZoneRecord", reflect.TypeOf((*MockInstanceServer)(nil).UpdateNetworkZoneRecord), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateNetworkZoneRecordCall{Call: call} +} + +// MockInstanceServerUpdateNetworkZoneRecordCall wrap *gomock.Call +type MockInstanceServerUpdateNetworkZoneRecordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateNetworkZoneRecordCall) Return(arg0 error) *MockInstanceServerUpdateNetworkZoneRecordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateNetworkZoneRecordCall) Do(f func(string, string, api.NetworkZoneRecordPut, string) error) *MockInstanceServerUpdateNetworkZoneRecordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateNetworkZoneRecordCall) DoAndReturn(f func(string, string, api.NetworkZoneRecordPut, string) error) *MockInstanceServerUpdateNetworkZoneRecordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateProfile mocks base method. @@ -4977,9 +12777,33 @@ func (m *MockInstanceServer) UpdateProfile(arg0 string, arg1 api.ProfilePut, arg } // UpdateProfile indicates an expected call of UpdateProfile. -func (mr *MockInstanceServerMockRecorder) UpdateProfile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateProfile(arg0, arg1, arg2 any) *MockInstanceServerUpdateProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateProfile", reflect.TypeOf((*MockInstanceServer)(nil).UpdateProfile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateProfile", reflect.TypeOf((*MockInstanceServer)(nil).UpdateProfile), arg0, arg1, arg2) + return &MockInstanceServerUpdateProfileCall{Call: call} +} + +// MockInstanceServerUpdateProfileCall wrap *gomock.Call +type MockInstanceServerUpdateProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateProfileCall) Return(arg0 error) *MockInstanceServerUpdateProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateProfileCall) Do(f func(string, api.ProfilePut, string) error) *MockInstanceServerUpdateProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateProfileCall) DoAndReturn(f func(string, api.ProfilePut, string) error) *MockInstanceServerUpdateProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateProject mocks base method. @@ -4991,9 +12815,33 @@ func (m *MockInstanceServer) UpdateProject(arg0 string, arg1 api.ProjectPut, arg } // UpdateProject indicates an expected call of UpdateProject. -func (mr *MockInstanceServerMockRecorder) UpdateProject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateProject(arg0, arg1, arg2 any) *MockInstanceServerUpdateProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateProject", reflect.TypeOf((*MockInstanceServer)(nil).UpdateProject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateProject", reflect.TypeOf((*MockInstanceServer)(nil).UpdateProject), arg0, arg1, arg2) + return &MockInstanceServerUpdateProjectCall{Call: call} +} + +// MockInstanceServerUpdateProjectCall wrap *gomock.Call +type MockInstanceServerUpdateProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateProjectCall) Return(arg0 error) *MockInstanceServerUpdateProjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateProjectCall) Do(f func(string, api.ProjectPut, string) error) *MockInstanceServerUpdateProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateProjectCall) DoAndReturn(f func(string, api.ProjectPut, string) error) *MockInstanceServerUpdateProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateServer mocks base method. @@ -5005,9 +12853,33 @@ func (m *MockInstanceServer) UpdateServer(arg0 api.ServerPut, arg1 string) error } // UpdateServer indicates an expected call of UpdateServer. -func (mr *MockInstanceServerMockRecorder) UpdateServer(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateServer(arg0, arg1 any) *MockInstanceServerUpdateServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateServer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServer", reflect.TypeOf((*MockInstanceServer)(nil).UpdateServer), arg0, arg1) + return &MockInstanceServerUpdateServerCall{Call: call} +} + +// MockInstanceServerUpdateServerCall wrap *gomock.Call +type MockInstanceServerUpdateServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateServerCall) Return(arg0 error) *MockInstanceServerUpdateServerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateServerCall) Do(f func(api.ServerPut, string) error) *MockInstanceServerUpdateServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateServerCall) DoAndReturn(f func(api.ServerPut, string) error) *MockInstanceServerUpdateServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePool mocks base method. @@ -5019,9 +12891,33 @@ func (m *MockInstanceServer) UpdateStoragePool(arg0 string, arg1 api.StoragePool } // UpdateStoragePool indicates an expected call of UpdateStoragePool. -func (mr *MockInstanceServerMockRecorder) UpdateStoragePool(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateStoragePool(arg0, arg1, arg2 any) *MockInstanceServerUpdateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePool), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePool", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePool), arg0, arg1, arg2) + return &MockInstanceServerUpdateStoragePoolCall{Call: call} +} + +// MockInstanceServerUpdateStoragePoolCall wrap *gomock.Call +type MockInstanceServerUpdateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateStoragePoolCall) Return(arg0 error) *MockInstanceServerUpdateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateStoragePoolCall) Do(f func(string, api.StoragePoolPut, string) error) *MockInstanceServerUpdateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateStoragePoolCall) DoAndReturn(f func(string, api.StoragePoolPut, string) error) *MockInstanceServerUpdateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolBucket mocks base method. @@ -5033,9 +12929,33 @@ func (m *MockInstanceServer) UpdateStoragePoolBucket(arg0, arg1 string, arg2 api } // UpdateStoragePoolBucket indicates an expected call of UpdateStoragePoolBucket. -func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolBucket(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolBucket(arg0, arg1, arg2, arg3 any) *MockInstanceServerUpdateStoragePoolBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolBucket), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolBucket", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolBucket), arg0, arg1, arg2, arg3) + return &MockInstanceServerUpdateStoragePoolBucketCall{Call: call} +} + +// MockInstanceServerUpdateStoragePoolBucketCall wrap *gomock.Call +type MockInstanceServerUpdateStoragePoolBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateStoragePoolBucketCall) Return(arg0 error) *MockInstanceServerUpdateStoragePoolBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateStoragePoolBucketCall) Do(f func(string, string, api.StorageBucketPut, string) error) *MockInstanceServerUpdateStoragePoolBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateStoragePoolBucketCall) DoAndReturn(f func(string, string, api.StorageBucketPut, string) error) *MockInstanceServerUpdateStoragePoolBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolBucketKey mocks base method. @@ -5047,9 +12967,33 @@ func (m *MockInstanceServer) UpdateStoragePoolBucketKey(arg0, arg1, arg2 string, } // UpdateStoragePoolBucketKey indicates an expected call of UpdateStoragePoolBucketKey. -func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolBucketKey(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolBucketKey(arg0, arg1, arg2, arg3, arg4 any) *MockInstanceServerUpdateStoragePoolBucketKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolBucketKey), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolBucketKey", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolBucketKey), arg0, arg1, arg2, arg3, arg4) + return &MockInstanceServerUpdateStoragePoolBucketKeyCall{Call: call} +} + +// MockInstanceServerUpdateStoragePoolBucketKeyCall wrap *gomock.Call +type MockInstanceServerUpdateStoragePoolBucketKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateStoragePoolBucketKeyCall) Return(arg0 error) *MockInstanceServerUpdateStoragePoolBucketKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateStoragePoolBucketKeyCall) Do(f func(string, string, string, api.StorageBucketKeyPut, string) error) *MockInstanceServerUpdateStoragePoolBucketKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateStoragePoolBucketKeyCall) DoAndReturn(f func(string, string, string, api.StorageBucketKeyPut, string) error) *MockInstanceServerUpdateStoragePoolBucketKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolVolume mocks base method. @@ -5061,9 +13005,33 @@ func (m *MockInstanceServer) UpdateStoragePoolVolume(arg0, arg1, arg2 string, ar } // UpdateStoragePoolVolume indicates an expected call of UpdateStoragePoolVolume. -func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *MockInstanceServerUpdateStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + return &MockInstanceServerUpdateStoragePoolVolumeCall{Call: call} +} + +// MockInstanceServerUpdateStoragePoolVolumeCall wrap *gomock.Call +type MockInstanceServerUpdateStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateStoragePoolVolumeCall) Return(arg0 error) *MockInstanceServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateStoragePoolVolumeCall) Do(f func(string, string, string, api.StorageVolumePut, string) error) *MockInstanceServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateStoragePoolVolumeCall) DoAndReturn(f func(string, string, string, api.StorageVolumePut, string) error) *MockInstanceServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolVolumeSnapshot mocks base method. @@ -5075,9 +13043,33 @@ func (m *MockInstanceServer) UpdateStoragePoolVolumeSnapshot(arg0, arg1, arg2, a } // UpdateStoragePoolVolumeSnapshot indicates an expected call of UpdateStoragePoolVolumeSnapshot. -func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateStoragePoolVolumeSnapshot(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolumeSnapshot", reflect.TypeOf((*MockInstanceServer)(nil).UpdateStoragePoolVolumeSnapshot), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockInstanceServerUpdateStoragePoolVolumeSnapshotCall{Call: call} +} + +// MockInstanceServerUpdateStoragePoolVolumeSnapshotCall wrap *gomock.Call +type MockInstanceServerUpdateStoragePoolVolumeSnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall) Return(arg0 error) *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall) Do(f func(string, string, string, string, api.StorageVolumeSnapshotPut, string) error) *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall) DoAndReturn(f func(string, string, string, string, api.StorageVolumeSnapshotPut, string) error) *MockInstanceServerUpdateStoragePoolVolumeSnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateWarning mocks base method. @@ -5089,9 +13081,33 @@ func (m *MockInstanceServer) UpdateWarning(arg0 string, arg1 api.WarningPut, arg } // UpdateWarning indicates an expected call of UpdateWarning. -func (mr *MockInstanceServerMockRecorder) UpdateWarning(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UpdateWarning(arg0, arg1, arg2 any) *MockInstanceServerUpdateWarningCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWarning", reflect.TypeOf((*MockInstanceServer)(nil).UpdateWarning), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWarning", reflect.TypeOf((*MockInstanceServer)(nil).UpdateWarning), arg0, arg1, arg2) + return &MockInstanceServerUpdateWarningCall{Call: call} +} + +// MockInstanceServerUpdateWarningCall wrap *gomock.Call +type MockInstanceServerUpdateWarningCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUpdateWarningCall) Return(arg0 error) *MockInstanceServerUpdateWarningCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUpdateWarningCall) Do(f func(string, api.WarningPut, string) error) *MockInstanceServerUpdateWarningCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUpdateWarningCall) DoAndReturn(f func(string, api.WarningPut, string) error) *MockInstanceServerUpdateWarningCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseProject mocks base method. @@ -5103,9 +13119,33 @@ func (m *MockInstanceServer) UseProject(arg0 string) lxd.InstanceServer { } // UseProject indicates an expected call of UseProject. -func (mr *MockInstanceServerMockRecorder) UseProject(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UseProject(arg0 any) *MockInstanceServerUseProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockInstanceServer)(nil).UseProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockInstanceServer)(nil).UseProject), arg0) + return &MockInstanceServerUseProjectCall{Call: call} +} + +// MockInstanceServerUseProjectCall wrap *gomock.Call +type MockInstanceServerUseProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUseProjectCall) Return(arg0 lxd.InstanceServer) *MockInstanceServerUseProjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUseProjectCall) Do(f func(string) lxd.InstanceServer) *MockInstanceServerUseProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUseProjectCall) DoAndReturn(f func(string) lxd.InstanceServer) *MockInstanceServerUseProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseTarget mocks base method. @@ -5117,7 +13157,31 @@ func (m *MockInstanceServer) UseTarget(arg0 string) lxd.InstanceServer { } // UseTarget indicates an expected call of UseTarget. -func (mr *MockInstanceServerMockRecorder) UseTarget(arg0 any) *gomock.Call { +func (mr *MockInstanceServerMockRecorder) UseTarget(arg0 any) *MockInstanceServerUseTargetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTarget", reflect.TypeOf((*MockInstanceServer)(nil).UseTarget), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTarget", reflect.TypeOf((*MockInstanceServer)(nil).UseTarget), arg0) + return &MockInstanceServerUseTargetCall{Call: call} +} + +// MockInstanceServerUseTargetCall wrap *gomock.Call +type MockInstanceServerUseTargetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServerUseTargetCall) Return(arg0 lxd.InstanceServer) *MockInstanceServerUseTargetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServerUseTargetCall) Do(f func(string) lxd.InstanceServer) *MockInstanceServerUseTargetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServerUseTargetCall) DoAndReturn(f func(string) lxd.InstanceServer) *MockInstanceServerUseTargetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/lxd/testing/package_test.go b/internal/container/lxd/testing/package_test.go index 70a63967d89..3e4f500f6c4 100644 --- a/internal/container/lxd/testing/package_test.go +++ b/internal/container/lxd/testing/package_test.go @@ -3,4 +3,4 @@ package testing -//go:generate go run go.uber.org/mock/mockgen -package testing -destination lxd_mock.go -write_package_comment=false github.com/canonical/lxd/client Operation,RemoteOperation,Server,ImageServer,InstanceServer +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination lxd_mock.go -write_package_comment=false github.com/canonical/lxd/client Operation,RemoteOperation,Server,ImageServer,InstanceServer diff --git a/internal/container/package_test.go b/internal/container/package_test.go index c7066ea7967..15f8b527d7e 100644 --- a/internal/container/package_test.go +++ b/internal/container/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/internal/container Manager,Initialiser -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/interface_mock.go -write_package_comment=false github.com/juju/juju/internal/container TestLXDManager +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/internal/container Manager,Initialiser +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/interface_mock.go -write_package_comment=false github.com/juju/juju/internal/container TestLXDManager func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/container/testing/interface_mock.go b/internal/container/testing/interface_mock.go index 186e3db81b1..53246751cb4 100644 --- a/internal/container/testing/interface_mock.go +++ b/internal/container/testing/interface_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/interface_mock.go -write_package_comment=false github.com/juju/juju/internal/container TestLXDManager +// mockgen -typed -package testing -destination testing/interface_mock.go -write_package_comment=false github.com/juju/juju/internal/container TestLXDManager package testing import ( @@ -54,9 +54,33 @@ func (m *MockTestLXDManager) AssignLXDProfiles(arg0 string, arg1 []string, arg2 } // AssignLXDProfiles indicates an expected call of AssignLXDProfiles. -func (mr *MockTestLXDManagerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *MockTestLXDManagerAssignLXDProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockTestLXDManager)(nil).AssignLXDProfiles), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockTestLXDManager)(nil).AssignLXDProfiles), arg0, arg1, arg2) + return &MockTestLXDManagerAssignLXDProfilesCall{Call: call} +} + +// MockTestLXDManagerAssignLXDProfilesCall wrap *gomock.Call +type MockTestLXDManagerAssignLXDProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerAssignLXDProfilesCall) Return(arg0 []string, arg1 error) *MockTestLXDManagerAssignLXDProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerAssignLXDProfilesCall) Do(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockTestLXDManagerAssignLXDProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerAssignLXDProfilesCall) DoAndReturn(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockTestLXDManagerAssignLXDProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainer mocks base method. @@ -70,9 +94,33 @@ func (m *MockTestLXDManager) CreateContainer(arg0 context.Context, arg1 *instanc } // CreateContainer indicates an expected call of CreateContainer. -func (mr *MockTestLXDManagerMockRecorder) CreateContainer(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) CreateContainer(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockTestLXDManagerCreateContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockTestLXDManager)(nil).CreateContainer), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockTestLXDManager)(nil).CreateContainer), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockTestLXDManagerCreateContainerCall{Call: call} +} + +// MockTestLXDManagerCreateContainerCall wrap *gomock.Call +type MockTestLXDManagerCreateContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerCreateContainerCall) Return(arg0 instances.Instance, arg1 *instance.HardwareCharacteristics, arg2 error) *MockTestLXDManagerCreateContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerCreateContainerCall) Do(f func(context.Context, *instancecfg.InstanceConfig, constraints.Value, base.Base, *container.NetworkConfig, *container.StorageConfig, environs.StatusCallbackFunc) (instances.Instance, *instance.HardwareCharacteristics, error)) *MockTestLXDManagerCreateContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerCreateContainerCall) DoAndReturn(f func(context.Context, *instancecfg.InstanceConfig, constraints.Value, base.Base, *container.NetworkConfig, *container.StorageConfig, environs.StatusCallbackFunc) (instances.Instance, *instance.HardwareCharacteristics, error)) *MockTestLXDManagerCreateContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyContainer mocks base method. @@ -84,9 +132,33 @@ func (m *MockTestLXDManager) DestroyContainer(arg0 instance.Id) error { } // DestroyContainer indicates an expected call of DestroyContainer. -func (mr *MockTestLXDManagerMockRecorder) DestroyContainer(arg0 any) *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) DestroyContainer(arg0 any) *MockTestLXDManagerDestroyContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyContainer", reflect.TypeOf((*MockTestLXDManager)(nil).DestroyContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyContainer", reflect.TypeOf((*MockTestLXDManager)(nil).DestroyContainer), arg0) + return &MockTestLXDManagerDestroyContainerCall{Call: call} +} + +// MockTestLXDManagerDestroyContainerCall wrap *gomock.Call +type MockTestLXDManagerDestroyContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerDestroyContainerCall) Return(arg0 error) *MockTestLXDManagerDestroyContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerDestroyContainerCall) Do(f func(instance.Id) error) *MockTestLXDManagerDestroyContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerDestroyContainerCall) DoAndReturn(f func(instance.Id) error) *MockTestLXDManagerDestroyContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsInitialized mocks base method. @@ -98,9 +170,33 @@ func (m *MockTestLXDManager) IsInitialized() bool { } // IsInitialized indicates an expected call of IsInitialized. -func (mr *MockTestLXDManagerMockRecorder) IsInitialized() *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) IsInitialized() *MockTestLXDManagerIsInitializedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockTestLXDManager)(nil).IsInitialized)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockTestLXDManager)(nil).IsInitialized)) + return &MockTestLXDManagerIsInitializedCall{Call: call} +} + +// MockTestLXDManagerIsInitializedCall wrap *gomock.Call +type MockTestLXDManagerIsInitializedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerIsInitializedCall) Return(arg0 bool) *MockTestLXDManagerIsInitializedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerIsInitializedCall) Do(f func() bool) *MockTestLXDManagerIsInitializedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerIsInitializedCall) DoAndReturn(f func() bool) *MockTestLXDManagerIsInitializedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfileNames mocks base method. @@ -113,9 +209,33 @@ func (m *MockTestLXDManager) LXDProfileNames(arg0 string) ([]string, error) { } // LXDProfileNames indicates an expected call of LXDProfileNames. -func (mr *MockTestLXDManagerMockRecorder) LXDProfileNames(arg0 any) *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) LXDProfileNames(arg0 any) *MockTestLXDManagerLXDProfileNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockTestLXDManager)(nil).LXDProfileNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockTestLXDManager)(nil).LXDProfileNames), arg0) + return &MockTestLXDManagerLXDProfileNamesCall{Call: call} +} + +// MockTestLXDManagerLXDProfileNamesCall wrap *gomock.Call +type MockTestLXDManagerLXDProfileNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerLXDProfileNamesCall) Return(arg0 []string, arg1 error) *MockTestLXDManagerLXDProfileNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerLXDProfileNamesCall) Do(f func(string) ([]string, error)) *MockTestLXDManagerLXDProfileNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerLXDProfileNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockTestLXDManagerLXDProfileNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListContainers mocks base method. @@ -128,9 +248,33 @@ func (m *MockTestLXDManager) ListContainers() ([]instances.Instance, error) { } // ListContainers indicates an expected call of ListContainers. -func (mr *MockTestLXDManagerMockRecorder) ListContainers() *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) ListContainers() *MockTestLXDManagerListContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockTestLXDManager)(nil).ListContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockTestLXDManager)(nil).ListContainers)) + return &MockTestLXDManagerListContainersCall{Call: call} +} + +// MockTestLXDManagerListContainersCall wrap *gomock.Call +type MockTestLXDManagerListContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerListContainersCall) Return(arg0 []instances.Instance, arg1 error) *MockTestLXDManagerListContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerListContainersCall) Do(f func() ([]instances.Instance, error)) *MockTestLXDManagerListContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerListContainersCall) DoAndReturn(f func() ([]instances.Instance, error)) *MockTestLXDManagerListContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MaybeWriteLXDProfile mocks base method. @@ -142,9 +286,33 @@ func (m *MockTestLXDManager) MaybeWriteLXDProfile(arg0 string, arg1 lxdprofile.P } // MaybeWriteLXDProfile indicates an expected call of MaybeWriteLXDProfile. -func (mr *MockTestLXDManagerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *MockTestLXDManagerMaybeWriteLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockTestLXDManager)(nil).MaybeWriteLXDProfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockTestLXDManager)(nil).MaybeWriteLXDProfile), arg0, arg1) + return &MockTestLXDManagerMaybeWriteLXDProfileCall{Call: call} +} + +// MockTestLXDManagerMaybeWriteLXDProfileCall wrap *gomock.Call +type MockTestLXDManagerMaybeWriteLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerMaybeWriteLXDProfileCall) Return(arg0 error) *MockTestLXDManagerMaybeWriteLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerMaybeWriteLXDProfileCall) Do(f func(string, lxdprofile.Profile) error) *MockTestLXDManagerMaybeWriteLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerMaybeWriteLXDProfileCall) DoAndReturn(f func(string, lxdprofile.Profile) error) *MockTestLXDManagerMaybeWriteLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Namespace mocks base method. @@ -156,7 +324,31 @@ func (m *MockTestLXDManager) Namespace() instance.Namespace { } // Namespace indicates an expected call of Namespace. -func (mr *MockTestLXDManagerMockRecorder) Namespace() *gomock.Call { +func (mr *MockTestLXDManagerMockRecorder) Namespace() *MockTestLXDManagerNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockTestLXDManager)(nil).Namespace)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockTestLXDManager)(nil).Namespace)) + return &MockTestLXDManagerNamespaceCall{Call: call} +} + +// MockTestLXDManagerNamespaceCall wrap *gomock.Call +type MockTestLXDManagerNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTestLXDManagerNamespaceCall) Return(arg0 instance.Namespace) *MockTestLXDManagerNamespaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTestLXDManagerNamespaceCall) Do(f func() instance.Namespace) *MockTestLXDManagerNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTestLXDManagerNamespaceCall) DoAndReturn(f func() instance.Namespace) *MockTestLXDManagerNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/container/testing/package_mock.go b/internal/container/testing/package_mock.go index 38acc94d1b8..ffa4915c142 100644 --- a/internal/container/testing/package_mock.go +++ b/internal/container/testing/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/internal/container Manager,Initialiser +// mockgen -typed -package testing -destination testing/package_mock.go -write_package_comment=false github.com/juju/juju/internal/container Manager,Initialiser package testing import ( @@ -54,9 +54,33 @@ func (m *MockManager) CreateContainer(arg0 context.Context, arg1 *instancecfg.In } // CreateContainer indicates an expected call of CreateContainer. -func (mr *MockManagerMockRecorder) CreateContainer(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockManagerMockRecorder) CreateContainer(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockManagerCreateContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockManager)(nil).CreateContainer), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainer", reflect.TypeOf((*MockManager)(nil).CreateContainer), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockManagerCreateContainerCall{Call: call} +} + +// MockManagerCreateContainerCall wrap *gomock.Call +type MockManagerCreateContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerCreateContainerCall) Return(arg0 instances.Instance, arg1 *instance.HardwareCharacteristics, arg2 error) *MockManagerCreateContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerCreateContainerCall) Do(f func(context.Context, *instancecfg.InstanceConfig, constraints.Value, base.Base, *container.NetworkConfig, *container.StorageConfig, environs.StatusCallbackFunc) (instances.Instance, *instance.HardwareCharacteristics, error)) *MockManagerCreateContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerCreateContainerCall) DoAndReturn(f func(context.Context, *instancecfg.InstanceConfig, constraints.Value, base.Base, *container.NetworkConfig, *container.StorageConfig, environs.StatusCallbackFunc) (instances.Instance, *instance.HardwareCharacteristics, error)) *MockManagerCreateContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyContainer mocks base method. @@ -68,9 +92,33 @@ func (m *MockManager) DestroyContainer(arg0 instance.Id) error { } // DestroyContainer indicates an expected call of DestroyContainer. -func (mr *MockManagerMockRecorder) DestroyContainer(arg0 any) *gomock.Call { +func (mr *MockManagerMockRecorder) DestroyContainer(arg0 any) *MockManagerDestroyContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyContainer", reflect.TypeOf((*MockManager)(nil).DestroyContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyContainer", reflect.TypeOf((*MockManager)(nil).DestroyContainer), arg0) + return &MockManagerDestroyContainerCall{Call: call} +} + +// MockManagerDestroyContainerCall wrap *gomock.Call +type MockManagerDestroyContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerDestroyContainerCall) Return(arg0 error) *MockManagerDestroyContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerDestroyContainerCall) Do(f func(instance.Id) error) *MockManagerDestroyContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerDestroyContainerCall) DoAndReturn(f func(instance.Id) error) *MockManagerDestroyContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsInitialized mocks base method. @@ -82,9 +130,33 @@ func (m *MockManager) IsInitialized() bool { } // IsInitialized indicates an expected call of IsInitialized. -func (mr *MockManagerMockRecorder) IsInitialized() *gomock.Call { +func (mr *MockManagerMockRecorder) IsInitialized() *MockManagerIsInitializedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockManager)(nil).IsInitialized)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockManager)(nil).IsInitialized)) + return &MockManagerIsInitializedCall{Call: call} +} + +// MockManagerIsInitializedCall wrap *gomock.Call +type MockManagerIsInitializedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerIsInitializedCall) Return(arg0 bool) *MockManagerIsInitializedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerIsInitializedCall) Do(f func() bool) *MockManagerIsInitializedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerIsInitializedCall) DoAndReturn(f func() bool) *MockManagerIsInitializedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListContainers mocks base method. @@ -97,9 +169,33 @@ func (m *MockManager) ListContainers() ([]instances.Instance, error) { } // ListContainers indicates an expected call of ListContainers. -func (mr *MockManagerMockRecorder) ListContainers() *gomock.Call { +func (mr *MockManagerMockRecorder) ListContainers() *MockManagerListContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockManager)(nil).ListContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListContainers", reflect.TypeOf((*MockManager)(nil).ListContainers)) + return &MockManagerListContainersCall{Call: call} +} + +// MockManagerListContainersCall wrap *gomock.Call +type MockManagerListContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerListContainersCall) Return(arg0 []instances.Instance, arg1 error) *MockManagerListContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerListContainersCall) Do(f func() ([]instances.Instance, error)) *MockManagerListContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerListContainersCall) DoAndReturn(f func() ([]instances.Instance, error)) *MockManagerListContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Namespace mocks base method. @@ -111,9 +207,33 @@ func (m *MockManager) Namespace() instance.Namespace { } // Namespace indicates an expected call of Namespace. -func (mr *MockManagerMockRecorder) Namespace() *gomock.Call { +func (mr *MockManagerMockRecorder) Namespace() *MockManagerNamespaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockManager)(nil).Namespace)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockManager)(nil).Namespace)) + return &MockManagerNamespaceCall{Call: call} +} + +// MockManagerNamespaceCall wrap *gomock.Call +type MockManagerNamespaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerNamespaceCall) Return(arg0 instance.Namespace) *MockManagerNamespaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerNamespaceCall) Do(f func() instance.Namespace) *MockManagerNamespaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerNamespaceCall) DoAndReturn(f func() instance.Namespace) *MockManagerNamespaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInitialiser is a mock of Initialiser interface. @@ -148,7 +268,31 @@ func (m *MockInitialiser) Initialise() error { } // Initialise indicates an expected call of Initialise. -func (mr *MockInitialiserMockRecorder) Initialise() *gomock.Call { +func (mr *MockInitialiserMockRecorder) Initialise() *MockInitialiserInitialiseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockInitialiser)(nil).Initialise)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialise", reflect.TypeOf((*MockInitialiser)(nil).Initialise)) + return &MockInitialiserInitialiseCall{Call: call} +} + +// MockInitialiserInitialiseCall wrap *gomock.Call +type MockInitialiserInitialiseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInitialiserInitialiseCall) Return(arg0 error) *MockInitialiserInitialiseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInitialiserInitialiseCall) Do(f func() error) *MockInitialiserInitialiseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInitialiserInitialiseCall) DoAndReturn(f func() error) *MockInitialiserInitialiseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/database/network_mock_test.go b/internal/database/network_mock_test.go index 3b62c21f5f1..f9b4f0a78b8 100644 --- a/internal/database/network_mock_test.go +++ b/internal/database/network_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package database -destination network_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr +// mockgen -typed -package database -destination network_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr // // Package database is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockConfigSource) DefaultRoute() (net.IP, string, error) { } // DefaultRoute indicates an expected call of DefaultRoute. -func (mr *MockConfigSourceMockRecorder) DefaultRoute() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) DefaultRoute() *MockConfigSourceDefaultRouteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultRoute", reflect.TypeOf((*MockConfigSource)(nil).DefaultRoute)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultRoute", reflect.TypeOf((*MockConfigSource)(nil).DefaultRoute)) + return &MockConfigSourceDefaultRouteCall{Call: call} +} + +// MockConfigSourceDefaultRouteCall wrap *gomock.Call +type MockConfigSourceDefaultRouteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceDefaultRouteCall) Return(arg0 net.IP, arg1 string, arg2 error) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceDefaultRouteCall) Do(f func() (net.IP, string, error)) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceDefaultRouteCall) DoAndReturn(f func() (net.IP, string, error)) *MockConfigSourceDefaultRouteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBridgePorts mocks base method. @@ -66,9 +90,33 @@ func (m *MockConfigSource) GetBridgePorts(arg0 string) []string { } // GetBridgePorts indicates an expected call of GetBridgePorts. -func (mr *MockConfigSourceMockRecorder) GetBridgePorts(arg0 any) *gomock.Call { +func (mr *MockConfigSourceMockRecorder) GetBridgePorts(arg0 any) *MockConfigSourceGetBridgePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBridgePorts", reflect.TypeOf((*MockConfigSource)(nil).GetBridgePorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBridgePorts", reflect.TypeOf((*MockConfigSource)(nil).GetBridgePorts), arg0) + return &MockConfigSourceGetBridgePortsCall{Call: call} +} + +// MockConfigSourceGetBridgePortsCall wrap *gomock.Call +type MockConfigSourceGetBridgePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceGetBridgePortsCall) Return(arg0 []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceGetBridgePortsCall) Do(f func(string) []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceGetBridgePortsCall) DoAndReturn(f func(string) []string) *MockConfigSourceGetBridgePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Interfaces mocks base method. @@ -81,9 +129,33 @@ func (m *MockConfigSource) Interfaces() ([]network.ConfigSourceNIC, error) { } // Interfaces indicates an expected call of Interfaces. -func (mr *MockConfigSourceMockRecorder) Interfaces() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) Interfaces() *MockConfigSourceInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Interfaces", reflect.TypeOf((*MockConfigSource)(nil).Interfaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Interfaces", reflect.TypeOf((*MockConfigSource)(nil).Interfaces)) + return &MockConfigSourceInterfacesCall{Call: call} +} + +// MockConfigSourceInterfacesCall wrap *gomock.Call +type MockConfigSourceInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceInterfacesCall) Return(arg0 []network.ConfigSourceNIC, arg1 error) *MockConfigSourceInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceInterfacesCall) Do(f func() ([]network.ConfigSourceNIC, error)) *MockConfigSourceInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceInterfacesCall) DoAndReturn(f func() ([]network.ConfigSourceNIC, error)) *MockConfigSourceInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OvsManagedBridges mocks base method. @@ -96,9 +168,33 @@ func (m *MockConfigSource) OvsManagedBridges() (set.Strings, error) { } // OvsManagedBridges indicates an expected call of OvsManagedBridges. -func (mr *MockConfigSourceMockRecorder) OvsManagedBridges() *gomock.Call { +func (mr *MockConfigSourceMockRecorder) OvsManagedBridges() *MockConfigSourceOvsManagedBridgesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OvsManagedBridges", reflect.TypeOf((*MockConfigSource)(nil).OvsManagedBridges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OvsManagedBridges", reflect.TypeOf((*MockConfigSource)(nil).OvsManagedBridges)) + return &MockConfigSourceOvsManagedBridgesCall{Call: call} +} + +// MockConfigSourceOvsManagedBridgesCall wrap *gomock.Call +type MockConfigSourceOvsManagedBridgesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceOvsManagedBridgesCall) Return(arg0 set.Strings, arg1 error) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceOvsManagedBridgesCall) Do(f func() (set.Strings, error)) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceOvsManagedBridgesCall) DoAndReturn(f func() (set.Strings, error)) *MockConfigSourceOvsManagedBridgesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSourceNIC is a mock of ConfigSourceNIC interface. @@ -134,9 +230,33 @@ func (m *MockConfigSourceNIC) Addresses() ([]network.ConfigSourceAddr, error) { } // Addresses indicates an expected call of Addresses. -func (mr *MockConfigSourceNICMockRecorder) Addresses() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Addresses() *MockConfigSourceNICAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockConfigSourceNIC)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockConfigSourceNIC)(nil).Addresses)) + return &MockConfigSourceNICAddressesCall{Call: call} +} + +// MockConfigSourceNICAddressesCall wrap *gomock.Call +type MockConfigSourceNICAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICAddressesCall) Return(arg0 []network.ConfigSourceAddr, arg1 error) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICAddressesCall) Do(f func() ([]network.ConfigSourceAddr, error)) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICAddressesCall) DoAndReturn(f func() ([]network.ConfigSourceAddr, error)) *MockConfigSourceNICAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HardwareAddr mocks base method. @@ -148,9 +268,33 @@ func (m *MockConfigSourceNIC) HardwareAddr() net.HardwareAddr { } // HardwareAddr indicates an expected call of HardwareAddr. -func (mr *MockConfigSourceNICMockRecorder) HardwareAddr() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) HardwareAddr() *MockConfigSourceNICHardwareAddrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareAddr", reflect.TypeOf((*MockConfigSourceNIC)(nil).HardwareAddr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HardwareAddr", reflect.TypeOf((*MockConfigSourceNIC)(nil).HardwareAddr)) + return &MockConfigSourceNICHardwareAddrCall{Call: call} +} + +// MockConfigSourceNICHardwareAddrCall wrap *gomock.Call +type MockConfigSourceNICHardwareAddrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICHardwareAddrCall) Return(arg0 net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICHardwareAddrCall) Do(f func() net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICHardwareAddrCall) DoAndReturn(f func() net.HardwareAddr) *MockConfigSourceNICHardwareAddrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Index mocks base method. @@ -162,9 +306,33 @@ func (m *MockConfigSourceNIC) Index() int { } // Index indicates an expected call of Index. -func (mr *MockConfigSourceNICMockRecorder) Index() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Index() *MockConfigSourceNICIndexCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index", reflect.TypeOf((*MockConfigSourceNIC)(nil).Index)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index", reflect.TypeOf((*MockConfigSourceNIC)(nil).Index)) + return &MockConfigSourceNICIndexCall{Call: call} +} + +// MockConfigSourceNICIndexCall wrap *gomock.Call +type MockConfigSourceNICIndexCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICIndexCall) Return(arg0 int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICIndexCall) Do(f func() int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICIndexCall) DoAndReturn(f func() int) *MockConfigSourceNICIndexCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUp mocks base method. @@ -176,9 +344,33 @@ func (m *MockConfigSourceNIC) IsUp() bool { } // IsUp indicates an expected call of IsUp. -func (mr *MockConfigSourceNICMockRecorder) IsUp() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) IsUp() *MockConfigSourceNICIsUpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockConfigSourceNIC)(nil).IsUp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockConfigSourceNIC)(nil).IsUp)) + return &MockConfigSourceNICIsUpCall{Call: call} +} + +// MockConfigSourceNICIsUpCall wrap *gomock.Call +type MockConfigSourceNICIsUpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICIsUpCall) Return(arg0 bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICIsUpCall) Do(f func() bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICIsUpCall) DoAndReturn(f func() bool) *MockConfigSourceNICIsUpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MTU mocks base method. @@ -190,9 +382,33 @@ func (m *MockConfigSourceNIC) MTU() int { } // MTU indicates an expected call of MTU. -func (mr *MockConfigSourceNICMockRecorder) MTU() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) MTU() *MockConfigSourceNICMTUCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockConfigSourceNIC)(nil).MTU)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockConfigSourceNIC)(nil).MTU)) + return &MockConfigSourceNICMTUCall{Call: call} +} + +// MockConfigSourceNICMTUCall wrap *gomock.Call +type MockConfigSourceNICMTUCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICMTUCall) Return(arg0 int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICMTUCall) Do(f func() int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICMTUCall) DoAndReturn(f func() int) *MockConfigSourceNICMTUCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -204,9 +420,33 @@ func (m *MockConfigSourceNIC) Name() string { } // Name indicates an expected call of Name. -func (mr *MockConfigSourceNICMockRecorder) Name() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Name() *MockConfigSourceNICNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockConfigSourceNIC)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockConfigSourceNIC)(nil).Name)) + return &MockConfigSourceNICNameCall{Call: call} +} + +// MockConfigSourceNICNameCall wrap *gomock.Call +type MockConfigSourceNICNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICNameCall) Return(arg0 string) *MockConfigSourceNICNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICNameCall) Do(f func() string) *MockConfigSourceNICNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICNameCall) DoAndReturn(f func() string) *MockConfigSourceNICNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -218,9 +458,33 @@ func (m *MockConfigSourceNIC) Type() network.LinkLayerDeviceType { } // Type indicates an expected call of Type. -func (mr *MockConfigSourceNICMockRecorder) Type() *gomock.Call { +func (mr *MockConfigSourceNICMockRecorder) Type() *MockConfigSourceNICTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockConfigSourceNIC)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockConfigSourceNIC)(nil).Type)) + return &MockConfigSourceNICTypeCall{Call: call} +} + +// MockConfigSourceNICTypeCall wrap *gomock.Call +type MockConfigSourceNICTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceNICTypeCall) Return(arg0 network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceNICTypeCall) Do(f func() network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceNICTypeCall) DoAndReturn(f func() network.LinkLayerDeviceType) *MockConfigSourceNICTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSourceAddr is a mock of ConfigSourceAddr interface. @@ -255,9 +519,33 @@ func (m *MockConfigSourceAddr) IP() net.IP { } // IP indicates an expected call of IP. -func (mr *MockConfigSourceAddrMockRecorder) IP() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IP() *MockConfigSourceAddrIPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IP", reflect.TypeOf((*MockConfigSourceAddr)(nil).IP)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IP", reflect.TypeOf((*MockConfigSourceAddr)(nil).IP)) + return &MockConfigSourceAddrIPCall{Call: call} +} + +// MockConfigSourceAddrIPCall wrap *gomock.Call +type MockConfigSourceAddrIPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIPCall) Return(arg0 net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIPCall) Do(f func() net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIPCall) DoAndReturn(f func() net.IP) *MockConfigSourceAddrIPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IPNet mocks base method. @@ -269,9 +557,33 @@ func (m *MockConfigSourceAddr) IPNet() *net.IPNet { } // IPNet indicates an expected call of IPNet. -func (mr *MockConfigSourceAddrMockRecorder) IPNet() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IPNet() *MockConfigSourceAddrIPNetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPNet", reflect.TypeOf((*MockConfigSourceAddr)(nil).IPNet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPNet", reflect.TypeOf((*MockConfigSourceAddr)(nil).IPNet)) + return &MockConfigSourceAddrIPNetCall{Call: call} +} + +// MockConfigSourceAddrIPNetCall wrap *gomock.Call +type MockConfigSourceAddrIPNetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIPNetCall) Return(arg0 *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIPNetCall) Do(f func() *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIPNetCall) DoAndReturn(f func() *net.IPNet) *MockConfigSourceAddrIPNetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsSecondary mocks base method. @@ -283,9 +595,33 @@ func (m *MockConfigSourceAddr) IsSecondary() bool { } // IsSecondary indicates an expected call of IsSecondary. -func (mr *MockConfigSourceAddrMockRecorder) IsSecondary() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) IsSecondary() *MockConfigSourceAddrIsSecondaryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSecondary", reflect.TypeOf((*MockConfigSourceAddr)(nil).IsSecondary)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSecondary", reflect.TypeOf((*MockConfigSourceAddr)(nil).IsSecondary)) + return &MockConfigSourceAddrIsSecondaryCall{Call: call} +} + +// MockConfigSourceAddrIsSecondaryCall wrap *gomock.Call +type MockConfigSourceAddrIsSecondaryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrIsSecondaryCall) Return(arg0 bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrIsSecondaryCall) Do(f func() bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrIsSecondaryCall) DoAndReturn(f func() bool) *MockConfigSourceAddrIsSecondaryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -297,7 +633,31 @@ func (m *MockConfigSourceAddr) String() string { } // String indicates an expected call of String. -func (mr *MockConfigSourceAddrMockRecorder) String() *gomock.Call { +func (mr *MockConfigSourceAddrMockRecorder) String() *MockConfigSourceAddrStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockConfigSourceAddr)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockConfigSourceAddr)(nil).String)) + return &MockConfigSourceAddrStringCall{Call: call} +} + +// MockConfigSourceAddrStringCall wrap *gomock.Call +type MockConfigSourceAddrStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSourceAddrStringCall) Return(arg0 string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSourceAddrStringCall) Do(f func() string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSourceAddrStringCall) DoAndReturn(f func() string) *MockConfigSourceAddrStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/database/package_test.go b/internal/database/package_test.go index 1d58a111a76..15ef0dd17ad 100644 --- a/internal/database/package_test.go +++ b/internal/database/package_test.go @@ -10,7 +10,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package database -destination network_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr +//go:generate go run go.uber.org/mock/mockgen -typed -package database -destination network_mock_test.go github.com/juju/juju/core/network ConfigSource,ConfigSourceNIC,ConfigSourceAddr func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/docker/registry/internal/base_manifests.go b/internal/docker/registry/internal/base_manifests.go index 998462a7a14..e5bb9459695 100644 --- a/internal/docker/registry/internal/base_manifests.go +++ b/internal/docker/registry/internal/base_manifests.go @@ -12,7 +12,7 @@ import ( "github.com/juju/errors" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/manifests_mock.go github.com/juju/juju/internal/docker/registry/internal ArchitectureGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/manifests_mock.go github.com/juju/juju/internal/docker/registry/internal ArchitectureGetter type manifestsResponseV1 struct { SchemaVersion int `json:"schemaVersion"` diff --git a/internal/docker/registry/internal/ecr.go b/internal/docker/registry/internal/ecr.go index 078c68ecfd8..2d733e5f317 100644 --- a/internal/docker/registry/internal/ecr.go +++ b/internal/docker/registry/internal/ecr.go @@ -36,7 +36,7 @@ func (l ecrLogger) Write(p []byte) (n int, err error) { return len(p), nil } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/ecr_mock.go github.com/juju/juju/internal/docker/registry/internal ECRInterface +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/ecr_mock.go github.com/juju/juju/internal/docker/registry/internal ECRInterface type ECRInterface interface { GetAuthorizationToken(context.Context, *ecr.GetAuthorizationTokenInput, ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error) } diff --git a/internal/docker/registry/internal/interface.go b/internal/docker/registry/internal/interface.go index de985d5118d..2e225c7d82d 100644 --- a/internal/docker/registry/internal/interface.go +++ b/internal/docker/registry/internal/interface.go @@ -10,7 +10,7 @@ import ( "github.com/juju/juju/internal/tools" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Initializer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Initializer // Registry provides APIs to interact with the OCI provider client. type Registry interface { diff --git a/internal/docker/registry/internal/mocks/ecr_mock.go b/internal/docker/registry/internal/mocks/ecr_mock.go index 4c9e9ae1166..c5111d1a114 100644 --- a/internal/docker/registry/internal/mocks/ecr_mock.go +++ b/internal/docker/registry/internal/mocks/ecr_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/ecr_mock.go github.com/juju/juju/internal/docker/registry/internal ECRInterface +// mockgen -typed -package mocks -destination mocks/ecr_mock.go github.com/juju/juju/internal/docker/registry/internal ECRInterface // // Package mocks is a generated GoMock package. @@ -54,8 +54,32 @@ func (m *MockECRInterface) GetAuthorizationToken(arg0 context.Context, arg1 *ecr } // GetAuthorizationToken indicates an expected call of GetAuthorizationToken. -func (mr *MockECRInterfaceMockRecorder) GetAuthorizationToken(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockECRInterfaceMockRecorder) GetAuthorizationToken(arg0, arg1 any, arg2 ...any) *MockECRInterfaceGetAuthorizationTokenCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthorizationToken", reflect.TypeOf((*MockECRInterface)(nil).GetAuthorizationToken), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthorizationToken", reflect.TypeOf((*MockECRInterface)(nil).GetAuthorizationToken), varargs...) + return &MockECRInterfaceGetAuthorizationTokenCall{Call: call} +} + +// MockECRInterfaceGetAuthorizationTokenCall wrap *gomock.Call +type MockECRInterfaceGetAuthorizationTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockECRInterfaceGetAuthorizationTokenCall) Return(arg0 *ecr.GetAuthorizationTokenOutput, arg1 error) *MockECRInterfaceGetAuthorizationTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockECRInterfaceGetAuthorizationTokenCall) Do(f func(context.Context, *ecr.GetAuthorizationTokenInput, ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)) *MockECRInterfaceGetAuthorizationTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockECRInterfaceGetAuthorizationTokenCall) DoAndReturn(f func(context.Context, *ecr.GetAuthorizationTokenInput, ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)) *MockECRInterfaceGetAuthorizationTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/docker/registry/internal/mocks/manifests_mock.go b/internal/docker/registry/internal/mocks/manifests_mock.go index 9910f2b3814..5d8e1174174 100644 --- a/internal/docker/registry/internal/mocks/manifests_mock.go +++ b/internal/docker/registry/internal/mocks/manifests_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/manifests_mock.go github.com/juju/juju/internal/docker/registry/internal ArchitectureGetter +// mockgen -typed -package mocks -destination mocks/manifests_mock.go github.com/juju/juju/internal/docker/registry/internal ArchitectureGetter // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockArchitectureGetter) GetBlobs(arg0, arg1 string) (*internal.BlobsRes } // GetBlobs indicates an expected call of GetBlobs. -func (mr *MockArchitectureGetterMockRecorder) GetBlobs(arg0, arg1 any) *gomock.Call { +func (mr *MockArchitectureGetterMockRecorder) GetBlobs(arg0, arg1 any) *MockArchitectureGetterGetBlobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlobs", reflect.TypeOf((*MockArchitectureGetter)(nil).GetBlobs), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlobs", reflect.TypeOf((*MockArchitectureGetter)(nil).GetBlobs), arg0, arg1) + return &MockArchitectureGetterGetBlobsCall{Call: call} +} + +// MockArchitectureGetterGetBlobsCall wrap *gomock.Call +type MockArchitectureGetterGetBlobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArchitectureGetterGetBlobsCall) Return(arg0 *internal.BlobsResponse, arg1 error) *MockArchitectureGetterGetBlobsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArchitectureGetterGetBlobsCall) Do(f func(string, string) (*internal.BlobsResponse, error)) *MockArchitectureGetterGetBlobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArchitectureGetterGetBlobsCall) DoAndReturn(f func(string, string) (*internal.BlobsResponse, error)) *MockArchitectureGetterGetBlobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetManifests mocks base method. @@ -64,7 +88,31 @@ func (m *MockArchitectureGetter) GetManifests(arg0, arg1 string) (*internal.Mani } // GetManifests indicates an expected call of GetManifests. -func (mr *MockArchitectureGetterMockRecorder) GetManifests(arg0, arg1 any) *gomock.Call { +func (mr *MockArchitectureGetterMockRecorder) GetManifests(arg0, arg1 any) *MockArchitectureGetterGetManifestsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManifests", reflect.TypeOf((*MockArchitectureGetter)(nil).GetManifests), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManifests", reflect.TypeOf((*MockArchitectureGetter)(nil).GetManifests), arg0, arg1) + return &MockArchitectureGetterGetManifestsCall{Call: call} +} + +// MockArchitectureGetterGetManifestsCall wrap *gomock.Call +type MockArchitectureGetterGetManifestsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArchitectureGetterGetManifestsCall) Return(arg0 *internal.ManifestsResult, arg1 error) *MockArchitectureGetterGetManifestsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArchitectureGetterGetManifestsCall) Do(f func(string, string) (*internal.ManifestsResult, error)) *MockArchitectureGetterGetManifestsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArchitectureGetterGetManifestsCall) DoAndReturn(f func(string, string) (*internal.ManifestsResult, error)) *MockArchitectureGetterGetManifestsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/docker/registry/internal/mocks/registry_mock.go b/internal/docker/registry/internal/mocks/registry_mock.go index 2d668b48695..f278be04608 100644 --- a/internal/docker/registry/internal/mocks/registry_mock.go +++ b/internal/docker/registry/internal/mocks/registry_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Initializer +// mockgen -typed -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Initializer // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockInitializer) DecideBaseURL() error { } // DecideBaseURL indicates an expected call of DecideBaseURL. -func (mr *MockInitializerMockRecorder) DecideBaseURL() *gomock.Call { +func (mr *MockInitializerMockRecorder) DecideBaseURL() *MockInitializerDecideBaseURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecideBaseURL", reflect.TypeOf((*MockInitializer)(nil).DecideBaseURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecideBaseURL", reflect.TypeOf((*MockInitializer)(nil).DecideBaseURL)) + return &MockInitializerDecideBaseURLCall{Call: call} +} + +// MockInitializerDecideBaseURLCall wrap *gomock.Call +type MockInitializerDecideBaseURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInitializerDecideBaseURLCall) Return(arg0 error) *MockInitializerDecideBaseURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInitializerDecideBaseURLCall) Do(f func() error) *MockInitializerDecideBaseURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInitializerDecideBaseURLCall) DoAndReturn(f func() error) *MockInitializerDecideBaseURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WrapTransport mocks base method. @@ -66,7 +90,31 @@ func (m *MockInitializer) WrapTransport(arg0 ...internal.TransportWrapper) error } // WrapTransport indicates an expected call of WrapTransport. -func (mr *MockInitializerMockRecorder) WrapTransport(arg0 ...any) *gomock.Call { +func (mr *MockInitializerMockRecorder) WrapTransport(arg0 ...any) *MockInitializerWrapTransportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WrapTransport", reflect.TypeOf((*MockInitializer)(nil).WrapTransport), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WrapTransport", reflect.TypeOf((*MockInitializer)(nil).WrapTransport), arg0...) + return &MockInitializerWrapTransportCall{Call: call} +} + +// MockInitializerWrapTransportCall wrap *gomock.Call +type MockInitializerWrapTransportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInitializerWrapTransportCall) Return(arg0 error) *MockInitializerWrapTransportCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInitializerWrapTransportCall) Do(f func(...internal.TransportWrapper) error) *MockInitializerWrapTransportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInitializerWrapTransportCall) DoAndReturn(f func(...internal.TransportWrapper) error) *MockInitializerWrapTransportCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/docker/registry/mocks/http_mock.go b/internal/docker/registry/mocks/http_mock.go index f245fa98fcf..2de021172fb 100644 --- a/internal/docker/registry/mocks/http_mock.go +++ b/internal/docker/registry/mocks/http_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper +// mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockRoundTripper) RoundTrip(arg0 *http.Request) (*http.Response, error) } // RoundTrip indicates an expected call of RoundTrip. -func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *gomock.Call { +func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *MockRoundTripperRoundTripCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + return &MockRoundTripperRoundTripCall{Call: call} +} + +// MockRoundTripperRoundTripCall wrap *gomock.Call +type MockRoundTripperRoundTripCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoundTripperRoundTripCall) Return(arg0 *http.Response, arg1 error) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoundTripperRoundTripCall) Do(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoundTripperRoundTripCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/docker/registry/mocks/registry_mock.go b/internal/docker/registry/mocks/registry_mock.go index efd539040aa..d16ee321d91 100644 --- a/internal/docker/registry/mocks/registry_mock.go +++ b/internal/docker/registry/mocks/registry_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Registry +// mockgen -typed -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Registry // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRegistry) Close() error { } // Close indicates an expected call of Close. -func (mr *MockRegistryMockRecorder) Close() *gomock.Call { +func (mr *MockRegistryMockRecorder) Close() *MockRegistryCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRegistry)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRegistry)(nil).Close)) + return &MockRegistryCloseCall{Call: call} +} + +// MockRegistryCloseCall wrap *gomock.Call +type MockRegistryCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryCloseCall) Return(arg0 error) *MockRegistryCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryCloseCall) Do(f func() error) *MockRegistryCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryCloseCall) DoAndReturn(f func() error) *MockRegistryCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetArchitecture mocks base method. @@ -65,9 +89,33 @@ func (m *MockRegistry) GetArchitecture(arg0, arg1 string) (string, error) { } // GetArchitecture indicates an expected call of GetArchitecture. -func (mr *MockRegistryMockRecorder) GetArchitecture(arg0, arg1 any) *gomock.Call { +func (mr *MockRegistryMockRecorder) GetArchitecture(arg0, arg1 any) *MockRegistryGetArchitectureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetArchitecture", reflect.TypeOf((*MockRegistry)(nil).GetArchitecture), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetArchitecture", reflect.TypeOf((*MockRegistry)(nil).GetArchitecture), arg0, arg1) + return &MockRegistryGetArchitectureCall{Call: call} +} + +// MockRegistryGetArchitectureCall wrap *gomock.Call +type MockRegistryGetArchitectureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryGetArchitectureCall) Return(arg0 string, arg1 error) *MockRegistryGetArchitectureCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryGetArchitectureCall) Do(f func(string, string) (string, error)) *MockRegistryGetArchitectureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryGetArchitectureCall) DoAndReturn(f func(string, string) (string, error)) *MockRegistryGetArchitectureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ImageRepoDetails mocks base method. @@ -79,9 +127,33 @@ func (m *MockRegistry) ImageRepoDetails() docker.ImageRepoDetails { } // ImageRepoDetails indicates an expected call of ImageRepoDetails. -func (mr *MockRegistryMockRecorder) ImageRepoDetails() *gomock.Call { +func (mr *MockRegistryMockRecorder) ImageRepoDetails() *MockRegistryImageRepoDetailsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageRepoDetails", reflect.TypeOf((*MockRegistry)(nil).ImageRepoDetails)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageRepoDetails", reflect.TypeOf((*MockRegistry)(nil).ImageRepoDetails)) + return &MockRegistryImageRepoDetailsCall{Call: call} +} + +// MockRegistryImageRepoDetailsCall wrap *gomock.Call +type MockRegistryImageRepoDetailsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryImageRepoDetailsCall) Return(arg0 docker.ImageRepoDetails) *MockRegistryImageRepoDetailsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryImageRepoDetailsCall) Do(f func() docker.ImageRepoDetails) *MockRegistryImageRepoDetailsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryImageRepoDetailsCall) DoAndReturn(f func() docker.ImageRepoDetails) *MockRegistryImageRepoDetailsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -93,9 +165,33 @@ func (m *MockRegistry) Ping() error { } // Ping indicates an expected call of Ping. -func (mr *MockRegistryMockRecorder) Ping() *gomock.Call { +func (mr *MockRegistryMockRecorder) Ping() *MockRegistryPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockRegistry)(nil).Ping)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockRegistry)(nil).Ping)) + return &MockRegistryPingCall{Call: call} +} + +// MockRegistryPingCall wrap *gomock.Call +type MockRegistryPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryPingCall) Return(arg0 error) *MockRegistryPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryPingCall) Do(f func() error) *MockRegistryPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryPingCall) DoAndReturn(f func() error) *MockRegistryPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RefreshAuth mocks base method. @@ -107,9 +203,33 @@ func (m *MockRegistry) RefreshAuth() error { } // RefreshAuth indicates an expected call of RefreshAuth. -func (mr *MockRegistryMockRecorder) RefreshAuth() *gomock.Call { +func (mr *MockRegistryMockRecorder) RefreshAuth() *MockRegistryRefreshAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshAuth", reflect.TypeOf((*MockRegistry)(nil).RefreshAuth)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshAuth", reflect.TypeOf((*MockRegistry)(nil).RefreshAuth)) + return &MockRegistryRefreshAuthCall{Call: call} +} + +// MockRegistryRefreshAuthCall wrap *gomock.Call +type MockRegistryRefreshAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryRefreshAuthCall) Return(arg0 error) *MockRegistryRefreshAuthCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryRefreshAuthCall) Do(f func() error) *MockRegistryRefreshAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryRefreshAuthCall) DoAndReturn(f func() error) *MockRegistryRefreshAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ShouldRefreshAuth mocks base method. @@ -122,9 +242,33 @@ func (m *MockRegistry) ShouldRefreshAuth() (bool, time.Duration) { } // ShouldRefreshAuth indicates an expected call of ShouldRefreshAuth. -func (mr *MockRegistryMockRecorder) ShouldRefreshAuth() *gomock.Call { +func (mr *MockRegistryMockRecorder) ShouldRefreshAuth() *MockRegistryShouldRefreshAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldRefreshAuth", reflect.TypeOf((*MockRegistry)(nil).ShouldRefreshAuth)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldRefreshAuth", reflect.TypeOf((*MockRegistry)(nil).ShouldRefreshAuth)) + return &MockRegistryShouldRefreshAuthCall{Call: call} +} + +// MockRegistryShouldRefreshAuthCall wrap *gomock.Call +type MockRegistryShouldRefreshAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryShouldRefreshAuthCall) Return(arg0 bool, arg1 time.Duration) *MockRegistryShouldRefreshAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryShouldRefreshAuthCall) Do(f func() (bool, time.Duration)) *MockRegistryShouldRefreshAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryShouldRefreshAuthCall) DoAndReturn(f func() (bool, time.Duration)) *MockRegistryShouldRefreshAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -136,9 +280,33 @@ func (m *MockRegistry) String() string { } // String indicates an expected call of String. -func (mr *MockRegistryMockRecorder) String() *gomock.Call { +func (mr *MockRegistryMockRecorder) String() *MockRegistryStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRegistry)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRegistry)(nil).String)) + return &MockRegistryStringCall{Call: call} +} + +// MockRegistryStringCall wrap *gomock.Call +type MockRegistryStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryStringCall) Return(arg0 string) *MockRegistryStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryStringCall) Do(f func() string) *MockRegistryStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryStringCall) DoAndReturn(f func() string) *MockRegistryStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tags mocks base method. @@ -151,7 +319,31 @@ func (m *MockRegistry) Tags(arg0 string) (tools.Versions, error) { } // Tags indicates an expected call of Tags. -func (mr *MockRegistryMockRecorder) Tags(arg0 any) *gomock.Call { +func (mr *MockRegistryMockRecorder) Tags(arg0 any) *MockRegistryTagsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tags", reflect.TypeOf((*MockRegistry)(nil).Tags), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tags", reflect.TypeOf((*MockRegistry)(nil).Tags), arg0) + return &MockRegistryTagsCall{Call: call} +} + +// MockRegistryTagsCall wrap *gomock.Call +type MockRegistryTagsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryTagsCall) Return(arg0 tools.Versions, arg1 error) *MockRegistryTagsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryTagsCall) Do(f func(string) (tools.Versions, error)) *MockRegistryTagsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryTagsCall) DoAndReturn(f func(string) (tools.Versions, error)) *MockRegistryTagsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/docker/registry/registry.go b/internal/docker/registry/registry.go index 0c737c3cf0a..8b7630bf164 100644 --- a/internal/docker/registry/registry.go +++ b/internal/docker/registry/registry.go @@ -15,8 +15,8 @@ import ( var logger = loggo.GetLogger("juju.docker.registry") -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Registry +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/registry_mock.go github.com/juju/juju/internal/docker/registry/internal Registry // Registry provides APIs to interact with the OCI provider client. type Registry = internal.Registry diff --git a/internal/lease/lease_mock_test.go b/internal/lease/lease_mock_test.go index bced523a4c2..be1e8ac5662 100644 --- a/internal/lease/lease_mock_test.go +++ b/internal/lease/lease_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lease -destination lease_mock_test.go github.com/juju/juju/core/lease Secretary +// mockgen -typed -package lease -destination lease_mock_test.go github.com/juju/juju/core/lease Secretary // // Package lease is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSecretary) CheckDuration(arg0 time.Duration) error { } // CheckDuration indicates an expected call of CheckDuration. -func (mr *MockSecretaryMockRecorder) CheckDuration(arg0 any) *gomock.Call { +func (mr *MockSecretaryMockRecorder) CheckDuration(arg0 any) *MockSecretaryCheckDurationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckDuration", reflect.TypeOf((*MockSecretary)(nil).CheckDuration), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckDuration", reflect.TypeOf((*MockSecretary)(nil).CheckDuration), arg0) + return &MockSecretaryCheckDurationCall{Call: call} +} + +// MockSecretaryCheckDurationCall wrap *gomock.Call +type MockSecretaryCheckDurationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretaryCheckDurationCall) Return(arg0 error) *MockSecretaryCheckDurationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretaryCheckDurationCall) Do(f func(time.Duration) error) *MockSecretaryCheckDurationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretaryCheckDurationCall) DoAndReturn(f func(time.Duration) error) *MockSecretaryCheckDurationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckHolder mocks base method. @@ -63,9 +87,33 @@ func (m *MockSecretary) CheckHolder(arg0 string) error { } // CheckHolder indicates an expected call of CheckHolder. -func (mr *MockSecretaryMockRecorder) CheckHolder(arg0 any) *gomock.Call { +func (mr *MockSecretaryMockRecorder) CheckHolder(arg0 any) *MockSecretaryCheckHolderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckHolder", reflect.TypeOf((*MockSecretary)(nil).CheckHolder), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckHolder", reflect.TypeOf((*MockSecretary)(nil).CheckHolder), arg0) + return &MockSecretaryCheckHolderCall{Call: call} +} + +// MockSecretaryCheckHolderCall wrap *gomock.Call +type MockSecretaryCheckHolderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretaryCheckHolderCall) Return(arg0 error) *MockSecretaryCheckHolderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretaryCheckHolderCall) Do(f func(string) error) *MockSecretaryCheckHolderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretaryCheckHolderCall) DoAndReturn(f func(string) error) *MockSecretaryCheckHolderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckLease mocks base method. @@ -77,7 +125,31 @@ func (m *MockSecretary) CheckLease(arg0 lease.Key) error { } // CheckLease indicates an expected call of CheckLease. -func (mr *MockSecretaryMockRecorder) CheckLease(arg0 any) *gomock.Call { +func (mr *MockSecretaryMockRecorder) CheckLease(arg0 any) *MockSecretaryCheckLeaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckLease", reflect.TypeOf((*MockSecretary)(nil).CheckLease), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckLease", reflect.TypeOf((*MockSecretary)(nil).CheckLease), arg0) + return &MockSecretaryCheckLeaseCall{Call: call} +} + +// MockSecretaryCheckLeaseCall wrap *gomock.Call +type MockSecretaryCheckLeaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretaryCheckLeaseCall) Return(arg0 error) *MockSecretaryCheckLeaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretaryCheckLeaseCall) Do(f func(lease.Key) error) *MockSecretaryCheckLeaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretaryCheckLeaseCall) DoAndReturn(f func(lease.Key) error) *MockSecretaryCheckLeaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/lease/package_test.go b/internal/lease/package_test.go index 6131002c4d7..447319615eb 100644 --- a/internal/lease/package_test.go +++ b/internal/lease/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package lease -destination lease_mock_test.go github.com/juju/juju/core/lease Secretary +//go:generate go run go.uber.org/mock/mockgen -typed -package lease -destination lease_mock_test.go github.com/juju/juju/core/lease Secretary func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/migration/migration_mock_test.go b/internal/migration/migration_mock_test.go index e44251213eb..fb22ed46a8e 100644 --- a/internal/migration/migration_mock_test.go +++ b/internal/migration/migration_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migration_test -destination migration_mock_test.go github.com/juju/juju/internal/migration ControllerConfigService,UpgradeService +// mockgen -typed -package migration_test -destination migration_mock_test.go github.com/juju/juju/internal/migration ControllerConfigService,UpgradeService // // Package migration_test is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgradeService is a mock of UpgradeService interface. @@ -88,7 +112,31 @@ func (m *MockUpgradeService) IsUpgrading(arg0 context.Context) (bool, error) { } // IsUpgrading indicates an expected call of IsUpgrading. -func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) IsUpgrading(arg0 any) *MockUpgradeServiceIsUpgradingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgradeService)(nil).IsUpgrading), arg0) + return &MockUpgradeServiceIsUpgradingCall{Call: call} +} + +// MockUpgradeServiceIsUpgradingCall wrap *gomock.Call +type MockUpgradeServiceIsUpgradingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceIsUpgradingCall) Return(arg0 bool, arg1 error) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceIsUpgradingCall) Do(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceIsUpgradingCall) DoAndReturn(f func(context.Context) (bool, error)) *MockUpgradeServiceIsUpgradingCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/migration/package_test.go b/internal/migration/package_test.go index 58ea0f52158..3cb0e2f9bbd 100644 --- a/internal/migration/package_test.go +++ b/internal/migration/package_test.go @@ -14,8 +14,8 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package migration_test -destination migration_mock_test.go github.com/juju/juju/internal/migration ControllerConfigService,UpgradeService -//go:generate go run go.uber.org/mock/mockgen -package migration_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package migration_test -destination migration_mock_test.go github.com/juju/juju/internal/migration ControllerConfigService,UpgradeService +//go:generate go run go.uber.org/mock/mockgen -typed -package migration_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/migration/servicefactory_mock_test.go b/internal/migration/servicefactory_mock_test.go index a2ad0bd4dc6..d1f4341a804 100644 --- a/internal/migration/servicefactory_mock_test.go +++ b/internal/migration/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migration_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory +// mockgen -typed -package migration_test -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter,ServiceFactory // // Package migration_test is a generated GoMock package. @@ -71,9 +71,33 @@ func (m *MockServiceFactoryGetter) FactoryForModel(arg0 string) servicefactory.S } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryGetterFactoryForModelCall) Return(arg0 servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryGetterFactoryForModelCall) Do(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceFactory is a mock of ServiceFactory interface. @@ -108,9 +132,33 @@ func (m *MockServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Access() *MockServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + return &MockServiceFactoryAccessCall{Call: call} +} + +// MockServiceFactoryAccessCall wrap *gomock.Call +type MockServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAccessCall) Return(arg0 *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAccessCall) Do(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -122,9 +170,33 @@ func (m *MockServiceFactory) AgentObjectStore() *service15.WatchableService { } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *MockServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + return &MockServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAgentObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAgentObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotation mocks base method. @@ -136,9 +208,33 @@ func (m *MockServiceFactory) Annotation() *service0.Service { } // Annotation indicates an expected call of Annotation. -func (mr *MockServiceFactoryMockRecorder) Annotation() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Annotation() *MockServiceFactoryAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + return &MockServiceFactoryAnnotationCall{Call: call} +} + +// MockServiceFactoryAnnotationCall wrap *gomock.Call +type MockServiceFactoryAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAnnotationCall) Return(arg0 *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAnnotationCall) Do(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAnnotationCall) DoAndReturn(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -150,9 +246,33 @@ func (m *MockServiceFactory) Application(arg0 storage.ProviderRegistry) *service } // Application indicates an expected call of Application. -func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *MockServiceFactoryApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + return &MockServiceFactoryApplicationCall{Call: call} +} + +// MockServiceFactoryApplicationCall wrap *gomock.Call +type MockServiceFactoryApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryApplicationCall) Return(arg0 *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryApplicationCall) Do(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryApplicationCall) DoAndReturn(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -164,9 +284,33 @@ func (m *MockServiceFactory) AutocertCache() *service2.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AutocertCache() *MockServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + return &MockServiceFactoryAutocertCacheCall{Call: call} +} + +// MockServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAutocertCacheCall) Return(arg0 *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAutocertCacheCall) Do(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BlockDevice mocks base method. @@ -178,9 +322,33 @@ func (m *MockServiceFactory) BlockDevice() *service3.WatchableService { } // BlockDevice indicates an expected call of BlockDevice. -func (mr *MockServiceFactoryMockRecorder) BlockDevice() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) BlockDevice() *MockServiceFactoryBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + return &MockServiceFactoryBlockDeviceCall{Call: call} +} + +// MockServiceFactoryBlockDeviceCall wrap *gomock.Call +type MockServiceFactoryBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryBlockDeviceCall) Return(arg0 *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryBlockDeviceCall) Do(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryBlockDeviceCall) DoAndReturn(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -192,9 +360,33 @@ func (m *MockServiceFactory) Cloud() *service4.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Cloud() *MockServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + return &MockServiceFactoryCloudCall{Call: call} +} + +// MockServiceFactoryCloudCall wrap *gomock.Call +type MockServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCloudCall) Return(arg0 *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCloudCall) Do(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCloudCall) DoAndReturn(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -206,9 +398,33 @@ func (m *MockServiceFactory) Config() *service12.WatchableService { } // Config indicates an expected call of Config. -func (mr *MockServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Config() *MockServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + return &MockServiceFactoryConfigCall{Call: call} +} + +// MockServiceFactoryConfigCall wrap *gomock.Call +type MockServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryConfigCall) Return(arg0 *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryConfigCall) Do(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryConfigCall) DoAndReturn(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -220,9 +436,33 @@ func (m *MockServiceFactory) ControllerConfig() *service5.WatchableService { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *MockServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + return &MockServiceFactoryControllerConfigCall{Call: call} +} + +// MockServiceFactoryControllerConfigCall wrap *gomock.Call +type MockServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerConfigCall) Return(arg0 *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerConfigCall) Do(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerConfigCall) DoAndReturn(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -234,9 +474,33 @@ func (m *MockServiceFactory) ControllerNode() *service6.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerNode() *MockServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + return &MockServiceFactoryControllerNodeCall{Call: call} +} + +// MockServiceFactoryControllerNodeCall wrap *gomock.Call +type MockServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerNodeCall) Return(arg0 *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerNodeCall) Do(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerNodeCall) DoAndReturn(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -248,9 +512,33 @@ func (m *MockServiceFactory) Credential() *service7.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Credential() *MockServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + return &MockServiceFactoryCredentialCall{Call: call} +} + +// MockServiceFactoryCredentialCall wrap *gomock.Call +type MockServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCredentialCall) Return(arg0 *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCredentialCall) Do(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCredentialCall) DoAndReturn(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -262,9 +550,33 @@ func (m *MockServiceFactory) ExternalController() *service8.WatchableService { } // ExternalController indicates an expected call of ExternalController. -func (mr *MockServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ExternalController() *MockServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + return &MockServiceFactoryExternalControllerCall{Call: call} +} + +// MockServiceFactoryExternalControllerCall wrap *gomock.Call +type MockServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryExternalControllerCall) Return(arg0 *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryExternalControllerCall) Do(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryExternalControllerCall) DoAndReturn(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -276,9 +588,33 @@ func (m *MockServiceFactory) Flag() *service9.Service { } // Flag indicates an expected call of Flag. -func (mr *MockServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Flag() *MockServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + return &MockServiceFactoryFlagCall{Call: call} +} + +// MockServiceFactoryFlagCall wrap *gomock.Call +type MockServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryFlagCall) Return(arg0 *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryFlagCall) Do(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryFlagCall) DoAndReturn(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -290,9 +626,33 @@ func (m *MockServiceFactory) Machine() *service10.Service { } // Machine indicates an expected call of Machine. -func (mr *MockServiceFactoryMockRecorder) Machine() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Machine() *MockServiceFactoryMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + return &MockServiceFactoryMachineCall{Call: call} +} + +// MockServiceFactoryMachineCall wrap *gomock.Call +type MockServiceFactoryMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryMachineCall) Return(arg0 *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryMachineCall) Do(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryMachineCall) DoAndReturn(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -304,9 +664,33 @@ func (m *MockServiceFactory) Model() *service11.Service { } // Model indicates an expected call of Model. -func (mr *MockServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Model() *MockServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + return &MockServiceFactoryModelCall{Call: call} +} + +// MockServiceFactoryModelCall wrap *gomock.Call +type MockServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelCall) Return(arg0 *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelCall) Do(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelCall) DoAndReturn(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -318,9 +702,33 @@ func (m *MockServiceFactory) ModelDefaults() *service13.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *MockServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + return &MockServiceFactoryModelDefaultsCall{Call: call} +} + +// MockServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelDefaultsCall) Return(arg0 *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelDefaultsCall) Do(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelInfo mocks base method. @@ -332,9 +740,33 @@ func (m *MockServiceFactory) ModelInfo() *service11.ModelService { } // ModelInfo indicates an expected call of ModelInfo. -func (mr *MockServiceFactoryMockRecorder) ModelInfo() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelInfo() *MockServiceFactoryModelInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + return &MockServiceFactoryModelInfoCall{Call: call} +} + +// MockServiceFactoryModelInfoCall wrap *gomock.Call +type MockServiceFactoryModelInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelInfoCall) Return(arg0 *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelInfoCall) Do(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelInfoCall) DoAndReturn(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Network mocks base method. @@ -346,9 +778,33 @@ func (m *MockServiceFactory) Network() *service14.WatchableService { } // Network indicates an expected call of Network. -func (mr *MockServiceFactoryMockRecorder) Network() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Network() *MockServiceFactoryNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + return &MockServiceFactoryNetworkCall{Call: call} +} + +// MockServiceFactoryNetworkCall wrap *gomock.Call +type MockServiceFactoryNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryNetworkCall) Return(arg0 *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryNetworkCall) Do(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryNetworkCall) DoAndReturn(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStore mocks base method. @@ -360,9 +816,33 @@ func (m *MockServiceFactory) ObjectStore() *service15.WatchableService { } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockServiceFactoryMockRecorder) ObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ObjectStore() *MockServiceFactoryObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + return &MockServiceFactoryObjectStoreCall{Call: call} +} + +// MockServiceFactoryObjectStoreCall wrap *gomock.Call +type MockServiceFactoryObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secret mocks base method. @@ -374,9 +854,33 @@ func (m *MockServiceFactory) Secret(arg0 service16.BackendAdminConfigGetter) *se } // Secret indicates an expected call of Secret. -func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *MockServiceFactorySecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + return &MockServiceFactorySecretCall{Call: call} +} + +// MockServiceFactorySecretCall wrap *gomock.Call +type MockServiceFactorySecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretCall) Return(arg0 *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretCall) Do(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretCall) DoAndReturn(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -388,9 +892,33 @@ func (m *MockServiceFactory) SecretBackend() *service17.WatchableService { } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) SecretBackend() *MockServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + return &MockServiceFactorySecretBackendCall{Call: call} +} + +// MockServiceFactorySecretBackendCall wrap *gomock.Call +type MockServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretBackendCall) Return(arg0 *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretBackendCall) Do(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretBackendCall) DoAndReturn(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -402,9 +930,33 @@ func (m *MockServiceFactory) Storage(arg0 storage.ProviderRegistry) *service18.S } // Storage indicates an expected call of Storage. -func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *MockServiceFactoryStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + return &MockServiceFactoryStorageCall{Call: call} +} + +// MockServiceFactoryStorageCall wrap *gomock.Call +type MockServiceFactoryStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryStorageCall) Return(arg0 *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryStorageCall) Do(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryStorageCall) DoAndReturn(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -416,9 +968,33 @@ func (m *MockServiceFactory) Unit() *service19.Service { } // Unit indicates an expected call of Unit. -func (mr *MockServiceFactoryMockRecorder) Unit() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Unit() *MockServiceFactoryUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + return &MockServiceFactoryUnitCall{Call: call} +} + +// MockServiceFactoryUnitCall wrap *gomock.Call +type MockServiceFactoryUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUnitCall) Return(arg0 *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUnitCall) Do(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUnitCall) DoAndReturn(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -430,7 +1006,31 @@ func (m *MockServiceFactory) Upgrade() *service20.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Upgrade() *MockServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + return &MockServiceFactoryUpgradeCall{Call: call} +} + +// MockServiceFactoryUpgradeCall wrap *gomock.Call +type MockServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUpgradeCall) Return(arg0 *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUpgradeCall) Do(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUpgradeCall) DoAndReturn(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/mongo/mongodfinder.go b/internal/mongo/mongodfinder.go index 2d62ab7ebfa..e8c1b5cdad1 100644 --- a/internal/mongo/mongodfinder.go +++ b/internal/mongo/mongodfinder.go @@ -13,7 +13,7 @@ import ( // SearchTools represents the OS functionality we need to find the correct MongoDB executable. // The mock for this (used in testing) is automatically generated by 'go generate' from the following line // -//go:generate go run go.uber.org/mock/mockgen -package mongo -destination searchtoolsmock_test.go github.com/juju/juju/internal/mongo SearchTools +//go:generate go run go.uber.org/mock/mockgen -typed -package mongo -destination searchtoolsmock_test.go github.com/juju/juju/internal/mongo SearchTools type SearchTools interface { // GetCommandOutput execs the given command, and returns the CombinedOutput, or any error that occurred. GetCommandOutput(name string, arg ...string) (string, error) diff --git a/internal/mongo/mongotest/mongoservice_mock.go b/internal/mongo/mongotest/mongoservice_mock.go index 74cb4080524..390de6321b3 100644 --- a/internal/mongo/mongotest/mongoservice_mock.go +++ b/internal/mongo/mongotest/mongoservice_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mongotest -destination mongotest/mongoservice_mock.go github.com/juju/juju/internal/mongo MongoSnapService +// mockgen -typed -package mongotest -destination mongotest/mongoservice_mock.go github.com/juju/juju/internal/mongo MongoSnapService // // Package mongotest is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockMongoSnapService) ConfigOverride() error { } // ConfigOverride indicates an expected call of ConfigOverride. -func (mr *MockMongoSnapServiceMockRecorder) ConfigOverride() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) ConfigOverride() *MockMongoSnapServiceConfigOverrideCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigOverride", reflect.TypeOf((*MockMongoSnapService)(nil).ConfigOverride)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigOverride", reflect.TypeOf((*MockMongoSnapService)(nil).ConfigOverride)) + return &MockMongoSnapServiceConfigOverrideCall{Call: call} +} + +// MockMongoSnapServiceConfigOverrideCall wrap *gomock.Call +type MockMongoSnapServiceConfigOverrideCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceConfigOverrideCall) Return(arg0 error) *MockMongoSnapServiceConfigOverrideCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceConfigOverrideCall) Do(f func() error) *MockMongoSnapServiceConfigOverrideCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceConfigOverrideCall) DoAndReturn(f func() error) *MockMongoSnapServiceConfigOverrideCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Exists mocks base method. @@ -62,9 +86,33 @@ func (m *MockMongoSnapService) Exists() (bool, error) { } // Exists indicates an expected call of Exists. -func (mr *MockMongoSnapServiceMockRecorder) Exists() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Exists() *MockMongoSnapServiceExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockMongoSnapService)(nil).Exists)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockMongoSnapService)(nil).Exists)) + return &MockMongoSnapServiceExistsCall{Call: call} +} + +// MockMongoSnapServiceExistsCall wrap *gomock.Call +type MockMongoSnapServiceExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceExistsCall) Return(arg0 bool, arg1 error) *MockMongoSnapServiceExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceExistsCall) Do(f func() (bool, error)) *MockMongoSnapServiceExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceExistsCall) DoAndReturn(f func() (bool, error)) *MockMongoSnapServiceExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Install mocks base method. @@ -76,9 +124,33 @@ func (m *MockMongoSnapService) Install() error { } // Install indicates an expected call of Install. -func (mr *MockMongoSnapServiceMockRecorder) Install() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Install() *MockMongoSnapServiceInstallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Install", reflect.TypeOf((*MockMongoSnapService)(nil).Install)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Install", reflect.TypeOf((*MockMongoSnapService)(nil).Install)) + return &MockMongoSnapServiceInstallCall{Call: call} +} + +// MockMongoSnapServiceInstallCall wrap *gomock.Call +type MockMongoSnapServiceInstallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceInstallCall) Return(arg0 error) *MockMongoSnapServiceInstallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceInstallCall) Do(f func() error) *MockMongoSnapServiceInstallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceInstallCall) DoAndReturn(f func() error) *MockMongoSnapServiceInstallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Installed mocks base method. @@ -91,9 +163,33 @@ func (m *MockMongoSnapService) Installed() (bool, error) { } // Installed indicates an expected call of Installed. -func (mr *MockMongoSnapServiceMockRecorder) Installed() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Installed() *MockMongoSnapServiceInstalledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Installed", reflect.TypeOf((*MockMongoSnapService)(nil).Installed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Installed", reflect.TypeOf((*MockMongoSnapService)(nil).Installed)) + return &MockMongoSnapServiceInstalledCall{Call: call} +} + +// MockMongoSnapServiceInstalledCall wrap *gomock.Call +type MockMongoSnapServiceInstalledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceInstalledCall) Return(arg0 bool, arg1 error) *MockMongoSnapServiceInstalledCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceInstalledCall) Do(f func() (bool, error)) *MockMongoSnapServiceInstalledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceInstalledCall) DoAndReturn(f func() (bool, error)) *MockMongoSnapServiceInstalledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -105,9 +201,33 @@ func (m *MockMongoSnapService) Name() string { } // Name indicates an expected call of Name. -func (mr *MockMongoSnapServiceMockRecorder) Name() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Name() *MockMongoSnapServiceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockMongoSnapService)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockMongoSnapService)(nil).Name)) + return &MockMongoSnapServiceNameCall{Call: call} +} + +// MockMongoSnapServiceNameCall wrap *gomock.Call +type MockMongoSnapServiceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceNameCall) Return(arg0 string) *MockMongoSnapServiceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceNameCall) Do(f func() string) *MockMongoSnapServiceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceNameCall) DoAndReturn(f func() string) *MockMongoSnapServiceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Restart mocks base method. @@ -119,9 +239,33 @@ func (m *MockMongoSnapService) Restart() error { } // Restart indicates an expected call of Restart. -func (mr *MockMongoSnapServiceMockRecorder) Restart() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Restart() *MockMongoSnapServiceRestartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restart", reflect.TypeOf((*MockMongoSnapService)(nil).Restart)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restart", reflect.TypeOf((*MockMongoSnapService)(nil).Restart)) + return &MockMongoSnapServiceRestartCall{Call: call} +} + +// MockMongoSnapServiceRestartCall wrap *gomock.Call +type MockMongoSnapServiceRestartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceRestartCall) Return(arg0 error) *MockMongoSnapServiceRestartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceRestartCall) Do(f func() error) *MockMongoSnapServiceRestartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceRestartCall) DoAndReturn(f func() error) *MockMongoSnapServiceRestartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Running mocks base method. @@ -134,9 +278,33 @@ func (m *MockMongoSnapService) Running() (bool, error) { } // Running indicates an expected call of Running. -func (mr *MockMongoSnapServiceMockRecorder) Running() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Running() *MockMongoSnapServiceRunningCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Running", reflect.TypeOf((*MockMongoSnapService)(nil).Running)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Running", reflect.TypeOf((*MockMongoSnapService)(nil).Running)) + return &MockMongoSnapServiceRunningCall{Call: call} +} + +// MockMongoSnapServiceRunningCall wrap *gomock.Call +type MockMongoSnapServiceRunningCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceRunningCall) Return(arg0 bool, arg1 error) *MockMongoSnapServiceRunningCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceRunningCall) Do(f func() (bool, error)) *MockMongoSnapServiceRunningCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceRunningCall) DoAndReturn(f func() (bool, error)) *MockMongoSnapServiceRunningCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Start mocks base method. @@ -148,7 +316,31 @@ func (m *MockMongoSnapService) Start() error { } // Start indicates an expected call of Start. -func (mr *MockMongoSnapServiceMockRecorder) Start() *gomock.Call { +func (mr *MockMongoSnapServiceMockRecorder) Start() *MockMongoSnapServiceStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMongoSnapService)(nil).Start)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMongoSnapService)(nil).Start)) + return &MockMongoSnapServiceStartCall{Call: call} +} + +// MockMongoSnapServiceStartCall wrap *gomock.Call +type MockMongoSnapServiceStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMongoSnapServiceStartCall) Return(arg0 error) *MockMongoSnapServiceStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMongoSnapServiceStartCall) Do(f func() error) *MockMongoSnapServiceStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMongoSnapServiceStartCall) DoAndReturn(f func() error) *MockMongoSnapServiceStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/mongo/package_test.go b/internal/mongo/package_test.go index 9ff300f21b7..723f777c0ff 100644 --- a/internal/mongo/package_test.go +++ b/internal/mongo/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mongotest -destination mongotest/mongoservice_mock.go github.com/juju/juju/internal/mongo MongoSnapService +//go:generate go run go.uber.org/mock/mockgen -typed -package mongotest -destination mongotest/mongoservice_mock.go github.com/juju/juju/internal/mongo MongoSnapService func Test(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/mongo/searchtoolsmock_test.go b/internal/mongo/searchtoolsmock_test.go index 4c00b43f1b3..7c92ee6f9f6 100644 --- a/internal/mongo/searchtoolsmock_test.go +++ b/internal/mongo/searchtoolsmock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mongo -destination searchtoolsmock_test.go github.com/juju/juju/internal/mongo SearchTools +// mockgen -typed -package mongo -destination searchtoolsmock_test.go github.com/juju/juju/internal/mongo SearchTools // // Package mongo is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockSearchTools) Exists(arg0 string) bool { } // Exists indicates an expected call of Exists. -func (mr *MockSearchToolsMockRecorder) Exists(arg0 any) *gomock.Call { +func (mr *MockSearchToolsMockRecorder) Exists(arg0 any) *MockSearchToolsExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockSearchTools)(nil).Exists), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockSearchTools)(nil).Exists), arg0) + return &MockSearchToolsExistsCall{Call: call} +} + +// MockSearchToolsExistsCall wrap *gomock.Call +type MockSearchToolsExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSearchToolsExistsCall) Return(arg0 bool) *MockSearchToolsExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSearchToolsExistsCall) Do(f func(string) bool) *MockSearchToolsExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSearchToolsExistsCall) DoAndReturn(f func(string) bool) *MockSearchToolsExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCommandOutput mocks base method. @@ -66,8 +90,32 @@ func (m *MockSearchTools) GetCommandOutput(arg0 string, arg1 ...string) (string, } // GetCommandOutput indicates an expected call of GetCommandOutput. -func (mr *MockSearchToolsMockRecorder) GetCommandOutput(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSearchToolsMockRecorder) GetCommandOutput(arg0 any, arg1 ...any) *MockSearchToolsGetCommandOutputCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommandOutput", reflect.TypeOf((*MockSearchTools)(nil).GetCommandOutput), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommandOutput", reflect.TypeOf((*MockSearchTools)(nil).GetCommandOutput), varargs...) + return &MockSearchToolsGetCommandOutputCall{Call: call} +} + +// MockSearchToolsGetCommandOutputCall wrap *gomock.Call +type MockSearchToolsGetCommandOutputCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSearchToolsGetCommandOutputCall) Return(arg0 string, arg1 error) *MockSearchToolsGetCommandOutputCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSearchToolsGetCommandOutputCall) Do(f func(string, ...string) (string, error)) *MockSearchToolsGetCommandOutputCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSearchToolsGetCommandOutputCall) DoAndReturn(f func(string, ...string) (string, error)) *MockSearchToolsGetCommandOutputCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/network/containerizer/bridgepolicy_mock_test.go b/internal/network/containerizer/bridgepolicy_mock_test.go index 2b815737570..49a903c8f17 100644 --- a/internal/network/containerizer/bridgepolicy_mock_test.go +++ b/internal/network/containerizer/bridgepolicy_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package containerizer -destination bridgepolicy_mock_test.go github.com/juju/juju/internal/network/containerizer Container,Address,Subnet,LinkLayerDevice +// mockgen -typed -package containerizer -destination bridgepolicy_mock_test.go github.com/juju/juju/internal/network/containerizer Container,Address,Subnet,LinkLayerDevice // // Package containerizer is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockContainer) AllDeviceAddresses() ([]Address, error) { } // AllDeviceAddresses indicates an expected call of AllDeviceAddresses. -func (mr *MockContainerMockRecorder) AllDeviceAddresses() *gomock.Call { +func (mr *MockContainerMockRecorder) AllDeviceAddresses() *MockContainerAllDeviceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockContainer)(nil).AllDeviceAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDeviceAddresses", reflect.TypeOf((*MockContainer)(nil).AllDeviceAddresses)) + return &MockContainerAllDeviceAddressesCall{Call: call} +} + +// MockContainerAllDeviceAddressesCall wrap *gomock.Call +type MockContainerAllDeviceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerAllDeviceAddressesCall) Return(arg0 []Address, arg1 error) *MockContainerAllDeviceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerAllDeviceAddressesCall) Do(f func() ([]Address, error)) *MockContainerAllDeviceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerAllDeviceAddressesCall) DoAndReturn(f func() ([]Address, error)) *MockContainerAllDeviceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllLinkLayerDevices mocks base method. @@ -68,9 +92,33 @@ func (m *MockContainer) AllLinkLayerDevices() ([]LinkLayerDevice, error) { } // AllLinkLayerDevices indicates an expected call of AllLinkLayerDevices. -func (mr *MockContainerMockRecorder) AllLinkLayerDevices() *gomock.Call { +func (mr *MockContainerMockRecorder) AllLinkLayerDevices() *MockContainerAllLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockContainer)(nil).AllLinkLayerDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllLinkLayerDevices", reflect.TypeOf((*MockContainer)(nil).AllLinkLayerDevices)) + return &MockContainerAllLinkLayerDevicesCall{Call: call} +} + +// MockContainerAllLinkLayerDevicesCall wrap *gomock.Call +type MockContainerAllLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerAllLinkLayerDevicesCall) Return(arg0 []LinkLayerDevice, arg1 error) *MockContainerAllLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerAllLinkLayerDevicesCall) Do(f func() ([]LinkLayerDevice, error)) *MockContainerAllLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerAllLinkLayerDevicesCall) DoAndReturn(f func() ([]LinkLayerDevice, error)) *MockContainerAllLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllSpaces mocks base method. @@ -83,9 +131,33 @@ func (m *MockContainer) AllSpaces(arg0 network.SubnetInfos) (set.Strings, error) } // AllSpaces indicates an expected call of AllSpaces. -func (mr *MockContainerMockRecorder) AllSpaces(arg0 any) *gomock.Call { +func (mr *MockContainerMockRecorder) AllSpaces(arg0 any) *MockContainerAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockContainer)(nil).AllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaces", reflect.TypeOf((*MockContainer)(nil).AllSpaces), arg0) + return &MockContainerAllSpacesCall{Call: call} +} + +// MockContainerAllSpacesCall wrap *gomock.Call +type MockContainerAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerAllSpacesCall) Return(arg0 set.Strings, arg1 error) *MockContainerAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerAllSpacesCall) Do(f func(network.SubnetInfos) (set.Strings, error)) *MockContainerAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerAllSpacesCall) DoAndReturn(f func(network.SubnetInfos) (set.Strings, error)) *MockContainerAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -98,9 +170,33 @@ func (m *MockContainer) Constraints() (constraints.Value, error) { } // Constraints indicates an expected call of Constraints. -func (mr *MockContainerMockRecorder) Constraints() *gomock.Call { +func (mr *MockContainerMockRecorder) Constraints() *MockContainerConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockContainer)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockContainer)(nil).Constraints)) + return &MockContainerConstraintsCall{Call: call} +} + +// MockContainerConstraintsCall wrap *gomock.Call +type MockContainerConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerConstraintsCall) Return(arg0 constraints.Value, arg1 error) *MockContainerConstraintsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerConstraintsCall) Do(f func() (constraints.Value, error)) *MockContainerConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerConstraintsCall) DoAndReturn(f func() (constraints.Value, error)) *MockContainerConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -112,9 +208,33 @@ func (m *MockContainer) ContainerType() instance.ContainerType { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockContainerMockRecorder) ContainerType() *gomock.Call { +func (mr *MockContainerMockRecorder) ContainerType() *MockContainerContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockContainer)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockContainer)(nil).ContainerType)) + return &MockContainerContainerTypeCall{Call: call} +} + +// MockContainerContainerTypeCall wrap *gomock.Call +type MockContainerContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerContainerTypeCall) Return(arg0 instance.ContainerType) *MockContainerContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerContainerTypeCall) Do(f func() instance.ContainerType) *MockContainerContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerContainerTypeCall) DoAndReturn(f func() instance.ContainerType) *MockContainerContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -126,9 +246,33 @@ func (m *MockContainer) Id() string { } // Id indicates an expected call of Id. -func (mr *MockContainerMockRecorder) Id() *gomock.Call { +func (mr *MockContainerMockRecorder) Id() *MockContainerIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContainer)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContainer)(nil).Id)) + return &MockContainerIdCall{Call: call} +} + +// MockContainerIdCall wrap *gomock.Call +type MockContainerIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerIdCall) Return(arg0 string) *MockContainerIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerIdCall) Do(f func() string) *MockContainerIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerIdCall) DoAndReturn(f func() string) *MockContainerIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Raw mocks base method. @@ -140,9 +284,33 @@ func (m *MockContainer) Raw() *state.Machine { } // Raw indicates an expected call of Raw. -func (mr *MockContainerMockRecorder) Raw() *gomock.Call { +func (mr *MockContainerMockRecorder) Raw() *MockContainerRawCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Raw", reflect.TypeOf((*MockContainer)(nil).Raw)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Raw", reflect.TypeOf((*MockContainer)(nil).Raw)) + return &MockContainerRawCall{Call: call} +} + +// MockContainerRawCall wrap *gomock.Call +type MockContainerRawCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerRawCall) Return(arg0 *state.Machine) *MockContainerRawCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerRawCall) Do(f func() *state.Machine) *MockContainerRawCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerRawCall) DoAndReturn(f func() *state.Machine) *MockContainerRawCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAllAddresses mocks base method. @@ -154,9 +322,33 @@ func (m *MockContainer) RemoveAllAddresses() error { } // RemoveAllAddresses indicates an expected call of RemoveAllAddresses. -func (mr *MockContainerMockRecorder) RemoveAllAddresses() *gomock.Call { +func (mr *MockContainerMockRecorder) RemoveAllAddresses() *MockContainerRemoveAllAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllAddresses", reflect.TypeOf((*MockContainer)(nil).RemoveAllAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAllAddresses", reflect.TypeOf((*MockContainer)(nil).RemoveAllAddresses)) + return &MockContainerRemoveAllAddressesCall{Call: call} +} + +// MockContainerRemoveAllAddressesCall wrap *gomock.Call +type MockContainerRemoveAllAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerRemoveAllAddressesCall) Return(arg0 error) *MockContainerRemoveAllAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerRemoveAllAddressesCall) Do(f func() error) *MockContainerRemoveAllAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerRemoveAllAddressesCall) DoAndReturn(f func() error) *MockContainerRemoveAllAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -168,9 +360,33 @@ func (m *MockContainer) SetConstraints(arg0 constraints.Value) error { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockContainerMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockContainerMockRecorder) SetConstraints(arg0 any) *MockContainerSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockContainer)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockContainer)(nil).SetConstraints), arg0) + return &MockContainerSetConstraintsCall{Call: call} +} + +// MockContainerSetConstraintsCall wrap *gomock.Call +type MockContainerSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerSetConstraintsCall) Return(arg0 error) *MockContainerSetConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerSetConstraintsCall) Do(f func(constraints.Value) error) *MockContainerSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerSetConstraintsCall) DoAndReturn(f func(constraints.Value) error) *MockContainerSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDevicesAddresses mocks base method. @@ -186,9 +402,33 @@ func (m *MockContainer) SetDevicesAddresses(arg0 ...state.LinkLayerDeviceAddress } // SetDevicesAddresses indicates an expected call of SetDevicesAddresses. -func (mr *MockContainerMockRecorder) SetDevicesAddresses(arg0 ...any) *gomock.Call { +func (mr *MockContainerMockRecorder) SetDevicesAddresses(arg0 ...any) *MockContainerSetDevicesAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDevicesAddresses", reflect.TypeOf((*MockContainer)(nil).SetDevicesAddresses), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDevicesAddresses", reflect.TypeOf((*MockContainer)(nil).SetDevicesAddresses), arg0...) + return &MockContainerSetDevicesAddressesCall{Call: call} +} + +// MockContainerSetDevicesAddressesCall wrap *gomock.Call +type MockContainerSetDevicesAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerSetDevicesAddressesCall) Return(arg0 error) *MockContainerSetDevicesAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerSetDevicesAddressesCall) Do(f func(...state.LinkLayerDeviceAddress) error) *MockContainerSetDevicesAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerSetDevicesAddressesCall) DoAndReturn(f func(...state.LinkLayerDeviceAddress) error) *MockContainerSetDevicesAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLinkLayerDevices mocks base method. @@ -204,9 +444,33 @@ func (m *MockContainer) SetLinkLayerDevices(arg0 ...state.LinkLayerDeviceArgs) e } // SetLinkLayerDevices indicates an expected call of SetLinkLayerDevices. -func (mr *MockContainerMockRecorder) SetLinkLayerDevices(arg0 ...any) *gomock.Call { +func (mr *MockContainerMockRecorder) SetLinkLayerDevices(arg0 ...any) *MockContainerSetLinkLayerDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkLayerDevices", reflect.TypeOf((*MockContainer)(nil).SetLinkLayerDevices), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkLayerDevices", reflect.TypeOf((*MockContainer)(nil).SetLinkLayerDevices), arg0...) + return &MockContainerSetLinkLayerDevicesCall{Call: call} +} + +// MockContainerSetLinkLayerDevicesCall wrap *gomock.Call +type MockContainerSetLinkLayerDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerSetLinkLayerDevicesCall) Return(arg0 error) *MockContainerSetLinkLayerDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerSetLinkLayerDevicesCall) Do(f func(...state.LinkLayerDeviceArgs) error) *MockContainerSetLinkLayerDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerSetLinkLayerDevicesCall) DoAndReturn(f func(...state.LinkLayerDeviceArgs) error) *MockContainerSetLinkLayerDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAddress is a mock of Address interface. @@ -241,9 +505,33 @@ func (m *MockAddress) DeviceName() string { } // DeviceName indicates an expected call of DeviceName. -func (mr *MockAddressMockRecorder) DeviceName() *gomock.Call { +func (mr *MockAddressMockRecorder) DeviceName() *MockAddressDeviceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeviceName", reflect.TypeOf((*MockAddress)(nil).DeviceName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeviceName", reflect.TypeOf((*MockAddress)(nil).DeviceName)) + return &MockAddressDeviceNameCall{Call: call} +} + +// MockAddressDeviceNameCall wrap *gomock.Call +type MockAddressDeviceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddressDeviceNameCall) Return(arg0 string) *MockAddressDeviceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddressDeviceNameCall) Do(f func() string) *MockAddressDeviceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddressDeviceNameCall) DoAndReturn(f func() string) *MockAddressDeviceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SubnetCIDR mocks base method. @@ -255,9 +543,33 @@ func (m *MockAddress) SubnetCIDR() string { } // SubnetCIDR indicates an expected call of SubnetCIDR. -func (mr *MockAddressMockRecorder) SubnetCIDR() *gomock.Call { +func (mr *MockAddressMockRecorder) SubnetCIDR() *MockAddressSubnetCIDRCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetCIDR", reflect.TypeOf((*MockAddress)(nil).SubnetCIDR)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetCIDR", reflect.TypeOf((*MockAddress)(nil).SubnetCIDR)) + return &MockAddressSubnetCIDRCall{Call: call} +} + +// MockAddressSubnetCIDRCall wrap *gomock.Call +type MockAddressSubnetCIDRCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddressSubnetCIDRCall) Return(arg0 string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddressSubnetCIDRCall) Do(f func() string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddressSubnetCIDRCall) DoAndReturn(f func() string) *MockAddressSubnetCIDRCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSubnet is a mock of Subnet interface. @@ -292,9 +604,33 @@ func (m *MockSubnet) SpaceID() string { } // SpaceID indicates an expected call of SpaceID. -func (mr *MockSubnetMockRecorder) SpaceID() *gomock.Call { +func (mr *MockSubnetMockRecorder) SpaceID() *MockSubnetSpaceIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceID", reflect.TypeOf((*MockSubnet)(nil).SpaceID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceID", reflect.TypeOf((*MockSubnet)(nil).SpaceID)) + return &MockSubnetSpaceIDCall{Call: call} +} + +// MockSubnetSpaceIDCall wrap *gomock.Call +type MockSubnetSpaceIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetSpaceIDCall) Return(arg0 string) *MockSubnetSpaceIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetSpaceIDCall) Do(f func() string) *MockSubnetSpaceIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetSpaceIDCall) DoAndReturn(f func() string) *MockSubnetSpaceIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLinkLayerDevice is a mock of LinkLayerDevice interface. @@ -330,9 +666,33 @@ func (m *MockLinkLayerDevice) Addresses() ([]*state.Address, error) { } // Addresses indicates an expected call of Addresses. -func (mr *MockLinkLayerDeviceMockRecorder) Addresses() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Addresses() *MockLinkLayerDeviceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockLinkLayerDevice)(nil).Addresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockLinkLayerDevice)(nil).Addresses)) + return &MockLinkLayerDeviceAddressesCall{Call: call} +} + +// MockLinkLayerDeviceAddressesCall wrap *gomock.Call +type MockLinkLayerDeviceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceAddressesCall) Return(arg0 []*state.Address, arg1 error) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceAddressesCall) Do(f func() ([]*state.Address, error)) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceAddressesCall) DoAndReturn(f func() ([]*state.Address, error)) *MockLinkLayerDeviceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EthernetDeviceForBridge mocks base method. @@ -345,9 +705,33 @@ func (m *MockLinkLayerDevice) EthernetDeviceForBridge(arg0 string, arg1 bool, ar } // EthernetDeviceForBridge indicates an expected call of EthernetDeviceForBridge. -func (mr *MockLinkLayerDeviceMockRecorder) EthernetDeviceForBridge(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) EthernetDeviceForBridge(arg0, arg1, arg2 any) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthernetDeviceForBridge", reflect.TypeOf((*MockLinkLayerDevice)(nil).EthernetDeviceForBridge), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthernetDeviceForBridge", reflect.TypeOf((*MockLinkLayerDevice)(nil).EthernetDeviceForBridge), arg0, arg1, arg2) + return &MockLinkLayerDeviceEthernetDeviceForBridgeCall{Call: call} +} + +// MockLinkLayerDeviceEthernetDeviceForBridgeCall wrap *gomock.Call +type MockLinkLayerDeviceEthernetDeviceForBridgeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) Return(arg0 network.InterfaceInfo, arg1 error) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) Do(f func(string, bool, network.SubnetInfos) (network.InterfaceInfo, error)) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceEthernetDeviceForBridgeCall) DoAndReturn(f func(string, bool, network.SubnetInfos) (network.InterfaceInfo, error)) *MockLinkLayerDeviceEthernetDeviceForBridgeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsAutoStart mocks base method. @@ -359,9 +743,33 @@ func (m *MockLinkLayerDevice) IsAutoStart() bool { } // IsAutoStart indicates an expected call of IsAutoStart. -func (mr *MockLinkLayerDeviceMockRecorder) IsAutoStart() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) IsAutoStart() *MockLinkLayerDeviceIsAutoStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoStart", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsAutoStart)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoStart", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsAutoStart)) + return &MockLinkLayerDeviceIsAutoStartCall{Call: call} +} + +// MockLinkLayerDeviceIsAutoStartCall wrap *gomock.Call +type MockLinkLayerDeviceIsAutoStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceIsAutoStartCall) Return(arg0 bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceIsAutoStartCall) Do(f func() bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceIsAutoStartCall) DoAndReturn(f func() bool) *MockLinkLayerDeviceIsAutoStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsUp mocks base method. @@ -373,9 +781,33 @@ func (m *MockLinkLayerDevice) IsUp() bool { } // IsUp indicates an expected call of IsUp. -func (mr *MockLinkLayerDeviceMockRecorder) IsUp() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) IsUp() *MockLinkLayerDeviceIsUpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsUp)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUp", reflect.TypeOf((*MockLinkLayerDevice)(nil).IsUp)) + return &MockLinkLayerDeviceIsUpCall{Call: call} +} + +// MockLinkLayerDeviceIsUpCall wrap *gomock.Call +type MockLinkLayerDeviceIsUpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceIsUpCall) Return(arg0 bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceIsUpCall) Do(f func() bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceIsUpCall) DoAndReturn(f func() bool) *MockLinkLayerDeviceIsUpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MACAddress mocks base method. @@ -387,9 +819,33 @@ func (m *MockLinkLayerDevice) MACAddress() string { } // MACAddress indicates an expected call of MACAddress. -func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) MACAddress() *MockLinkLayerDeviceMACAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MACAddress", reflect.TypeOf((*MockLinkLayerDevice)(nil).MACAddress)) + return &MockLinkLayerDeviceMACAddressCall{Call: call} +} + +// MockLinkLayerDeviceMACAddressCall wrap *gomock.Call +type MockLinkLayerDeviceMACAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceMACAddressCall) Return(arg0 string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceMACAddressCall) Do(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceMACAddressCall) DoAndReturn(f func() string) *MockLinkLayerDeviceMACAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MTU mocks base method. @@ -401,9 +857,33 @@ func (m *MockLinkLayerDevice) MTU() uint { } // MTU indicates an expected call of MTU. -func (mr *MockLinkLayerDeviceMockRecorder) MTU() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) MTU() *MockLinkLayerDeviceMTUCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockLinkLayerDevice)(nil).MTU)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MTU", reflect.TypeOf((*MockLinkLayerDevice)(nil).MTU)) + return &MockLinkLayerDeviceMTUCall{Call: call} +} + +// MockLinkLayerDeviceMTUCall wrap *gomock.Call +type MockLinkLayerDeviceMTUCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceMTUCall) Return(arg0 uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceMTUCall) Do(f func() uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceMTUCall) DoAndReturn(f func() uint) *MockLinkLayerDeviceMTUCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -415,9 +895,33 @@ func (m *MockLinkLayerDevice) Name() string { } // Name indicates an expected call of Name. -func (mr *MockLinkLayerDeviceMockRecorder) Name() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Name() *MockLinkLayerDeviceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLinkLayerDevice)(nil).Name)) + return &MockLinkLayerDeviceNameCall{Call: call} +} + +// MockLinkLayerDeviceNameCall wrap *gomock.Call +type MockLinkLayerDeviceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceNameCall) Return(arg0 string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceNameCall) Do(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceNameCall) DoAndReturn(f func() string) *MockLinkLayerDeviceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ParentDevice mocks base method. @@ -430,9 +934,33 @@ func (m *MockLinkLayerDevice) ParentDevice() (LinkLayerDevice, error) { } // ParentDevice indicates an expected call of ParentDevice. -func (mr *MockLinkLayerDeviceMockRecorder) ParentDevice() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) ParentDevice() *MockLinkLayerDeviceParentDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentDevice", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentDevice", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentDevice)) + return &MockLinkLayerDeviceParentDeviceCall{Call: call} +} + +// MockLinkLayerDeviceParentDeviceCall wrap *gomock.Call +type MockLinkLayerDeviceParentDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceParentDeviceCall) Return(arg0 LinkLayerDevice, arg1 error) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceParentDeviceCall) Do(f func() (LinkLayerDevice, error)) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceParentDeviceCall) DoAndReturn(f func() (LinkLayerDevice, error)) *MockLinkLayerDeviceParentDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ParentName mocks base method. @@ -444,9 +972,33 @@ func (m *MockLinkLayerDevice) ParentName() string { } // ParentName indicates an expected call of ParentName. -func (mr *MockLinkLayerDeviceMockRecorder) ParentName() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) ParentName() *MockLinkLayerDeviceParentNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentName", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParentName", reflect.TypeOf((*MockLinkLayerDevice)(nil).ParentName)) + return &MockLinkLayerDeviceParentNameCall{Call: call} +} + +// MockLinkLayerDeviceParentNameCall wrap *gomock.Call +type MockLinkLayerDeviceParentNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceParentNameCall) Return(arg0 string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceParentNameCall) Do(f func() string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceParentNameCall) DoAndReturn(f func() string) *MockLinkLayerDeviceParentNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -458,9 +1010,33 @@ func (m *MockLinkLayerDevice) Type() network.LinkLayerDeviceType { } // Type indicates an expected call of Type. -func (mr *MockLinkLayerDeviceMockRecorder) Type() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) Type() *MockLinkLayerDeviceTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLinkLayerDevice)(nil).Type)) + return &MockLinkLayerDeviceTypeCall{Call: call} +} + +// MockLinkLayerDeviceTypeCall wrap *gomock.Call +type MockLinkLayerDeviceTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceTypeCall) Return(arg0 network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceTypeCall) Do(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceTypeCall) DoAndReturn(f func() network.LinkLayerDeviceType) *MockLinkLayerDeviceTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VirtualPortType mocks base method. @@ -472,7 +1048,31 @@ func (m *MockLinkLayerDevice) VirtualPortType() network.VirtualPortType { } // VirtualPortType indicates an expected call of VirtualPortType. -func (mr *MockLinkLayerDeviceMockRecorder) VirtualPortType() *gomock.Call { +func (mr *MockLinkLayerDeviceMockRecorder) VirtualPortType() *MockLinkLayerDeviceVirtualPortTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualPortType", reflect.TypeOf((*MockLinkLayerDevice)(nil).VirtualPortType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualPortType", reflect.TypeOf((*MockLinkLayerDevice)(nil).VirtualPortType)) + return &MockLinkLayerDeviceVirtualPortTypeCall{Call: call} +} + +// MockLinkLayerDeviceVirtualPortTypeCall wrap *gomock.Call +type MockLinkLayerDeviceVirtualPortTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLinkLayerDeviceVirtualPortTypeCall) Return(arg0 network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLinkLayerDeviceVirtualPortTypeCall) Do(f func() network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLinkLayerDeviceVirtualPortTypeCall) DoAndReturn(f func() network.VirtualPortType) *MockLinkLayerDeviceVirtualPortTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/network/containerizer/package_test.go b/internal/network/containerizer/package_test.go index 0ea7691bfb5..7eaf09c5643 100644 --- a/internal/network/containerizer/package_test.go +++ b/internal/network/containerizer/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package containerizer -destination bridgepolicy_mock_test.go github.com/juju/juju/internal/network/containerizer Container,Address,Subnet,LinkLayerDevice +//go:generate go run go.uber.org/mock/mockgen -typed -package containerizer -destination bridgepolicy_mock_test.go github.com/juju/juju/internal/network/containerizer Container,Address,Subnet,LinkLayerDevice func TestAll(t *stdtesting.T) { gc.TestingT(t) } diff --git a/internal/objectstore/clock_mock_test.go b/internal/objectstore/clock_mock_test.go index 6bc39737c67..0d42fa63992 100644 --- a/internal/objectstore/clock_mock_test.go +++ b/internal/objectstore/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock // // Package objectstore is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/objectstore/objectstore_mock_test.go b/internal/objectstore/objectstore_mock_test.go index ac14455dc7e..7e9ad0f33da 100644 --- a/internal/objectstore/objectstore_mock_test.go +++ b/internal/objectstore/objectstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStoreMetadata,Session +// mockgen -typed -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStoreMetadata,Session // // Package objectstore is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockObjectStoreMetadata) GetMetadata(arg0 context.Context, arg1 string) } // GetMetadata indicates an expected call of GetMetadata. -func (mr *MockObjectStoreMetadataMockRecorder) GetMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMetadataMockRecorder) GetMetadata(arg0, arg1 any) *MockObjectStoreMetadataGetMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).GetMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).GetMetadata), arg0, arg1) + return &MockObjectStoreMetadataGetMetadataCall{Call: call} +} + +// MockObjectStoreMetadataGetMetadataCall wrap *gomock.Call +type MockObjectStoreMetadataGetMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreMetadataGetMetadataCall) Return(arg0 objectstore.Metadata, arg1 error) *MockObjectStoreMetadataGetMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreMetadataGetMetadataCall) Do(f func(context.Context, string) (objectstore.Metadata, error)) *MockObjectStoreMetadataGetMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreMetadataGetMetadataCall) DoAndReturn(f func(context.Context, string) (objectstore.Metadata, error)) *MockObjectStoreMetadataGetMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListMetadata mocks base method. @@ -67,9 +91,33 @@ func (m *MockObjectStoreMetadata) ListMetadata(arg0 context.Context) ([]objectst } // ListMetadata indicates an expected call of ListMetadata. -func (mr *MockObjectStoreMetadataMockRecorder) ListMetadata(arg0 any) *gomock.Call { +func (mr *MockObjectStoreMetadataMockRecorder) ListMetadata(arg0 any) *MockObjectStoreMetadataListMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).ListMetadata), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).ListMetadata), arg0) + return &MockObjectStoreMetadataListMetadataCall{Call: call} +} + +// MockObjectStoreMetadataListMetadataCall wrap *gomock.Call +type MockObjectStoreMetadataListMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreMetadataListMetadataCall) Return(arg0 []objectstore.Metadata, arg1 error) *MockObjectStoreMetadataListMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreMetadataListMetadataCall) Do(f func(context.Context) ([]objectstore.Metadata, error)) *MockObjectStoreMetadataListMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreMetadataListMetadataCall) DoAndReturn(f func(context.Context) ([]objectstore.Metadata, error)) *MockObjectStoreMetadataListMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutMetadata mocks base method. @@ -81,9 +129,33 @@ func (m *MockObjectStoreMetadata) PutMetadata(arg0 context.Context, arg1 objects } // PutMetadata indicates an expected call of PutMetadata. -func (mr *MockObjectStoreMetadataMockRecorder) PutMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMetadataMockRecorder) PutMetadata(arg0, arg1 any) *MockObjectStoreMetadataPutMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).PutMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).PutMetadata), arg0, arg1) + return &MockObjectStoreMetadataPutMetadataCall{Call: call} +} + +// MockObjectStoreMetadataPutMetadataCall wrap *gomock.Call +type MockObjectStoreMetadataPutMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreMetadataPutMetadataCall) Return(arg0 error) *MockObjectStoreMetadataPutMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreMetadataPutMetadataCall) Do(f func(context.Context, objectstore.Metadata) error) *MockObjectStoreMetadataPutMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreMetadataPutMetadataCall) DoAndReturn(f func(context.Context, objectstore.Metadata) error) *MockObjectStoreMetadataPutMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveMetadata mocks base method. @@ -95,9 +167,33 @@ func (m *MockObjectStoreMetadata) RemoveMetadata(arg0 context.Context, arg1 stri } // RemoveMetadata indicates an expected call of RemoveMetadata. -func (mr *MockObjectStoreMetadataMockRecorder) RemoveMetadata(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMetadataMockRecorder) RemoveMetadata(arg0, arg1 any) *MockObjectStoreMetadataRemoveMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).RemoveMetadata), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMetadata", reflect.TypeOf((*MockObjectStoreMetadata)(nil).RemoveMetadata), arg0, arg1) + return &MockObjectStoreMetadataRemoveMetadataCall{Call: call} +} + +// MockObjectStoreMetadataRemoveMetadataCall wrap *gomock.Call +type MockObjectStoreMetadataRemoveMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreMetadataRemoveMetadataCall) Return(arg0 error) *MockObjectStoreMetadataRemoveMetadataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreMetadataRemoveMetadataCall) Do(f func(context.Context, string) error) *MockObjectStoreMetadataRemoveMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreMetadataRemoveMetadataCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreMetadataRemoveMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -110,9 +206,33 @@ func (m *MockObjectStoreMetadata) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockObjectStoreMetadataMockRecorder) Watch() *gomock.Call { +func (mr *MockObjectStoreMetadataMockRecorder) Watch() *MockObjectStoreMetadataWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockObjectStoreMetadata)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockObjectStoreMetadata)(nil).Watch)) + return &MockObjectStoreMetadataWatchCall{Call: call} +} + +// MockObjectStoreMetadataWatchCall wrap *gomock.Call +type MockObjectStoreMetadataWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreMetadataWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockObjectStoreMetadataWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreMetadataWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockObjectStoreMetadataWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreMetadataWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockObjectStoreMetadataWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSession is a mock of Session interface. @@ -147,9 +267,33 @@ func (m *MockSession) CreateBucket(arg0 context.Context, arg1 string) error { } // CreateBucket indicates an expected call of CreateBucket. -func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *MockSessionCreateBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + return &MockSessionCreateBucketCall{Call: call} +} + +// MockSessionCreateBucketCall wrap *gomock.Call +type MockSessionCreateBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionCreateBucketCall) Return(arg0 error) *MockSessionCreateBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionCreateBucketCall) Do(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionCreateBucketCall) DoAndReturn(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteObject mocks base method. @@ -161,9 +305,33 @@ func (m *MockSession) DeleteObject(arg0 context.Context, arg1, arg2 string) erro } // DeleteObject indicates an expected call of DeleteObject. -func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *MockSessionDeleteObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + return &MockSessionDeleteObjectCall{Call: call} +} + +// MockSessionDeleteObjectCall wrap *gomock.Call +type MockSessionDeleteObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionDeleteObjectCall) Return(arg0 error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionDeleteObjectCall) Do(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionDeleteObjectCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObject mocks base method. @@ -178,9 +346,33 @@ func (m *MockSession) GetObject(arg0 context.Context, arg1, arg2 string) (io.Rea } // GetObject indicates an expected call of GetObject. -func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *MockSessionGetObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + return &MockSessionGetObjectCall{Call: call} +} + +// MockSessionGetObjectCall wrap *gomock.Call +type MockSessionGetObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionGetObjectCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 string, arg3 error) *MockSessionGetObjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionGetObjectCall) Do(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionGetObjectCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListObjects mocks base method. @@ -193,9 +385,33 @@ func (m *MockSession) ListObjects(arg0 context.Context, arg1 string) ([]string, } // ListObjects indicates an expected call of ListObjects. -func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *MockSessionListObjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + return &MockSessionListObjectsCall{Call: call} +} + +// MockSessionListObjectsCall wrap *gomock.Call +type MockSessionListObjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionListObjectsCall) Return(arg0 []string, arg1 error) *MockSessionListObjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionListObjectsCall) Do(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionListObjectsCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectExists mocks base method. @@ -207,9 +423,33 @@ func (m *MockSession) ObjectExists(arg0 context.Context, arg1, arg2 string) erro } // ObjectExists indicates an expected call of ObjectExists. -func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *MockSessionObjectExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + return &MockSessionObjectExistsCall{Call: call} +} + +// MockSessionObjectExistsCall wrap *gomock.Call +type MockSessionObjectExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionObjectExistsCall) Return(arg0 error) *MockSessionObjectExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionObjectExistsCall) Do(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionObjectExistsCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutObject mocks base method. @@ -221,7 +461,31 @@ func (m *MockSession) PutObject(arg0 context.Context, arg1, arg2 string, arg3 io } // PutObject indicates an expected call of PutObject. -func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *MockSessionPutObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + return &MockSessionPutObjectCall{Call: call} +} + +// MockSessionPutObjectCall wrap *gomock.Call +type MockSessionPutObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionPutObjectCall) Return(arg0 error) *MockSessionPutObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionPutObjectCall) Do(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionPutObjectCall) DoAndReturn(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/objectstore/package_test.go b/internal/objectstore/package_test.go index 6d7929f2865..5ea33fd8a3e 100644 --- a/internal/objectstore/package_test.go +++ b/internal/objectstore/package_test.go @@ -22,9 +22,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination state_mock_test.go github.com/juju/juju/internal/objectstore Claimer,ClaimExtender,HashFileSystemAccessor -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStoreMetadata,Session -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination state_mock_test.go github.com/juju/juju/internal/objectstore Claimer,ClaimExtender,HashFileSystemAccessor +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStoreMetadata,Session +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock func TestAll(t *stdtesting.T) { defer goleak.VerifyNone(t) diff --git a/internal/objectstore/state_mock_test.go b/internal/objectstore/state_mock_test.go index a519cc9c2d9..23b1d577255 100644 --- a/internal/objectstore/state_mock_test.go +++ b/internal/objectstore/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination state_mock_test.go github.com/juju/juju/internal/objectstore Claimer,ClaimExtender,HashFileSystemAccessor +// mockgen -typed -package objectstore -destination state_mock_test.go github.com/juju/juju/internal/objectstore Claimer,ClaimExtender,HashFileSystemAccessor // // Package objectstore is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockClaimer) Claim(arg0 context.Context, arg1 string) (ClaimExtender, e } // Claim indicates an expected call of Claim. -func (mr *MockClaimerMockRecorder) Claim(arg0, arg1 any) *gomock.Call { +func (mr *MockClaimerMockRecorder) Claim(arg0, arg1 any) *MockClaimerClaimCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claim", reflect.TypeOf((*MockClaimer)(nil).Claim), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claim", reflect.TypeOf((*MockClaimer)(nil).Claim), arg0, arg1) + return &MockClaimerClaimCall{Call: call} +} + +// MockClaimerClaimCall wrap *gomock.Call +type MockClaimerClaimCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimerClaimCall) Return(arg0 ClaimExtender, arg1 error) *MockClaimerClaimCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimerClaimCall) Do(f func(context.Context, string) (ClaimExtender, error)) *MockClaimerClaimCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimerClaimCall) DoAndReturn(f func(context.Context, string) (ClaimExtender, error)) *MockClaimerClaimCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Release mocks base method. @@ -65,9 +89,33 @@ func (m *MockClaimer) Release(arg0 context.Context, arg1 string) error { } // Release indicates an expected call of Release. -func (mr *MockClaimerMockRecorder) Release(arg0, arg1 any) *gomock.Call { +func (mr *MockClaimerMockRecorder) Release(arg0, arg1 any) *MockClaimerReleaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockClaimer)(nil).Release), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockClaimer)(nil).Release), arg0, arg1) + return &MockClaimerReleaseCall{Call: call} +} + +// MockClaimerReleaseCall wrap *gomock.Call +type MockClaimerReleaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimerReleaseCall) Return(arg0 error) *MockClaimerReleaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimerReleaseCall) Do(f func(context.Context, string) error) *MockClaimerReleaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimerReleaseCall) DoAndReturn(f func(context.Context, string) error) *MockClaimerReleaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClaimExtender is a mock of ClaimExtender interface. @@ -102,9 +150,33 @@ func (m *MockClaimExtender) Duration() time.Duration { } // Duration indicates an expected call of Duration. -func (mr *MockClaimExtenderMockRecorder) Duration() *gomock.Call { +func (mr *MockClaimExtenderMockRecorder) Duration() *MockClaimExtenderDurationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Duration", reflect.TypeOf((*MockClaimExtender)(nil).Duration)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Duration", reflect.TypeOf((*MockClaimExtender)(nil).Duration)) + return &MockClaimExtenderDurationCall{Call: call} +} + +// MockClaimExtenderDurationCall wrap *gomock.Call +type MockClaimExtenderDurationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimExtenderDurationCall) Return(arg0 time.Duration) *MockClaimExtenderDurationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimExtenderDurationCall) Do(f func() time.Duration) *MockClaimExtenderDurationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimExtenderDurationCall) DoAndReturn(f func() time.Duration) *MockClaimExtenderDurationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Extend mocks base method. @@ -116,9 +188,33 @@ func (m *MockClaimExtender) Extend(arg0 context.Context) error { } // Extend indicates an expected call of Extend. -func (mr *MockClaimExtenderMockRecorder) Extend(arg0 any) *gomock.Call { +func (mr *MockClaimExtenderMockRecorder) Extend(arg0 any) *MockClaimExtenderExtendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Extend", reflect.TypeOf((*MockClaimExtender)(nil).Extend), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Extend", reflect.TypeOf((*MockClaimExtender)(nil).Extend), arg0) + return &MockClaimExtenderExtendCall{Call: call} +} + +// MockClaimExtenderExtendCall wrap *gomock.Call +type MockClaimExtenderExtendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimExtenderExtendCall) Return(arg0 error) *MockClaimExtenderExtendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimExtenderExtendCall) Do(f func(context.Context) error) *MockClaimExtenderExtendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimExtenderExtendCall) DoAndReturn(f func(context.Context) error) *MockClaimExtenderExtendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockHashFileSystemAccessor is a mock of HashFileSystemAccessor interface. @@ -153,9 +249,33 @@ func (m *MockHashFileSystemAccessor) DeleteByHash(arg0 context.Context, arg1 str } // DeleteByHash indicates an expected call of DeleteByHash. -func (mr *MockHashFileSystemAccessorMockRecorder) DeleteByHash(arg0, arg1 any) *gomock.Call { +func (mr *MockHashFileSystemAccessorMockRecorder) DeleteByHash(arg0, arg1 any) *MockHashFileSystemAccessorDeleteByHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByHash", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).DeleteByHash), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByHash", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).DeleteByHash), arg0, arg1) + return &MockHashFileSystemAccessorDeleteByHashCall{Call: call} +} + +// MockHashFileSystemAccessorDeleteByHashCall wrap *gomock.Call +type MockHashFileSystemAccessorDeleteByHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHashFileSystemAccessorDeleteByHashCall) Return(arg0 error) *MockHashFileSystemAccessorDeleteByHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHashFileSystemAccessorDeleteByHashCall) Do(f func(context.Context, string) error) *MockHashFileSystemAccessorDeleteByHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHashFileSystemAccessorDeleteByHashCall) DoAndReturn(f func(context.Context, string) error) *MockHashFileSystemAccessorDeleteByHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetByHash mocks base method. @@ -169,9 +289,33 @@ func (m *MockHashFileSystemAccessor) GetByHash(arg0 context.Context, arg1 string } // GetByHash indicates an expected call of GetByHash. -func (mr *MockHashFileSystemAccessorMockRecorder) GetByHash(arg0, arg1 any) *gomock.Call { +func (mr *MockHashFileSystemAccessorMockRecorder) GetByHash(arg0, arg1 any) *MockHashFileSystemAccessorGetByHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByHash", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).GetByHash), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByHash", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).GetByHash), arg0, arg1) + return &MockHashFileSystemAccessorGetByHashCall{Call: call} +} + +// MockHashFileSystemAccessorGetByHashCall wrap *gomock.Call +type MockHashFileSystemAccessorGetByHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHashFileSystemAccessorGetByHashCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockHashFileSystemAccessorGetByHashCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHashFileSystemAccessorGetByHashCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockHashFileSystemAccessorGetByHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHashFileSystemAccessorGetByHashCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockHashFileSystemAccessorGetByHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HashExists mocks base method. @@ -183,7 +327,31 @@ func (m *MockHashFileSystemAccessor) HashExists(arg0 context.Context, arg1 strin } // HashExists indicates an expected call of HashExists. -func (mr *MockHashFileSystemAccessorMockRecorder) HashExists(arg0, arg1 any) *gomock.Call { +func (mr *MockHashFileSystemAccessorMockRecorder) HashExists(arg0, arg1 any) *MockHashFileSystemAccessorHashExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HashExists", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).HashExists), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HashExists", reflect.TypeOf((*MockHashFileSystemAccessor)(nil).HashExists), arg0, arg1) + return &MockHashFileSystemAccessorHashExistsCall{Call: call} +} + +// MockHashFileSystemAccessorHashExistsCall wrap *gomock.Call +type MockHashFileSystemAccessorHashExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHashFileSystemAccessorHashExistsCall) Return(arg0 error) *MockHashFileSystemAccessorHashExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHashFileSystemAccessorHashExistsCall) Do(f func(context.Context, string) error) *MockHashFileSystemAccessorHashExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHashFileSystemAccessorHashExistsCall) DoAndReturn(f func(context.Context, string) error) *MockHashFileSystemAccessorHashExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/common/mocks/availability_zone.go b/internal/provider/common/mocks/availability_zone.go index 87ea4d7f66d..353279710cc 100644 --- a/internal/provider/common/mocks/availability_zone.go +++ b/internal/provider/common/mocks/availability_zone.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/availability_zone.go github.com/juju/juju/core/network AvailabilityZone +// mockgen -typed -package mocks -destination mocks/availability_zone.go github.com/juju/juju/core/network AvailabilityZone // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockAvailabilityZone) Available() bool { } // Available indicates an expected call of Available. -func (mr *MockAvailabilityZoneMockRecorder) Available() *gomock.Call { +func (mr *MockAvailabilityZoneMockRecorder) Available() *MockAvailabilityZoneAvailableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Available", reflect.TypeOf((*MockAvailabilityZone)(nil).Available)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Available", reflect.TypeOf((*MockAvailabilityZone)(nil).Available)) + return &MockAvailabilityZoneAvailableCall{Call: call} +} + +// MockAvailabilityZoneAvailableCall wrap *gomock.Call +type MockAvailabilityZoneAvailableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAvailabilityZoneAvailableCall) Return(arg0 bool) *MockAvailabilityZoneAvailableCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAvailabilityZoneAvailableCall) Do(f func() bool) *MockAvailabilityZoneAvailableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAvailabilityZoneAvailableCall) DoAndReturn(f func() bool) *MockAvailabilityZoneAvailableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -61,7 +85,31 @@ func (m *MockAvailabilityZone) Name() string { } // Name indicates an expected call of Name. -func (mr *MockAvailabilityZoneMockRecorder) Name() *gomock.Call { +func (mr *MockAvailabilityZoneMockRecorder) Name() *MockAvailabilityZoneNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAvailabilityZone)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAvailabilityZone)(nil).Name)) + return &MockAvailabilityZoneNameCall{Call: call} +} + +// MockAvailabilityZoneNameCall wrap *gomock.Call +type MockAvailabilityZoneNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAvailabilityZoneNameCall) Return(arg0 string) *MockAvailabilityZoneNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAvailabilityZoneNameCall) Do(f func() string) *MockAvailabilityZoneNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAvailabilityZoneNameCall) DoAndReturn(f func() string) *MockAvailabilityZoneNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/common/mocks/instance_configurator.go b/internal/provider/common/mocks/instance_configurator.go index b75771389d6..440289a1fa0 100644 --- a/internal/provider/common/mocks/instance_configurator.go +++ b/internal/provider/common/mocks/instance_configurator.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/instance_configurator.go github.com/juju/juju/internal/provider/common InstanceConfigurator +// mockgen -typed -package mocks -destination mocks/instance_configurator.go github.com/juju/juju/internal/provider/common InstanceConfigurator // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockInstanceConfigurator) ChangeIngressRules(arg0 string, arg1 bool, ar } // ChangeIngressRules indicates an expected call of ChangeIngressRules. -func (mr *MockInstanceConfiguratorMockRecorder) ChangeIngressRules(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockInstanceConfiguratorMockRecorder) ChangeIngressRules(arg0, arg1, arg2 any) *MockInstanceConfiguratorChangeIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeIngressRules", reflect.TypeOf((*MockInstanceConfigurator)(nil).ChangeIngressRules), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeIngressRules", reflect.TypeOf((*MockInstanceConfigurator)(nil).ChangeIngressRules), arg0, arg1, arg2) + return &MockInstanceConfiguratorChangeIngressRulesCall{Call: call} +} + +// MockInstanceConfiguratorChangeIngressRulesCall wrap *gomock.Call +type MockInstanceConfiguratorChangeIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfiguratorChangeIngressRulesCall) Return(arg0 error) *MockInstanceConfiguratorChangeIngressRulesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfiguratorChangeIngressRulesCall) Do(f func(string, bool, firewall.IngressRules) error) *MockInstanceConfiguratorChangeIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfiguratorChangeIngressRulesCall) DoAndReturn(f func(string, bool, firewall.IngressRules) error) *MockInstanceConfiguratorChangeIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DropAllPorts mocks base method. @@ -62,9 +86,33 @@ func (m *MockInstanceConfigurator) DropAllPorts(arg0 []int, arg1 string) error { } // DropAllPorts indicates an expected call of DropAllPorts. -func (mr *MockInstanceConfiguratorMockRecorder) DropAllPorts(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceConfiguratorMockRecorder) DropAllPorts(arg0, arg1 any) *MockInstanceConfiguratorDropAllPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropAllPorts", reflect.TypeOf((*MockInstanceConfigurator)(nil).DropAllPorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropAllPorts", reflect.TypeOf((*MockInstanceConfigurator)(nil).DropAllPorts), arg0, arg1) + return &MockInstanceConfiguratorDropAllPortsCall{Call: call} +} + +// MockInstanceConfiguratorDropAllPortsCall wrap *gomock.Call +type MockInstanceConfiguratorDropAllPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfiguratorDropAllPortsCall) Return(arg0 error) *MockInstanceConfiguratorDropAllPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfiguratorDropAllPortsCall) Do(f func([]int, string) error) *MockInstanceConfiguratorDropAllPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfiguratorDropAllPortsCall) DoAndReturn(f func([]int, string) error) *MockInstanceConfiguratorDropAllPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindIngressRules mocks base method. @@ -77,7 +125,31 @@ func (m *MockInstanceConfigurator) FindIngressRules() (firewall.IngressRules, er } // FindIngressRules indicates an expected call of FindIngressRules. -func (mr *MockInstanceConfiguratorMockRecorder) FindIngressRules() *gomock.Call { +func (mr *MockInstanceConfiguratorMockRecorder) FindIngressRules() *MockInstanceConfiguratorFindIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindIngressRules", reflect.TypeOf((*MockInstanceConfigurator)(nil).FindIngressRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindIngressRules", reflect.TypeOf((*MockInstanceConfigurator)(nil).FindIngressRules)) + return &MockInstanceConfiguratorFindIngressRulesCall{Call: call} +} + +// MockInstanceConfiguratorFindIngressRulesCall wrap *gomock.Call +type MockInstanceConfiguratorFindIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceConfiguratorFindIngressRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockInstanceConfiguratorFindIngressRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceConfiguratorFindIngressRulesCall) Do(f func() (firewall.IngressRules, error)) *MockInstanceConfiguratorFindIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceConfiguratorFindIngressRulesCall) DoAndReturn(f func() (firewall.IngressRules, error)) *MockInstanceConfiguratorFindIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/common/mocks/zoned_environ.go b/internal/provider/common/mocks/zoned_environ.go index f6cf7c162a6..029937f485e 100644 --- a/internal/provider/common/mocks/zoned_environ.go +++ b/internal/provider/common/mocks/zoned_environ.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/zoned_environ.go github.com/juju/juju/internal/provider/common ZonedEnviron +// mockgen -typed -package mocks -destination mocks/zoned_environ.go github.com/juju/juju/internal/provider/common ZonedEnviron // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockZonedEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, a } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockZonedEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockZonedEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockZonedEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockZonedEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockZonedEnvironAdoptResourcesCall{Call: call} +} + +// MockZonedEnvironAdoptResourcesCall wrap *gomock.Call +type MockZonedEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironAdoptResourcesCall) Return(arg0 error) *MockZonedEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockZonedEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockZonedEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -72,9 +96,33 @@ func (m *MockZonedEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([] } // AllInstances indicates an expected call of AllInstances. -func (mr *MockZonedEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) AllInstances(arg0 any) *MockZonedEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockZonedEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockZonedEnviron)(nil).AllInstances), arg0) + return &MockZonedEnvironAllInstancesCall{Call: call} +} + +// MockZonedEnvironAllInstancesCall wrap *gomock.Call +type MockZonedEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockZonedEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockZonedEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockZonedEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -87,9 +135,33 @@ func (m *MockZonedEnviron) AllRunningInstances(arg0 envcontext.ProviderCallConte } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockZonedEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) AllRunningInstances(arg0 any) *MockZonedEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockZonedEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockZonedEnviron)(nil).AllRunningInstances), arg0) + return &MockZonedEnvironAllRunningInstancesCall{Call: call} +} + +// MockZonedEnvironAllRunningInstancesCall wrap *gomock.Call +type MockZonedEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockZonedEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockZonedEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockZonedEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AvailabilityZones mocks base method. @@ -102,9 +174,33 @@ func (m *MockZonedEnviron) AvailabilityZones(arg0 envcontext.ProviderCallContext } // AvailabilityZones indicates an expected call of AvailabilityZones. -func (mr *MockZonedEnvironMockRecorder) AvailabilityZones(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) AvailabilityZones(arg0 any) *MockZonedEnvironAvailabilityZonesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZones", reflect.TypeOf((*MockZonedEnviron)(nil).AvailabilityZones), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZones", reflect.TypeOf((*MockZonedEnviron)(nil).AvailabilityZones), arg0) + return &MockZonedEnvironAvailabilityZonesCall{Call: call} +} + +// MockZonedEnvironAvailabilityZonesCall wrap *gomock.Call +type MockZonedEnvironAvailabilityZonesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironAvailabilityZonesCall) Return(arg0 network.AvailabilityZones, arg1 error) *MockZonedEnvironAvailabilityZonesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironAvailabilityZonesCall) Do(f func(envcontext.ProviderCallContext) (network.AvailabilityZones, error)) *MockZonedEnvironAvailabilityZonesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironAvailabilityZonesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.AvailabilityZones, error)) *MockZonedEnvironAvailabilityZonesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -117,9 +213,33 @@ func (m *MockZonedEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcon } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockZonedEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockZonedEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockZonedEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockZonedEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockZonedEnvironBootstrapCall{Call: call} +} + +// MockZonedEnvironBootstrapCall wrap *gomock.Call +type MockZonedEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockZonedEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockZonedEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockZonedEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -131,9 +251,33 @@ func (m *MockZonedEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockZonedEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Config() *MockZonedEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockZonedEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockZonedEnviron)(nil).Config)) + return &MockZonedEnvironConfigCall{Call: call} +} + +// MockZonedEnvironConfigCall wrap *gomock.Call +type MockZonedEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironConfigCall) Return(arg0 *config.Config) *MockZonedEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironConfigCall) Do(f func() *config.Config) *MockZonedEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockZonedEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -146,9 +290,33 @@ func (m *MockZonedEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallCont } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockZonedEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockZonedEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockZonedEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockZonedEnviron)(nil).ConstraintsValidator), arg0) + return &MockZonedEnvironConstraintsValidatorCall{Call: call} +} + +// MockZonedEnvironConstraintsValidatorCall wrap *gomock.Call +type MockZonedEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockZonedEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockZonedEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockZonedEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -161,9 +329,33 @@ func (m *MockZonedEnviron) ControllerInstances(arg0 envcontext.ProviderCallConte } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockZonedEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockZonedEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockZonedEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockZonedEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockZonedEnvironControllerInstancesCall{Call: call} +} + +// MockZonedEnvironControllerInstancesCall wrap *gomock.Call +type MockZonedEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockZonedEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockZonedEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockZonedEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -175,9 +367,33 @@ func (m *MockZonedEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 envi } // Create indicates an expected call of Create. -func (mr *MockZonedEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Create(arg0, arg1 any) *MockZonedEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockZonedEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockZonedEnviron)(nil).Create), arg0, arg1) + return &MockZonedEnvironCreateCall{Call: call} +} + +// MockZonedEnvironCreateCall wrap *gomock.Call +type MockZonedEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironCreateCall) Return(arg0 error) *MockZonedEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockZonedEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockZonedEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeriveAvailabilityZones mocks base method. @@ -190,9 +406,33 @@ func (m *MockZonedEnviron) DeriveAvailabilityZones(arg0 envcontext.ProviderCallC } // DeriveAvailabilityZones indicates an expected call of DeriveAvailabilityZones. -func (mr *MockZonedEnvironMockRecorder) DeriveAvailabilityZones(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) DeriveAvailabilityZones(arg0, arg1 any) *MockZonedEnvironDeriveAvailabilityZonesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeriveAvailabilityZones", reflect.TypeOf((*MockZonedEnviron)(nil).DeriveAvailabilityZones), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeriveAvailabilityZones", reflect.TypeOf((*MockZonedEnviron)(nil).DeriveAvailabilityZones), arg0, arg1) + return &MockZonedEnvironDeriveAvailabilityZonesCall{Call: call} +} + +// MockZonedEnvironDeriveAvailabilityZonesCall wrap *gomock.Call +type MockZonedEnvironDeriveAvailabilityZonesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironDeriveAvailabilityZonesCall) Return(arg0 []string, arg1 error) *MockZonedEnvironDeriveAvailabilityZonesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironDeriveAvailabilityZonesCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) ([]string, error)) *MockZonedEnvironDeriveAvailabilityZonesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironDeriveAvailabilityZonesCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) ([]string, error)) *MockZonedEnvironDeriveAvailabilityZonesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -204,9 +444,33 @@ func (m *MockZonedEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockZonedEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Destroy(arg0 any) *MockZonedEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockZonedEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockZonedEnviron)(nil).Destroy), arg0) + return &MockZonedEnvironDestroyCall{Call: call} +} + +// MockZonedEnvironDestroyCall wrap *gomock.Call +type MockZonedEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironDestroyCall) Return(arg0 error) *MockZonedEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockZonedEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockZonedEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -218,9 +482,33 @@ func (m *MockZonedEnviron) DestroyController(arg0 envcontext.ProviderCallContext } // DestroyController indicates an expected call of DestroyController. -func (mr *MockZonedEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockZonedEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockZonedEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockZonedEnviron)(nil).DestroyController), arg0, arg1) + return &MockZonedEnvironDestroyControllerCall{Call: call} +} + +// MockZonedEnvironDestroyControllerCall wrap *gomock.Call +type MockZonedEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironDestroyControllerCall) Return(arg0 error) *MockZonedEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockZonedEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockZonedEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceAvailabilityZoneNames mocks base method. @@ -233,9 +521,33 @@ func (m *MockZonedEnviron) InstanceAvailabilityZoneNames(arg0 envcontext.Provide } // InstanceAvailabilityZoneNames indicates an expected call of InstanceAvailabilityZoneNames. -func (mr *MockZonedEnvironMockRecorder) InstanceAvailabilityZoneNames(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) InstanceAvailabilityZoneNames(arg0, arg1 any) *MockZonedEnvironInstanceAvailabilityZoneNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceAvailabilityZoneNames", reflect.TypeOf((*MockZonedEnviron)(nil).InstanceAvailabilityZoneNames), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceAvailabilityZoneNames", reflect.TypeOf((*MockZonedEnviron)(nil).InstanceAvailabilityZoneNames), arg0, arg1) + return &MockZonedEnvironInstanceAvailabilityZoneNamesCall{Call: call} +} + +// MockZonedEnvironInstanceAvailabilityZoneNamesCall wrap *gomock.Call +type MockZonedEnvironInstanceAvailabilityZoneNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironInstanceAvailabilityZoneNamesCall) Return(arg0 map[instance.Id]string, arg1 error) *MockZonedEnvironInstanceAvailabilityZoneNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironInstanceAvailabilityZoneNamesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) (map[instance.Id]string, error)) *MockZonedEnvironInstanceAvailabilityZoneNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironInstanceAvailabilityZoneNamesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) (map[instance.Id]string, error)) *MockZonedEnvironInstanceAvailabilityZoneNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -248,9 +560,33 @@ func (m *MockZonedEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, ar } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockZonedEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockZonedEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockZonedEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockZonedEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockZonedEnvironInstanceTypesCall{Call: call} +} + +// MockZonedEnvironInstanceTypesCall wrap *gomock.Call +type MockZonedEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockZonedEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockZonedEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockZonedEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -263,9 +599,33 @@ func (m *MockZonedEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 [ } // Instances indicates an expected call of Instances. -func (mr *MockZonedEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Instances(arg0, arg1 any) *MockZonedEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockZonedEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockZonedEnviron)(nil).Instances), arg0, arg1) + return &MockZonedEnvironInstancesCall{Call: call} +} + +// MockZonedEnvironInstancesCall wrap *gomock.Call +type MockZonedEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockZonedEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockZonedEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockZonedEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -277,9 +637,33 @@ func (m *MockZonedEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockZonedEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockZonedEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockZonedEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockZonedEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockZonedEnvironPrecheckInstanceCall{Call: call} +} + +// MockZonedEnvironPrecheckInstanceCall wrap *gomock.Call +type MockZonedEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironPrecheckInstanceCall) Return(arg0 error) *MockZonedEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockZonedEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockZonedEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -291,9 +675,33 @@ func (m *MockZonedEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, a } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockZonedEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockZonedEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockZonedEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockZonedEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockZonedEnvironPrepareForBootstrapCall{Call: call} +} + +// MockZonedEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockZonedEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironPrepareForBootstrapCall) Return(arg0 error) *MockZonedEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockZonedEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockZonedEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -305,9 +713,33 @@ func (m *MockZonedEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockZonedEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) Provider() *MockZonedEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockZonedEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockZonedEnviron)(nil).Provider)) + return &MockZonedEnvironProviderCall{Call: call} +} + +// MockZonedEnvironProviderCall wrap *gomock.Call +type MockZonedEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockZonedEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockZonedEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockZonedEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -319,9 +751,33 @@ func (m *MockZonedEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) } // SetConfig indicates an expected call of SetConfig. -func (mr *MockZonedEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockZonedEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockZonedEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockZonedEnviron)(nil).SetConfig), arg0, arg1) + return &MockZonedEnvironSetConfigCall{Call: call} +} + +// MockZonedEnvironSetConfigCall wrap *gomock.Call +type MockZonedEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironSetConfigCall) Return(arg0 error) *MockZonedEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockZonedEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockZonedEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -334,9 +790,33 @@ func (m *MockZonedEnviron) StartInstance(arg0 envcontext.ProviderCallContext, ar } // StartInstance indicates an expected call of StartInstance. -func (mr *MockZonedEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockZonedEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockZonedEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockZonedEnviron)(nil).StartInstance), arg0, arg1) + return &MockZonedEnvironStartInstanceCall{Call: call} +} + +// MockZonedEnvironStartInstanceCall wrap *gomock.Call +type MockZonedEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockZonedEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockZonedEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockZonedEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -352,10 +832,34 @@ func (m *MockZonedEnviron) StopInstances(arg0 envcontext.ProviderCallContext, ar } // StopInstances indicates an expected call of StopInstances. -func (mr *MockZonedEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockZonedEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockZonedEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockZonedEnviron)(nil).StopInstances), varargs...) + return &MockZonedEnvironStopInstancesCall{Call: call} +} + +// MockZonedEnvironStopInstancesCall wrap *gomock.Call +type MockZonedEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironStopInstancesCall) Return(arg0 error) *MockZonedEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockZonedEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockZonedEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -368,9 +872,33 @@ func (m *MockZonedEnviron) StorageProvider(arg0 storage.ProviderType) (storage.P } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockZonedEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) StorageProvider(arg0 any) *MockZonedEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockZonedEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockZonedEnviron)(nil).StorageProvider), arg0) + return &MockZonedEnvironStorageProviderCall{Call: call} +} + +// MockZonedEnvironStorageProviderCall wrap *gomock.Call +type MockZonedEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockZonedEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockZonedEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockZonedEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -383,7 +911,31 @@ func (m *MockZonedEnviron) StorageProviderTypes() ([]storage.ProviderType, error } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockZonedEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockZonedEnvironMockRecorder) StorageProviderTypes() *MockZonedEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockZonedEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockZonedEnviron)(nil).StorageProviderTypes)) + return &MockZonedEnvironStorageProviderTypesCall{Call: call} +} + +// MockZonedEnvironStorageProviderTypesCall wrap *gomock.Call +type MockZonedEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockZonedEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockZonedEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockZonedEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockZonedEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockZonedEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockZonedEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/common/package_test.go b/internal/provider/common/package_test.go index 232ffb4d0ce..0433db2d7e0 100644 --- a/internal/provider/common/package_test.go +++ b/internal/provider/common/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/zoned_environ.go github.com/juju/juju/internal/provider/common ZonedEnviron -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/instance_configurator.go github.com/juju/juju/internal/provider/common InstanceConfigurator -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/availability_zone.go github.com/juju/juju/core/network AvailabilityZone +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/zoned_environ.go github.com/juju/juju/internal/provider/common ZonedEnviron +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/instance_configurator.go github.com/juju/juju/internal/provider/common InstanceConfigurator +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/availability_zone.go github.com/juju/juju/core/network AvailabilityZone func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/provider/equinix/environ.go b/internal/provider/equinix/environ.go index 2bc789f7081..8b9810035e3 100644 --- a/internal/provider/equinix/environ.go +++ b/internal/provider/equinix/environ.go @@ -42,7 +42,7 @@ import ( "github.com/juju/juju/internal/storage" ) -//go:generate go run go.uber.org/mock/mockgen -destination ./mocks/packngo.go -package mocks github.com/packethost/packngo DeviceService,OSService,PlanService,ProjectIPService +//go:generate go run go.uber.org/mock/mockgen -typed -destination ./mocks/packngo.go -package mocks github.com/packethost/packngo DeviceService,OSService,PlanService,ProjectIPService var logger = loggo.GetLogger("juju.provider.equinix") diff --git a/internal/provider/equinix/mocks/packngo.go b/internal/provider/equinix/mocks/packngo.go index 2764394ec42..ea5d8e194a2 100644 --- a/internal/provider/equinix/mocks/packngo.go +++ b/internal/provider/equinix/mocks/packngo.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -destination ./mocks/packngo.go -package mocks github.com/packethost/packngo DeviceService,OSService,PlanService,ProjectIPService +// mockgen -typed -destination ./mocks/packngo.go -package mocks github.com/packethost/packngo DeviceService,OSService,PlanService,ProjectIPService // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockDeviceService) Create(arg0 *packngo.DeviceCreateRequest) (*packngo. } // Create indicates an expected call of Create. -func (mr *MockDeviceServiceMockRecorder) Create(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Create(arg0 any) *MockDeviceServiceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDeviceService)(nil).Create), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDeviceService)(nil).Create), arg0) + return &MockDeviceServiceCreateCall{Call: call} +} + +// MockDeviceServiceCreateCall wrap *gomock.Call +type MockDeviceServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceCreateCall) Return(arg0 *packngo.Device, arg1 *packngo.Response, arg2 error) *MockDeviceServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceCreateCall) Do(f func(*packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceCreateCall) DoAndReturn(f func(*packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -65,9 +89,33 @@ func (m *MockDeviceService) Delete(arg0 string, arg1 bool) (*packngo.Response, e } // Delete indicates an expected call of Delete. -func (mr *MockDeviceServiceMockRecorder) Delete(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Delete(arg0, arg1 any) *MockDeviceServiceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeviceService)(nil).Delete), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeviceService)(nil).Delete), arg0, arg1) + return &MockDeviceServiceDeleteCall{Call: call} +} + +// MockDeviceServiceDeleteCall wrap *gomock.Call +type MockDeviceServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceDeleteCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceDeleteCall) Do(f func(string, bool) (*packngo.Response, error)) *MockDeviceServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceDeleteCall) DoAndReturn(f func(string, bool) (*packngo.Response, error)) *MockDeviceServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -81,9 +129,33 @@ func (m *MockDeviceService) Get(arg0 string, arg1 *packngo.GetOptions) (*packngo } // Get indicates an expected call of Get. -func (mr *MockDeviceServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Get(arg0, arg1 any) *MockDeviceServiceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDeviceService)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDeviceService)(nil).Get), arg0, arg1) + return &MockDeviceServiceGetCall{Call: call} +} + +// MockDeviceServiceGetCall wrap *gomock.Call +type MockDeviceServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceGetCall) Return(arg0 *packngo.Device, arg1 *packngo.Response, arg2 error) *MockDeviceServiceGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceGetCall) Do(f func(string, *packngo.GetOptions) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceGetCall) DoAndReturn(f func(string, *packngo.GetOptions) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBandwidth mocks base method. @@ -97,9 +169,33 @@ func (m *MockDeviceService) GetBandwidth(arg0 string, arg1 *packngo.BandwidthOpt } // GetBandwidth indicates an expected call of GetBandwidth. -func (mr *MockDeviceServiceMockRecorder) GetBandwidth(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) GetBandwidth(arg0, arg1 any) *MockDeviceServiceGetBandwidthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBandwidth", reflect.TypeOf((*MockDeviceService)(nil).GetBandwidth), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBandwidth", reflect.TypeOf((*MockDeviceService)(nil).GetBandwidth), arg0, arg1) + return &MockDeviceServiceGetBandwidthCall{Call: call} +} + +// MockDeviceServiceGetBandwidthCall wrap *gomock.Call +type MockDeviceServiceGetBandwidthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceGetBandwidthCall) Return(arg0 *packngo.BandwidthIO, arg1 *packngo.Response, arg2 error) *MockDeviceServiceGetBandwidthCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceGetBandwidthCall) Do(f func(string, *packngo.BandwidthOpts) (*packngo.BandwidthIO, *packngo.Response, error)) *MockDeviceServiceGetBandwidthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceGetBandwidthCall) DoAndReturn(f func(string, *packngo.BandwidthOpts) (*packngo.BandwidthIO, *packngo.Response, error)) *MockDeviceServiceGetBandwidthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -113,9 +209,33 @@ func (m *MockDeviceService) List(arg0 string, arg1 *packngo.GetOptions) ([]packn } // List indicates an expected call of List. -func (mr *MockDeviceServiceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) List(arg0, arg1 any) *MockDeviceServiceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDeviceService)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDeviceService)(nil).List), arg0, arg1) + return &MockDeviceServiceListCall{Call: call} +} + +// MockDeviceServiceListCall wrap *gomock.Call +type MockDeviceServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceListCall) Return(arg0 []packngo.Device, arg1 *packngo.Response, arg2 error) *MockDeviceServiceListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceListCall) Do(f func(string, *packngo.GetOptions) ([]packngo.Device, *packngo.Response, error)) *MockDeviceServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceListCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.Device, *packngo.Response, error)) *MockDeviceServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListBGPNeighbors mocks base method. @@ -129,9 +249,33 @@ func (m *MockDeviceService) ListBGPNeighbors(arg0 string, arg1 *packngo.GetOptio } // ListBGPNeighbors indicates an expected call of ListBGPNeighbors. -func (mr *MockDeviceServiceMockRecorder) ListBGPNeighbors(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) ListBGPNeighbors(arg0, arg1 any) *MockDeviceServiceListBGPNeighborsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBGPNeighbors", reflect.TypeOf((*MockDeviceService)(nil).ListBGPNeighbors), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBGPNeighbors", reflect.TypeOf((*MockDeviceService)(nil).ListBGPNeighbors), arg0, arg1) + return &MockDeviceServiceListBGPNeighborsCall{Call: call} +} + +// MockDeviceServiceListBGPNeighborsCall wrap *gomock.Call +type MockDeviceServiceListBGPNeighborsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceListBGPNeighborsCall) Return(arg0 []packngo.BGPNeighbor, arg1 *packngo.Response, arg2 error) *MockDeviceServiceListBGPNeighborsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceListBGPNeighborsCall) Do(f func(string, *packngo.GetOptions) ([]packngo.BGPNeighbor, *packngo.Response, error)) *MockDeviceServiceListBGPNeighborsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceListBGPNeighborsCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.BGPNeighbor, *packngo.Response, error)) *MockDeviceServiceListBGPNeighborsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListBGPSessions mocks base method. @@ -145,9 +289,33 @@ func (m *MockDeviceService) ListBGPSessions(arg0 string, arg1 *packngo.GetOption } // ListBGPSessions indicates an expected call of ListBGPSessions. -func (mr *MockDeviceServiceMockRecorder) ListBGPSessions(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) ListBGPSessions(arg0, arg1 any) *MockDeviceServiceListBGPSessionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBGPSessions", reflect.TypeOf((*MockDeviceService)(nil).ListBGPSessions), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBGPSessions", reflect.TypeOf((*MockDeviceService)(nil).ListBGPSessions), arg0, arg1) + return &MockDeviceServiceListBGPSessionsCall{Call: call} +} + +// MockDeviceServiceListBGPSessionsCall wrap *gomock.Call +type MockDeviceServiceListBGPSessionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceListBGPSessionsCall) Return(arg0 []packngo.BGPSession, arg1 *packngo.Response, arg2 error) *MockDeviceServiceListBGPSessionsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceListBGPSessionsCall) Do(f func(string, *packngo.GetOptions) ([]packngo.BGPSession, *packngo.Response, error)) *MockDeviceServiceListBGPSessionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceListBGPSessionsCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.BGPSession, *packngo.Response, error)) *MockDeviceServiceListBGPSessionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListEvents mocks base method. @@ -161,9 +329,33 @@ func (m *MockDeviceService) ListEvents(arg0 string, arg1 *packngo.GetOptions) ([ } // ListEvents indicates an expected call of ListEvents. -func (mr *MockDeviceServiceMockRecorder) ListEvents(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) ListEvents(arg0, arg1 any) *MockDeviceServiceListEventsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListEvents", reflect.TypeOf((*MockDeviceService)(nil).ListEvents), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListEvents", reflect.TypeOf((*MockDeviceService)(nil).ListEvents), arg0, arg1) + return &MockDeviceServiceListEventsCall{Call: call} +} + +// MockDeviceServiceListEventsCall wrap *gomock.Call +type MockDeviceServiceListEventsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceListEventsCall) Return(arg0 []packngo.Event, arg1 *packngo.Response, arg2 error) *MockDeviceServiceListEventsCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceListEventsCall) Do(f func(string, *packngo.GetOptions) ([]packngo.Event, *packngo.Response, error)) *MockDeviceServiceListEventsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceListEventsCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.Event, *packngo.Response, error)) *MockDeviceServiceListEventsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Lock mocks base method. @@ -176,9 +368,33 @@ func (m *MockDeviceService) Lock(arg0 string) (*packngo.Response, error) { } // Lock indicates an expected call of Lock. -func (mr *MockDeviceServiceMockRecorder) Lock(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Lock(arg0 any) *MockDeviceServiceLockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockDeviceService)(nil).Lock), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockDeviceService)(nil).Lock), arg0) + return &MockDeviceServiceLockCall{Call: call} +} + +// MockDeviceServiceLockCall wrap *gomock.Call +type MockDeviceServiceLockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceLockCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServiceLockCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceLockCall) Do(f func(string) (*packngo.Response, error)) *MockDeviceServiceLockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceLockCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockDeviceServiceLockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PowerOff mocks base method. @@ -191,9 +407,33 @@ func (m *MockDeviceService) PowerOff(arg0 string) (*packngo.Response, error) { } // PowerOff indicates an expected call of PowerOff. -func (mr *MockDeviceServiceMockRecorder) PowerOff(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) PowerOff(arg0 any) *MockDeviceServicePowerOffCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOff", reflect.TypeOf((*MockDeviceService)(nil).PowerOff), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOff", reflect.TypeOf((*MockDeviceService)(nil).PowerOff), arg0) + return &MockDeviceServicePowerOffCall{Call: call} +} + +// MockDeviceServicePowerOffCall wrap *gomock.Call +type MockDeviceServicePowerOffCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServicePowerOffCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServicePowerOffCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServicePowerOffCall) Do(f func(string) (*packngo.Response, error)) *MockDeviceServicePowerOffCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServicePowerOffCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockDeviceServicePowerOffCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PowerOn mocks base method. @@ -206,9 +446,33 @@ func (m *MockDeviceService) PowerOn(arg0 string) (*packngo.Response, error) { } // PowerOn indicates an expected call of PowerOn. -func (mr *MockDeviceServiceMockRecorder) PowerOn(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) PowerOn(arg0 any) *MockDeviceServicePowerOnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOn", reflect.TypeOf((*MockDeviceService)(nil).PowerOn), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowerOn", reflect.TypeOf((*MockDeviceService)(nil).PowerOn), arg0) + return &MockDeviceServicePowerOnCall{Call: call} +} + +// MockDeviceServicePowerOnCall wrap *gomock.Call +type MockDeviceServicePowerOnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServicePowerOnCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServicePowerOnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServicePowerOnCall) Do(f func(string) (*packngo.Response, error)) *MockDeviceServicePowerOnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServicePowerOnCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockDeviceServicePowerOnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reboot mocks base method. @@ -221,9 +485,33 @@ func (m *MockDeviceService) Reboot(arg0 string) (*packngo.Response, error) { } // Reboot indicates an expected call of Reboot. -func (mr *MockDeviceServiceMockRecorder) Reboot(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Reboot(arg0 any) *MockDeviceServiceRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reboot", reflect.TypeOf((*MockDeviceService)(nil).Reboot), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reboot", reflect.TypeOf((*MockDeviceService)(nil).Reboot), arg0) + return &MockDeviceServiceRebootCall{Call: call} +} + +// MockDeviceServiceRebootCall wrap *gomock.Call +type MockDeviceServiceRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceRebootCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServiceRebootCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceRebootCall) Do(f func(string) (*packngo.Response, error)) *MockDeviceServiceRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceRebootCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockDeviceServiceRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reinstall mocks base method. @@ -236,9 +524,33 @@ func (m *MockDeviceService) Reinstall(arg0 string, arg1 *packngo.DeviceReinstall } // Reinstall indicates an expected call of Reinstall. -func (mr *MockDeviceServiceMockRecorder) Reinstall(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Reinstall(arg0, arg1 any) *MockDeviceServiceReinstallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reinstall", reflect.TypeOf((*MockDeviceService)(nil).Reinstall), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reinstall", reflect.TypeOf((*MockDeviceService)(nil).Reinstall), arg0, arg1) + return &MockDeviceServiceReinstallCall{Call: call} +} + +// MockDeviceServiceReinstallCall wrap *gomock.Call +type MockDeviceServiceReinstallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceReinstallCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServiceReinstallCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceReinstallCall) Do(f func(string, *packngo.DeviceReinstallFields) (*packngo.Response, error)) *MockDeviceServiceReinstallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceReinstallCall) DoAndReturn(f func(string, *packngo.DeviceReinstallFields) (*packngo.Response, error)) *MockDeviceServiceReinstallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -251,9 +563,33 @@ func (m *MockDeviceService) Unlock(arg0 string) (*packngo.Response, error) { } // Unlock indicates an expected call of Unlock. -func (mr *MockDeviceServiceMockRecorder) Unlock(arg0 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Unlock(arg0 any) *MockDeviceServiceUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockDeviceService)(nil).Unlock), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockDeviceService)(nil).Unlock), arg0) + return &MockDeviceServiceUnlockCall{Call: call} +} + +// MockDeviceServiceUnlockCall wrap *gomock.Call +type MockDeviceServiceUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceUnlockCall) Return(arg0 *packngo.Response, arg1 error) *MockDeviceServiceUnlockCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceUnlockCall) Do(f func(string) (*packngo.Response, error)) *MockDeviceServiceUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceUnlockCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockDeviceServiceUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -267,9 +603,33 @@ func (m *MockDeviceService) Update(arg0 string, arg1 *packngo.DeviceUpdateReques } // Update indicates an expected call of Update. -func (mr *MockDeviceServiceMockRecorder) Update(arg0, arg1 any) *gomock.Call { +func (mr *MockDeviceServiceMockRecorder) Update(arg0, arg1 any) *MockDeviceServiceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDeviceService)(nil).Update), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDeviceService)(nil).Update), arg0, arg1) + return &MockDeviceServiceUpdateCall{Call: call} +} + +// MockDeviceServiceUpdateCall wrap *gomock.Call +type MockDeviceServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDeviceServiceUpdateCall) Return(arg0 *packngo.Device, arg1 *packngo.Response, arg2 error) *MockDeviceServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDeviceServiceUpdateCall) Do(f func(string, *packngo.DeviceUpdateRequest) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDeviceServiceUpdateCall) DoAndReturn(f func(string, *packngo.DeviceUpdateRequest) (*packngo.Device, *packngo.Response, error)) *MockDeviceServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockOSService is a mock of OSService interface. @@ -306,9 +666,33 @@ func (m *MockOSService) List() ([]packngo.OS, *packngo.Response, error) { } // List indicates an expected call of List. -func (mr *MockOSServiceMockRecorder) List() *gomock.Call { +func (mr *MockOSServiceMockRecorder) List() *MockOSServiceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockOSService)(nil).List)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockOSService)(nil).List)) + return &MockOSServiceListCall{Call: call} +} + +// MockOSServiceListCall wrap *gomock.Call +type MockOSServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOSServiceListCall) Return(arg0 []packngo.OS, arg1 *packngo.Response, arg2 error) *MockOSServiceListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOSServiceListCall) Do(f func() ([]packngo.OS, *packngo.Response, error)) *MockOSServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOSServiceListCall) DoAndReturn(f func() ([]packngo.OS, *packngo.Response, error)) *MockOSServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPlanService is a mock of PlanService interface. @@ -345,9 +729,33 @@ func (m *MockPlanService) List(arg0 *packngo.GetOptions) ([]packngo.Plan, *packn } // List indicates an expected call of List. -func (mr *MockPlanServiceMockRecorder) List(arg0 any) *gomock.Call { +func (mr *MockPlanServiceMockRecorder) List(arg0 any) *MockPlanServiceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPlanService)(nil).List), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPlanService)(nil).List), arg0) + return &MockPlanServiceListCall{Call: call} +} + +// MockPlanServiceListCall wrap *gomock.Call +type MockPlanServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPlanServiceListCall) Return(arg0 []packngo.Plan, arg1 *packngo.Response, arg2 error) *MockPlanServiceListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPlanServiceListCall) Do(f func(*packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPlanServiceListCall) DoAndReturn(f func(*packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OrganizationList mocks base method. @@ -361,9 +769,33 @@ func (m *MockPlanService) OrganizationList(arg0 string, arg1 *packngo.GetOptions } // OrganizationList indicates an expected call of OrganizationList. -func (mr *MockPlanServiceMockRecorder) OrganizationList(arg0, arg1 any) *gomock.Call { +func (mr *MockPlanServiceMockRecorder) OrganizationList(arg0, arg1 any) *MockPlanServiceOrganizationListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrganizationList", reflect.TypeOf((*MockPlanService)(nil).OrganizationList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrganizationList", reflect.TypeOf((*MockPlanService)(nil).OrganizationList), arg0, arg1) + return &MockPlanServiceOrganizationListCall{Call: call} +} + +// MockPlanServiceOrganizationListCall wrap *gomock.Call +type MockPlanServiceOrganizationListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPlanServiceOrganizationListCall) Return(arg0 []packngo.Plan, arg1 *packngo.Response, arg2 error) *MockPlanServiceOrganizationListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPlanServiceOrganizationListCall) Do(f func(string, *packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceOrganizationListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPlanServiceOrganizationListCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceOrganizationListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProjectList mocks base method. @@ -377,9 +809,33 @@ func (m *MockPlanService) ProjectList(arg0 string, arg1 *packngo.GetOptions) ([] } // ProjectList indicates an expected call of ProjectList. -func (mr *MockPlanServiceMockRecorder) ProjectList(arg0, arg1 any) *gomock.Call { +func (mr *MockPlanServiceMockRecorder) ProjectList(arg0, arg1 any) *MockPlanServiceProjectListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectList", reflect.TypeOf((*MockPlanService)(nil).ProjectList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectList", reflect.TypeOf((*MockPlanService)(nil).ProjectList), arg0, arg1) + return &MockPlanServiceProjectListCall{Call: call} +} + +// MockPlanServiceProjectListCall wrap *gomock.Call +type MockPlanServiceProjectListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPlanServiceProjectListCall) Return(arg0 []packngo.Plan, arg1 *packngo.Response, arg2 error) *MockPlanServiceProjectListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPlanServiceProjectListCall) Do(f func(string, *packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceProjectListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPlanServiceProjectListCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.Plan, *packngo.Response, error)) *MockPlanServiceProjectListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProjectIPService is a mock of ProjectIPService interface. @@ -416,9 +872,33 @@ func (m *MockProjectIPService) AvailableAddresses(arg0 string, arg1 *packngo.Ava } // AvailableAddresses indicates an expected call of AvailableAddresses. -func (mr *MockProjectIPServiceMockRecorder) AvailableAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) AvailableAddresses(arg0, arg1 any) *MockProjectIPServiceAvailableAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailableAddresses", reflect.TypeOf((*MockProjectIPService)(nil).AvailableAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailableAddresses", reflect.TypeOf((*MockProjectIPService)(nil).AvailableAddresses), arg0, arg1) + return &MockProjectIPServiceAvailableAddressesCall{Call: call} +} + +// MockProjectIPServiceAvailableAddressesCall wrap *gomock.Call +type MockProjectIPServiceAvailableAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceAvailableAddressesCall) Return(arg0 []string, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceAvailableAddressesCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceAvailableAddressesCall) Do(f func(string, *packngo.AvailableRequest) ([]string, *packngo.Response, error)) *MockProjectIPServiceAvailableAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceAvailableAddressesCall) DoAndReturn(f func(string, *packngo.AvailableRequest) ([]string, *packngo.Response, error)) *MockProjectIPServiceAvailableAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -432,9 +912,33 @@ func (m *MockProjectIPService) Create(arg0 string, arg1 *packngo.IPReservationCr } // Create indicates an expected call of Create. -func (mr *MockProjectIPServiceMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Create(arg0, arg1 any) *MockProjectIPServiceCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProjectIPService)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProjectIPService)(nil).Create), arg0, arg1) + return &MockProjectIPServiceCreateCall{Call: call} +} + +// MockProjectIPServiceCreateCall wrap *gomock.Call +type MockProjectIPServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceCreateCall) Return(arg0 *packngo.IPAddressReservation, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceCreateCall) Do(f func(string, *packngo.IPReservationCreateRequest) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceCreateCall) DoAndReturn(f func(string, *packngo.IPReservationCreateRequest) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Delete mocks base method. @@ -447,9 +951,33 @@ func (m *MockProjectIPService) Delete(arg0 string) (*packngo.Response, error) { } // Delete indicates an expected call of Delete. -func (mr *MockProjectIPServiceMockRecorder) Delete(arg0 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Delete(arg0 any) *MockProjectIPServiceDeleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockProjectIPService)(nil).Delete), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockProjectIPService)(nil).Delete), arg0) + return &MockProjectIPServiceDeleteCall{Call: call} +} + +// MockProjectIPServiceDeleteCall wrap *gomock.Call +type MockProjectIPServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceDeleteCall) Return(arg0 *packngo.Response, arg1 error) *MockProjectIPServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceDeleteCall) Do(f func(string) (*packngo.Response, error)) *MockProjectIPServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceDeleteCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockProjectIPServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Get mocks base method. @@ -463,9 +991,33 @@ func (m *MockProjectIPService) Get(arg0 string, arg1 *packngo.GetOptions) (*pack } // Get indicates an expected call of Get. -func (mr *MockProjectIPServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Get(arg0, arg1 any) *MockProjectIPServiceGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockProjectIPService)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockProjectIPService)(nil).Get), arg0, arg1) + return &MockProjectIPServiceGetCall{Call: call} +} + +// MockProjectIPServiceGetCall wrap *gomock.Call +type MockProjectIPServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceGetCall) Return(arg0 *packngo.IPAddressReservation, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceGetCall) Do(f func(string, *packngo.GetOptions) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceGetCall) DoAndReturn(f func(string, *packngo.GetOptions) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // List mocks base method. @@ -479,9 +1031,33 @@ func (m *MockProjectIPService) List(arg0 string, arg1 *packngo.GetOptions) ([]pa } // List indicates an expected call of List. -func (mr *MockProjectIPServiceMockRecorder) List(arg0, arg1 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) List(arg0, arg1 any) *MockProjectIPServiceListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockProjectIPService)(nil).List), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockProjectIPService)(nil).List), arg0, arg1) + return &MockProjectIPServiceListCall{Call: call} +} + +// MockProjectIPServiceListCall wrap *gomock.Call +type MockProjectIPServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceListCall) Return(arg0 []packngo.IPAddressReservation, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceListCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceListCall) Do(f func(string, *packngo.GetOptions) ([]packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceListCall) DoAndReturn(f func(string, *packngo.GetOptions) ([]packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -494,9 +1070,33 @@ func (m *MockProjectIPService) Remove(arg0 string) (*packngo.Response, error) { } // Remove indicates an expected call of Remove. -func (mr *MockProjectIPServiceMockRecorder) Remove(arg0 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Remove(arg0 any) *MockProjectIPServiceRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockProjectIPService)(nil).Remove), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockProjectIPService)(nil).Remove), arg0) + return &MockProjectIPServiceRemoveCall{Call: call} +} + +// MockProjectIPServiceRemoveCall wrap *gomock.Call +type MockProjectIPServiceRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceRemoveCall) Return(arg0 *packngo.Response, arg1 error) *MockProjectIPServiceRemoveCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceRemoveCall) Do(f func(string) (*packngo.Response, error)) *MockProjectIPServiceRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceRemoveCall) DoAndReturn(f func(string) (*packngo.Response, error)) *MockProjectIPServiceRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Request mocks base method. @@ -510,9 +1110,33 @@ func (m *MockProjectIPService) Request(arg0 string, arg1 *packngo.IPReservationC } // Request indicates an expected call of Request. -func (mr *MockProjectIPServiceMockRecorder) Request(arg0, arg1 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Request(arg0, arg1 any) *MockProjectIPServiceRequestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockProjectIPService)(nil).Request), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockProjectIPService)(nil).Request), arg0, arg1) + return &MockProjectIPServiceRequestCall{Call: call} +} + +// MockProjectIPServiceRequestCall wrap *gomock.Call +type MockProjectIPServiceRequestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceRequestCall) Return(arg0 *packngo.IPAddressReservation, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceRequestCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceRequestCall) Do(f func(string, *packngo.IPReservationCreateRequest) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceRequestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceRequestCall) DoAndReturn(f func(string, *packngo.IPReservationCreateRequest) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceRequestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Update mocks base method. @@ -526,7 +1150,31 @@ func (m *MockProjectIPService) Update(arg0 string, arg1 *packngo.IPAddressUpdate } // Update indicates an expected call of Update. -func (mr *MockProjectIPServiceMockRecorder) Update(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProjectIPServiceMockRecorder) Update(arg0, arg1, arg2 any) *MockProjectIPServiceUpdateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockProjectIPService)(nil).Update), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockProjectIPService)(nil).Update), arg0, arg1, arg2) + return &MockProjectIPServiceUpdateCall{Call: call} +} + +// MockProjectIPServiceUpdateCall wrap *gomock.Call +type MockProjectIPServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectIPServiceUpdateCall) Return(arg0 *packngo.IPAddressReservation, arg1 *packngo.Response, arg2 error) *MockProjectIPServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectIPServiceUpdateCall) Do(f func(string, *packngo.IPAddressUpdateRequest, *packngo.GetOptions) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectIPServiceUpdateCall) DoAndReturn(f func(string, *packngo.IPAddressUpdateRequest, *packngo.GetOptions) (*packngo.IPAddressReservation, *packngo.Response, error)) *MockProjectIPServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/lxd/credentials_test.go b/internal/provider/lxd/credentials_test.go index 092a207a8f7..fcf68396b07 100644 --- a/internal/provider/lxd/credentials_test.go +++ b/internal/provider/lxd/credentials_test.go @@ -28,7 +28,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package lxd -destination net_mock_test.go net Addr +//go:generate go run go.uber.org/mock/mockgen -typed -package lxd -destination net_mock_test.go net Addr type credentialsSuite struct { lxd.BaseSuite diff --git a/internal/provider/lxd/net_mock_test.go b/internal/provider/lxd/net_mock_test.go index aea2fc64cf2..cc92a5c1918 100644 --- a/internal/provider/lxd/net_mock_test.go +++ b/internal/provider/lxd/net_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lxd -destination net_mock_test.go net Addr +// mockgen -typed -package lxd -destination net_mock_test.go net Addr // // Package lxd is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockAddr) Network() string { } // Network indicates an expected call of Network. -func (mr *MockAddrMockRecorder) Network() *gomock.Call { +func (mr *MockAddrMockRecorder) Network() *MockAddrNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockAddr)(nil).Network)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockAddr)(nil).Network)) + return &MockAddrNetworkCall{Call: call} +} + +// MockAddrNetworkCall wrap *gomock.Call +type MockAddrNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddrNetworkCall) Return(arg0 string) *MockAddrNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddrNetworkCall) Do(f func() string) *MockAddrNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddrNetworkCall) DoAndReturn(f func() string) *MockAddrNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -61,7 +85,31 @@ func (m *MockAddr) String() string { } // String indicates an expected call of String. -func (mr *MockAddrMockRecorder) String() *gomock.Call { +func (mr *MockAddrMockRecorder) String() *MockAddrStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockAddr)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockAddr)(nil).String)) + return &MockAddrStringCall{Call: call} +} + +// MockAddrStringCall wrap *gomock.Call +type MockAddrStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAddrStringCall) Return(arg0 string) *MockAddrStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAddrStringCall) Do(f func() string) *MockAddrStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAddrStringCall) DoAndReturn(f func() string) *MockAddrStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/lxd/package_mock_test.go b/internal/provider/lxd/package_mock_test.go index 47ec223d87d..2db560ba256 100644 --- a/internal/provider/lxd/package_mock_test.go +++ b/internal/provider/lxd/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lxd -destination package_mock_test.go github.com/juju/juju/internal/provider/lxd Server,ServerFactory,InterfaceAddress,CertificateReadWriter,CertificateGenerator,LXCConfigReader +// mockgen -typed -package lxd -destination package_mock_test.go github.com/juju/juju/internal/provider/lxd Server,ServerFactory,InterfaceAddress,CertificateReadWriter,CertificateGenerator,LXCConfigReader // // Package lxd is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockServer) AliveContainers(arg0 string) ([]lxd0.Container, error) { } // AliveContainers indicates an expected call of AliveContainers. -func (mr *MockServerMockRecorder) AliveContainers(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) AliveContainers(arg0 any) *MockServerAliveContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveContainers", reflect.TypeOf((*MockServer)(nil).AliveContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveContainers", reflect.TypeOf((*MockServer)(nil).AliveContainers), arg0) + return &MockServerAliveContainersCall{Call: call} +} + +// MockServerAliveContainersCall wrap *gomock.Call +type MockServerAliveContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerAliveContainersCall) Return(arg0 []lxd0.Container, arg1 error) *MockServerAliveContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerAliveContainersCall) Do(f func(string) ([]lxd0.Container, error)) *MockServerAliveContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerAliveContainersCall) DoAndReturn(f func(string) ([]lxd0.Container, error)) *MockServerAliveContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerAddresses mocks base method. @@ -71,9 +95,33 @@ func (m *MockServer) ContainerAddresses(arg0 string) ([]network.ProviderAddress, } // ContainerAddresses indicates an expected call of ContainerAddresses. -func (mr *MockServerMockRecorder) ContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) ContainerAddresses(arg0 any) *MockServerContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerAddresses", reflect.TypeOf((*MockServer)(nil).ContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerAddresses", reflect.TypeOf((*MockServer)(nil).ContainerAddresses), arg0) + return &MockServerContainerAddressesCall{Call: call} +} + +// MockServerContainerAddressesCall wrap *gomock.Call +type MockServerContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerContainerAddressesCall) Return(arg0 []network.ProviderAddress, arg1 error) *MockServerContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerContainerAddressesCall) Do(f func(string) ([]network.ProviderAddress, error)) *MockServerContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerContainerAddressesCall) DoAndReturn(f func(string) ([]network.ProviderAddress, error)) *MockServerContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCertificate mocks base method. @@ -85,9 +133,33 @@ func (m *MockServer) CreateCertificate(arg0 api.CertificatesPost) error { } // CreateCertificate indicates an expected call of CreateCertificate. -func (mr *MockServerMockRecorder) CreateCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateCertificate(arg0 any) *MockServerCreateCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockServer)(nil).CreateCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockServer)(nil).CreateCertificate), arg0) + return &MockServerCreateCertificateCall{Call: call} +} + +// MockServerCreateCertificateCall wrap *gomock.Call +type MockServerCreateCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateCertificateCall) Return(arg0 error) *MockServerCreateCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateCertificateCall) Do(f func(api.CertificatesPost) error) *MockServerCreateCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateCertificateCall) DoAndReturn(f func(api.CertificatesPost) error) *MockServerCreateCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateClientCertificate mocks base method. @@ -99,9 +171,33 @@ func (m *MockServer) CreateClientCertificate(arg0 *lxd0.Certificate) error { } // CreateClientCertificate indicates an expected call of CreateClientCertificate. -func (mr *MockServerMockRecorder) CreateClientCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateClientCertificate(arg0 any) *MockServerCreateClientCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientCertificate", reflect.TypeOf((*MockServer)(nil).CreateClientCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientCertificate", reflect.TypeOf((*MockServer)(nil).CreateClientCertificate), arg0) + return &MockServerCreateClientCertificateCall{Call: call} +} + +// MockServerCreateClientCertificateCall wrap *gomock.Call +type MockServerCreateClientCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateClientCertificateCall) Return(arg0 error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateClientCertificateCall) Do(f func(*lxd0.Certificate) error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateClientCertificateCall) DoAndReturn(f func(*lxd0.Certificate) error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerFromSpec mocks base method. @@ -114,9 +210,33 @@ func (m *MockServer) CreateContainerFromSpec(arg0 lxd0.ContainerSpec) (*lxd0.Con } // CreateContainerFromSpec indicates an expected call of CreateContainerFromSpec. -func (mr *MockServerMockRecorder) CreateContainerFromSpec(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateContainerFromSpec(arg0 any) *MockServerCreateContainerFromSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromSpec", reflect.TypeOf((*MockServer)(nil).CreateContainerFromSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromSpec", reflect.TypeOf((*MockServer)(nil).CreateContainerFromSpec), arg0) + return &MockServerCreateContainerFromSpecCall{Call: call} +} + +// MockServerCreateContainerFromSpecCall wrap *gomock.Call +type MockServerCreateContainerFromSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateContainerFromSpecCall) Return(arg0 *lxd0.Container, arg1 error) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateContainerFromSpecCall) Do(f func(lxd0.ContainerSpec) (*lxd0.Container, error)) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateContainerFromSpecCall) DoAndReturn(f func(lxd0.ContainerSpec) (*lxd0.Container, error)) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePool mocks base method. @@ -128,9 +248,33 @@ func (m *MockServer) CreatePool(arg0, arg1 string, arg2 map[string]string) error } // CreatePool indicates an expected call of CreatePool. -func (mr *MockServerMockRecorder) CreatePool(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreatePool(arg0, arg1, arg2 any) *MockServerCreatePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePool", reflect.TypeOf((*MockServer)(nil).CreatePool), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePool", reflect.TypeOf((*MockServer)(nil).CreatePool), arg0, arg1, arg2) + return &MockServerCreatePoolCall{Call: call} +} + +// MockServerCreatePoolCall wrap *gomock.Call +type MockServerCreatePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreatePoolCall) Return(arg0 error) *MockServerCreatePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreatePoolCall) Do(f func(string, string, map[string]string) error) *MockServerCreatePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreatePoolCall) DoAndReturn(f func(string, string, map[string]string) error) *MockServerCreatePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProfile mocks base method. @@ -142,9 +286,33 @@ func (m *MockServer) CreateProfile(arg0 api.ProfilesPost) error { } // CreateProfile indicates an expected call of CreateProfile. -func (mr *MockServerMockRecorder) CreateProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateProfile(arg0 any) *MockServerCreateProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockServer)(nil).CreateProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockServer)(nil).CreateProfile), arg0) + return &MockServerCreateProfileCall{Call: call} +} + +// MockServerCreateProfileCall wrap *gomock.Call +type MockServerCreateProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateProfileCall) Return(arg0 error) *MockServerCreateProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateProfileCall) Do(f func(api.ProfilesPost) error) *MockServerCreateProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateProfileCall) DoAndReturn(f func(api.ProfilesPost) error) *MockServerCreateProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProfileWithConfig mocks base method. @@ -156,9 +324,33 @@ func (m *MockServer) CreateProfileWithConfig(arg0 string, arg1 map[string]string } // CreateProfileWithConfig indicates an expected call of CreateProfileWithConfig. -func (mr *MockServerMockRecorder) CreateProfileWithConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateProfileWithConfig(arg0, arg1 any) *MockServerCreateProfileWithConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfileWithConfig", reflect.TypeOf((*MockServer)(nil).CreateProfileWithConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfileWithConfig", reflect.TypeOf((*MockServer)(nil).CreateProfileWithConfig), arg0, arg1) + return &MockServerCreateProfileWithConfigCall{Call: call} +} + +// MockServerCreateProfileWithConfigCall wrap *gomock.Call +type MockServerCreateProfileWithConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateProfileWithConfigCall) Return(arg0 error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateProfileWithConfigCall) Do(f func(string, map[string]string) error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateProfileWithConfigCall) DoAndReturn(f func(string, map[string]string) error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateVolume mocks base method. @@ -170,9 +362,33 @@ func (m *MockServer) CreateVolume(arg0, arg1 string, arg2 map[string]string) err } // CreateVolume indicates an expected call of CreateVolume. -func (mr *MockServerMockRecorder) CreateVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateVolume(arg0, arg1, arg2 any) *MockServerCreateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockServer)(nil).CreateVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockServer)(nil).CreateVolume), arg0, arg1, arg2) + return &MockServerCreateVolumeCall{Call: call} +} + +// MockServerCreateVolumeCall wrap *gomock.Call +type MockServerCreateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateVolumeCall) Return(arg0 error) *MockServerCreateVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateVolumeCall) Do(f func(string, string, map[string]string) error) *MockServerCreateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateVolumeCall) DoAndReturn(f func(string, string, map[string]string) error) *MockServerCreateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCertificate mocks base method. @@ -184,9 +400,33 @@ func (m *MockServer) DeleteCertificate(arg0 string) error { } // DeleteCertificate indicates an expected call of DeleteCertificate. -func (mr *MockServerMockRecorder) DeleteCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteCertificate(arg0 any) *MockServerDeleteCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockServer)(nil).DeleteCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockServer)(nil).DeleteCertificate), arg0) + return &MockServerDeleteCertificateCall{Call: call} +} + +// MockServerDeleteCertificateCall wrap *gomock.Call +type MockServerDeleteCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteCertificateCall) Return(arg0 error) *MockServerDeleteCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteCertificateCall) Do(f func(string) error) *MockServerDeleteCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteCertificateCall) DoAndReturn(f func(string) error) *MockServerDeleteCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteProfile mocks base method. @@ -198,9 +438,33 @@ func (m *MockServer) DeleteProfile(arg0 string) error { } // DeleteProfile indicates an expected call of DeleteProfile. -func (mr *MockServerMockRecorder) DeleteProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteProfile(arg0 any) *MockServerDeleteProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockServer)(nil).DeleteProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockServer)(nil).DeleteProfile), arg0) + return &MockServerDeleteProfileCall{Call: call} +} + +// MockServerDeleteProfileCall wrap *gomock.Call +type MockServerDeleteProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteProfileCall) Return(arg0 error) *MockServerDeleteProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteProfileCall) Do(f func(string) error) *MockServerDeleteProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteProfileCall) DoAndReturn(f func(string) error) *MockServerDeleteProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolVolume mocks base method. @@ -212,9 +476,33 @@ func (m *MockServer) DeleteStoragePoolVolume(arg0, arg1, arg2 string) error { } // DeleteStoragePoolVolume indicates an expected call of DeleteStoragePoolVolume. -func (mr *MockServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *MockServerDeleteStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + return &MockServerDeleteStoragePoolVolumeCall{Call: call} +} + +// MockServerDeleteStoragePoolVolumeCall wrap *gomock.Call +type MockServerDeleteStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteStoragePoolVolumeCall) Return(arg0 error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteStoragePoolVolumeCall) Do(f func(string, string, string) error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableHTTPSListener mocks base method. @@ -226,9 +514,33 @@ func (m *MockServer) EnableHTTPSListener() error { } // EnableHTTPSListener indicates an expected call of EnableHTTPSListener. -func (mr *MockServerMockRecorder) EnableHTTPSListener() *gomock.Call { +func (mr *MockServerMockRecorder) EnableHTTPSListener() *MockServerEnableHTTPSListenerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableHTTPSListener", reflect.TypeOf((*MockServer)(nil).EnableHTTPSListener)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableHTTPSListener", reflect.TypeOf((*MockServer)(nil).EnableHTTPSListener)) + return &MockServerEnableHTTPSListenerCall{Call: call} +} + +// MockServerEnableHTTPSListenerCall wrap *gomock.Call +type MockServerEnableHTTPSListenerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerEnableHTTPSListenerCall) Return(arg0 error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerEnableHTTPSListenerCall) Do(f func() error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerEnableHTTPSListenerCall) DoAndReturn(f func() error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDefaultStorage mocks base method. @@ -240,9 +552,33 @@ func (m *MockServer) EnsureDefaultStorage(arg0 *api.Profile, arg1 string) error } // EnsureDefaultStorage indicates an expected call of EnsureDefaultStorage. -func (mr *MockServerMockRecorder) EnsureDefaultStorage(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) EnsureDefaultStorage(arg0, arg1 any) *MockServerEnsureDefaultStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDefaultStorage", reflect.TypeOf((*MockServer)(nil).EnsureDefaultStorage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDefaultStorage", reflect.TypeOf((*MockServer)(nil).EnsureDefaultStorage), arg0, arg1) + return &MockServerEnsureDefaultStorageCall{Call: call} +} + +// MockServerEnsureDefaultStorageCall wrap *gomock.Call +type MockServerEnsureDefaultStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerEnsureDefaultStorageCall) Return(arg0 error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerEnsureDefaultStorageCall) Do(f func(*api.Profile, string) error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerEnsureDefaultStorageCall) DoAndReturn(f func(*api.Profile, string) error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FilterContainers mocks base method. @@ -259,10 +595,34 @@ func (m *MockServer) FilterContainers(arg0 string, arg1 ...string) ([]lxd0.Conta } // FilterContainers indicates an expected call of FilterContainers. -func (mr *MockServerMockRecorder) FilterContainers(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockServerMockRecorder) FilterContainers(arg0 any, arg1 ...any) *MockServerFilterContainersCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterContainers", reflect.TypeOf((*MockServer)(nil).FilterContainers), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterContainers", reflect.TypeOf((*MockServer)(nil).FilterContainers), varargs...) + return &MockServerFilterContainersCall{Call: call} +} + +// MockServerFilterContainersCall wrap *gomock.Call +type MockServerFilterContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFilterContainersCall) Return(arg0 []lxd0.Container, arg1 error) *MockServerFilterContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFilterContainersCall) Do(f func(string, ...string) ([]lxd0.Container, error)) *MockServerFilterContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFilterContainersCall) DoAndReturn(f func(string, ...string) ([]lxd0.Container, error)) *MockServerFilterContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindImage mocks base method. @@ -275,9 +635,33 @@ func (m *MockServer) FindImage(arg0 context.Context, arg1 base.Base, arg2 string } // FindImage indicates an expected call of FindImage. -func (mr *MockServerMockRecorder) FindImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockServerMockRecorder) FindImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockServerFindImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindImage", reflect.TypeOf((*MockServer)(nil).FindImage), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindImage", reflect.TypeOf((*MockServer)(nil).FindImage), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockServerFindImageCall{Call: call} +} + +// MockServerFindImageCall wrap *gomock.Call +type MockServerFindImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFindImageCall) Return(arg0 lxd0.SourcedImage, arg1 error) *MockServerFindImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFindImageCall) Do(f func(context.Context, base.Base, string, instance.VirtType, []lxd0.ServerSpec, bool, environs.StatusCallbackFunc) (lxd0.SourcedImage, error)) *MockServerFindImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFindImageCall) DoAndReturn(f func(context.Context, base.Base, string, instance.VirtType, []lxd0.ServerSpec, bool, environs.StatusCallbackFunc) (lxd0.SourcedImage, error)) *MockServerFindImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCertificate mocks base method. @@ -291,9 +675,33 @@ func (m *MockServer) GetCertificate(arg0 string) (*api.Certificate, string, erro } // GetCertificate indicates an expected call of GetCertificate. -func (mr *MockServerMockRecorder) GetCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetCertificate(arg0 any) *MockServerGetCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockServer)(nil).GetCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockServer)(nil).GetCertificate), arg0) + return &MockServerGetCertificateCall{Call: call} +} + +// MockServerGetCertificateCall wrap *gomock.Call +type MockServerGetCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetCertificateCall) Return(arg0 *api.Certificate, arg1 string, arg2 error) *MockServerGetCertificateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetCertificateCall) Do(f func(string) (*api.Certificate, string, error)) *MockServerGetCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetCertificateCall) DoAndReturn(f func(string) (*api.Certificate, string, error)) *MockServerGetCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMembers mocks base method. @@ -306,9 +714,33 @@ func (m *MockServer) GetClusterMembers() ([]api.ClusterMember, error) { } // GetClusterMembers indicates an expected call of GetClusterMembers. -func (mr *MockServerMockRecorder) GetClusterMembers() *gomock.Call { +func (mr *MockServerMockRecorder) GetClusterMembers() *MockServerGetClusterMembersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockServer)(nil).GetClusterMembers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockServer)(nil).GetClusterMembers)) + return &MockServerGetClusterMembersCall{Call: call} +} + +// MockServerGetClusterMembersCall wrap *gomock.Call +type MockServerGetClusterMembersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetClusterMembersCall) Return(arg0 []api.ClusterMember, arg1 error) *MockServerGetClusterMembersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetClusterMembersCall) Do(f func() ([]api.ClusterMember, error)) *MockServerGetClusterMembersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetClusterMembersCall) DoAndReturn(f func() ([]api.ClusterMember, error)) *MockServerGetClusterMembersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConnectionInfo mocks base method. @@ -321,9 +753,33 @@ func (m *MockServer) GetConnectionInfo() (*lxd.ConnectionInfo, error) { } // GetConnectionInfo indicates an expected call of GetConnectionInfo. -func (mr *MockServerMockRecorder) GetConnectionInfo() *gomock.Call { +func (mr *MockServerMockRecorder) GetConnectionInfo() *MockServerGetConnectionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + return &MockServerGetConnectionInfoCall{Call: call} +} + +// MockServerGetConnectionInfoCall wrap *gomock.Call +type MockServerGetConnectionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetConnectionInfoCall) Return(arg0 *lxd.ConnectionInfo, arg1 error) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetConnectionInfoCall) Do(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetConnectionInfoCall) DoAndReturn(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerProfiles mocks base method. @@ -336,9 +792,33 @@ func (m *MockServer) GetContainerProfiles(arg0 string) ([]string, error) { } // GetContainerProfiles indicates an expected call of GetContainerProfiles. -func (mr *MockServerMockRecorder) GetContainerProfiles(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetContainerProfiles(arg0 any) *MockServerGetContainerProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfiles", reflect.TypeOf((*MockServer)(nil).GetContainerProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfiles", reflect.TypeOf((*MockServer)(nil).GetContainerProfiles), arg0) + return &MockServerGetContainerProfilesCall{Call: call} +} + +// MockServerGetContainerProfilesCall wrap *gomock.Call +type MockServerGetContainerProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetContainerProfilesCall) Return(arg0 []string, arg1 error) *MockServerGetContainerProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetContainerProfilesCall) Do(f func(string) ([]string, error)) *MockServerGetContainerProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetContainerProfilesCall) DoAndReturn(f func(string) ([]string, error)) *MockServerGetContainerProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstance mocks base method. @@ -352,9 +832,33 @@ func (m *MockServer) GetInstance(arg0 string) (*api.Instance, string, error) { } // GetInstance indicates an expected call of GetInstance. -func (mr *MockServerMockRecorder) GetInstance(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetInstance(arg0 any) *MockServerGetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockServer)(nil).GetInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockServer)(nil).GetInstance), arg0) + return &MockServerGetInstanceCall{Call: call} +} + +// MockServerGetInstanceCall wrap *gomock.Call +type MockServerGetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetInstanceCall) Return(arg0 *api.Instance, arg1 string, arg2 error) *MockServerGetInstanceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetInstanceCall) Do(f func(string) (*api.Instance, string, error)) *MockServerGetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetInstanceCall) DoAndReturn(f func(string) (*api.Instance, string, error)) *MockServerGetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceState mocks base method. @@ -368,9 +872,33 @@ func (m *MockServer) GetInstanceState(arg0 string) (*api.InstanceState, string, } // GetInstanceState indicates an expected call of GetInstanceState. -func (mr *MockServerMockRecorder) GetInstanceState(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetInstanceState(arg0 any) *MockServerGetInstanceStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockServer)(nil).GetInstanceState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockServer)(nil).GetInstanceState), arg0) + return &MockServerGetInstanceStateCall{Call: call} +} + +// MockServerGetInstanceStateCall wrap *gomock.Call +type MockServerGetInstanceStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetInstanceStateCall) Return(arg0 *api.InstanceState, arg1 string, arg2 error) *MockServerGetInstanceStateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetInstanceStateCall) Do(f func(string) (*api.InstanceState, string, error)) *MockServerGetInstanceStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetInstanceStateCall) DoAndReturn(f func(string) (*api.InstanceState, string, error)) *MockServerGetInstanceStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNICsFromProfile mocks base method. @@ -383,9 +911,33 @@ func (m *MockServer) GetNICsFromProfile(arg0 string) (map[string]map[string]stri } // GetNICsFromProfile indicates an expected call of GetNICsFromProfile. -func (mr *MockServerMockRecorder) GetNICsFromProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetNICsFromProfile(arg0 any) *MockServerGetNICsFromProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNICsFromProfile", reflect.TypeOf((*MockServer)(nil).GetNICsFromProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNICsFromProfile", reflect.TypeOf((*MockServer)(nil).GetNICsFromProfile), arg0) + return &MockServerGetNICsFromProfileCall{Call: call} +} + +// MockServerGetNICsFromProfileCall wrap *gomock.Call +type MockServerGetNICsFromProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNICsFromProfileCall) Return(arg0 map[string]map[string]string, arg1 error) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNICsFromProfileCall) Do(f func(string) (map[string]map[string]string, error)) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNICsFromProfileCall) DoAndReturn(f func(string) (map[string]map[string]string, error)) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkState mocks base method. @@ -398,9 +950,33 @@ func (m *MockServer) GetNetworkState(arg0 string) (*api.NetworkState, error) { } // GetNetworkState indicates an expected call of GetNetworkState. -func (mr *MockServerMockRecorder) GetNetworkState(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetNetworkState(arg0 any) *MockServerGetNetworkStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockServer)(nil).GetNetworkState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockServer)(nil).GetNetworkState), arg0) + return &MockServerGetNetworkStateCall{Call: call} +} + +// MockServerGetNetworkStateCall wrap *gomock.Call +type MockServerGetNetworkStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNetworkStateCall) Return(arg0 *api.NetworkState, arg1 error) *MockServerGetNetworkStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNetworkStateCall) Do(f func(string) (*api.NetworkState, error)) *MockServerGetNetworkStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNetworkStateCall) DoAndReturn(f func(string) (*api.NetworkState, error)) *MockServerGetNetworkStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworks mocks base method. @@ -413,9 +989,33 @@ func (m *MockServer) GetNetworks() ([]api.Network, error) { } // GetNetworks indicates an expected call of GetNetworks. -func (mr *MockServerMockRecorder) GetNetworks() *gomock.Call { +func (mr *MockServerMockRecorder) GetNetworks() *MockServerGetNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockServer)(nil).GetNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockServer)(nil).GetNetworks)) + return &MockServerGetNetworksCall{Call: call} +} + +// MockServerGetNetworksCall wrap *gomock.Call +type MockServerGetNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNetworksCall) Return(arg0 []api.Network, arg1 error) *MockServerGetNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNetworksCall) Do(f func() ([]api.Network, error)) *MockServerGetNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNetworksCall) DoAndReturn(f func() ([]api.Network, error)) *MockServerGetNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProfile mocks base method. @@ -429,9 +1029,33 @@ func (m *MockServer) GetProfile(arg0 string) (*api.Profile, string, error) { } // GetProfile indicates an expected call of GetProfile. -func (mr *MockServerMockRecorder) GetProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetProfile(arg0 any) *MockServerGetProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockServer)(nil).GetProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockServer)(nil).GetProfile), arg0) + return &MockServerGetProfileCall{Call: call} +} + +// MockServerGetProfileCall wrap *gomock.Call +type MockServerGetProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetProfileCall) Return(arg0 *api.Profile, arg1 string, arg2 error) *MockServerGetProfileCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetProfileCall) Do(f func(string) (*api.Profile, string, error)) *MockServerGetProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetProfileCall) DoAndReturn(f func(string) (*api.Profile, string, error)) *MockServerGetProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetServer mocks base method. @@ -445,9 +1069,33 @@ func (m *MockServer) GetServer() (*api.Server, string, error) { } // GetServer indicates an expected call of GetServer. -func (mr *MockServerMockRecorder) GetServer() *gomock.Call { +func (mr *MockServerMockRecorder) GetServer() *MockServerGetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockServer)(nil).GetServer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockServer)(nil).GetServer)) + return &MockServerGetServerCall{Call: call} +} + +// MockServerGetServerCall wrap *gomock.Call +type MockServerGetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetServerCall) Return(arg0 *api.Server, arg1 string, arg2 error) *MockServerGetServerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetServerCall) Do(f func() (*api.Server, string, error)) *MockServerGetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetServerCall) DoAndReturn(f func() (*api.Server, string, error)) *MockServerGetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePool mocks base method. @@ -461,9 +1109,33 @@ func (m *MockServer) GetStoragePool(arg0 string) (*api.StoragePool, string, erro } // GetStoragePool indicates an expected call of GetStoragePool. -func (mr *MockServerMockRecorder) GetStoragePool(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePool(arg0 any) *MockServerGetStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockServer)(nil).GetStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockServer)(nil).GetStoragePool), arg0) + return &MockServerGetStoragePoolCall{Call: call} +} + +// MockServerGetStoragePoolCall wrap *gomock.Call +type MockServerGetStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolCall) Return(arg0 *api.StoragePool, arg1 string, arg2 error) *MockServerGetStoragePoolCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolCall) Do(f func(string) (*api.StoragePool, string, error)) *MockServerGetStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolCall) DoAndReturn(f func(string) (*api.StoragePool, string, error)) *MockServerGetStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolume mocks base method. @@ -477,9 +1149,33 @@ func (m *MockServer) GetStoragePoolVolume(arg0, arg1, arg2 string) (*api.Storage } // GetStoragePoolVolume indicates an expected call of GetStoragePoolVolume. -func (mr *MockServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *MockServerGetStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + return &MockServerGetStoragePoolVolumeCall{Call: call} +} + +// MockServerGetStoragePoolVolumeCall wrap *gomock.Call +type MockServerGetStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolVolumeCall) Return(arg0 *api.StorageVolume, arg1 string, arg2 error) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolVolumeCall) Do(f func(string, string, string) (*api.StorageVolume, string, error)) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) (*api.StorageVolume, string, error)) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumes mocks base method. @@ -492,9 +1188,33 @@ func (m *MockServer) GetStoragePoolVolumes(arg0 string) ([]api.StorageVolume, er } // GetStoragePoolVolumes indicates an expected call of GetStoragePoolVolumes. -func (mr *MockServerMockRecorder) GetStoragePoolVolumes(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePoolVolumes(arg0 any) *MockServerGetStoragePoolVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolumes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolumes), arg0) + return &MockServerGetStoragePoolVolumesCall{Call: call} +} + +// MockServerGetStoragePoolVolumesCall wrap *gomock.Call +type MockServerGetStoragePoolVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolVolumesCall) Return(arg0 []api.StorageVolume, arg1 error) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolVolumesCall) Do(f func(string) ([]api.StorageVolume, error)) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolVolumesCall) DoAndReturn(f func(string) ([]api.StorageVolume, error)) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePools mocks base method. @@ -507,9 +1227,33 @@ func (m *MockServer) GetStoragePools() ([]api.StoragePool, error) { } // GetStoragePools indicates an expected call of GetStoragePools. -func (mr *MockServerMockRecorder) GetStoragePools() *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePools() *MockServerGetStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockServer)(nil).GetStoragePools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockServer)(nil).GetStoragePools)) + return &MockServerGetStoragePoolsCall{Call: call} +} + +// MockServerGetStoragePoolsCall wrap *gomock.Call +type MockServerGetStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolsCall) Return(arg0 []api.StoragePool, arg1 error) *MockServerGetStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolsCall) Do(f func() ([]api.StoragePool, error)) *MockServerGetStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolsCall) DoAndReturn(f func() ([]api.StoragePool, error)) *MockServerGetStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasExtension mocks base method. @@ -521,9 +1265,33 @@ func (m *MockServer) HasExtension(arg0 string) bool { } // HasExtension indicates an expected call of HasExtension. -func (mr *MockServerMockRecorder) HasExtension(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) HasExtension(arg0 any) *MockServerHasExtensionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockServer)(nil).HasExtension), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockServer)(nil).HasExtension), arg0) + return &MockServerHasExtensionCall{Call: call} +} + +// MockServerHasExtensionCall wrap *gomock.Call +type MockServerHasExtensionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHasExtensionCall) Return(arg0 bool) *MockServerHasExtensionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHasExtensionCall) Do(f func(string) bool) *MockServerHasExtensionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHasExtensionCall) DoAndReturn(f func(string) bool) *MockServerHasExtensionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasProfile mocks base method. @@ -536,9 +1304,33 @@ func (m *MockServer) HasProfile(arg0 string) (bool, error) { } // HasProfile indicates an expected call of HasProfile. -func (mr *MockServerMockRecorder) HasProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) HasProfile(arg0 any) *MockServerHasProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasProfile", reflect.TypeOf((*MockServer)(nil).HasProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasProfile", reflect.TypeOf((*MockServer)(nil).HasProfile), arg0) + return &MockServerHasProfileCall{Call: call} +} + +// MockServerHasProfileCall wrap *gomock.Call +type MockServerHasProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHasProfileCall) Return(arg0 bool, arg1 error) *MockServerHasProfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHasProfileCall) Do(f func(string) (bool, error)) *MockServerHasProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHasProfileCall) DoAndReturn(f func(string) (bool, error)) *MockServerHasProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HostArch mocks base method. @@ -550,9 +1342,33 @@ func (m *MockServer) HostArch() string { } // HostArch indicates an expected call of HostArch. -func (mr *MockServerMockRecorder) HostArch() *gomock.Call { +func (mr *MockServerMockRecorder) HostArch() *MockServerHostArchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostArch", reflect.TypeOf((*MockServer)(nil).HostArch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostArch", reflect.TypeOf((*MockServer)(nil).HostArch)) + return &MockServerHostArchCall{Call: call} +} + +// MockServerHostArchCall wrap *gomock.Call +type MockServerHostArchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHostArchCall) Return(arg0 string) *MockServerHostArchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHostArchCall) Do(f func() string) *MockServerHostArchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHostArchCall) DoAndReturn(f func() string) *MockServerHostArchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsClustered mocks base method. @@ -564,9 +1380,33 @@ func (m *MockServer) IsClustered() bool { } // IsClustered indicates an expected call of IsClustered. -func (mr *MockServerMockRecorder) IsClustered() *gomock.Call { +func (mr *MockServerMockRecorder) IsClustered() *MockServerIsClusteredCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockServer)(nil).IsClustered)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockServer)(nil).IsClustered)) + return &MockServerIsClusteredCall{Call: call} +} + +// MockServerIsClusteredCall wrap *gomock.Call +type MockServerIsClusteredCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerIsClusteredCall) Return(arg0 bool) *MockServerIsClusteredCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerIsClusteredCall) Do(f func() bool) *MockServerIsClusteredCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerIsClusteredCall) DoAndReturn(f func() bool) *MockServerIsClusteredCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalBridgeName mocks base method. @@ -578,9 +1418,33 @@ func (m *MockServer) LocalBridgeName() string { } // LocalBridgeName indicates an expected call of LocalBridgeName. -func (mr *MockServerMockRecorder) LocalBridgeName() *gomock.Call { +func (mr *MockServerMockRecorder) LocalBridgeName() *MockServerLocalBridgeNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalBridgeName", reflect.TypeOf((*MockServer)(nil).LocalBridgeName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalBridgeName", reflect.TypeOf((*MockServer)(nil).LocalBridgeName)) + return &MockServerLocalBridgeNameCall{Call: call} +} + +// MockServerLocalBridgeNameCall wrap *gomock.Call +type MockServerLocalBridgeNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerLocalBridgeNameCall) Return(arg0 string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerLocalBridgeNameCall) Do(f func() string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerLocalBridgeNameCall) DoAndReturn(f func() string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -592,9 +1456,33 @@ func (m *MockServer) Name() string { } // Name indicates an expected call of Name. -func (mr *MockServerMockRecorder) Name() *gomock.Call { +func (mr *MockServerMockRecorder) Name() *MockServerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockServer)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockServer)(nil).Name)) + return &MockServerNameCall{Call: call} +} + +// MockServerNameCall wrap *gomock.Call +type MockServerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerNameCall) Return(arg0 string) *MockServerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerNameCall) Do(f func() string) *MockServerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerNameCall) DoAndReturn(f func() string) *MockServerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveContainer mocks base method. @@ -606,9 +1494,33 @@ func (m *MockServer) RemoveContainer(arg0 string) error { } // RemoveContainer indicates an expected call of RemoveContainer. -func (mr *MockServerMockRecorder) RemoveContainer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) RemoveContainer(arg0 any) *MockServerRemoveContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainer", reflect.TypeOf((*MockServer)(nil).RemoveContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainer", reflect.TypeOf((*MockServer)(nil).RemoveContainer), arg0) + return &MockServerRemoveContainerCall{Call: call} +} + +// MockServerRemoveContainerCall wrap *gomock.Call +type MockServerRemoveContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerRemoveContainerCall) Return(arg0 error) *MockServerRemoveContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerRemoveContainerCall) Do(f func(string) error) *MockServerRemoveContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerRemoveContainerCall) DoAndReturn(f func(string) error) *MockServerRemoveContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveContainers mocks base method. @@ -620,9 +1532,33 @@ func (m *MockServer) RemoveContainers(arg0 []string) error { } // RemoveContainers indicates an expected call of RemoveContainers. -func (mr *MockServerMockRecorder) RemoveContainers(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) RemoveContainers(arg0 any) *MockServerRemoveContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainers", reflect.TypeOf((*MockServer)(nil).RemoveContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainers", reflect.TypeOf((*MockServer)(nil).RemoveContainers), arg0) + return &MockServerRemoveContainersCall{Call: call} +} + +// MockServerRemoveContainersCall wrap *gomock.Call +type MockServerRemoveContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerRemoveContainersCall) Return(arg0 error) *MockServerRemoveContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerRemoveContainersCall) Do(f func([]string) error) *MockServerRemoveContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerRemoveContainersCall) DoAndReturn(f func([]string) error) *MockServerRemoveContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplaceOrAddContainerProfile mocks base method. @@ -634,9 +1570,33 @@ func (m *MockServer) ReplaceOrAddContainerProfile(arg0, arg1, arg2 string) error } // ReplaceOrAddContainerProfile indicates an expected call of ReplaceOrAddContainerProfile. -func (mr *MockServerMockRecorder) ReplaceOrAddContainerProfile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) ReplaceOrAddContainerProfile(arg0, arg1, arg2 any) *MockServerReplaceOrAddContainerProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceOrAddContainerProfile", reflect.TypeOf((*MockServer)(nil).ReplaceOrAddContainerProfile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceOrAddContainerProfile", reflect.TypeOf((*MockServer)(nil).ReplaceOrAddContainerProfile), arg0, arg1, arg2) + return &MockServerReplaceOrAddContainerProfileCall{Call: call} +} + +// MockServerReplaceOrAddContainerProfileCall wrap *gomock.Call +type MockServerReplaceOrAddContainerProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerReplaceOrAddContainerProfileCall) Return(arg0 error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerReplaceOrAddContainerProfileCall) Do(f func(string, string, string) error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerReplaceOrAddContainerProfileCall) DoAndReturn(f func(string, string, string) error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerCertificate mocks base method. @@ -648,9 +1608,33 @@ func (m *MockServer) ServerCertificate() string { } // ServerCertificate indicates an expected call of ServerCertificate. -func (mr *MockServerMockRecorder) ServerCertificate() *gomock.Call { +func (mr *MockServerMockRecorder) ServerCertificate() *MockServerServerCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerCertificate", reflect.TypeOf((*MockServer)(nil).ServerCertificate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerCertificate", reflect.TypeOf((*MockServer)(nil).ServerCertificate)) + return &MockServerServerCertificateCall{Call: call} +} + +// MockServerServerCertificateCall wrap *gomock.Call +type MockServerServerCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerServerCertificateCall) Return(arg0 string) *MockServerServerCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerServerCertificateCall) Do(f func() string) *MockServerServerCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerServerCertificateCall) DoAndReturn(f func() string) *MockServerServerCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerVersion mocks base method. @@ -662,9 +1646,33 @@ func (m *MockServer) ServerVersion() string { } // ServerVersion indicates an expected call of ServerVersion. -func (mr *MockServerMockRecorder) ServerVersion() *gomock.Call { +func (mr *MockServerMockRecorder) ServerVersion() *MockServerServerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockServer)(nil).ServerVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockServer)(nil).ServerVersion)) + return &MockServerServerVersionCall{Call: call} +} + +// MockServerServerVersionCall wrap *gomock.Call +type MockServerServerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerServerVersionCall) Return(arg0 string) *MockServerServerVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerServerVersionCall) Do(f func() string) *MockServerServerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerServerVersionCall) DoAndReturn(f func() string) *MockServerServerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageSupported mocks base method. @@ -676,9 +1684,33 @@ func (m *MockServer) StorageSupported() bool { } // StorageSupported indicates an expected call of StorageSupported. -func (mr *MockServerMockRecorder) StorageSupported() *gomock.Call { +func (mr *MockServerMockRecorder) StorageSupported() *MockServerStorageSupportedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageSupported", reflect.TypeOf((*MockServer)(nil).StorageSupported)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageSupported", reflect.TypeOf((*MockServer)(nil).StorageSupported)) + return &MockServerStorageSupportedCall{Call: call} +} + +// MockServerStorageSupportedCall wrap *gomock.Call +type MockServerStorageSupportedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerStorageSupportedCall) Return(arg0 bool) *MockServerStorageSupportedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerStorageSupportedCall) Do(f func() bool) *MockServerStorageSupportedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerStorageSupportedCall) DoAndReturn(f func() bool) *MockServerStorageSupportedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedArches mocks base method. @@ -690,9 +1722,33 @@ func (m *MockServer) SupportedArches() []string { } // SupportedArches indicates an expected call of SupportedArches. -func (mr *MockServerMockRecorder) SupportedArches() *gomock.Call { +func (mr *MockServerMockRecorder) SupportedArches() *MockServerSupportedArchesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedArches", reflect.TypeOf((*MockServer)(nil).SupportedArches)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedArches", reflect.TypeOf((*MockServer)(nil).SupportedArches)) + return &MockServerSupportedArchesCall{Call: call} +} + +// MockServerSupportedArchesCall wrap *gomock.Call +type MockServerSupportedArchesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerSupportedArchesCall) Return(arg0 []string) *MockServerSupportedArchesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerSupportedArchesCall) Do(f func() []string) *MockServerSupportedArchesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerSupportedArchesCall) DoAndReturn(f func() []string) *MockServerSupportedArchesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerConfig mocks base method. @@ -704,9 +1760,33 @@ func (m *MockServer) UpdateContainerConfig(arg0 string, arg1 map[string]string) } // UpdateContainerConfig indicates an expected call of UpdateContainerConfig. -func (mr *MockServerMockRecorder) UpdateContainerConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateContainerConfig(arg0, arg1 any) *MockServerUpdateContainerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerConfig", reflect.TypeOf((*MockServer)(nil).UpdateContainerConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerConfig", reflect.TypeOf((*MockServer)(nil).UpdateContainerConfig), arg0, arg1) + return &MockServerUpdateContainerConfigCall{Call: call} +} + +// MockServerUpdateContainerConfigCall wrap *gomock.Call +type MockServerUpdateContainerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateContainerConfigCall) Return(arg0 error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateContainerConfigCall) Do(f func(string, map[string]string) error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateContainerConfigCall) DoAndReturn(f func(string, map[string]string) error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerProfiles mocks base method. @@ -718,9 +1798,33 @@ func (m *MockServer) UpdateContainerProfiles(arg0 string, arg1 []string) error { } // UpdateContainerProfiles indicates an expected call of UpdateContainerProfiles. -func (mr *MockServerMockRecorder) UpdateContainerProfiles(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateContainerProfiles(arg0, arg1 any) *MockServerUpdateContainerProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerProfiles", reflect.TypeOf((*MockServer)(nil).UpdateContainerProfiles), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerProfiles", reflect.TypeOf((*MockServer)(nil).UpdateContainerProfiles), arg0, arg1) + return &MockServerUpdateContainerProfilesCall{Call: call} +} + +// MockServerUpdateContainerProfilesCall wrap *gomock.Call +type MockServerUpdateContainerProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateContainerProfilesCall) Return(arg0 error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateContainerProfilesCall) Do(f func(string, []string) error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateContainerProfilesCall) DoAndReturn(f func(string, []string) error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateServerConfig mocks base method. @@ -732,9 +1836,33 @@ func (m *MockServer) UpdateServerConfig(arg0 map[string]string) error { } // UpdateServerConfig indicates an expected call of UpdateServerConfig. -func (mr *MockServerMockRecorder) UpdateServerConfig(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateServerConfig(arg0 any) *MockServerUpdateServerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServerConfig", reflect.TypeOf((*MockServer)(nil).UpdateServerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServerConfig", reflect.TypeOf((*MockServer)(nil).UpdateServerConfig), arg0) + return &MockServerUpdateServerConfigCall{Call: call} +} + +// MockServerUpdateServerConfigCall wrap *gomock.Call +type MockServerUpdateServerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateServerConfigCall) Return(arg0 error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateServerConfigCall) Do(f func(map[string]string) error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateServerConfigCall) DoAndReturn(f func(map[string]string) error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolVolume mocks base method. @@ -746,9 +1874,33 @@ func (m *MockServer) UpdateStoragePoolVolume(arg0, arg1, arg2 string, arg3 api.S } // UpdateStoragePoolVolume indicates an expected call of UpdateStoragePoolVolume. -func (mr *MockServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *MockServerUpdateStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + return &MockServerUpdateStoragePoolVolumeCall{Call: call} +} + +// MockServerUpdateStoragePoolVolumeCall wrap *gomock.Call +type MockServerUpdateStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateStoragePoolVolumeCall) Return(arg0 error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateStoragePoolVolumeCall) Do(f func(string, string, string, api.StorageVolumePut, string) error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateStoragePoolVolumeCall) DoAndReturn(f func(string, string, string, api.StorageVolumePut, string) error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseProject mocks base method. @@ -758,9 +1910,33 @@ func (m *MockServer) UseProject(arg0 string) { } // UseProject indicates an expected call of UseProject. -func (mr *MockServerMockRecorder) UseProject(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UseProject(arg0 any) *MockServerUseProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockServer)(nil).UseProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockServer)(nil).UseProject), arg0) + return &MockServerUseProjectCall{Call: call} +} + +// MockServerUseProjectCall wrap *gomock.Call +type MockServerUseProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUseProjectCall) Return() *MockServerUseProjectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUseProjectCall) Do(f func(string)) *MockServerUseProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUseProjectCall) DoAndReturn(f func(string)) *MockServerUseProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseTargetServer mocks base method. @@ -773,9 +1949,33 @@ func (m *MockServer) UseTargetServer(arg0 string) (*lxd0.Server, error) { } // UseTargetServer indicates an expected call of UseTargetServer. -func (mr *MockServerMockRecorder) UseTargetServer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UseTargetServer(arg0 any) *MockServerUseTargetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTargetServer", reflect.TypeOf((*MockServer)(nil).UseTargetServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTargetServer", reflect.TypeOf((*MockServer)(nil).UseTargetServer), arg0) + return &MockServerUseTargetServerCall{Call: call} +} + +// MockServerUseTargetServerCall wrap *gomock.Call +type MockServerUseTargetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUseTargetServerCall) Return(arg0 *lxd0.Server, arg1 error) *MockServerUseTargetServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUseTargetServerCall) Do(f func(string) (*lxd0.Server, error)) *MockServerUseTargetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUseTargetServerCall) DoAndReturn(f func(string) (*lxd0.Server, error)) *MockServerUseTargetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VerifyNetworkDevice mocks base method. @@ -787,9 +1987,33 @@ func (m *MockServer) VerifyNetworkDevice(arg0 *api.Profile, arg1 string) error { } // VerifyNetworkDevice indicates an expected call of VerifyNetworkDevice. -func (mr *MockServerMockRecorder) VerifyNetworkDevice(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) VerifyNetworkDevice(arg0, arg1 any) *MockServerVerifyNetworkDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyNetworkDevice", reflect.TypeOf((*MockServer)(nil).VerifyNetworkDevice), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyNetworkDevice", reflect.TypeOf((*MockServer)(nil).VerifyNetworkDevice), arg0, arg1) + return &MockServerVerifyNetworkDeviceCall{Call: call} +} + +// MockServerVerifyNetworkDeviceCall wrap *gomock.Call +type MockServerVerifyNetworkDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerVerifyNetworkDeviceCall) Return(arg0 error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerVerifyNetworkDeviceCall) Do(f func(*api.Profile, string) error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerVerifyNetworkDeviceCall) DoAndReturn(f func(*api.Profile, string) error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteContainer mocks base method. @@ -801,9 +2025,33 @@ func (m *MockServer) WriteContainer(arg0 *lxd0.Container) error { } // WriteContainer indicates an expected call of WriteContainer. -func (mr *MockServerMockRecorder) WriteContainer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) WriteContainer(arg0 any) *MockServerWriteContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteContainer", reflect.TypeOf((*MockServer)(nil).WriteContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteContainer", reflect.TypeOf((*MockServer)(nil).WriteContainer), arg0) + return &MockServerWriteContainerCall{Call: call} +} + +// MockServerWriteContainerCall wrap *gomock.Call +type MockServerWriteContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerWriteContainerCall) Return(arg0 error) *MockServerWriteContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerWriteContainerCall) Do(f func(*lxd0.Container) error) *MockServerWriteContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerWriteContainerCall) DoAndReturn(f func(*lxd0.Container) error) *MockServerWriteContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServerFactory is a mock of ServerFactory interface. @@ -839,9 +2087,33 @@ func (m *MockServerFactory) InsecureRemoteServer(arg0 CloudSpec) (Server, error) } // InsecureRemoteServer indicates an expected call of InsecureRemoteServer. -func (mr *MockServerFactoryMockRecorder) InsecureRemoteServer(arg0 any) *gomock.Call { +func (mr *MockServerFactoryMockRecorder) InsecureRemoteServer(arg0 any) *MockServerFactoryInsecureRemoteServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsecureRemoteServer", reflect.TypeOf((*MockServerFactory)(nil).InsecureRemoteServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsecureRemoteServer", reflect.TypeOf((*MockServerFactory)(nil).InsecureRemoteServer), arg0) + return &MockServerFactoryInsecureRemoteServerCall{Call: call} +} + +// MockServerFactoryInsecureRemoteServerCall wrap *gomock.Call +type MockServerFactoryInsecureRemoteServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryInsecureRemoteServerCall) Return(arg0 Server, arg1 error) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryInsecureRemoteServerCall) Do(f func(CloudSpec) (Server, error)) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryInsecureRemoteServerCall) DoAndReturn(f func(CloudSpec) (Server, error)) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalServer mocks base method. @@ -854,9 +2126,33 @@ func (m *MockServerFactory) LocalServer() (Server, error) { } // LocalServer indicates an expected call of LocalServer. -func (mr *MockServerFactoryMockRecorder) LocalServer() *gomock.Call { +func (mr *MockServerFactoryMockRecorder) LocalServer() *MockServerFactoryLocalServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServer", reflect.TypeOf((*MockServerFactory)(nil).LocalServer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServer", reflect.TypeOf((*MockServerFactory)(nil).LocalServer)) + return &MockServerFactoryLocalServerCall{Call: call} +} + +// MockServerFactoryLocalServerCall wrap *gomock.Call +type MockServerFactoryLocalServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryLocalServerCall) Return(arg0 Server, arg1 error) *MockServerFactoryLocalServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryLocalServerCall) Do(f func() (Server, error)) *MockServerFactoryLocalServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryLocalServerCall) DoAndReturn(f func() (Server, error)) *MockServerFactoryLocalServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalServerAddress mocks base method. @@ -869,9 +2165,33 @@ func (m *MockServerFactory) LocalServerAddress() (string, error) { } // LocalServerAddress indicates an expected call of LocalServerAddress. -func (mr *MockServerFactoryMockRecorder) LocalServerAddress() *gomock.Call { +func (mr *MockServerFactoryMockRecorder) LocalServerAddress() *MockServerFactoryLocalServerAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServerAddress", reflect.TypeOf((*MockServerFactory)(nil).LocalServerAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServerAddress", reflect.TypeOf((*MockServerFactory)(nil).LocalServerAddress)) + return &MockServerFactoryLocalServerAddressCall{Call: call} +} + +// MockServerFactoryLocalServerAddressCall wrap *gomock.Call +type MockServerFactoryLocalServerAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryLocalServerAddressCall) Return(arg0 string, arg1 error) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryLocalServerAddressCall) Do(f func() (string, error)) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryLocalServerAddressCall) DoAndReturn(f func() (string, error)) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteServer mocks base method. @@ -884,9 +2204,33 @@ func (m *MockServerFactory) RemoteServer(arg0 CloudSpec) (Server, error) { } // RemoteServer indicates an expected call of RemoteServer. -func (mr *MockServerFactoryMockRecorder) RemoteServer(arg0 any) *gomock.Call { +func (mr *MockServerFactoryMockRecorder) RemoteServer(arg0 any) *MockServerFactoryRemoteServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteServer", reflect.TypeOf((*MockServerFactory)(nil).RemoteServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteServer", reflect.TypeOf((*MockServerFactory)(nil).RemoteServer), arg0) + return &MockServerFactoryRemoteServerCall{Call: call} +} + +// MockServerFactoryRemoteServerCall wrap *gomock.Call +type MockServerFactoryRemoteServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryRemoteServerCall) Return(arg0 Server, arg1 error) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryRemoteServerCall) Do(f func(CloudSpec) (Server, error)) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryRemoteServerCall) DoAndReturn(f func(CloudSpec) (Server, error)) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInterfaceAddress is a mock of InterfaceAddress interface. @@ -922,9 +2266,33 @@ func (m *MockInterfaceAddress) InterfaceAddress(arg0 string) (string, error) { } // InterfaceAddress indicates an expected call of InterfaceAddress. -func (mr *MockInterfaceAddressMockRecorder) InterfaceAddress(arg0 any) *gomock.Call { +func (mr *MockInterfaceAddressMockRecorder) InterfaceAddress(arg0 any) *MockInterfaceAddressInterfaceAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterfaceAddress", reflect.TypeOf((*MockInterfaceAddress)(nil).InterfaceAddress), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterfaceAddress", reflect.TypeOf((*MockInterfaceAddress)(nil).InterfaceAddress), arg0) + return &MockInterfaceAddressInterfaceAddressCall{Call: call} +} + +// MockInterfaceAddressInterfaceAddressCall wrap *gomock.Call +type MockInterfaceAddressInterfaceAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInterfaceAddressInterfaceAddressCall) Return(arg0 string, arg1 error) *MockInterfaceAddressInterfaceAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInterfaceAddressInterfaceAddressCall) Do(f func(string) (string, error)) *MockInterfaceAddressInterfaceAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInterfaceAddressInterfaceAddressCall) DoAndReturn(f func(string) (string, error)) *MockInterfaceAddressInterfaceAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCertificateReadWriter is a mock of CertificateReadWriter interface. @@ -961,9 +2329,33 @@ func (m *MockCertificateReadWriter) Read(arg0 string) ([]byte, []byte, error) { } // Read indicates an expected call of Read. -func (mr *MockCertificateReadWriterMockRecorder) Read(arg0 any) *gomock.Call { +func (mr *MockCertificateReadWriterMockRecorder) Read(arg0 any) *MockCertificateReadWriterReadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockCertificateReadWriter)(nil).Read), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockCertificateReadWriter)(nil).Read), arg0) + return &MockCertificateReadWriterReadCall{Call: call} +} + +// MockCertificateReadWriterReadCall wrap *gomock.Call +type MockCertificateReadWriterReadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCertificateReadWriterReadCall) Return(arg0, arg1 []byte, arg2 error) *MockCertificateReadWriterReadCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCertificateReadWriterReadCall) Do(f func(string) ([]byte, []byte, error)) *MockCertificateReadWriterReadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCertificateReadWriterReadCall) DoAndReturn(f func(string) ([]byte, []byte, error)) *MockCertificateReadWriterReadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Write mocks base method. @@ -975,9 +2367,33 @@ func (m *MockCertificateReadWriter) Write(arg0 string, arg1, arg2 []byte) error } // Write indicates an expected call of Write. -func (mr *MockCertificateReadWriterMockRecorder) Write(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCertificateReadWriterMockRecorder) Write(arg0, arg1, arg2 any) *MockCertificateReadWriterWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCertificateReadWriter)(nil).Write), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCertificateReadWriter)(nil).Write), arg0, arg1, arg2) + return &MockCertificateReadWriterWriteCall{Call: call} +} + +// MockCertificateReadWriterWriteCall wrap *gomock.Call +type MockCertificateReadWriterWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCertificateReadWriterWriteCall) Return(arg0 error) *MockCertificateReadWriterWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCertificateReadWriterWriteCall) Do(f func(string, []byte, []byte) error) *MockCertificateReadWriterWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCertificateReadWriterWriteCall) DoAndReturn(f func(string, []byte, []byte) error) *MockCertificateReadWriterWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCertificateGenerator is a mock of CertificateGenerator interface. @@ -1014,9 +2430,33 @@ func (m *MockCertificateGenerator) Generate(arg0, arg1 bool) ([]byte, []byte, er } // Generate indicates an expected call of Generate. -func (mr *MockCertificateGeneratorMockRecorder) Generate(arg0, arg1 any) *gomock.Call { +func (mr *MockCertificateGeneratorMockRecorder) Generate(arg0, arg1 any) *MockCertificateGeneratorGenerateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generate", reflect.TypeOf((*MockCertificateGenerator)(nil).Generate), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Generate", reflect.TypeOf((*MockCertificateGenerator)(nil).Generate), arg0, arg1) + return &MockCertificateGeneratorGenerateCall{Call: call} +} + +// MockCertificateGeneratorGenerateCall wrap *gomock.Call +type MockCertificateGeneratorGenerateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCertificateGeneratorGenerateCall) Return(arg0, arg1 []byte, arg2 error) *MockCertificateGeneratorGenerateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCertificateGeneratorGenerateCall) Do(f func(bool, bool) ([]byte, []byte, error)) *MockCertificateGeneratorGenerateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCertificateGeneratorGenerateCall) DoAndReturn(f func(bool, bool) ([]byte, []byte, error)) *MockCertificateGeneratorGenerateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXCConfigReader is a mock of LXCConfigReader interface. @@ -1052,9 +2492,33 @@ func (m *MockLXCConfigReader) ReadCert(arg0 string) ([]byte, error) { } // ReadCert indicates an expected call of ReadCert. -func (mr *MockLXCConfigReaderMockRecorder) ReadCert(arg0 any) *gomock.Call { +func (mr *MockLXCConfigReaderMockRecorder) ReadCert(arg0 any) *MockLXCConfigReaderReadCertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadCert", reflect.TypeOf((*MockLXCConfigReader)(nil).ReadCert), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadCert", reflect.TypeOf((*MockLXCConfigReader)(nil).ReadCert), arg0) + return &MockLXCConfigReaderReadCertCall{Call: call} +} + +// MockLXCConfigReaderReadCertCall wrap *gomock.Call +type MockLXCConfigReaderReadCertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXCConfigReaderReadCertCall) Return(arg0 []byte, arg1 error) *MockLXCConfigReaderReadCertCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXCConfigReaderReadCertCall) Do(f func(string) ([]byte, error)) *MockLXCConfigReaderReadCertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXCConfigReaderReadCertCall) DoAndReturn(f func(string) ([]byte, error)) *MockLXCConfigReaderReadCertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadConfig mocks base method. @@ -1067,7 +2531,31 @@ func (m *MockLXCConfigReader) ReadConfig(arg0 string) (LXCConfig, error) { } // ReadConfig indicates an expected call of ReadConfig. -func (mr *MockLXCConfigReaderMockRecorder) ReadConfig(arg0 any) *gomock.Call { +func (mr *MockLXCConfigReaderMockRecorder) ReadConfig(arg0 any) *MockLXCConfigReaderReadConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadConfig", reflect.TypeOf((*MockLXCConfigReader)(nil).ReadConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadConfig", reflect.TypeOf((*MockLXCConfigReader)(nil).ReadConfig), arg0) + return &MockLXCConfigReaderReadConfigCall{Call: call} +} + +// MockLXCConfigReaderReadConfigCall wrap *gomock.Call +type MockLXCConfigReaderReadConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXCConfigReaderReadConfigCall) Return(arg0 LXCConfig, arg1 error) *MockLXCConfigReaderReadConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXCConfigReaderReadConfigCall) Do(f func(string) (LXCConfig, error)) *MockLXCConfigReaderReadConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXCConfigReaderReadConfigCall) DoAndReturn(f func(string) (LXCConfig, error)) *MockLXCConfigReaderReadConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/lxd/package_test.go b/internal/provider/lxd/package_test.go index b2ed465b821..9a87b864184 100644 --- a/internal/provider/lxd/package_test.go +++ b/internal/provider/lxd/package_test.go @@ -12,7 +12,7 @@ import ( containerLXD "github.com/juju/juju/internal/container/lxd" ) -//go:generate go run go.uber.org/mock/mockgen -package lxd -destination package_mock_test.go github.com/juju/juju/internal/provider/lxd Server,ServerFactory,InterfaceAddress,CertificateReadWriter,CertificateGenerator,LXCConfigReader +//go:generate go run go.uber.org/mock/mockgen -typed -package lxd -destination package_mock_test.go github.com/juju/juju/internal/provider/lxd Server,ServerFactory,InterfaceAddress,CertificateReadWriter,CertificateGenerator,LXCConfigReader func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/provider/oci/common/interfaces.go b/internal/provider/oci/common/interfaces.go index aeb5f5b8c70..cbdc6cef847 100644 --- a/internal/provider/oci/common/interfaces.go +++ b/internal/provider/oci/common/interfaces.go @@ -13,7 +13,7 @@ import ( // that cloud for compute, storage and virtual networking. This is due to abstracting away // pagination required by most List methods. -//go:generate go run go.uber.org/mock/mockgen -package testing -destination ../testing/mocks_clientcompute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIComputeClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination ../testing/mocks_clientcompute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIComputeClient type OCIComputeClient interface { ListVnicAttachments(ctx context.Context, request ociCore.ListVnicAttachmentsRequest) (ociCore.ListVnicAttachmentsResponse, error) TerminateInstance(ctx context.Context, request ociCore.TerminateInstanceRequest) (ociCore.TerminateInstanceResponse, error) @@ -28,7 +28,7 @@ type OCIComputeClient interface { AttachVolume(ctx context.Context, request ociCore.AttachVolumeRequest) (ociCore.AttachVolumeResponse, error) } -//go:generate go run go.uber.org/mock/mockgen -package testing -destination ../testing/mocks_clientnetworking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIVirtualNetworkingClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination ../testing/mocks_clientnetworking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIVirtualNetworkingClient type OCIVirtualNetworkingClient interface { CreateVcn(ctx context.Context, request ociCore.CreateVcnRequest) (ociCore.CreateVcnResponse, error) DeleteVcn(ctx context.Context, request ociCore.DeleteVcnRequest) (ociCore.DeleteVcnResponse, error) @@ -58,7 +58,7 @@ type OCIVirtualNetworkingClient interface { GetSecurityList(ctx context.Context, request ociCore.GetSecurityListRequest) (ociCore.GetSecurityListResponse, error) } -//go:generate go run go.uber.org/mock/mockgen -package testing -destination ../testing/mocks_clientstorage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIStorageClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination ../testing/mocks_clientstorage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIStorageClient type OCIStorageClient interface { CreateVolume(ctx context.Context, request ociCore.CreateVolumeRequest) (ociCore.CreateVolumeResponse, error) ListVolumes(ctx context.Context, request ociCore.ListVolumesRequest) (response ociCore.ListVolumesResponse, err error) diff --git a/internal/provider/oci/package_test.go b/internal/provider/oci/package_test.go index 0cdff9bd45c..ffec4dc0a50 100644 --- a/internal/provider/oci/package_test.go +++ b/internal/provider/oci/package_test.go @@ -9,11 +9,11 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/mocks_identity.go -write_package_comment=false github.com/juju/juju/internal/provider/oci IdentityClient -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/mocks_compute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci ComputeClient -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/mocks_networking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci NetworkingClient -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/mocks_firewall.go -write_package_comment=false github.com/juju/juju/internal/provider/oci FirewallClient -//go:generate go run go.uber.org/mock/mockgen -package testing -destination testing/mocks_storage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci StorageClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/mocks_identity.go -write_package_comment=false github.com/juju/juju/internal/provider/oci IdentityClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/mocks_compute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci ComputeClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/mocks_networking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci NetworkingClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/mocks_firewall.go -write_package_comment=false github.com/juju/juju/internal/provider/oci FirewallClient +//go:generate go run go.uber.org/mock/mockgen -typed -package testing -destination testing/mocks_storage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci StorageClient func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/provider/oci/testing/mocks_clientcompute.go b/internal/provider/oci/testing/mocks_clientcompute.go index 36056728731..faa92c91ab6 100644 --- a/internal/provider/oci/testing/mocks_clientcompute.go +++ b/internal/provider/oci/testing/mocks_clientcompute.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination ../testing/mocks_clientcompute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIComputeClient +// mockgen -typed -package testing -destination ../testing/mocks_clientcompute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIComputeClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockOCIComputeClient) AttachVolume(arg0 context.Context, arg1 core.Atta } // AttachVolume indicates an expected call of AttachVolume. -func (mr *MockOCIComputeClientMockRecorder) AttachVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) AttachVolume(arg0, arg1 any) *MockOCIComputeClientAttachVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachVolume", reflect.TypeOf((*MockOCIComputeClient)(nil).AttachVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachVolume", reflect.TypeOf((*MockOCIComputeClient)(nil).AttachVolume), arg0, arg1) + return &MockOCIComputeClientAttachVolumeCall{Call: call} +} + +// MockOCIComputeClientAttachVolumeCall wrap *gomock.Call +type MockOCIComputeClientAttachVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientAttachVolumeCall) Return(arg0 core.AttachVolumeResponse, arg1 error) *MockOCIComputeClientAttachVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientAttachVolumeCall) Do(f func(context.Context, core.AttachVolumeRequest) (core.AttachVolumeResponse, error)) *MockOCIComputeClientAttachVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientAttachVolumeCall) DoAndReturn(f func(context.Context, core.AttachVolumeRequest) (core.AttachVolumeResponse, error)) *MockOCIComputeClientAttachVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetachVolume mocks base method. @@ -62,9 +86,33 @@ func (m *MockOCIComputeClient) DetachVolume(arg0 context.Context, arg1 core.Deta } // DetachVolume indicates an expected call of DetachVolume. -func (mr *MockOCIComputeClientMockRecorder) DetachVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) DetachVolume(arg0, arg1 any) *MockOCIComputeClientDetachVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachVolume", reflect.TypeOf((*MockOCIComputeClient)(nil).DetachVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachVolume", reflect.TypeOf((*MockOCIComputeClient)(nil).DetachVolume), arg0, arg1) + return &MockOCIComputeClientDetachVolumeCall{Call: call} +} + +// MockOCIComputeClientDetachVolumeCall wrap *gomock.Call +type MockOCIComputeClientDetachVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientDetachVolumeCall) Return(arg0 core.DetachVolumeResponse, arg1 error) *MockOCIComputeClientDetachVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientDetachVolumeCall) Do(f func(context.Context, core.DetachVolumeRequest) (core.DetachVolumeResponse, error)) *MockOCIComputeClientDetachVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientDetachVolumeCall) DoAndReturn(f func(context.Context, core.DetachVolumeRequest) (core.DetachVolumeResponse, error)) *MockOCIComputeClientDetachVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstance mocks base method. @@ -77,9 +125,33 @@ func (m *MockOCIComputeClient) GetInstance(arg0 context.Context, arg1 core.GetIn } // GetInstance indicates an expected call of GetInstance. -func (mr *MockOCIComputeClientMockRecorder) GetInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) GetInstance(arg0, arg1 any) *MockOCIComputeClientGetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).GetInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).GetInstance), arg0, arg1) + return &MockOCIComputeClientGetInstanceCall{Call: call} +} + +// MockOCIComputeClientGetInstanceCall wrap *gomock.Call +type MockOCIComputeClientGetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientGetInstanceCall) Return(arg0 core.GetInstanceResponse, arg1 error) *MockOCIComputeClientGetInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientGetInstanceCall) Do(f func(context.Context, core.GetInstanceRequest) (core.GetInstanceResponse, error)) *MockOCIComputeClientGetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientGetInstanceCall) DoAndReturn(f func(context.Context, core.GetInstanceRequest) (core.GetInstanceResponse, error)) *MockOCIComputeClientGetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVolumeAttachment mocks base method. @@ -92,9 +164,33 @@ func (m *MockOCIComputeClient) GetVolumeAttachment(arg0 context.Context, arg1 co } // GetVolumeAttachment indicates an expected call of GetVolumeAttachment. -func (mr *MockOCIComputeClientMockRecorder) GetVolumeAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) GetVolumeAttachment(arg0, arg1 any) *MockOCIComputeClientGetVolumeAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAttachment", reflect.TypeOf((*MockOCIComputeClient)(nil).GetVolumeAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAttachment", reflect.TypeOf((*MockOCIComputeClient)(nil).GetVolumeAttachment), arg0, arg1) + return &MockOCIComputeClientGetVolumeAttachmentCall{Call: call} +} + +// MockOCIComputeClientGetVolumeAttachmentCall wrap *gomock.Call +type MockOCIComputeClientGetVolumeAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientGetVolumeAttachmentCall) Return(arg0 core.GetVolumeAttachmentResponse, arg1 error) *MockOCIComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientGetVolumeAttachmentCall) Do(f func(context.Context, core.GetVolumeAttachmentRequest) (core.GetVolumeAttachmentResponse, error)) *MockOCIComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientGetVolumeAttachmentCall) DoAndReturn(f func(context.Context, core.GetVolumeAttachmentRequest) (core.GetVolumeAttachmentResponse, error)) *MockOCIComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LaunchInstance mocks base method. @@ -107,9 +203,33 @@ func (m *MockOCIComputeClient) LaunchInstance(arg0 context.Context, arg1 core.La } // LaunchInstance indicates an expected call of LaunchInstance. -func (mr *MockOCIComputeClientMockRecorder) LaunchInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) LaunchInstance(arg0, arg1 any) *MockOCIComputeClientLaunchInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LaunchInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).LaunchInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LaunchInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).LaunchInstance), arg0, arg1) + return &MockOCIComputeClientLaunchInstanceCall{Call: call} +} + +// MockOCIComputeClientLaunchInstanceCall wrap *gomock.Call +type MockOCIComputeClientLaunchInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientLaunchInstanceCall) Return(arg0 core.LaunchInstanceResponse, arg1 error) *MockOCIComputeClientLaunchInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientLaunchInstanceCall) Do(f func(context.Context, core.LaunchInstanceRequest) (core.LaunchInstanceResponse, error)) *MockOCIComputeClientLaunchInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientLaunchInstanceCall) DoAndReturn(f func(context.Context, core.LaunchInstanceRequest) (core.LaunchInstanceResponse, error)) *MockOCIComputeClientLaunchInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListImages mocks base method. @@ -122,9 +242,33 @@ func (m *MockOCIComputeClient) ListImages(arg0 context.Context, arg1 core.ListIm } // ListImages indicates an expected call of ListImages. -func (mr *MockOCIComputeClientMockRecorder) ListImages(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) ListImages(arg0, arg1 any) *MockOCIComputeClientListImagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockOCIComputeClient)(nil).ListImages), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockOCIComputeClient)(nil).ListImages), arg0, arg1) + return &MockOCIComputeClientListImagesCall{Call: call} +} + +// MockOCIComputeClientListImagesCall wrap *gomock.Call +type MockOCIComputeClientListImagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientListImagesCall) Return(arg0 core.ListImagesResponse, arg1 error) *MockOCIComputeClientListImagesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientListImagesCall) Do(f func(context.Context, core.ListImagesRequest) (core.ListImagesResponse, error)) *MockOCIComputeClientListImagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientListImagesCall) DoAndReturn(f func(context.Context, core.ListImagesRequest) (core.ListImagesResponse, error)) *MockOCIComputeClientListImagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListInstances mocks base method. @@ -137,9 +281,33 @@ func (m *MockOCIComputeClient) ListInstances(arg0 context.Context, arg1 core.Lis } // ListInstances indicates an expected call of ListInstances. -func (mr *MockOCIComputeClientMockRecorder) ListInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) ListInstances(arg0, arg1 any) *MockOCIComputeClientListInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstances", reflect.TypeOf((*MockOCIComputeClient)(nil).ListInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstances", reflect.TypeOf((*MockOCIComputeClient)(nil).ListInstances), arg0, arg1) + return &MockOCIComputeClientListInstancesCall{Call: call} +} + +// MockOCIComputeClientListInstancesCall wrap *gomock.Call +type MockOCIComputeClientListInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientListInstancesCall) Return(arg0 core.ListInstancesResponse, arg1 error) *MockOCIComputeClientListInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientListInstancesCall) Do(f func(context.Context, core.ListInstancesRequest) (core.ListInstancesResponse, error)) *MockOCIComputeClientListInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientListInstancesCall) DoAndReturn(f func(context.Context, core.ListInstancesRequest) (core.ListInstancesResponse, error)) *MockOCIComputeClientListInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListShapes mocks base method. @@ -152,9 +320,33 @@ func (m *MockOCIComputeClient) ListShapes(arg0 context.Context, arg1 core.ListSh } // ListShapes indicates an expected call of ListShapes. -func (mr *MockOCIComputeClientMockRecorder) ListShapes(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) ListShapes(arg0, arg1 any) *MockOCIComputeClientListShapesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListShapes", reflect.TypeOf((*MockOCIComputeClient)(nil).ListShapes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListShapes", reflect.TypeOf((*MockOCIComputeClient)(nil).ListShapes), arg0, arg1) + return &MockOCIComputeClientListShapesCall{Call: call} +} + +// MockOCIComputeClientListShapesCall wrap *gomock.Call +type MockOCIComputeClientListShapesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientListShapesCall) Return(arg0 core.ListShapesResponse, arg1 error) *MockOCIComputeClientListShapesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientListShapesCall) Do(f func(context.Context, core.ListShapesRequest) (core.ListShapesResponse, error)) *MockOCIComputeClientListShapesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientListShapesCall) DoAndReturn(f func(context.Context, core.ListShapesRequest) (core.ListShapesResponse, error)) *MockOCIComputeClientListShapesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVnicAttachments mocks base method. @@ -167,9 +359,33 @@ func (m *MockOCIComputeClient) ListVnicAttachments(arg0 context.Context, arg1 co } // ListVnicAttachments indicates an expected call of ListVnicAttachments. -func (mr *MockOCIComputeClientMockRecorder) ListVnicAttachments(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) ListVnicAttachments(arg0, arg1 any) *MockOCIComputeClientListVnicAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVnicAttachments", reflect.TypeOf((*MockOCIComputeClient)(nil).ListVnicAttachments), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVnicAttachments", reflect.TypeOf((*MockOCIComputeClient)(nil).ListVnicAttachments), arg0, arg1) + return &MockOCIComputeClientListVnicAttachmentsCall{Call: call} +} + +// MockOCIComputeClientListVnicAttachmentsCall wrap *gomock.Call +type MockOCIComputeClientListVnicAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientListVnicAttachmentsCall) Return(arg0 core.ListVnicAttachmentsResponse, arg1 error) *MockOCIComputeClientListVnicAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientListVnicAttachmentsCall) Do(f func(context.Context, core.ListVnicAttachmentsRequest) (core.ListVnicAttachmentsResponse, error)) *MockOCIComputeClientListVnicAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientListVnicAttachmentsCall) DoAndReturn(f func(context.Context, core.ListVnicAttachmentsRequest) (core.ListVnicAttachmentsResponse, error)) *MockOCIComputeClientListVnicAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVolumeAttachments mocks base method. @@ -182,9 +398,33 @@ func (m *MockOCIComputeClient) ListVolumeAttachments(arg0 context.Context, arg1 } // ListVolumeAttachments indicates an expected call of ListVolumeAttachments. -func (mr *MockOCIComputeClientMockRecorder) ListVolumeAttachments(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) ListVolumeAttachments(arg0, arg1 any) *MockOCIComputeClientListVolumeAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumeAttachments", reflect.TypeOf((*MockOCIComputeClient)(nil).ListVolumeAttachments), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumeAttachments", reflect.TypeOf((*MockOCIComputeClient)(nil).ListVolumeAttachments), arg0, arg1) + return &MockOCIComputeClientListVolumeAttachmentsCall{Call: call} +} + +// MockOCIComputeClientListVolumeAttachmentsCall wrap *gomock.Call +type MockOCIComputeClientListVolumeAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientListVolumeAttachmentsCall) Return(arg0 core.ListVolumeAttachmentsResponse, arg1 error) *MockOCIComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientListVolumeAttachmentsCall) Do(f func(context.Context, core.ListVolumeAttachmentsRequest) (core.ListVolumeAttachmentsResponse, error)) *MockOCIComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientListVolumeAttachmentsCall) DoAndReturn(f func(context.Context, core.ListVolumeAttachmentsRequest) (core.ListVolumeAttachmentsResponse, error)) *MockOCIComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TerminateInstance mocks base method. @@ -197,7 +437,31 @@ func (m *MockOCIComputeClient) TerminateInstance(arg0 context.Context, arg1 core } // TerminateInstance indicates an expected call of TerminateInstance. -func (mr *MockOCIComputeClientMockRecorder) TerminateInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIComputeClientMockRecorder) TerminateInstance(arg0, arg1 any) *MockOCIComputeClientTerminateInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TerminateInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).TerminateInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TerminateInstance", reflect.TypeOf((*MockOCIComputeClient)(nil).TerminateInstance), arg0, arg1) + return &MockOCIComputeClientTerminateInstanceCall{Call: call} +} + +// MockOCIComputeClientTerminateInstanceCall wrap *gomock.Call +type MockOCIComputeClientTerminateInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIComputeClientTerminateInstanceCall) Return(arg0 core.TerminateInstanceResponse, arg1 error) *MockOCIComputeClientTerminateInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIComputeClientTerminateInstanceCall) Do(f func(context.Context, core.TerminateInstanceRequest) (core.TerminateInstanceResponse, error)) *MockOCIComputeClientTerminateInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIComputeClientTerminateInstanceCall) DoAndReturn(f func(context.Context, core.TerminateInstanceRequest) (core.TerminateInstanceResponse, error)) *MockOCIComputeClientTerminateInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_clientnetworking.go b/internal/provider/oci/testing/mocks_clientnetworking.go index 5335d061d68..6274f7b72b5 100644 --- a/internal/provider/oci/testing/mocks_clientnetworking.go +++ b/internal/provider/oci/testing/mocks_clientnetworking.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination ../testing/mocks_clientnetworking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIVirtualNetworkingClient +// mockgen -typed -package testing -destination ../testing/mocks_clientnetworking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIVirtualNetworkingClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockOCIVirtualNetworkingClient) CreateInternetGateway(arg0 context.Cont } // CreateInternetGateway indicates an expected call of CreateInternetGateway. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateInternetGateway(arg0, arg1 any) *MockOCIVirtualNetworkingClientCreateInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateInternetGateway), arg0, arg1) + return &MockOCIVirtualNetworkingClientCreateInternetGatewayCall{Call: call} +} + +// MockOCIVirtualNetworkingClientCreateInternetGatewayCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientCreateInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientCreateInternetGatewayCall) Return(arg0 core.CreateInternetGatewayResponse, arg1 error) *MockOCIVirtualNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientCreateInternetGatewayCall) Do(f func(context.Context, core.CreateInternetGatewayRequest) (core.CreateInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientCreateInternetGatewayCall) DoAndReturn(f func(context.Context, core.CreateInternetGatewayRequest) (core.CreateInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateRouteTable mocks base method. @@ -62,9 +86,33 @@ func (m *MockOCIVirtualNetworkingClient) CreateRouteTable(arg0 context.Context, } // CreateRouteTable indicates an expected call of CreateRouteTable. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateRouteTable(arg0, arg1 any) *MockOCIVirtualNetworkingClientCreateRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateRouteTable), arg0, arg1) + return &MockOCIVirtualNetworkingClientCreateRouteTableCall{Call: call} +} + +// MockOCIVirtualNetworkingClientCreateRouteTableCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientCreateRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientCreateRouteTableCall) Return(arg0 core.CreateRouteTableResponse, arg1 error) *MockOCIVirtualNetworkingClientCreateRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientCreateRouteTableCall) Do(f func(context.Context, core.CreateRouteTableRequest) (core.CreateRouteTableResponse, error)) *MockOCIVirtualNetworkingClientCreateRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientCreateRouteTableCall) DoAndReturn(f func(context.Context, core.CreateRouteTableRequest) (core.CreateRouteTableResponse, error)) *MockOCIVirtualNetworkingClientCreateRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecurityList mocks base method. @@ -77,9 +125,33 @@ func (m *MockOCIVirtualNetworkingClient) CreateSecurityList(arg0 context.Context } // CreateSecurityList indicates an expected call of CreateSecurityList. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateSecurityList(arg0, arg1 any) *MockOCIVirtualNetworkingClientCreateSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateSecurityList), arg0, arg1) + return &MockOCIVirtualNetworkingClientCreateSecurityListCall{Call: call} +} + +// MockOCIVirtualNetworkingClientCreateSecurityListCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientCreateSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientCreateSecurityListCall) Return(arg0 core.CreateSecurityListResponse, arg1 error) *MockOCIVirtualNetworkingClientCreateSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientCreateSecurityListCall) Do(f func(context.Context, core.CreateSecurityListRequest) (core.CreateSecurityListResponse, error)) *MockOCIVirtualNetworkingClientCreateSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientCreateSecurityListCall) DoAndReturn(f func(context.Context, core.CreateSecurityListRequest) (core.CreateSecurityListResponse, error)) *MockOCIVirtualNetworkingClientCreateSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSubnet mocks base method. @@ -92,9 +164,33 @@ func (m *MockOCIVirtualNetworkingClient) CreateSubnet(arg0 context.Context, arg1 } // CreateSubnet indicates an expected call of CreateSubnet. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateSubnet(arg0, arg1 any) *MockOCIVirtualNetworkingClientCreateSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateSubnet), arg0, arg1) + return &MockOCIVirtualNetworkingClientCreateSubnetCall{Call: call} +} + +// MockOCIVirtualNetworkingClientCreateSubnetCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientCreateSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientCreateSubnetCall) Return(arg0 core.CreateSubnetResponse, arg1 error) *MockOCIVirtualNetworkingClientCreateSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientCreateSubnetCall) Do(f func(context.Context, core.CreateSubnetRequest) (core.CreateSubnetResponse, error)) *MockOCIVirtualNetworkingClientCreateSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientCreateSubnetCall) DoAndReturn(f func(context.Context, core.CreateSubnetRequest) (core.CreateSubnetResponse, error)) *MockOCIVirtualNetworkingClientCreateSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateVcn mocks base method. @@ -107,9 +203,33 @@ func (m *MockOCIVirtualNetworkingClient) CreateVcn(arg0 context.Context, arg1 co } // CreateVcn indicates an expected call of CreateVcn. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) CreateVcn(arg0, arg1 any) *MockOCIVirtualNetworkingClientCreateVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).CreateVcn), arg0, arg1) + return &MockOCIVirtualNetworkingClientCreateVcnCall{Call: call} +} + +// MockOCIVirtualNetworkingClientCreateVcnCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientCreateVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientCreateVcnCall) Return(arg0 core.CreateVcnResponse, arg1 error) *MockOCIVirtualNetworkingClientCreateVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientCreateVcnCall) Do(f func(context.Context, core.CreateVcnRequest) (core.CreateVcnResponse, error)) *MockOCIVirtualNetworkingClientCreateVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientCreateVcnCall) DoAndReturn(f func(context.Context, core.CreateVcnRequest) (core.CreateVcnResponse, error)) *MockOCIVirtualNetworkingClientCreateVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInternetGateway mocks base method. @@ -122,9 +242,33 @@ func (m *MockOCIVirtualNetworkingClient) DeleteInternetGateway(arg0 context.Cont } // DeleteInternetGateway indicates an expected call of DeleteInternetGateway. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteInternetGateway(arg0, arg1 any) *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteInternetGateway), arg0, arg1) + return &MockOCIVirtualNetworkingClientDeleteInternetGatewayCall{Call: call} +} + +// MockOCIVirtualNetworkingClientDeleteInternetGatewayCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientDeleteInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall) Return(arg0 core.DeleteInternetGatewayResponse, arg1 error) *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall) Do(f func(context.Context, core.DeleteInternetGatewayRequest) (core.DeleteInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall) DoAndReturn(f func(context.Context, core.DeleteInternetGatewayRequest) (core.DeleteInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteRouteTable mocks base method. @@ -137,9 +281,33 @@ func (m *MockOCIVirtualNetworkingClient) DeleteRouteTable(arg0 context.Context, } // DeleteRouteTable indicates an expected call of DeleteRouteTable. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteRouteTable(arg0, arg1 any) *MockOCIVirtualNetworkingClientDeleteRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteRouteTable), arg0, arg1) + return &MockOCIVirtualNetworkingClientDeleteRouteTableCall{Call: call} +} + +// MockOCIVirtualNetworkingClientDeleteRouteTableCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientDeleteRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientDeleteRouteTableCall) Return(arg0 core.DeleteRouteTableResponse, arg1 error) *MockOCIVirtualNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientDeleteRouteTableCall) Do(f func(context.Context, core.DeleteRouteTableRequest) (core.DeleteRouteTableResponse, error)) *MockOCIVirtualNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientDeleteRouteTableCall) DoAndReturn(f func(context.Context, core.DeleteRouteTableRequest) (core.DeleteRouteTableResponse, error)) *MockOCIVirtualNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecurityList mocks base method. @@ -152,9 +320,33 @@ func (m *MockOCIVirtualNetworkingClient) DeleteSecurityList(arg0 context.Context } // DeleteSecurityList indicates an expected call of DeleteSecurityList. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteSecurityList(arg0, arg1 any) *MockOCIVirtualNetworkingClientDeleteSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteSecurityList), arg0, arg1) + return &MockOCIVirtualNetworkingClientDeleteSecurityListCall{Call: call} +} + +// MockOCIVirtualNetworkingClientDeleteSecurityListCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientDeleteSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientDeleteSecurityListCall) Return(arg0 core.DeleteSecurityListResponse, arg1 error) *MockOCIVirtualNetworkingClientDeleteSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientDeleteSecurityListCall) Do(f func(context.Context, core.DeleteSecurityListRequest) (core.DeleteSecurityListResponse, error)) *MockOCIVirtualNetworkingClientDeleteSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientDeleteSecurityListCall) DoAndReturn(f func(context.Context, core.DeleteSecurityListRequest) (core.DeleteSecurityListResponse, error)) *MockOCIVirtualNetworkingClientDeleteSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSubnet mocks base method. @@ -167,9 +359,33 @@ func (m *MockOCIVirtualNetworkingClient) DeleteSubnet(arg0 context.Context, arg1 } // DeleteSubnet indicates an expected call of DeleteSubnet. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteSubnet(arg0, arg1 any) *MockOCIVirtualNetworkingClientDeleteSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteSubnet), arg0, arg1) + return &MockOCIVirtualNetworkingClientDeleteSubnetCall{Call: call} +} + +// MockOCIVirtualNetworkingClientDeleteSubnetCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientDeleteSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientDeleteSubnetCall) Return(arg0 core.DeleteSubnetResponse, arg1 error) *MockOCIVirtualNetworkingClientDeleteSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientDeleteSubnetCall) Do(f func(context.Context, core.DeleteSubnetRequest) (core.DeleteSubnetResponse, error)) *MockOCIVirtualNetworkingClientDeleteSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientDeleteSubnetCall) DoAndReturn(f func(context.Context, core.DeleteSubnetRequest) (core.DeleteSubnetResponse, error)) *MockOCIVirtualNetworkingClientDeleteSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteVcn mocks base method. @@ -182,9 +398,33 @@ func (m *MockOCIVirtualNetworkingClient) DeleteVcn(arg0 context.Context, arg1 co } // DeleteVcn indicates an expected call of DeleteVcn. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) DeleteVcn(arg0, arg1 any) *MockOCIVirtualNetworkingClientDeleteVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).DeleteVcn), arg0, arg1) + return &MockOCIVirtualNetworkingClientDeleteVcnCall{Call: call} +} + +// MockOCIVirtualNetworkingClientDeleteVcnCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientDeleteVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientDeleteVcnCall) Return(arg0 core.DeleteVcnResponse, arg1 error) *MockOCIVirtualNetworkingClientDeleteVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientDeleteVcnCall) Do(f func(context.Context, core.DeleteVcnRequest) (core.DeleteVcnResponse, error)) *MockOCIVirtualNetworkingClientDeleteVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientDeleteVcnCall) DoAndReturn(f func(context.Context, core.DeleteVcnRequest) (core.DeleteVcnResponse, error)) *MockOCIVirtualNetworkingClientDeleteVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInternetGateway mocks base method. @@ -197,9 +437,33 @@ func (m *MockOCIVirtualNetworkingClient) GetInternetGateway(arg0 context.Context } // GetInternetGateway indicates an expected call of GetInternetGateway. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetInternetGateway(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInternetGateway", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetInternetGateway), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetInternetGatewayCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetInternetGatewayCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetInternetGatewayCall) Return(arg0 core.GetInternetGatewayResponse, arg1 error) *MockOCIVirtualNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetInternetGatewayCall) Do(f func(context.Context, core.GetInternetGatewayRequest) (core.GetInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetInternetGatewayCall) DoAndReturn(f func(context.Context, core.GetInternetGatewayRequest) (core.GetInternetGatewayResponse, error)) *MockOCIVirtualNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRouteTable mocks base method. @@ -212,9 +476,33 @@ func (m *MockOCIVirtualNetworkingClient) GetRouteTable(arg0 context.Context, arg } // GetRouteTable indicates an expected call of GetRouteTable. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetRouteTable(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRouteTable", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetRouteTable), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetRouteTableCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetRouteTableCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetRouteTableCall) Return(arg0 core.GetRouteTableResponse, arg1 error) *MockOCIVirtualNetworkingClientGetRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetRouteTableCall) Do(f func(context.Context, core.GetRouteTableRequest) (core.GetRouteTableResponse, error)) *MockOCIVirtualNetworkingClientGetRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetRouteTableCall) DoAndReturn(f func(context.Context, core.GetRouteTableRequest) (core.GetRouteTableResponse, error)) *MockOCIVirtualNetworkingClientGetRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecurityList mocks base method. @@ -227,9 +515,33 @@ func (m *MockOCIVirtualNetworkingClient) GetSecurityList(arg0 context.Context, a } // GetSecurityList indicates an expected call of GetSecurityList. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetSecurityList(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecurityList", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetSecurityList), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetSecurityListCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetSecurityListCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetSecurityListCall) Return(arg0 core.GetSecurityListResponse, arg1 error) *MockOCIVirtualNetworkingClientGetSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetSecurityListCall) Do(f func(context.Context, core.GetSecurityListRequest) (core.GetSecurityListResponse, error)) *MockOCIVirtualNetworkingClientGetSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetSecurityListCall) DoAndReturn(f func(context.Context, core.GetSecurityListRequest) (core.GetSecurityListResponse, error)) *MockOCIVirtualNetworkingClientGetSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSubnet mocks base method. @@ -242,9 +554,33 @@ func (m *MockOCIVirtualNetworkingClient) GetSubnet(arg0 context.Context, arg1 co } // GetSubnet indicates an expected call of GetSubnet. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetSubnet(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetSubnet), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetSubnetCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetSubnetCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetSubnetCall) Return(arg0 core.GetSubnetResponse, arg1 error) *MockOCIVirtualNetworkingClientGetSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetSubnetCall) Do(f func(context.Context, core.GetSubnetRequest) (core.GetSubnetResponse, error)) *MockOCIVirtualNetworkingClientGetSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetSubnetCall) DoAndReturn(f func(context.Context, core.GetSubnetRequest) (core.GetSubnetResponse, error)) *MockOCIVirtualNetworkingClientGetSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVcn mocks base method. @@ -257,9 +593,33 @@ func (m *MockOCIVirtualNetworkingClient) GetVcn(arg0 context.Context, arg1 core. } // GetVcn indicates an expected call of GetVcn. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetVcn(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVcn", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetVcn), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetVcnCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetVcnCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetVcnCall) Return(arg0 core.GetVcnResponse, arg1 error) *MockOCIVirtualNetworkingClientGetVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetVcnCall) Do(f func(context.Context, core.GetVcnRequest) (core.GetVcnResponse, error)) *MockOCIVirtualNetworkingClientGetVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetVcnCall) DoAndReturn(f func(context.Context, core.GetVcnRequest) (core.GetVcnResponse, error)) *MockOCIVirtualNetworkingClientGetVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVnic mocks base method. @@ -272,9 +632,33 @@ func (m *MockOCIVirtualNetworkingClient) GetVnic(arg0 context.Context, arg1 core } // GetVnic indicates an expected call of GetVnic. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetVnic(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) GetVnic(arg0, arg1 any) *MockOCIVirtualNetworkingClientGetVnicCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVnic", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetVnic), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVnic", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).GetVnic), arg0, arg1) + return &MockOCIVirtualNetworkingClientGetVnicCall{Call: call} +} + +// MockOCIVirtualNetworkingClientGetVnicCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientGetVnicCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientGetVnicCall) Return(arg0 core.GetVnicResponse, arg1 error) *MockOCIVirtualNetworkingClientGetVnicCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientGetVnicCall) Do(f func(context.Context, core.GetVnicRequest) (core.GetVnicResponse, error)) *MockOCIVirtualNetworkingClientGetVnicCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientGetVnicCall) DoAndReturn(f func(context.Context, core.GetVnicRequest) (core.GetVnicResponse, error)) *MockOCIVirtualNetworkingClientGetVnicCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListInternetGateways mocks base method. @@ -287,9 +671,33 @@ func (m *MockOCIVirtualNetworkingClient) ListInternetGateways(arg0 context.Conte } // ListInternetGateways indicates an expected call of ListInternetGateways. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListInternetGateways(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListInternetGateways(arg0, arg1 any) *MockOCIVirtualNetworkingClientListInternetGatewaysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInternetGateways", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListInternetGateways), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInternetGateways", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListInternetGateways), arg0, arg1) + return &MockOCIVirtualNetworkingClientListInternetGatewaysCall{Call: call} +} + +// MockOCIVirtualNetworkingClientListInternetGatewaysCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientListInternetGatewaysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientListInternetGatewaysCall) Return(arg0 core.ListInternetGatewaysResponse, arg1 error) *MockOCIVirtualNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientListInternetGatewaysCall) Do(f func(context.Context, core.ListInternetGatewaysRequest) (core.ListInternetGatewaysResponse, error)) *MockOCIVirtualNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientListInternetGatewaysCall) DoAndReturn(f func(context.Context, core.ListInternetGatewaysRequest) (core.ListInternetGatewaysResponse, error)) *MockOCIVirtualNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListRouteTables mocks base method. @@ -302,9 +710,33 @@ func (m *MockOCIVirtualNetworkingClient) ListRouteTables(arg0 context.Context, a } // ListRouteTables indicates an expected call of ListRouteTables. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListRouteTables(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListRouteTables(arg0, arg1 any) *MockOCIVirtualNetworkingClientListRouteTablesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRouteTables", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListRouteTables), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRouteTables", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListRouteTables), arg0, arg1) + return &MockOCIVirtualNetworkingClientListRouteTablesCall{Call: call} +} + +// MockOCIVirtualNetworkingClientListRouteTablesCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientListRouteTablesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientListRouteTablesCall) Return(arg0 core.ListRouteTablesResponse, arg1 error) *MockOCIVirtualNetworkingClientListRouteTablesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientListRouteTablesCall) Do(f func(context.Context, core.ListRouteTablesRequest) (core.ListRouteTablesResponse, error)) *MockOCIVirtualNetworkingClientListRouteTablesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientListRouteTablesCall) DoAndReturn(f func(context.Context, core.ListRouteTablesRequest) (core.ListRouteTablesResponse, error)) *MockOCIVirtualNetworkingClientListRouteTablesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecurityLists mocks base method. @@ -317,9 +749,33 @@ func (m *MockOCIVirtualNetworkingClient) ListSecurityLists(arg0 context.Context, } // ListSecurityLists indicates an expected call of ListSecurityLists. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListSecurityLists(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListSecurityLists(arg0, arg1 any) *MockOCIVirtualNetworkingClientListSecurityListsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecurityLists", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListSecurityLists), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecurityLists", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListSecurityLists), arg0, arg1) + return &MockOCIVirtualNetworkingClientListSecurityListsCall{Call: call} +} + +// MockOCIVirtualNetworkingClientListSecurityListsCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientListSecurityListsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientListSecurityListsCall) Return(arg0 core.ListSecurityListsResponse, arg1 error) *MockOCIVirtualNetworkingClientListSecurityListsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientListSecurityListsCall) Do(f func(context.Context, core.ListSecurityListsRequest) (core.ListSecurityListsResponse, error)) *MockOCIVirtualNetworkingClientListSecurityListsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientListSecurityListsCall) DoAndReturn(f func(context.Context, core.ListSecurityListsRequest) (core.ListSecurityListsResponse, error)) *MockOCIVirtualNetworkingClientListSecurityListsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSubnets mocks base method. @@ -332,9 +788,33 @@ func (m *MockOCIVirtualNetworkingClient) ListSubnets(arg0 context.Context, arg1 } // ListSubnets indicates an expected call of ListSubnets. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListSubnets(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListSubnets(arg0, arg1 any) *MockOCIVirtualNetworkingClientListSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnets", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListSubnets), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnets", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListSubnets), arg0, arg1) + return &MockOCIVirtualNetworkingClientListSubnetsCall{Call: call} +} + +// MockOCIVirtualNetworkingClientListSubnetsCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientListSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientListSubnetsCall) Return(arg0 core.ListSubnetsResponse, arg1 error) *MockOCIVirtualNetworkingClientListSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientListSubnetsCall) Do(f func(context.Context, core.ListSubnetsRequest) (core.ListSubnetsResponse, error)) *MockOCIVirtualNetworkingClientListSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientListSubnetsCall) DoAndReturn(f func(context.Context, core.ListSubnetsRequest) (core.ListSubnetsResponse, error)) *MockOCIVirtualNetworkingClientListSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVcns mocks base method. @@ -347,7 +827,31 @@ func (m *MockOCIVirtualNetworkingClient) ListVcns(arg0 context.Context, arg1 cor } // ListVcns indicates an expected call of ListVcns. -func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListVcns(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIVirtualNetworkingClientMockRecorder) ListVcns(arg0, arg1 any) *MockOCIVirtualNetworkingClientListVcnsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVcns", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListVcns), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVcns", reflect.TypeOf((*MockOCIVirtualNetworkingClient)(nil).ListVcns), arg0, arg1) + return &MockOCIVirtualNetworkingClientListVcnsCall{Call: call} +} + +// MockOCIVirtualNetworkingClientListVcnsCall wrap *gomock.Call +type MockOCIVirtualNetworkingClientListVcnsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIVirtualNetworkingClientListVcnsCall) Return(arg0 core.ListVcnsResponse, arg1 error) *MockOCIVirtualNetworkingClientListVcnsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIVirtualNetworkingClientListVcnsCall) Do(f func(context.Context, core.ListVcnsRequest) (core.ListVcnsResponse, error)) *MockOCIVirtualNetworkingClientListVcnsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIVirtualNetworkingClientListVcnsCall) DoAndReturn(f func(context.Context, core.ListVcnsRequest) (core.ListVcnsResponse, error)) *MockOCIVirtualNetworkingClientListVcnsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_clientstorage.go b/internal/provider/oci/testing/mocks_clientstorage.go index e42c9e211d9..683070a99ab 100644 --- a/internal/provider/oci/testing/mocks_clientstorage.go +++ b/internal/provider/oci/testing/mocks_clientstorage.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination ../testing/mocks_clientstorage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIStorageClient +// mockgen -typed -package testing -destination ../testing/mocks_clientstorage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci/common OCIStorageClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockOCIStorageClient) CreateVolume(arg0 context.Context, arg1 core.Crea } // CreateVolume indicates an expected call of CreateVolume. -func (mr *MockOCIStorageClientMockRecorder) CreateVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIStorageClientMockRecorder) CreateVolume(arg0, arg1 any) *MockOCIStorageClientCreateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).CreateVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).CreateVolume), arg0, arg1) + return &MockOCIStorageClientCreateVolumeCall{Call: call} +} + +// MockOCIStorageClientCreateVolumeCall wrap *gomock.Call +type MockOCIStorageClientCreateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIStorageClientCreateVolumeCall) Return(arg0 core.CreateVolumeResponse, arg1 error) *MockOCIStorageClientCreateVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIStorageClientCreateVolumeCall) Do(f func(context.Context, core.CreateVolumeRequest) (core.CreateVolumeResponse, error)) *MockOCIStorageClientCreateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIStorageClientCreateVolumeCall) DoAndReturn(f func(context.Context, core.CreateVolumeRequest) (core.CreateVolumeResponse, error)) *MockOCIStorageClientCreateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteVolume mocks base method. @@ -62,9 +86,33 @@ func (m *MockOCIStorageClient) DeleteVolume(arg0 context.Context, arg1 core.Dele } // DeleteVolume indicates an expected call of DeleteVolume. -func (mr *MockOCIStorageClientMockRecorder) DeleteVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIStorageClientMockRecorder) DeleteVolume(arg0, arg1 any) *MockOCIStorageClientDeleteVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).DeleteVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).DeleteVolume), arg0, arg1) + return &MockOCIStorageClientDeleteVolumeCall{Call: call} +} + +// MockOCIStorageClientDeleteVolumeCall wrap *gomock.Call +type MockOCIStorageClientDeleteVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIStorageClientDeleteVolumeCall) Return(arg0 core.DeleteVolumeResponse, arg1 error) *MockOCIStorageClientDeleteVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIStorageClientDeleteVolumeCall) Do(f func(context.Context, core.DeleteVolumeRequest) (core.DeleteVolumeResponse, error)) *MockOCIStorageClientDeleteVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIStorageClientDeleteVolumeCall) DoAndReturn(f func(context.Context, core.DeleteVolumeRequest) (core.DeleteVolumeResponse, error)) *MockOCIStorageClientDeleteVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVolume mocks base method. @@ -77,9 +125,33 @@ func (m *MockOCIStorageClient) GetVolume(arg0 context.Context, arg1 core.GetVolu } // GetVolume indicates an expected call of GetVolume. -func (mr *MockOCIStorageClientMockRecorder) GetVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIStorageClientMockRecorder) GetVolume(arg0, arg1 any) *MockOCIStorageClientGetVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).GetVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).GetVolume), arg0, arg1) + return &MockOCIStorageClientGetVolumeCall{Call: call} +} + +// MockOCIStorageClientGetVolumeCall wrap *gomock.Call +type MockOCIStorageClientGetVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIStorageClientGetVolumeCall) Return(arg0 core.GetVolumeResponse, arg1 error) *MockOCIStorageClientGetVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIStorageClientGetVolumeCall) Do(f func(context.Context, core.GetVolumeRequest) (core.GetVolumeResponse, error)) *MockOCIStorageClientGetVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIStorageClientGetVolumeCall) DoAndReturn(f func(context.Context, core.GetVolumeRequest) (core.GetVolumeResponse, error)) *MockOCIStorageClientGetVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVolumes mocks base method. @@ -92,9 +164,33 @@ func (m *MockOCIStorageClient) ListVolumes(arg0 context.Context, arg1 core.ListV } // ListVolumes indicates an expected call of ListVolumes. -func (mr *MockOCIStorageClientMockRecorder) ListVolumes(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIStorageClientMockRecorder) ListVolumes(arg0, arg1 any) *MockOCIStorageClientListVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumes", reflect.TypeOf((*MockOCIStorageClient)(nil).ListVolumes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumes", reflect.TypeOf((*MockOCIStorageClient)(nil).ListVolumes), arg0, arg1) + return &MockOCIStorageClientListVolumesCall{Call: call} +} + +// MockOCIStorageClientListVolumesCall wrap *gomock.Call +type MockOCIStorageClientListVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIStorageClientListVolumesCall) Return(arg0 core.ListVolumesResponse, arg1 error) *MockOCIStorageClientListVolumesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIStorageClientListVolumesCall) Do(f func(context.Context, core.ListVolumesRequest) (core.ListVolumesResponse, error)) *MockOCIStorageClientListVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIStorageClientListVolumesCall) DoAndReturn(f func(context.Context, core.ListVolumesRequest) (core.ListVolumesResponse, error)) *MockOCIStorageClientListVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateVolume mocks base method. @@ -107,7 +203,31 @@ func (m *MockOCIStorageClient) UpdateVolume(arg0 context.Context, arg1 core.Upda } // UpdateVolume indicates an expected call of UpdateVolume. -func (mr *MockOCIStorageClientMockRecorder) UpdateVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockOCIStorageClientMockRecorder) UpdateVolume(arg0, arg1 any) *MockOCIStorageClientUpdateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).UpdateVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVolume", reflect.TypeOf((*MockOCIStorageClient)(nil).UpdateVolume), arg0, arg1) + return &MockOCIStorageClientUpdateVolumeCall{Call: call} +} + +// MockOCIStorageClientUpdateVolumeCall wrap *gomock.Call +type MockOCIStorageClientUpdateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOCIStorageClientUpdateVolumeCall) Return(arg0 core.UpdateVolumeResponse, arg1 error) *MockOCIStorageClientUpdateVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOCIStorageClientUpdateVolumeCall) Do(f func(context.Context, core.UpdateVolumeRequest) (core.UpdateVolumeResponse, error)) *MockOCIStorageClientUpdateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOCIStorageClientUpdateVolumeCall) DoAndReturn(f func(context.Context, core.UpdateVolumeRequest) (core.UpdateVolumeResponse, error)) *MockOCIStorageClientUpdateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_compute.go b/internal/provider/oci/testing/mocks_compute.go index d47778c1c43..3bfba3bd150 100644 --- a/internal/provider/oci/testing/mocks_compute.go +++ b/internal/provider/oci/testing/mocks_compute.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/mocks_compute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci ComputeClient +// mockgen -typed -package testing -destination testing/mocks_compute.go -write_package_comment=false github.com/juju/juju/internal/provider/oci ComputeClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockComputeClient) AttachVolume(arg0 context.Context, arg1 core.AttachV } // AttachVolume indicates an expected call of AttachVolume. -func (mr *MockComputeClientMockRecorder) AttachVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) AttachVolume(arg0, arg1 any) *MockComputeClientAttachVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachVolume", reflect.TypeOf((*MockComputeClient)(nil).AttachVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachVolume", reflect.TypeOf((*MockComputeClient)(nil).AttachVolume), arg0, arg1) + return &MockComputeClientAttachVolumeCall{Call: call} +} + +// MockComputeClientAttachVolumeCall wrap *gomock.Call +type MockComputeClientAttachVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientAttachVolumeCall) Return(arg0 core.AttachVolumeResponse, arg1 error) *MockComputeClientAttachVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientAttachVolumeCall) Do(f func(context.Context, core.AttachVolumeRequest) (core.AttachVolumeResponse, error)) *MockComputeClientAttachVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientAttachVolumeCall) DoAndReturn(f func(context.Context, core.AttachVolumeRequest) (core.AttachVolumeResponse, error)) *MockComputeClientAttachVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DetachVolume mocks base method. @@ -62,9 +86,33 @@ func (m *MockComputeClient) DetachVolume(arg0 context.Context, arg1 core.DetachV } // DetachVolume indicates an expected call of DetachVolume. -func (mr *MockComputeClientMockRecorder) DetachVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) DetachVolume(arg0, arg1 any) *MockComputeClientDetachVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachVolume", reflect.TypeOf((*MockComputeClient)(nil).DetachVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachVolume", reflect.TypeOf((*MockComputeClient)(nil).DetachVolume), arg0, arg1) + return &MockComputeClientDetachVolumeCall{Call: call} +} + +// MockComputeClientDetachVolumeCall wrap *gomock.Call +type MockComputeClientDetachVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientDetachVolumeCall) Return(arg0 core.DetachVolumeResponse, arg1 error) *MockComputeClientDetachVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientDetachVolumeCall) Do(f func(context.Context, core.DetachVolumeRequest) (core.DetachVolumeResponse, error)) *MockComputeClientDetachVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientDetachVolumeCall) DoAndReturn(f func(context.Context, core.DetachVolumeRequest) (core.DetachVolumeResponse, error)) *MockComputeClientDetachVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstance mocks base method. @@ -77,9 +125,33 @@ func (m *MockComputeClient) GetInstance(arg0 context.Context, arg1 core.GetInsta } // GetInstance indicates an expected call of GetInstance. -func (mr *MockComputeClientMockRecorder) GetInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) GetInstance(arg0, arg1 any) *MockComputeClientGetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockComputeClient)(nil).GetInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockComputeClient)(nil).GetInstance), arg0, arg1) + return &MockComputeClientGetInstanceCall{Call: call} +} + +// MockComputeClientGetInstanceCall wrap *gomock.Call +type MockComputeClientGetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientGetInstanceCall) Return(arg0 core.GetInstanceResponse, arg1 error) *MockComputeClientGetInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientGetInstanceCall) Do(f func(context.Context, core.GetInstanceRequest) (core.GetInstanceResponse, error)) *MockComputeClientGetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientGetInstanceCall) DoAndReturn(f func(context.Context, core.GetInstanceRequest) (core.GetInstanceResponse, error)) *MockComputeClientGetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVolumeAttachment mocks base method. @@ -92,9 +164,33 @@ func (m *MockComputeClient) GetVolumeAttachment(arg0 context.Context, arg1 core. } // GetVolumeAttachment indicates an expected call of GetVolumeAttachment. -func (mr *MockComputeClientMockRecorder) GetVolumeAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) GetVolumeAttachment(arg0, arg1 any) *MockComputeClientGetVolumeAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAttachment", reflect.TypeOf((*MockComputeClient)(nil).GetVolumeAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAttachment", reflect.TypeOf((*MockComputeClient)(nil).GetVolumeAttachment), arg0, arg1) + return &MockComputeClientGetVolumeAttachmentCall{Call: call} +} + +// MockComputeClientGetVolumeAttachmentCall wrap *gomock.Call +type MockComputeClientGetVolumeAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientGetVolumeAttachmentCall) Return(arg0 core.GetVolumeAttachmentResponse, arg1 error) *MockComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientGetVolumeAttachmentCall) Do(f func(context.Context, core.GetVolumeAttachmentRequest) (core.GetVolumeAttachmentResponse, error)) *MockComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientGetVolumeAttachmentCall) DoAndReturn(f func(context.Context, core.GetVolumeAttachmentRequest) (core.GetVolumeAttachmentResponse, error)) *MockComputeClientGetVolumeAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LaunchInstance mocks base method. @@ -107,9 +203,33 @@ func (m *MockComputeClient) LaunchInstance(arg0 context.Context, arg1 core.Launc } // LaunchInstance indicates an expected call of LaunchInstance. -func (mr *MockComputeClientMockRecorder) LaunchInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) LaunchInstance(arg0, arg1 any) *MockComputeClientLaunchInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LaunchInstance", reflect.TypeOf((*MockComputeClient)(nil).LaunchInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LaunchInstance", reflect.TypeOf((*MockComputeClient)(nil).LaunchInstance), arg0, arg1) + return &MockComputeClientLaunchInstanceCall{Call: call} +} + +// MockComputeClientLaunchInstanceCall wrap *gomock.Call +type MockComputeClientLaunchInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientLaunchInstanceCall) Return(arg0 core.LaunchInstanceResponse, arg1 error) *MockComputeClientLaunchInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientLaunchInstanceCall) Do(f func(context.Context, core.LaunchInstanceRequest) (core.LaunchInstanceResponse, error)) *MockComputeClientLaunchInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientLaunchInstanceCall) DoAndReturn(f func(context.Context, core.LaunchInstanceRequest) (core.LaunchInstanceResponse, error)) *MockComputeClientLaunchInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListImages mocks base method. @@ -122,9 +242,33 @@ func (m *MockComputeClient) ListImages(arg0 context.Context, arg1 *string) ([]co } // ListImages indicates an expected call of ListImages. -func (mr *MockComputeClientMockRecorder) ListImages(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) ListImages(arg0, arg1 any) *MockComputeClientListImagesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockComputeClient)(nil).ListImages), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockComputeClient)(nil).ListImages), arg0, arg1) + return &MockComputeClientListImagesCall{Call: call} +} + +// MockComputeClientListImagesCall wrap *gomock.Call +type MockComputeClientListImagesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientListImagesCall) Return(arg0 []core.Image, arg1 error) *MockComputeClientListImagesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientListImagesCall) Do(f func(context.Context, *string) ([]core.Image, error)) *MockComputeClientListImagesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientListImagesCall) DoAndReturn(f func(context.Context, *string) ([]core.Image, error)) *MockComputeClientListImagesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListInstances mocks base method. @@ -137,9 +281,33 @@ func (m *MockComputeClient) ListInstances(arg0 context.Context, arg1 *string) ([ } // ListInstances indicates an expected call of ListInstances. -func (mr *MockComputeClientMockRecorder) ListInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) ListInstances(arg0, arg1 any) *MockComputeClientListInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstances", reflect.TypeOf((*MockComputeClient)(nil).ListInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstances", reflect.TypeOf((*MockComputeClient)(nil).ListInstances), arg0, arg1) + return &MockComputeClientListInstancesCall{Call: call} +} + +// MockComputeClientListInstancesCall wrap *gomock.Call +type MockComputeClientListInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientListInstancesCall) Return(arg0 []core.Instance, arg1 error) *MockComputeClientListInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientListInstancesCall) Do(f func(context.Context, *string) ([]core.Instance, error)) *MockComputeClientListInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientListInstancesCall) DoAndReturn(f func(context.Context, *string) ([]core.Instance, error)) *MockComputeClientListInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListShapes mocks base method. @@ -152,9 +320,33 @@ func (m *MockComputeClient) ListShapes(arg0 context.Context, arg1, arg2 *string) } // ListShapes indicates an expected call of ListShapes. -func (mr *MockComputeClientMockRecorder) ListShapes(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) ListShapes(arg0, arg1, arg2 any) *MockComputeClientListShapesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListShapes", reflect.TypeOf((*MockComputeClient)(nil).ListShapes), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListShapes", reflect.TypeOf((*MockComputeClient)(nil).ListShapes), arg0, arg1, arg2) + return &MockComputeClientListShapesCall{Call: call} +} + +// MockComputeClientListShapesCall wrap *gomock.Call +type MockComputeClientListShapesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientListShapesCall) Return(arg0 []core.Shape, arg1 error) *MockComputeClientListShapesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientListShapesCall) Do(f func(context.Context, *string, *string) ([]core.Shape, error)) *MockComputeClientListShapesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientListShapesCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.Shape, error)) *MockComputeClientListShapesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVnicAttachments mocks base method. @@ -167,9 +359,33 @@ func (m *MockComputeClient) ListVnicAttachments(arg0 context.Context, arg1, arg2 } // ListVnicAttachments indicates an expected call of ListVnicAttachments. -func (mr *MockComputeClientMockRecorder) ListVnicAttachments(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) ListVnicAttachments(arg0, arg1, arg2 any) *MockComputeClientListVnicAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVnicAttachments", reflect.TypeOf((*MockComputeClient)(nil).ListVnicAttachments), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVnicAttachments", reflect.TypeOf((*MockComputeClient)(nil).ListVnicAttachments), arg0, arg1, arg2) + return &MockComputeClientListVnicAttachmentsCall{Call: call} +} + +// MockComputeClientListVnicAttachmentsCall wrap *gomock.Call +type MockComputeClientListVnicAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientListVnicAttachmentsCall) Return(arg0 []core.VnicAttachment, arg1 error) *MockComputeClientListVnicAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientListVnicAttachmentsCall) Do(f func(context.Context, *string, *string) ([]core.VnicAttachment, error)) *MockComputeClientListVnicAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientListVnicAttachmentsCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.VnicAttachment, error)) *MockComputeClientListVnicAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVolumeAttachments mocks base method. @@ -182,9 +398,33 @@ func (m *MockComputeClient) ListVolumeAttachments(arg0 context.Context, arg1, ar } // ListVolumeAttachments indicates an expected call of ListVolumeAttachments. -func (mr *MockComputeClientMockRecorder) ListVolumeAttachments(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) ListVolumeAttachments(arg0, arg1, arg2 any) *MockComputeClientListVolumeAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumeAttachments", reflect.TypeOf((*MockComputeClient)(nil).ListVolumeAttachments), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumeAttachments", reflect.TypeOf((*MockComputeClient)(nil).ListVolumeAttachments), arg0, arg1, arg2) + return &MockComputeClientListVolumeAttachmentsCall{Call: call} +} + +// MockComputeClientListVolumeAttachmentsCall wrap *gomock.Call +type MockComputeClientListVolumeAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientListVolumeAttachmentsCall) Return(arg0 []core.VolumeAttachment, arg1 error) *MockComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientListVolumeAttachmentsCall) Do(f func(context.Context, *string, *string) ([]core.VolumeAttachment, error)) *MockComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientListVolumeAttachmentsCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.VolumeAttachment, error)) *MockComputeClientListVolumeAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TerminateInstance mocks base method. @@ -197,7 +437,31 @@ func (m *MockComputeClient) TerminateInstance(arg0 context.Context, arg1 core.Te } // TerminateInstance indicates an expected call of TerminateInstance. -func (mr *MockComputeClientMockRecorder) TerminateInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockComputeClientMockRecorder) TerminateInstance(arg0, arg1 any) *MockComputeClientTerminateInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TerminateInstance", reflect.TypeOf((*MockComputeClient)(nil).TerminateInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TerminateInstance", reflect.TypeOf((*MockComputeClient)(nil).TerminateInstance), arg0, arg1) + return &MockComputeClientTerminateInstanceCall{Call: call} +} + +// MockComputeClientTerminateInstanceCall wrap *gomock.Call +type MockComputeClientTerminateInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockComputeClientTerminateInstanceCall) Return(arg0 core.TerminateInstanceResponse, arg1 error) *MockComputeClientTerminateInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockComputeClientTerminateInstanceCall) Do(f func(context.Context, core.TerminateInstanceRequest) (core.TerminateInstanceResponse, error)) *MockComputeClientTerminateInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockComputeClientTerminateInstanceCall) DoAndReturn(f func(context.Context, core.TerminateInstanceRequest) (core.TerminateInstanceResponse, error)) *MockComputeClientTerminateInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_firewall.go b/internal/provider/oci/testing/mocks_firewall.go index 920495e53d0..87ba0591f84 100644 --- a/internal/provider/oci/testing/mocks_firewall.go +++ b/internal/provider/oci/testing/mocks_firewall.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/mocks_firewall.go -write_package_comment=false github.com/juju/juju/internal/provider/oci FirewallClient +// mockgen -typed -package testing -destination testing/mocks_firewall.go -write_package_comment=false github.com/juju/juju/internal/provider/oci FirewallClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockFirewallClient) CreateSecurityList(arg0 context.Context, arg1 core. } // CreateSecurityList indicates an expected call of CreateSecurityList. -func (mr *MockFirewallClientMockRecorder) CreateSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) CreateSecurityList(arg0, arg1 any) *MockFirewallClientCreateSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).CreateSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).CreateSecurityList), arg0, arg1) + return &MockFirewallClientCreateSecurityListCall{Call: call} +} + +// MockFirewallClientCreateSecurityListCall wrap *gomock.Call +type MockFirewallClientCreateSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallClientCreateSecurityListCall) Return(arg0 core.CreateSecurityListResponse, arg1 error) *MockFirewallClientCreateSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallClientCreateSecurityListCall) Do(f func(context.Context, core.CreateSecurityListRequest) (core.CreateSecurityListResponse, error)) *MockFirewallClientCreateSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallClientCreateSecurityListCall) DoAndReturn(f func(context.Context, core.CreateSecurityListRequest) (core.CreateSecurityListResponse, error)) *MockFirewallClientCreateSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSecurityList mocks base method. @@ -62,9 +86,33 @@ func (m *MockFirewallClient) DeleteSecurityList(arg0 context.Context, arg1 core. } // DeleteSecurityList indicates an expected call of DeleteSecurityList. -func (mr *MockFirewallClientMockRecorder) DeleteSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) DeleteSecurityList(arg0, arg1 any) *MockFirewallClientDeleteSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).DeleteSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).DeleteSecurityList), arg0, arg1) + return &MockFirewallClientDeleteSecurityListCall{Call: call} +} + +// MockFirewallClientDeleteSecurityListCall wrap *gomock.Call +type MockFirewallClientDeleteSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallClientDeleteSecurityListCall) Return(arg0 core.DeleteSecurityListResponse, arg1 error) *MockFirewallClientDeleteSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallClientDeleteSecurityListCall) Do(f func(context.Context, core.DeleteSecurityListRequest) (core.DeleteSecurityListResponse, error)) *MockFirewallClientDeleteSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallClientDeleteSecurityListCall) DoAndReturn(f func(context.Context, core.DeleteSecurityListRequest) (core.DeleteSecurityListResponse, error)) *MockFirewallClientDeleteSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecurityList mocks base method. @@ -77,9 +125,33 @@ func (m *MockFirewallClient) GetSecurityList(arg0 context.Context, arg1 core.Get } // GetSecurityList indicates an expected call of GetSecurityList. -func (mr *MockFirewallClientMockRecorder) GetSecurityList(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) GetSecurityList(arg0, arg1 any) *MockFirewallClientGetSecurityListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).GetSecurityList), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecurityList", reflect.TypeOf((*MockFirewallClient)(nil).GetSecurityList), arg0, arg1) + return &MockFirewallClientGetSecurityListCall{Call: call} +} + +// MockFirewallClientGetSecurityListCall wrap *gomock.Call +type MockFirewallClientGetSecurityListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallClientGetSecurityListCall) Return(arg0 core.GetSecurityListResponse, arg1 error) *MockFirewallClientGetSecurityListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallClientGetSecurityListCall) Do(f func(context.Context, core.GetSecurityListRequest) (core.GetSecurityListResponse, error)) *MockFirewallClientGetSecurityListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallClientGetSecurityListCall) DoAndReturn(f func(context.Context, core.GetSecurityListRequest) (core.GetSecurityListResponse, error)) *MockFirewallClientGetSecurityListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSecurityLists mocks base method. @@ -92,7 +164,31 @@ func (m *MockFirewallClient) ListSecurityLists(arg0 context.Context, arg1, arg2 } // ListSecurityLists indicates an expected call of ListSecurityLists. -func (mr *MockFirewallClientMockRecorder) ListSecurityLists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) ListSecurityLists(arg0, arg1, arg2 any) *MockFirewallClientListSecurityListsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecurityLists", reflect.TypeOf((*MockFirewallClient)(nil).ListSecurityLists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecurityLists", reflect.TypeOf((*MockFirewallClient)(nil).ListSecurityLists), arg0, arg1, arg2) + return &MockFirewallClientListSecurityListsCall{Call: call} +} + +// MockFirewallClientListSecurityListsCall wrap *gomock.Call +type MockFirewallClientListSecurityListsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallClientListSecurityListsCall) Return(arg0 []core.SecurityList, arg1 error) *MockFirewallClientListSecurityListsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallClientListSecurityListsCall) Do(f func(context.Context, *string, *string) ([]core.SecurityList, error)) *MockFirewallClientListSecurityListsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallClientListSecurityListsCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.SecurityList, error)) *MockFirewallClientListSecurityListsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_identity.go b/internal/provider/oci/testing/mocks_identity.go index 448486fce42..f66ff914657 100644 --- a/internal/provider/oci/testing/mocks_identity.go +++ b/internal/provider/oci/testing/mocks_identity.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/mocks_identity.go -write_package_comment=false github.com/juju/juju/internal/provider/oci IdentityClient +// mockgen -typed -package testing -destination testing/mocks_identity.go -write_package_comment=false github.com/juju/juju/internal/provider/oci IdentityClient package testing import ( @@ -47,7 +47,31 @@ func (m *MockIdentityClient) ListAvailabilityDomains(arg0 context.Context, arg1 } // ListAvailabilityDomains indicates an expected call of ListAvailabilityDomains. -func (mr *MockIdentityClientMockRecorder) ListAvailabilityDomains(arg0, arg1 any) *gomock.Call { +func (mr *MockIdentityClientMockRecorder) ListAvailabilityDomains(arg0, arg1 any) *MockIdentityClientListAvailabilityDomainsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAvailabilityDomains", reflect.TypeOf((*MockIdentityClient)(nil).ListAvailabilityDomains), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAvailabilityDomains", reflect.TypeOf((*MockIdentityClient)(nil).ListAvailabilityDomains), arg0, arg1) + return &MockIdentityClientListAvailabilityDomainsCall{Call: call} +} + +// MockIdentityClientListAvailabilityDomainsCall wrap *gomock.Call +type MockIdentityClientListAvailabilityDomainsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIdentityClientListAvailabilityDomainsCall) Return(arg0 identity.ListAvailabilityDomainsResponse, arg1 error) *MockIdentityClientListAvailabilityDomainsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIdentityClientListAvailabilityDomainsCall) Do(f func(context.Context, identity.ListAvailabilityDomainsRequest) (identity.ListAvailabilityDomainsResponse, error)) *MockIdentityClientListAvailabilityDomainsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIdentityClientListAvailabilityDomainsCall) DoAndReturn(f func(context.Context, identity.ListAvailabilityDomainsRequest) (identity.ListAvailabilityDomainsResponse, error)) *MockIdentityClientListAvailabilityDomainsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_networking.go b/internal/provider/oci/testing/mocks_networking.go index e50275b445c..48b4b9e614c 100644 --- a/internal/provider/oci/testing/mocks_networking.go +++ b/internal/provider/oci/testing/mocks_networking.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/mocks_networking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci NetworkingClient +// mockgen -typed -package testing -destination testing/mocks_networking.go -write_package_comment=false github.com/juju/juju/internal/provider/oci NetworkingClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockNetworkingClient) CreateInternetGateway(arg0 context.Context, arg1 } // CreateInternetGateway indicates an expected call of CreateInternetGateway. -func (mr *MockNetworkingClientMockRecorder) CreateInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) CreateInternetGateway(arg0, arg1 any) *MockNetworkingClientCreateInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).CreateInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).CreateInternetGateway), arg0, arg1) + return &MockNetworkingClientCreateInternetGatewayCall{Call: call} +} + +// MockNetworkingClientCreateInternetGatewayCall wrap *gomock.Call +type MockNetworkingClientCreateInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientCreateInternetGatewayCall) Return(arg0 core.CreateInternetGatewayResponse, arg1 error) *MockNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientCreateInternetGatewayCall) Do(f func(context.Context, core.CreateInternetGatewayRequest) (core.CreateInternetGatewayResponse, error)) *MockNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientCreateInternetGatewayCall) DoAndReturn(f func(context.Context, core.CreateInternetGatewayRequest) (core.CreateInternetGatewayResponse, error)) *MockNetworkingClientCreateInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateRouteTable mocks base method. @@ -62,9 +86,33 @@ func (m *MockNetworkingClient) CreateRouteTable(arg0 context.Context, arg1 core. } // CreateRouteTable indicates an expected call of CreateRouteTable. -func (mr *MockNetworkingClientMockRecorder) CreateRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) CreateRouteTable(arg0, arg1 any) *MockNetworkingClientCreateRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).CreateRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).CreateRouteTable), arg0, arg1) + return &MockNetworkingClientCreateRouteTableCall{Call: call} +} + +// MockNetworkingClientCreateRouteTableCall wrap *gomock.Call +type MockNetworkingClientCreateRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientCreateRouteTableCall) Return(arg0 core.CreateRouteTableResponse, arg1 error) *MockNetworkingClientCreateRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientCreateRouteTableCall) Do(f func(context.Context, core.CreateRouteTableRequest) (core.CreateRouteTableResponse, error)) *MockNetworkingClientCreateRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientCreateRouteTableCall) DoAndReturn(f func(context.Context, core.CreateRouteTableRequest) (core.CreateRouteTableResponse, error)) *MockNetworkingClientCreateRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSubnet mocks base method. @@ -77,9 +125,33 @@ func (m *MockNetworkingClient) CreateSubnet(arg0 context.Context, arg1 core.Crea } // CreateSubnet indicates an expected call of CreateSubnet. -func (mr *MockNetworkingClientMockRecorder) CreateSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) CreateSubnet(arg0, arg1 any) *MockNetworkingClientCreateSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).CreateSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).CreateSubnet), arg0, arg1) + return &MockNetworkingClientCreateSubnetCall{Call: call} +} + +// MockNetworkingClientCreateSubnetCall wrap *gomock.Call +type MockNetworkingClientCreateSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientCreateSubnetCall) Return(arg0 core.CreateSubnetResponse, arg1 error) *MockNetworkingClientCreateSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientCreateSubnetCall) Do(f func(context.Context, core.CreateSubnetRequest) (core.CreateSubnetResponse, error)) *MockNetworkingClientCreateSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientCreateSubnetCall) DoAndReturn(f func(context.Context, core.CreateSubnetRequest) (core.CreateSubnetResponse, error)) *MockNetworkingClientCreateSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateVcn mocks base method. @@ -92,9 +164,33 @@ func (m *MockNetworkingClient) CreateVcn(arg0 context.Context, arg1 core.CreateV } // CreateVcn indicates an expected call of CreateVcn. -func (mr *MockNetworkingClientMockRecorder) CreateVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) CreateVcn(arg0, arg1 any) *MockNetworkingClientCreateVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVcn", reflect.TypeOf((*MockNetworkingClient)(nil).CreateVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVcn", reflect.TypeOf((*MockNetworkingClient)(nil).CreateVcn), arg0, arg1) + return &MockNetworkingClientCreateVcnCall{Call: call} +} + +// MockNetworkingClientCreateVcnCall wrap *gomock.Call +type MockNetworkingClientCreateVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientCreateVcnCall) Return(arg0 core.CreateVcnResponse, arg1 error) *MockNetworkingClientCreateVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientCreateVcnCall) Do(f func(context.Context, core.CreateVcnRequest) (core.CreateVcnResponse, error)) *MockNetworkingClientCreateVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientCreateVcnCall) DoAndReturn(f func(context.Context, core.CreateVcnRequest) (core.CreateVcnResponse, error)) *MockNetworkingClientCreateVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteInternetGateway mocks base method. @@ -107,9 +203,33 @@ func (m *MockNetworkingClient) DeleteInternetGateway(arg0 context.Context, arg1 } // DeleteInternetGateway indicates an expected call of DeleteInternetGateway. -func (mr *MockNetworkingClientMockRecorder) DeleteInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) DeleteInternetGateway(arg0, arg1 any) *MockNetworkingClientDeleteInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteInternetGateway), arg0, arg1) + return &MockNetworkingClientDeleteInternetGatewayCall{Call: call} +} + +// MockNetworkingClientDeleteInternetGatewayCall wrap *gomock.Call +type MockNetworkingClientDeleteInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientDeleteInternetGatewayCall) Return(arg0 core.DeleteInternetGatewayResponse, arg1 error) *MockNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientDeleteInternetGatewayCall) Do(f func(context.Context, core.DeleteInternetGatewayRequest) (core.DeleteInternetGatewayResponse, error)) *MockNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientDeleteInternetGatewayCall) DoAndReturn(f func(context.Context, core.DeleteInternetGatewayRequest) (core.DeleteInternetGatewayResponse, error)) *MockNetworkingClientDeleteInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteRouteTable mocks base method. @@ -122,9 +242,33 @@ func (m *MockNetworkingClient) DeleteRouteTable(arg0 context.Context, arg1 core. } // DeleteRouteTable indicates an expected call of DeleteRouteTable. -func (mr *MockNetworkingClientMockRecorder) DeleteRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) DeleteRouteTable(arg0, arg1 any) *MockNetworkingClientDeleteRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteRouteTable), arg0, arg1) + return &MockNetworkingClientDeleteRouteTableCall{Call: call} +} + +// MockNetworkingClientDeleteRouteTableCall wrap *gomock.Call +type MockNetworkingClientDeleteRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientDeleteRouteTableCall) Return(arg0 core.DeleteRouteTableResponse, arg1 error) *MockNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientDeleteRouteTableCall) Do(f func(context.Context, core.DeleteRouteTableRequest) (core.DeleteRouteTableResponse, error)) *MockNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientDeleteRouteTableCall) DoAndReturn(f func(context.Context, core.DeleteRouteTableRequest) (core.DeleteRouteTableResponse, error)) *MockNetworkingClientDeleteRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteSubnet mocks base method. @@ -137,9 +281,33 @@ func (m *MockNetworkingClient) DeleteSubnet(arg0 context.Context, arg1 core.Dele } // DeleteSubnet indicates an expected call of DeleteSubnet. -func (mr *MockNetworkingClientMockRecorder) DeleteSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) DeleteSubnet(arg0, arg1 any) *MockNetworkingClientDeleteSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteSubnet), arg0, arg1) + return &MockNetworkingClientDeleteSubnetCall{Call: call} +} + +// MockNetworkingClientDeleteSubnetCall wrap *gomock.Call +type MockNetworkingClientDeleteSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientDeleteSubnetCall) Return(arg0 core.DeleteSubnetResponse, arg1 error) *MockNetworkingClientDeleteSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientDeleteSubnetCall) Do(f func(context.Context, core.DeleteSubnetRequest) (core.DeleteSubnetResponse, error)) *MockNetworkingClientDeleteSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientDeleteSubnetCall) DoAndReturn(f func(context.Context, core.DeleteSubnetRequest) (core.DeleteSubnetResponse, error)) *MockNetworkingClientDeleteSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteVcn mocks base method. @@ -152,9 +320,33 @@ func (m *MockNetworkingClient) DeleteVcn(arg0 context.Context, arg1 core.DeleteV } // DeleteVcn indicates an expected call of DeleteVcn. -func (mr *MockNetworkingClientMockRecorder) DeleteVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) DeleteVcn(arg0, arg1 any) *MockNetworkingClientDeleteVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVcn", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVcn", reflect.TypeOf((*MockNetworkingClient)(nil).DeleteVcn), arg0, arg1) + return &MockNetworkingClientDeleteVcnCall{Call: call} +} + +// MockNetworkingClientDeleteVcnCall wrap *gomock.Call +type MockNetworkingClientDeleteVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientDeleteVcnCall) Return(arg0 core.DeleteVcnResponse, arg1 error) *MockNetworkingClientDeleteVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientDeleteVcnCall) Do(f func(context.Context, core.DeleteVcnRequest) (core.DeleteVcnResponse, error)) *MockNetworkingClientDeleteVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientDeleteVcnCall) DoAndReturn(f func(context.Context, core.DeleteVcnRequest) (core.DeleteVcnResponse, error)) *MockNetworkingClientDeleteVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInternetGateway mocks base method. @@ -167,9 +359,33 @@ func (m *MockNetworkingClient) GetInternetGateway(arg0 context.Context, arg1 cor } // GetInternetGateway indicates an expected call of GetInternetGateway. -func (mr *MockNetworkingClientMockRecorder) GetInternetGateway(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) GetInternetGateway(arg0, arg1 any) *MockNetworkingClientGetInternetGatewayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).GetInternetGateway), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInternetGateway", reflect.TypeOf((*MockNetworkingClient)(nil).GetInternetGateway), arg0, arg1) + return &MockNetworkingClientGetInternetGatewayCall{Call: call} +} + +// MockNetworkingClientGetInternetGatewayCall wrap *gomock.Call +type MockNetworkingClientGetInternetGatewayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientGetInternetGatewayCall) Return(arg0 core.GetInternetGatewayResponse, arg1 error) *MockNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientGetInternetGatewayCall) Do(f func(context.Context, core.GetInternetGatewayRequest) (core.GetInternetGatewayResponse, error)) *MockNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientGetInternetGatewayCall) DoAndReturn(f func(context.Context, core.GetInternetGatewayRequest) (core.GetInternetGatewayResponse, error)) *MockNetworkingClientGetInternetGatewayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRouteTable mocks base method. @@ -182,9 +398,33 @@ func (m *MockNetworkingClient) GetRouteTable(arg0 context.Context, arg1 core.Get } // GetRouteTable indicates an expected call of GetRouteTable. -func (mr *MockNetworkingClientMockRecorder) GetRouteTable(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) GetRouteTable(arg0, arg1 any) *MockNetworkingClientGetRouteTableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).GetRouteTable), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRouteTable", reflect.TypeOf((*MockNetworkingClient)(nil).GetRouteTable), arg0, arg1) + return &MockNetworkingClientGetRouteTableCall{Call: call} +} + +// MockNetworkingClientGetRouteTableCall wrap *gomock.Call +type MockNetworkingClientGetRouteTableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientGetRouteTableCall) Return(arg0 core.GetRouteTableResponse, arg1 error) *MockNetworkingClientGetRouteTableCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientGetRouteTableCall) Do(f func(context.Context, core.GetRouteTableRequest) (core.GetRouteTableResponse, error)) *MockNetworkingClientGetRouteTableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientGetRouteTableCall) DoAndReturn(f func(context.Context, core.GetRouteTableRequest) (core.GetRouteTableResponse, error)) *MockNetworkingClientGetRouteTableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSubnet mocks base method. @@ -197,9 +437,33 @@ func (m *MockNetworkingClient) GetSubnet(arg0 context.Context, arg1 core.GetSubn } // GetSubnet indicates an expected call of GetSubnet. -func (mr *MockNetworkingClientMockRecorder) GetSubnet(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) GetSubnet(arg0, arg1 any) *MockNetworkingClientGetSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).GetSubnet), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnet", reflect.TypeOf((*MockNetworkingClient)(nil).GetSubnet), arg0, arg1) + return &MockNetworkingClientGetSubnetCall{Call: call} +} + +// MockNetworkingClientGetSubnetCall wrap *gomock.Call +type MockNetworkingClientGetSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientGetSubnetCall) Return(arg0 core.GetSubnetResponse, arg1 error) *MockNetworkingClientGetSubnetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientGetSubnetCall) Do(f func(context.Context, core.GetSubnetRequest) (core.GetSubnetResponse, error)) *MockNetworkingClientGetSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientGetSubnetCall) DoAndReturn(f func(context.Context, core.GetSubnetRequest) (core.GetSubnetResponse, error)) *MockNetworkingClientGetSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVcn mocks base method. @@ -212,9 +476,33 @@ func (m *MockNetworkingClient) GetVcn(arg0 context.Context, arg1 core.GetVcnRequ } // GetVcn indicates an expected call of GetVcn. -func (mr *MockNetworkingClientMockRecorder) GetVcn(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) GetVcn(arg0, arg1 any) *MockNetworkingClientGetVcnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVcn", reflect.TypeOf((*MockNetworkingClient)(nil).GetVcn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVcn", reflect.TypeOf((*MockNetworkingClient)(nil).GetVcn), arg0, arg1) + return &MockNetworkingClientGetVcnCall{Call: call} +} + +// MockNetworkingClientGetVcnCall wrap *gomock.Call +type MockNetworkingClientGetVcnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientGetVcnCall) Return(arg0 core.GetVcnResponse, arg1 error) *MockNetworkingClientGetVcnCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientGetVcnCall) Do(f func(context.Context, core.GetVcnRequest) (core.GetVcnResponse, error)) *MockNetworkingClientGetVcnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientGetVcnCall) DoAndReturn(f func(context.Context, core.GetVcnRequest) (core.GetVcnResponse, error)) *MockNetworkingClientGetVcnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVnic mocks base method. @@ -227,9 +515,33 @@ func (m *MockNetworkingClient) GetVnic(arg0 context.Context, arg1 core.GetVnicRe } // GetVnic indicates an expected call of GetVnic. -func (mr *MockNetworkingClientMockRecorder) GetVnic(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) GetVnic(arg0, arg1 any) *MockNetworkingClientGetVnicCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVnic", reflect.TypeOf((*MockNetworkingClient)(nil).GetVnic), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVnic", reflect.TypeOf((*MockNetworkingClient)(nil).GetVnic), arg0, arg1) + return &MockNetworkingClientGetVnicCall{Call: call} +} + +// MockNetworkingClientGetVnicCall wrap *gomock.Call +type MockNetworkingClientGetVnicCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientGetVnicCall) Return(arg0 core.GetVnicResponse, arg1 error) *MockNetworkingClientGetVnicCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientGetVnicCall) Do(f func(context.Context, core.GetVnicRequest) (core.GetVnicResponse, error)) *MockNetworkingClientGetVnicCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientGetVnicCall) DoAndReturn(f func(context.Context, core.GetVnicRequest) (core.GetVnicResponse, error)) *MockNetworkingClientGetVnicCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListInternetGateways mocks base method. @@ -242,9 +554,33 @@ func (m *MockNetworkingClient) ListInternetGateways(arg0 context.Context, arg1, } // ListInternetGateways indicates an expected call of ListInternetGateways. -func (mr *MockNetworkingClientMockRecorder) ListInternetGateways(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) ListInternetGateways(arg0, arg1, arg2 any) *MockNetworkingClientListInternetGatewaysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInternetGateways", reflect.TypeOf((*MockNetworkingClient)(nil).ListInternetGateways), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInternetGateways", reflect.TypeOf((*MockNetworkingClient)(nil).ListInternetGateways), arg0, arg1, arg2) + return &MockNetworkingClientListInternetGatewaysCall{Call: call} +} + +// MockNetworkingClientListInternetGatewaysCall wrap *gomock.Call +type MockNetworkingClientListInternetGatewaysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientListInternetGatewaysCall) Return(arg0 []core.InternetGateway, arg1 error) *MockNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientListInternetGatewaysCall) Do(f func(context.Context, *string, *string) ([]core.InternetGateway, error)) *MockNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientListInternetGatewaysCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.InternetGateway, error)) *MockNetworkingClientListInternetGatewaysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListRouteTables mocks base method. @@ -257,9 +593,33 @@ func (m *MockNetworkingClient) ListRouteTables(arg0 context.Context, arg1, arg2 } // ListRouteTables indicates an expected call of ListRouteTables. -func (mr *MockNetworkingClientMockRecorder) ListRouteTables(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) ListRouteTables(arg0, arg1, arg2 any) *MockNetworkingClientListRouteTablesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRouteTables", reflect.TypeOf((*MockNetworkingClient)(nil).ListRouteTables), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRouteTables", reflect.TypeOf((*MockNetworkingClient)(nil).ListRouteTables), arg0, arg1, arg2) + return &MockNetworkingClientListRouteTablesCall{Call: call} +} + +// MockNetworkingClientListRouteTablesCall wrap *gomock.Call +type MockNetworkingClientListRouteTablesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientListRouteTablesCall) Return(arg0 []core.RouteTable, arg1 error) *MockNetworkingClientListRouteTablesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientListRouteTablesCall) Do(f func(context.Context, *string, *string) ([]core.RouteTable, error)) *MockNetworkingClientListRouteTablesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientListRouteTablesCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.RouteTable, error)) *MockNetworkingClientListRouteTablesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSubnets mocks base method. @@ -272,9 +632,33 @@ func (m *MockNetworkingClient) ListSubnets(arg0 context.Context, arg1, arg2 *str } // ListSubnets indicates an expected call of ListSubnets. -func (mr *MockNetworkingClientMockRecorder) ListSubnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) ListSubnets(arg0, arg1, arg2 any) *MockNetworkingClientListSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnets", reflect.TypeOf((*MockNetworkingClient)(nil).ListSubnets), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnets", reflect.TypeOf((*MockNetworkingClient)(nil).ListSubnets), arg0, arg1, arg2) + return &MockNetworkingClientListSubnetsCall{Call: call} +} + +// MockNetworkingClientListSubnetsCall wrap *gomock.Call +type MockNetworkingClientListSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientListSubnetsCall) Return(arg0 []core.Subnet, arg1 error) *MockNetworkingClientListSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientListSubnetsCall) Do(f func(context.Context, *string, *string) ([]core.Subnet, error)) *MockNetworkingClientListSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientListSubnetsCall) DoAndReturn(f func(context.Context, *string, *string) ([]core.Subnet, error)) *MockNetworkingClientListSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVcns mocks base method. @@ -287,7 +671,31 @@ func (m *MockNetworkingClient) ListVcns(arg0 context.Context, arg1 *string) ([]c } // ListVcns indicates an expected call of ListVcns. -func (mr *MockNetworkingClientMockRecorder) ListVcns(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingClientMockRecorder) ListVcns(arg0, arg1 any) *MockNetworkingClientListVcnsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVcns", reflect.TypeOf((*MockNetworkingClient)(nil).ListVcns), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVcns", reflect.TypeOf((*MockNetworkingClient)(nil).ListVcns), arg0, arg1) + return &MockNetworkingClientListVcnsCall{Call: call} +} + +// MockNetworkingClientListVcnsCall wrap *gomock.Call +type MockNetworkingClientListVcnsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingClientListVcnsCall) Return(arg0 []core.Vcn, arg1 error) *MockNetworkingClientListVcnsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingClientListVcnsCall) Do(f func(context.Context, *string) ([]core.Vcn, error)) *MockNetworkingClientListVcnsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingClientListVcnsCall) DoAndReturn(f func(context.Context, *string) ([]core.Vcn, error)) *MockNetworkingClientListVcnsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/oci/testing/mocks_storage.go b/internal/provider/oci/testing/mocks_storage.go index 2a58853b43b..8ff817226e2 100644 --- a/internal/provider/oci/testing/mocks_storage.go +++ b/internal/provider/oci/testing/mocks_storage.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package testing -destination testing/mocks_storage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci StorageClient +// mockgen -typed -package testing -destination testing/mocks_storage.go -write_package_comment=false github.com/juju/juju/internal/provider/oci StorageClient package testing import ( @@ -47,9 +47,33 @@ func (m *MockStorageClient) CreateVolume(arg0 context.Context, arg1 core.CreateV } // CreateVolume indicates an expected call of CreateVolume. -func (mr *MockStorageClientMockRecorder) CreateVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClientMockRecorder) CreateVolume(arg0, arg1 any) *MockStorageClientCreateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockStorageClient)(nil).CreateVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockStorageClient)(nil).CreateVolume), arg0, arg1) + return &MockStorageClientCreateVolumeCall{Call: call} +} + +// MockStorageClientCreateVolumeCall wrap *gomock.Call +type MockStorageClientCreateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClientCreateVolumeCall) Return(arg0 core.CreateVolumeResponse, arg1 error) *MockStorageClientCreateVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClientCreateVolumeCall) Do(f func(context.Context, core.CreateVolumeRequest) (core.CreateVolumeResponse, error)) *MockStorageClientCreateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClientCreateVolumeCall) DoAndReturn(f func(context.Context, core.CreateVolumeRequest) (core.CreateVolumeResponse, error)) *MockStorageClientCreateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteVolume mocks base method. @@ -62,9 +86,33 @@ func (m *MockStorageClient) DeleteVolume(arg0 context.Context, arg1 core.DeleteV } // DeleteVolume indicates an expected call of DeleteVolume. -func (mr *MockStorageClientMockRecorder) DeleteVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClientMockRecorder) DeleteVolume(arg0, arg1 any) *MockStorageClientDeleteVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockStorageClient)(nil).DeleteVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockStorageClient)(nil).DeleteVolume), arg0, arg1) + return &MockStorageClientDeleteVolumeCall{Call: call} +} + +// MockStorageClientDeleteVolumeCall wrap *gomock.Call +type MockStorageClientDeleteVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClientDeleteVolumeCall) Return(arg0 core.DeleteVolumeResponse, arg1 error) *MockStorageClientDeleteVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClientDeleteVolumeCall) Do(f func(context.Context, core.DeleteVolumeRequest) (core.DeleteVolumeResponse, error)) *MockStorageClientDeleteVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClientDeleteVolumeCall) DoAndReturn(f func(context.Context, core.DeleteVolumeRequest) (core.DeleteVolumeResponse, error)) *MockStorageClientDeleteVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetVolume mocks base method. @@ -77,9 +125,33 @@ func (m *MockStorageClient) GetVolume(arg0 context.Context, arg1 core.GetVolumeR } // GetVolume indicates an expected call of GetVolume. -func (mr *MockStorageClientMockRecorder) GetVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClientMockRecorder) GetVolume(arg0, arg1 any) *MockStorageClientGetVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolume", reflect.TypeOf((*MockStorageClient)(nil).GetVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolume", reflect.TypeOf((*MockStorageClient)(nil).GetVolume), arg0, arg1) + return &MockStorageClientGetVolumeCall{Call: call} +} + +// MockStorageClientGetVolumeCall wrap *gomock.Call +type MockStorageClientGetVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClientGetVolumeCall) Return(arg0 core.GetVolumeResponse, arg1 error) *MockStorageClientGetVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClientGetVolumeCall) Do(f func(context.Context, core.GetVolumeRequest) (core.GetVolumeResponse, error)) *MockStorageClientGetVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClientGetVolumeCall) DoAndReturn(f func(context.Context, core.GetVolumeRequest) (core.GetVolumeResponse, error)) *MockStorageClientGetVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVolumes mocks base method. @@ -92,9 +164,33 @@ func (m *MockStorageClient) ListVolumes(arg0 context.Context, arg1 *string) ([]c } // ListVolumes indicates an expected call of ListVolumes. -func (mr *MockStorageClientMockRecorder) ListVolumes(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClientMockRecorder) ListVolumes(arg0, arg1 any) *MockStorageClientListVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumes", reflect.TypeOf((*MockStorageClient)(nil).ListVolumes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVolumes", reflect.TypeOf((*MockStorageClient)(nil).ListVolumes), arg0, arg1) + return &MockStorageClientListVolumesCall{Call: call} +} + +// MockStorageClientListVolumesCall wrap *gomock.Call +type MockStorageClientListVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClientListVolumesCall) Return(arg0 []core.Volume, arg1 error) *MockStorageClientListVolumesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClientListVolumesCall) Do(f func(context.Context, *string) ([]core.Volume, error)) *MockStorageClientListVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClientListVolumesCall) DoAndReturn(f func(context.Context, *string) ([]core.Volume, error)) *MockStorageClientListVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateVolume mocks base method. @@ -107,7 +203,31 @@ func (m *MockStorageClient) UpdateVolume(arg0 context.Context, arg1 core.UpdateV } // UpdateVolume indicates an expected call of UpdateVolume. -func (mr *MockStorageClientMockRecorder) UpdateVolume(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageClientMockRecorder) UpdateVolume(arg0, arg1 any) *MockStorageClientUpdateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVolume", reflect.TypeOf((*MockStorageClient)(nil).UpdateVolume), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVolume", reflect.TypeOf((*MockStorageClient)(nil).UpdateVolume), arg0, arg1) + return &MockStorageClientUpdateVolumeCall{Call: call} +} + +// MockStorageClientUpdateVolumeCall wrap *gomock.Call +type MockStorageClientUpdateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageClientUpdateVolumeCall) Return(arg0 core.UpdateVolumeResponse, arg1 error) *MockStorageClientUpdateVolumeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageClientUpdateVolumeCall) Do(f func(context.Context, core.UpdateVolumeRequest) (core.UpdateVolumeResponse, error)) *MockStorageClientUpdateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageClientUpdateVolumeCall) DoAndReturn(f func(context.Context, core.UpdateVolumeRequest) (core.UpdateVolumeResponse, error)) *MockStorageClientUpdateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/openstack/cloud_mock_test.go b/internal/provider/openstack/cloud_mock_test.go index 840ada8c038..12387010569 100644 --- a/internal/provider/openstack/cloud_mock_test.go +++ b/internal/provider/openstack/cloud_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package openstack -destination cloud_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit NetworkingConfig +// mockgen -typed -package openstack -destination cloud_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit NetworkingConfig // // Package openstack is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockNetworkingConfig) AddNetworkConfig(arg0 network.InterfaceInfos) err } // AddNetworkConfig indicates an expected call of AddNetworkConfig. -func (mr *MockNetworkingConfigMockRecorder) AddNetworkConfig(arg0 any) *gomock.Call { +func (mr *MockNetworkingConfigMockRecorder) AddNetworkConfig(arg0 any) *MockNetworkingConfigAddNetworkConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNetworkConfig", reflect.TypeOf((*MockNetworkingConfig)(nil).AddNetworkConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNetworkConfig", reflect.TypeOf((*MockNetworkingConfig)(nil).AddNetworkConfig), arg0) + return &MockNetworkingConfigAddNetworkConfigCall{Call: call} +} + +// MockNetworkingConfigAddNetworkConfigCall wrap *gomock.Call +type MockNetworkingConfigAddNetworkConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingConfigAddNetworkConfigCall) Return(arg0 error) *MockNetworkingConfigAddNetworkConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingConfigAddNetworkConfigCall) Do(f func(network.InterfaceInfos) error) *MockNetworkingConfigAddNetworkConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingConfigAddNetworkConfigCall) DoAndReturn(f func(network.InterfaceInfos) error) *MockNetworkingConfigAddNetworkConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/openstack/goose_mock_test.go b/internal/provider/openstack/goose_mock_test.go index e8001a0cc87..93e971de236 100644 --- a/internal/provider/openstack/goose_mock_test.go +++ b/internal/provider/openstack/goose_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package openstack -destination goose_mock_test.go github.com/go-goose/goose/v5/client AuthenticatingClient +// mockgen -typed -package openstack -destination goose_mock_test.go github.com/go-goose/goose/v5/client AuthenticatingClient // // Package openstack is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockAuthenticatingClient) Authenticate() error { } // Authenticate indicates an expected call of Authenticate. -func (mr *MockAuthenticatingClientMockRecorder) Authenticate() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) Authenticate() *MockAuthenticatingClientAuthenticateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockAuthenticatingClient)(nil).Authenticate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockAuthenticatingClient)(nil).Authenticate)) + return &MockAuthenticatingClientAuthenticateCall{Call: call} +} + +// MockAuthenticatingClientAuthenticateCall wrap *gomock.Call +type MockAuthenticatingClientAuthenticateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientAuthenticateCall) Return(arg0 error) *MockAuthenticatingClientAuthenticateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientAuthenticateCall) Do(f func() error) *MockAuthenticatingClientAuthenticateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientAuthenticateCall) DoAndReturn(f func() error) *MockAuthenticatingClientAuthenticateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointsForRegion mocks base method. @@ -63,9 +87,33 @@ func (m *MockAuthenticatingClient) EndpointsForRegion(arg0 string) identity.Serv } // EndpointsForRegion indicates an expected call of EndpointsForRegion. -func (mr *MockAuthenticatingClientMockRecorder) EndpointsForRegion(arg0 any) *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) EndpointsForRegion(arg0 any) *MockAuthenticatingClientEndpointsForRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsForRegion", reflect.TypeOf((*MockAuthenticatingClient)(nil).EndpointsForRegion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsForRegion", reflect.TypeOf((*MockAuthenticatingClient)(nil).EndpointsForRegion), arg0) + return &MockAuthenticatingClientEndpointsForRegionCall{Call: call} +} + +// MockAuthenticatingClientEndpointsForRegionCall wrap *gomock.Call +type MockAuthenticatingClientEndpointsForRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientEndpointsForRegionCall) Return(arg0 identity.ServiceURLs) *MockAuthenticatingClientEndpointsForRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientEndpointsForRegionCall) Do(f func(string) identity.ServiceURLs) *MockAuthenticatingClientEndpointsForRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientEndpointsForRegionCall) DoAndReturn(f func(string) identity.ServiceURLs) *MockAuthenticatingClientEndpointsForRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IdentityAuthOptions mocks base method. @@ -78,9 +126,33 @@ func (m *MockAuthenticatingClient) IdentityAuthOptions() (identity.AuthOptions, } // IdentityAuthOptions indicates an expected call of IdentityAuthOptions. -func (mr *MockAuthenticatingClientMockRecorder) IdentityAuthOptions() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) IdentityAuthOptions() *MockAuthenticatingClientIdentityAuthOptionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityAuthOptions", reflect.TypeOf((*MockAuthenticatingClient)(nil).IdentityAuthOptions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityAuthOptions", reflect.TypeOf((*MockAuthenticatingClient)(nil).IdentityAuthOptions)) + return &MockAuthenticatingClientIdentityAuthOptionsCall{Call: call} +} + +// MockAuthenticatingClientIdentityAuthOptionsCall wrap *gomock.Call +type MockAuthenticatingClientIdentityAuthOptionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientIdentityAuthOptionsCall) Return(arg0 identity.AuthOptions, arg1 error) *MockAuthenticatingClientIdentityAuthOptionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientIdentityAuthOptionsCall) Do(f func() (identity.AuthOptions, error)) *MockAuthenticatingClientIdentityAuthOptionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientIdentityAuthOptionsCall) DoAndReturn(f func() (identity.AuthOptions, error)) *MockAuthenticatingClientIdentityAuthOptionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsAuthenticated mocks base method. @@ -92,9 +164,33 @@ func (m *MockAuthenticatingClient) IsAuthenticated() bool { } // IsAuthenticated indicates an expected call of IsAuthenticated. -func (mr *MockAuthenticatingClientMockRecorder) IsAuthenticated() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) IsAuthenticated() *MockAuthenticatingClientIsAuthenticatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAuthenticated", reflect.TypeOf((*MockAuthenticatingClient)(nil).IsAuthenticated)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAuthenticated", reflect.TypeOf((*MockAuthenticatingClient)(nil).IsAuthenticated)) + return &MockAuthenticatingClientIsAuthenticatedCall{Call: call} +} + +// MockAuthenticatingClientIsAuthenticatedCall wrap *gomock.Call +type MockAuthenticatingClientIsAuthenticatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientIsAuthenticatedCall) Return(arg0 bool) *MockAuthenticatingClientIsAuthenticatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientIsAuthenticatedCall) Do(f func() bool) *MockAuthenticatingClientIsAuthenticatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientIsAuthenticatedCall) DoAndReturn(f func() bool) *MockAuthenticatingClientIsAuthenticatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeServiceURL mocks base method. @@ -107,9 +203,33 @@ func (m *MockAuthenticatingClient) MakeServiceURL(arg0, arg1 string, arg2 []stri } // MakeServiceURL indicates an expected call of MakeServiceURL. -func (mr *MockAuthenticatingClientMockRecorder) MakeServiceURL(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) MakeServiceURL(arg0, arg1, arg2 any) *MockAuthenticatingClientMakeServiceURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeServiceURL", reflect.TypeOf((*MockAuthenticatingClient)(nil).MakeServiceURL), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeServiceURL", reflect.TypeOf((*MockAuthenticatingClient)(nil).MakeServiceURL), arg0, arg1, arg2) + return &MockAuthenticatingClientMakeServiceURLCall{Call: call} +} + +// MockAuthenticatingClientMakeServiceURLCall wrap *gomock.Call +type MockAuthenticatingClientMakeServiceURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientMakeServiceURLCall) Return(arg0 string, arg1 error) *MockAuthenticatingClientMakeServiceURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientMakeServiceURLCall) Do(f func(string, string, []string) (string, error)) *MockAuthenticatingClientMakeServiceURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientMakeServiceURLCall) DoAndReturn(f func(string, string, []string) (string, error)) *MockAuthenticatingClientMakeServiceURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SendRequest mocks base method. @@ -121,9 +241,33 @@ func (m *MockAuthenticatingClient) SendRequest(arg0, arg1, arg2, arg3 string, ar } // SendRequest indicates an expected call of SendRequest. -func (mr *MockAuthenticatingClientMockRecorder) SendRequest(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) SendRequest(arg0, arg1, arg2, arg3, arg4 any) *MockAuthenticatingClientSendRequestCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequest", reflect.TypeOf((*MockAuthenticatingClient)(nil).SendRequest), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequest", reflect.TypeOf((*MockAuthenticatingClient)(nil).SendRequest), arg0, arg1, arg2, arg3, arg4) + return &MockAuthenticatingClientSendRequestCall{Call: call} +} + +// MockAuthenticatingClientSendRequestCall wrap *gomock.Call +type MockAuthenticatingClientSendRequestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientSendRequestCall) Return(arg0 error) *MockAuthenticatingClientSendRequestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientSendRequestCall) Do(f func(string, string, string, string, *http.RequestData) error) *MockAuthenticatingClientSendRequestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientSendRequestCall) DoAndReturn(f func(string, string, string, string, *http.RequestData) error) *MockAuthenticatingClientSendRequestCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetRequiredServiceTypes mocks base method. @@ -133,9 +277,33 @@ func (m *MockAuthenticatingClient) SetRequiredServiceTypes(arg0 []string) { } // SetRequiredServiceTypes indicates an expected call of SetRequiredServiceTypes. -func (mr *MockAuthenticatingClientMockRecorder) SetRequiredServiceTypes(arg0 any) *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) SetRequiredServiceTypes(arg0 any) *MockAuthenticatingClientSetRequiredServiceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRequiredServiceTypes", reflect.TypeOf((*MockAuthenticatingClient)(nil).SetRequiredServiceTypes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRequiredServiceTypes", reflect.TypeOf((*MockAuthenticatingClient)(nil).SetRequiredServiceTypes), arg0) + return &MockAuthenticatingClientSetRequiredServiceTypesCall{Call: call} +} + +// MockAuthenticatingClientSetRequiredServiceTypesCall wrap *gomock.Call +type MockAuthenticatingClientSetRequiredServiceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientSetRequiredServiceTypesCall) Return() *MockAuthenticatingClientSetRequiredServiceTypesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientSetRequiredServiceTypesCall) Do(f func([]string)) *MockAuthenticatingClientSetRequiredServiceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientSetRequiredServiceTypesCall) DoAndReturn(f func([]string)) *MockAuthenticatingClientSetRequiredServiceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetVersionDiscoveryDisabled mocks base method. @@ -145,9 +313,33 @@ func (m *MockAuthenticatingClient) SetVersionDiscoveryDisabled(arg0 string, arg1 } // SetVersionDiscoveryDisabled indicates an expected call of SetVersionDiscoveryDisabled. -func (mr *MockAuthenticatingClientMockRecorder) SetVersionDiscoveryDisabled(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) SetVersionDiscoveryDisabled(arg0, arg1 any) *MockAuthenticatingClientSetVersionDiscoveryDisabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVersionDiscoveryDisabled", reflect.TypeOf((*MockAuthenticatingClient)(nil).SetVersionDiscoveryDisabled), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVersionDiscoveryDisabled", reflect.TypeOf((*MockAuthenticatingClient)(nil).SetVersionDiscoveryDisabled), arg0, arg1) + return &MockAuthenticatingClientSetVersionDiscoveryDisabledCall{Call: call} +} + +// MockAuthenticatingClientSetVersionDiscoveryDisabledCall wrap *gomock.Call +type MockAuthenticatingClientSetVersionDiscoveryDisabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientSetVersionDiscoveryDisabledCall) Return() *MockAuthenticatingClientSetVersionDiscoveryDisabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientSetVersionDiscoveryDisabledCall) Do(f func(string, bool)) *MockAuthenticatingClientSetVersionDiscoveryDisabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientSetVersionDiscoveryDisabledCall) DoAndReturn(f func(string, bool)) *MockAuthenticatingClientSetVersionDiscoveryDisabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TenantId mocks base method. @@ -159,9 +351,33 @@ func (m *MockAuthenticatingClient) TenantId() string { } // TenantId indicates an expected call of TenantId. -func (mr *MockAuthenticatingClientMockRecorder) TenantId() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) TenantId() *MockAuthenticatingClientTenantIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantId", reflect.TypeOf((*MockAuthenticatingClient)(nil).TenantId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantId", reflect.TypeOf((*MockAuthenticatingClient)(nil).TenantId)) + return &MockAuthenticatingClientTenantIdCall{Call: call} +} + +// MockAuthenticatingClientTenantIdCall wrap *gomock.Call +type MockAuthenticatingClientTenantIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientTenantIdCall) Return(arg0 string) *MockAuthenticatingClientTenantIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientTenantIdCall) Do(f func() string) *MockAuthenticatingClientTenantIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientTenantIdCall) DoAndReturn(f func() string) *MockAuthenticatingClientTenantIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Token mocks base method. @@ -173,9 +389,33 @@ func (m *MockAuthenticatingClient) Token() string { } // Token indicates an expected call of Token. -func (mr *MockAuthenticatingClientMockRecorder) Token() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) Token() *MockAuthenticatingClientTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockAuthenticatingClient)(nil).Token)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockAuthenticatingClient)(nil).Token)) + return &MockAuthenticatingClientTokenCall{Call: call} +} + +// MockAuthenticatingClientTokenCall wrap *gomock.Call +type MockAuthenticatingClientTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientTokenCall) Return(arg0 string) *MockAuthenticatingClientTokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientTokenCall) Do(f func() string) *MockAuthenticatingClientTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientTokenCall) DoAndReturn(f func() string) *MockAuthenticatingClientTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserId mocks base method. @@ -187,7 +427,31 @@ func (m *MockAuthenticatingClient) UserId() string { } // UserId indicates an expected call of UserId. -func (mr *MockAuthenticatingClientMockRecorder) UserId() *gomock.Call { +func (mr *MockAuthenticatingClientMockRecorder) UserId() *MockAuthenticatingClientUserIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserId", reflect.TypeOf((*MockAuthenticatingClient)(nil).UserId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserId", reflect.TypeOf((*MockAuthenticatingClient)(nil).UserId)) + return &MockAuthenticatingClientUserIdCall{Call: call} +} + +// MockAuthenticatingClientUserIdCall wrap *gomock.Call +type MockAuthenticatingClientUserIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthenticatingClientUserIdCall) Return(arg0 string) *MockAuthenticatingClientUserIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthenticatingClientUserIdCall) Do(f func() string) *MockAuthenticatingClientUserIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthenticatingClientUserIdCall) DoAndReturn(f func() string) *MockAuthenticatingClientUserIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/openstack/network_mock_test.go b/internal/provider/openstack/network_mock_test.go index 4ab2f72646f..746ff343038 100644 --- a/internal/provider/openstack/network_mock_test.go +++ b/internal/provider/openstack/network_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package openstack -destination network_mock_test.go github.com/juju/juju/internal/provider/openstack SSLHostnameConfig,Networking,NetworkingBase,NetworkingNeutron,NetworkingAuthenticatingClient,NetworkingNova,NetworkingEnvironConfig +// mockgen -typed -package openstack -destination network_mock_test.go github.com/juju/juju/internal/provider/openstack SSLHostnameConfig,Networking,NetworkingBase,NetworkingNeutron,NetworkingAuthenticatingClient,NetworkingNova,NetworkingEnvironConfig // // Package openstack is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockSSLHostnameConfig) SSLHostnameVerification() bool { } // SSLHostnameVerification indicates an expected call of SSLHostnameVerification. -func (mr *MockSSLHostnameConfigMockRecorder) SSLHostnameVerification() *gomock.Call { +func (mr *MockSSLHostnameConfigMockRecorder) SSLHostnameVerification() *MockSSLHostnameConfigSSLHostnameVerificationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SSLHostnameVerification", reflect.TypeOf((*MockSSLHostnameConfig)(nil).SSLHostnameVerification)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SSLHostnameVerification", reflect.TypeOf((*MockSSLHostnameConfig)(nil).SSLHostnameVerification)) + return &MockSSLHostnameConfigSSLHostnameVerificationCall{Call: call} +} + +// MockSSLHostnameConfigSSLHostnameVerificationCall wrap *gomock.Call +type MockSSLHostnameConfigSSLHostnameVerificationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSSLHostnameConfigSSLHostnameVerificationCall) Return(arg0 bool) *MockSSLHostnameConfigSSLHostnameVerificationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSSLHostnameConfigSSLHostnameVerificationCall) Do(f func() bool) *MockSSLHostnameConfigSSLHostnameVerificationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSSLHostnameConfigSSLHostnameVerificationCall) DoAndReturn(f func() bool) *MockSSLHostnameConfigSSLHostnameVerificationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworking is a mock of Networking interface. @@ -90,9 +114,33 @@ func (m *MockNetworking) AllocatePublicIP(arg0 instance.Id) (*string, error) { } // AllocatePublicIP indicates an expected call of AllocatePublicIP. -func (mr *MockNetworkingMockRecorder) AllocatePublicIP(arg0 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) AllocatePublicIP(arg0 any) *MockNetworkingAllocatePublicIPCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocatePublicIP", reflect.TypeOf((*MockNetworking)(nil).AllocatePublicIP), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocatePublicIP", reflect.TypeOf((*MockNetworking)(nil).AllocatePublicIP), arg0) + return &MockNetworkingAllocatePublicIPCall{Call: call} +} + +// MockNetworkingAllocatePublicIPCall wrap *gomock.Call +type MockNetworkingAllocatePublicIPCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingAllocatePublicIPCall) Return(arg0 *string, arg1 error) *MockNetworkingAllocatePublicIPCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingAllocatePublicIPCall) Do(f func(instance.Id) (*string, error)) *MockNetworkingAllocatePublicIPCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingAllocatePublicIPCall) DoAndReturn(f func(instance.Id) (*string, error)) *MockNetworkingAllocatePublicIPCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePort mocks base method. @@ -105,9 +153,33 @@ func (m *MockNetworking) CreatePort(arg0, arg1 string, arg2 network.Id) (*neutro } // CreatePort indicates an expected call of CreatePort. -func (mr *MockNetworkingMockRecorder) CreatePort(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) CreatePort(arg0, arg1, arg2 any) *MockNetworkingCreatePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePort", reflect.TypeOf((*MockNetworking)(nil).CreatePort), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePort", reflect.TypeOf((*MockNetworking)(nil).CreatePort), arg0, arg1, arg2) + return &MockNetworkingCreatePortCall{Call: call} +} + +// MockNetworkingCreatePortCall wrap *gomock.Call +type MockNetworkingCreatePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingCreatePortCall) Return(arg0 *neutron.PortV2, arg1 error) *MockNetworkingCreatePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingCreatePortCall) Do(f func(string, string, network.Id) (*neutron.PortV2, error)) *MockNetworkingCreatePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingCreatePortCall) DoAndReturn(f func(string, string, network.Id) (*neutron.PortV2, error)) *MockNetworkingCreatePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeletePortByID mocks base method. @@ -119,9 +191,33 @@ func (m *MockNetworking) DeletePortByID(arg0 string) error { } // DeletePortByID indicates an expected call of DeletePortByID. -func (mr *MockNetworkingMockRecorder) DeletePortByID(arg0 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) DeletePortByID(arg0 any) *MockNetworkingDeletePortByIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortByID", reflect.TypeOf((*MockNetworking)(nil).DeletePortByID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortByID", reflect.TypeOf((*MockNetworking)(nil).DeletePortByID), arg0) + return &MockNetworkingDeletePortByIDCall{Call: call} +} + +// MockNetworkingDeletePortByIDCall wrap *gomock.Call +type MockNetworkingDeletePortByIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingDeletePortByIDCall) Return(arg0 error) *MockNetworkingDeletePortByIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingDeletePortByIDCall) Do(f func(string) error) *MockNetworkingDeletePortByIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingDeletePortByIDCall) DoAndReturn(f func(string) error) *MockNetworkingDeletePortByIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindNetworks mocks base method. @@ -134,9 +230,33 @@ func (m *MockNetworking) FindNetworks(arg0 bool) (set.Strings, error) { } // FindNetworks indicates an expected call of FindNetworks. -func (mr *MockNetworkingMockRecorder) FindNetworks(arg0 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) FindNetworks(arg0 any) *MockNetworkingFindNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindNetworks", reflect.TypeOf((*MockNetworking)(nil).FindNetworks), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindNetworks", reflect.TypeOf((*MockNetworking)(nil).FindNetworks), arg0) + return &MockNetworkingFindNetworksCall{Call: call} +} + +// MockNetworkingFindNetworksCall wrap *gomock.Call +type MockNetworkingFindNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingFindNetworksCall) Return(arg0 set.Strings, arg1 error) *MockNetworkingFindNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingFindNetworksCall) Do(f func(bool) (set.Strings, error)) *MockNetworkingFindNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingFindNetworksCall) DoAndReturn(f func(bool) (set.Strings, error)) *MockNetworkingFindNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInterfaces mocks base method. @@ -149,9 +269,33 @@ func (m *MockNetworking) NetworkInterfaces(arg0 []instance.Id) ([]network.Interf } // NetworkInterfaces indicates an expected call of NetworkInterfaces. -func (mr *MockNetworkingMockRecorder) NetworkInterfaces(arg0 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) NetworkInterfaces(arg0 any) *MockNetworkingNetworkInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworking)(nil).NetworkInterfaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockNetworking)(nil).NetworkInterfaces), arg0) + return &MockNetworkingNetworkInterfacesCall{Call: call} +} + +// MockNetworkingNetworkInterfacesCall wrap *gomock.Call +type MockNetworkingNetworkInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNetworkInterfacesCall) Return(arg0 []network.InterfaceInfos, arg1 error) *MockNetworkingNetworkInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNetworkInterfacesCall) Do(f func([]instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingNetworkInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNetworkInterfacesCall) DoAndReturn(f func([]instance.Id) ([]network.InterfaceInfos, error)) *MockNetworkingNetworkInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResolveNetworks mocks base method. @@ -164,9 +308,33 @@ func (m *MockNetworking) ResolveNetworks(arg0 string, arg1 bool) ([]neutron.Netw } // ResolveNetworks indicates an expected call of ResolveNetworks. -func (mr *MockNetworkingMockRecorder) ResolveNetworks(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) ResolveNetworks(arg0, arg1 any) *MockNetworkingResolveNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveNetworks", reflect.TypeOf((*MockNetworking)(nil).ResolveNetworks), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveNetworks", reflect.TypeOf((*MockNetworking)(nil).ResolveNetworks), arg0, arg1) + return &MockNetworkingResolveNetworksCall{Call: call} +} + +// MockNetworkingResolveNetworksCall wrap *gomock.Call +type MockNetworkingResolveNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingResolveNetworksCall) Return(arg0 []neutron.NetworkV2, arg1 error) *MockNetworkingResolveNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingResolveNetworksCall) Do(f func(string, bool) ([]neutron.NetworkV2, error)) *MockNetworkingResolveNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingResolveNetworksCall) DoAndReturn(f func(string, bool) ([]neutron.NetworkV2, error)) *MockNetworkingResolveNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -179,9 +347,33 @@ func (m *MockNetworking) Subnets(arg0 instance.Id, arg1 []network.Id) ([]network } // Subnets indicates an expected call of Subnets. -func (mr *MockNetworkingMockRecorder) Subnets(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkingMockRecorder) Subnets(arg0, arg1 any) *MockNetworkingSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworking)(nil).Subnets), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockNetworking)(nil).Subnets), arg0, arg1) + return &MockNetworkingSubnetsCall{Call: call} +} + +// MockNetworkingSubnetsCall wrap *gomock.Call +type MockNetworkingSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingSubnetsCall) Return(arg0 []network.SubnetInfo, arg1 error) *MockNetworkingSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingSubnetsCall) Do(f func(instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingSubnetsCall) DoAndReturn(f func(instance.Id, []network.Id) ([]network.SubnetInfo, error)) *MockNetworkingSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingBase is a mock of NetworkingBase interface. @@ -216,9 +408,33 @@ func (m *MockNetworkingBase) client() NetworkingAuthenticatingClient { } // client indicates an expected call of client. -func (mr *MockNetworkingBaseMockRecorder) client() *gomock.Call { +func (mr *MockNetworkingBaseMockRecorder) client() *MockNetworkingBaseclientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "client", reflect.TypeOf((*MockNetworkingBase)(nil).client)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "client", reflect.TypeOf((*MockNetworkingBase)(nil).client)) + return &MockNetworkingBaseclientCall{Call: call} +} + +// MockNetworkingBaseclientCall wrap *gomock.Call +type MockNetworkingBaseclientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingBaseclientCall) Return(arg0 NetworkingAuthenticatingClient) *MockNetworkingBaseclientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingBaseclientCall) Do(f func() NetworkingAuthenticatingClient) *MockNetworkingBaseclientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingBaseclientCall) DoAndReturn(f func() NetworkingAuthenticatingClient) *MockNetworkingBaseclientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ecfg mocks base method. @@ -230,9 +446,33 @@ func (m *MockNetworkingBase) ecfg() NetworkingEnvironConfig { } // ecfg indicates an expected call of ecfg. -func (mr *MockNetworkingBaseMockRecorder) ecfg() *gomock.Call { +func (mr *MockNetworkingBaseMockRecorder) ecfg() *MockNetworkingBaseecfgCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ecfg", reflect.TypeOf((*MockNetworkingBase)(nil).ecfg)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ecfg", reflect.TypeOf((*MockNetworkingBase)(nil).ecfg)) + return &MockNetworkingBaseecfgCall{Call: call} +} + +// MockNetworkingBaseecfgCall wrap *gomock.Call +type MockNetworkingBaseecfgCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingBaseecfgCall) Return(arg0 NetworkingEnvironConfig) *MockNetworkingBaseecfgCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingBaseecfgCall) Do(f func() NetworkingEnvironConfig) *MockNetworkingBaseecfgCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingBaseecfgCall) DoAndReturn(f func() NetworkingEnvironConfig) *MockNetworkingBaseecfgCall { + c.Call = c.Call.DoAndReturn(f) + return c } // neutron mocks base method. @@ -244,9 +484,33 @@ func (m *MockNetworkingBase) neutron() NetworkingNeutron { } // neutron indicates an expected call of neutron. -func (mr *MockNetworkingBaseMockRecorder) neutron() *gomock.Call { +func (mr *MockNetworkingBaseMockRecorder) neutron() *MockNetworkingBaseneutronCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "neutron", reflect.TypeOf((*MockNetworkingBase)(nil).neutron)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "neutron", reflect.TypeOf((*MockNetworkingBase)(nil).neutron)) + return &MockNetworkingBaseneutronCall{Call: call} +} + +// MockNetworkingBaseneutronCall wrap *gomock.Call +type MockNetworkingBaseneutronCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingBaseneutronCall) Return(arg0 NetworkingNeutron) *MockNetworkingBaseneutronCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingBaseneutronCall) Do(f func() NetworkingNeutron) *MockNetworkingBaseneutronCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingBaseneutronCall) DoAndReturn(f func() NetworkingNeutron) *MockNetworkingBaseneutronCall { + c.Call = c.Call.DoAndReturn(f) + return c } // nova mocks base method. @@ -258,9 +522,33 @@ func (m *MockNetworkingBase) nova() NetworkingNova { } // nova indicates an expected call of nova. -func (mr *MockNetworkingBaseMockRecorder) nova() *gomock.Call { +func (mr *MockNetworkingBaseMockRecorder) nova() *MockNetworkingBasenovaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "nova", reflect.TypeOf((*MockNetworkingBase)(nil).nova)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "nova", reflect.TypeOf((*MockNetworkingBase)(nil).nova)) + return &MockNetworkingBasenovaCall{Call: call} +} + +// MockNetworkingBasenovaCall wrap *gomock.Call +type MockNetworkingBasenovaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingBasenovaCall) Return(arg0 NetworkingNova) *MockNetworkingBasenovaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingBasenovaCall) Do(f func() NetworkingNova) *MockNetworkingBasenovaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingBasenovaCall) DoAndReturn(f func() NetworkingNova) *MockNetworkingBasenovaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingNeutron is a mock of NetworkingNeutron interface. @@ -296,9 +584,33 @@ func (m *MockNetworkingNeutron) AllocateFloatingIPV2(arg0 string) (*neutron.Floa } // AllocateFloatingIPV2 indicates an expected call of AllocateFloatingIPV2. -func (mr *MockNetworkingNeutronMockRecorder) AllocateFloatingIPV2(arg0 any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) AllocateFloatingIPV2(arg0 any) *MockNetworkingNeutronAllocateFloatingIPV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateFloatingIPV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).AllocateFloatingIPV2), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateFloatingIPV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).AllocateFloatingIPV2), arg0) + return &MockNetworkingNeutronAllocateFloatingIPV2Call{Call: call} +} + +// MockNetworkingNeutronAllocateFloatingIPV2Call wrap *gomock.Call +type MockNetworkingNeutronAllocateFloatingIPV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronAllocateFloatingIPV2Call) Return(arg0 *neutron.FloatingIPV2, arg1 error) *MockNetworkingNeutronAllocateFloatingIPV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronAllocateFloatingIPV2Call) Do(f func(string) (*neutron.FloatingIPV2, error)) *MockNetworkingNeutronAllocateFloatingIPV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronAllocateFloatingIPV2Call) DoAndReturn(f func(string) (*neutron.FloatingIPV2, error)) *MockNetworkingNeutronAllocateFloatingIPV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePortV2 mocks base method. @@ -311,9 +623,33 @@ func (m *MockNetworkingNeutron) CreatePortV2(arg0 neutron.PortV2) (*neutron.Port } // CreatePortV2 indicates an expected call of CreatePortV2. -func (mr *MockNetworkingNeutronMockRecorder) CreatePortV2(arg0 any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) CreatePortV2(arg0 any) *MockNetworkingNeutronCreatePortV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePortV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).CreatePortV2), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePortV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).CreatePortV2), arg0) + return &MockNetworkingNeutronCreatePortV2Call{Call: call} +} + +// MockNetworkingNeutronCreatePortV2Call wrap *gomock.Call +type MockNetworkingNeutronCreatePortV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronCreatePortV2Call) Return(arg0 *neutron.PortV2, arg1 error) *MockNetworkingNeutronCreatePortV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronCreatePortV2Call) Do(f func(neutron.PortV2) (*neutron.PortV2, error)) *MockNetworkingNeutronCreatePortV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronCreatePortV2Call) DoAndReturn(f func(neutron.PortV2) (*neutron.PortV2, error)) *MockNetworkingNeutronCreatePortV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // DeletePortV2 mocks base method. @@ -325,9 +661,33 @@ func (m *MockNetworkingNeutron) DeletePortV2(arg0 string) error { } // DeletePortV2 indicates an expected call of DeletePortV2. -func (mr *MockNetworkingNeutronMockRecorder) DeletePortV2(arg0 any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) DeletePortV2(arg0 any) *MockNetworkingNeutronDeletePortV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).DeletePortV2), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).DeletePortV2), arg0) + return &MockNetworkingNeutronDeletePortV2Call{Call: call} +} + +// MockNetworkingNeutronDeletePortV2Call wrap *gomock.Call +type MockNetworkingNeutronDeletePortV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronDeletePortV2Call) Return(arg0 error) *MockNetworkingNeutronDeletePortV2Call { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronDeletePortV2Call) Do(f func(string) error) *MockNetworkingNeutronDeletePortV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronDeletePortV2Call) DoAndReturn(f func(string) error) *MockNetworkingNeutronDeletePortV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkV2 mocks base method. @@ -340,9 +700,33 @@ func (m *MockNetworkingNeutron) GetNetworkV2(arg0 string) (*neutron.NetworkV2, e } // GetNetworkV2 indicates an expected call of GetNetworkV2. -func (mr *MockNetworkingNeutronMockRecorder) GetNetworkV2(arg0 any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) GetNetworkV2(arg0 any) *MockNetworkingNeutronGetNetworkV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).GetNetworkV2), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).GetNetworkV2), arg0) + return &MockNetworkingNeutronGetNetworkV2Call{Call: call} +} + +// MockNetworkingNeutronGetNetworkV2Call wrap *gomock.Call +type MockNetworkingNeutronGetNetworkV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronGetNetworkV2Call) Return(arg0 *neutron.NetworkV2, arg1 error) *MockNetworkingNeutronGetNetworkV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronGetNetworkV2Call) Do(f func(string) (*neutron.NetworkV2, error)) *MockNetworkingNeutronGetNetworkV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronGetNetworkV2Call) DoAndReturn(f func(string) (*neutron.NetworkV2, error)) *MockNetworkingNeutronGetNetworkV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ListFloatingIPsV2 mocks base method. @@ -359,9 +743,33 @@ func (m *MockNetworkingNeutron) ListFloatingIPsV2(arg0 ...*neutron.Filter) ([]ne } // ListFloatingIPsV2 indicates an expected call of ListFloatingIPsV2. -func (mr *MockNetworkingNeutronMockRecorder) ListFloatingIPsV2(arg0 ...any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) ListFloatingIPsV2(arg0 ...any) *MockNetworkingNeutronListFloatingIPsV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFloatingIPsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListFloatingIPsV2), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFloatingIPsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListFloatingIPsV2), arg0...) + return &MockNetworkingNeutronListFloatingIPsV2Call{Call: call} +} + +// MockNetworkingNeutronListFloatingIPsV2Call wrap *gomock.Call +type MockNetworkingNeutronListFloatingIPsV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronListFloatingIPsV2Call) Return(arg0 []neutron.FloatingIPV2, arg1 error) *MockNetworkingNeutronListFloatingIPsV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronListFloatingIPsV2Call) Do(f func(...*neutron.Filter) ([]neutron.FloatingIPV2, error)) *MockNetworkingNeutronListFloatingIPsV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronListFloatingIPsV2Call) DoAndReturn(f func(...*neutron.Filter) ([]neutron.FloatingIPV2, error)) *MockNetworkingNeutronListFloatingIPsV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ListNetworksV2 mocks base method. @@ -378,9 +786,33 @@ func (m *MockNetworkingNeutron) ListNetworksV2(arg0 ...*neutron.Filter) ([]neutr } // ListNetworksV2 indicates an expected call of ListNetworksV2. -func (mr *MockNetworkingNeutronMockRecorder) ListNetworksV2(arg0 ...any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) ListNetworksV2(arg0 ...any) *MockNetworkingNeutronListNetworksV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListNetworksV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListNetworksV2), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListNetworksV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListNetworksV2), arg0...) + return &MockNetworkingNeutronListNetworksV2Call{Call: call} +} + +// MockNetworkingNeutronListNetworksV2Call wrap *gomock.Call +type MockNetworkingNeutronListNetworksV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronListNetworksV2Call) Return(arg0 []neutron.NetworkV2, arg1 error) *MockNetworkingNeutronListNetworksV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronListNetworksV2Call) Do(f func(...*neutron.Filter) ([]neutron.NetworkV2, error)) *MockNetworkingNeutronListNetworksV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronListNetworksV2Call) DoAndReturn(f func(...*neutron.Filter) ([]neutron.NetworkV2, error)) *MockNetworkingNeutronListNetworksV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ListPortsV2 mocks base method. @@ -397,9 +829,33 @@ func (m *MockNetworkingNeutron) ListPortsV2(arg0 ...*neutron.Filter) ([]neutron. } // ListPortsV2 indicates an expected call of ListPortsV2. -func (mr *MockNetworkingNeutronMockRecorder) ListPortsV2(arg0 ...any) *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) ListPortsV2(arg0 ...any) *MockNetworkingNeutronListPortsV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPortsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListPortsV2), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPortsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListPortsV2), arg0...) + return &MockNetworkingNeutronListPortsV2Call{Call: call} +} + +// MockNetworkingNeutronListPortsV2Call wrap *gomock.Call +type MockNetworkingNeutronListPortsV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronListPortsV2Call) Return(arg0 []neutron.PortV2, arg1 error) *MockNetworkingNeutronListPortsV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronListPortsV2Call) Do(f func(...*neutron.Filter) ([]neutron.PortV2, error)) *MockNetworkingNeutronListPortsV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronListPortsV2Call) DoAndReturn(f func(...*neutron.Filter) ([]neutron.PortV2, error)) *MockNetworkingNeutronListPortsV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // ListSubnetsV2 mocks base method. @@ -412,9 +868,33 @@ func (m *MockNetworkingNeutron) ListSubnetsV2() ([]neutron.SubnetV2, error) { } // ListSubnetsV2 indicates an expected call of ListSubnetsV2. -func (mr *MockNetworkingNeutronMockRecorder) ListSubnetsV2() *gomock.Call { +func (mr *MockNetworkingNeutronMockRecorder) ListSubnetsV2() *MockNetworkingNeutronListSubnetsV2Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnetsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListSubnetsV2)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnetsV2", reflect.TypeOf((*MockNetworkingNeutron)(nil).ListSubnetsV2)) + return &MockNetworkingNeutronListSubnetsV2Call{Call: call} +} + +// MockNetworkingNeutronListSubnetsV2Call wrap *gomock.Call +type MockNetworkingNeutronListSubnetsV2Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNeutronListSubnetsV2Call) Return(arg0 []neutron.SubnetV2, arg1 error) *MockNetworkingNeutronListSubnetsV2Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNeutronListSubnetsV2Call) Do(f func() ([]neutron.SubnetV2, error)) *MockNetworkingNeutronListSubnetsV2Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNeutronListSubnetsV2Call) DoAndReturn(f func() ([]neutron.SubnetV2, error)) *MockNetworkingNeutronListSubnetsV2Call { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingAuthenticatingClient is a mock of NetworkingAuthenticatingClient interface. @@ -449,9 +929,33 @@ func (m *MockNetworkingAuthenticatingClient) TenantId() string { } // TenantId indicates an expected call of TenantId. -func (mr *MockNetworkingAuthenticatingClientMockRecorder) TenantId() *gomock.Call { +func (mr *MockNetworkingAuthenticatingClientMockRecorder) TenantId() *MockNetworkingAuthenticatingClientTenantIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantId", reflect.TypeOf((*MockNetworkingAuthenticatingClient)(nil).TenantId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantId", reflect.TypeOf((*MockNetworkingAuthenticatingClient)(nil).TenantId)) + return &MockNetworkingAuthenticatingClientTenantIdCall{Call: call} +} + +// MockNetworkingAuthenticatingClientTenantIdCall wrap *gomock.Call +type MockNetworkingAuthenticatingClientTenantIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingAuthenticatingClientTenantIdCall) Return(arg0 string) *MockNetworkingAuthenticatingClientTenantIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingAuthenticatingClientTenantIdCall) Do(f func() string) *MockNetworkingAuthenticatingClientTenantIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingAuthenticatingClientTenantIdCall) DoAndReturn(f func() string) *MockNetworkingAuthenticatingClientTenantIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingNova is a mock of NetworkingNova interface. @@ -487,9 +991,33 @@ func (m *MockNetworkingNova) GetServer(arg0 string) (*nova.ServerDetail, error) } // GetServer indicates an expected call of GetServer. -func (mr *MockNetworkingNovaMockRecorder) GetServer(arg0 any) *gomock.Call { +func (mr *MockNetworkingNovaMockRecorder) GetServer(arg0 any) *MockNetworkingNovaGetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockNetworkingNova)(nil).GetServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockNetworkingNova)(nil).GetServer), arg0) + return &MockNetworkingNovaGetServerCall{Call: call} +} + +// MockNetworkingNovaGetServerCall wrap *gomock.Call +type MockNetworkingNovaGetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingNovaGetServerCall) Return(arg0 *nova.ServerDetail, arg1 error) *MockNetworkingNovaGetServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingNovaGetServerCall) Do(f func(string) (*nova.ServerDetail, error)) *MockNetworkingNovaGetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingNovaGetServerCall) DoAndReturn(f func(string) (*nova.ServerDetail, error)) *MockNetworkingNovaGetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkingEnvironConfig is a mock of NetworkingEnvironConfig interface. @@ -524,9 +1052,33 @@ func (m *MockNetworkingEnvironConfig) externalNetwork() string { } // externalNetwork indicates an expected call of externalNetwork. -func (mr *MockNetworkingEnvironConfigMockRecorder) externalNetwork() *gomock.Call { +func (mr *MockNetworkingEnvironConfigMockRecorder) externalNetwork() *MockNetworkingEnvironConfigexternalNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "externalNetwork", reflect.TypeOf((*MockNetworkingEnvironConfig)(nil).externalNetwork)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "externalNetwork", reflect.TypeOf((*MockNetworkingEnvironConfig)(nil).externalNetwork)) + return &MockNetworkingEnvironConfigexternalNetworkCall{Call: call} +} + +// MockNetworkingEnvironConfigexternalNetworkCall wrap *gomock.Call +type MockNetworkingEnvironConfigexternalNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConfigexternalNetworkCall) Return(arg0 string) *MockNetworkingEnvironConfigexternalNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConfigexternalNetworkCall) Do(f func() string) *MockNetworkingEnvironConfigexternalNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConfigexternalNetworkCall) DoAndReturn(f func() string) *MockNetworkingEnvironConfigexternalNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // networks mocks base method. @@ -538,7 +1090,31 @@ func (m *MockNetworkingEnvironConfig) networks() []string { } // networks indicates an expected call of networks. -func (mr *MockNetworkingEnvironConfigMockRecorder) networks() *gomock.Call { +func (mr *MockNetworkingEnvironConfigMockRecorder) networks() *MockNetworkingEnvironConfignetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "networks", reflect.TypeOf((*MockNetworkingEnvironConfig)(nil).networks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "networks", reflect.TypeOf((*MockNetworkingEnvironConfig)(nil).networks)) + return &MockNetworkingEnvironConfignetworksCall{Call: call} +} + +// MockNetworkingEnvironConfignetworksCall wrap *gomock.Call +type MockNetworkingEnvironConfignetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkingEnvironConfignetworksCall) Return(arg0 []string) *MockNetworkingEnvironConfignetworksCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkingEnvironConfignetworksCall) Do(f func() []string) *MockNetworkingEnvironConfignetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkingEnvironConfignetworksCall) DoAndReturn(f func() []string) *MockNetworkingEnvironConfignetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/provider/openstack/package_test.go b/internal/provider/openstack/package_test.go index a4d978c8286..c16a818328f 100644 --- a/internal/provider/openstack/package_test.go +++ b/internal/provider/openstack/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package openstack -destination network_mock_test.go github.com/juju/juju/internal/provider/openstack SSLHostnameConfig,Networking,NetworkingBase,NetworkingNeutron,NetworkingAuthenticatingClient,NetworkingNova,NetworkingEnvironConfig -//go:generate go run go.uber.org/mock/mockgen -package openstack -destination cloud_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit NetworkingConfig -//go:generate go run go.uber.org/mock/mockgen -package openstack -destination goose_mock_test.go github.com/go-goose/goose/v5/client AuthenticatingClient +//go:generate go run go.uber.org/mock/mockgen -typed -package openstack -destination network_mock_test.go github.com/juju/juju/internal/provider/openstack SSLHostnameConfig,Networking,NetworkingBase,NetworkingNeutron,NetworkingAuthenticatingClient,NetworkingNova,NetworkingEnvironConfig +//go:generate go run go.uber.org/mock/mockgen -typed -package openstack -destination cloud_mock_test.go github.com/juju/juju/internal/cloudconfig/cloudinit NetworkingConfig +//go:generate go run go.uber.org/mock/mockgen -typed -package openstack -destination goose_mock_test.go github.com/go-goose/goose/v5/client AuthenticatingClient func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/provider/vsphere/client.go b/internal/provider/vsphere/client.go index fa27822ecb4..4491c5cfa2b 100644 --- a/internal/provider/vsphere/client.go +++ b/internal/provider/vsphere/client.go @@ -42,7 +42,7 @@ type Client interface { FindFolder(ctx context.Context, folderPath string) (vmFolder *object.Folder, err error) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/provider/vsphere Client +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/provider/vsphere Client func dialClient( ctx context.Context, cloudSpec environscloudspec.CloudSpec, diff --git a/internal/provider/vsphere/environ_broker_test.go b/internal/provider/vsphere/environ_broker_test.go index 4f4a9d9c41b..ac154228ebc 100644 --- a/internal/provider/vsphere/environ_broker_test.go +++ b/internal/provider/vsphere/environ_broker_test.go @@ -540,7 +540,7 @@ func (s *environBrokerSuite) TestStopInstancesOneFailure(c *gc.C) { Return(nil) s.mockClient.EXPECT(). FindFolder(gomock.Any(), ""). - After(failedRemoveVM).Return(nil, nil) // only do find folder check if the RemoveVirtualMachines failed. + After(failedRemoveVM.Call).Return(nil, nil) // only do find folder check if the RemoveVirtualMachines failed. s.mockClient.EXPECT().Close(gomock.Any()).Return(nil) err := s.env.StopInstances(s.callCtx, "vm-0", "vm-1") @@ -562,10 +562,10 @@ func (s *environBrokerSuite) TestStopInstancesMultipleFailures(c *gc.C) { Return(err2) s.mockClient.EXPECT(). FindFolder(gomock.Any(), ""). - After(failedRemoveVM1).Return(nil, nil) + After(failedRemoveVM1.Call).Return(nil, nil) s.mockClient.EXPECT(). FindFolder(gomock.Any(), ""). - After(failedRemoveVM2).Return(nil, nil) + After(failedRemoveVM2.Call).Return(nil, nil) s.mockClient.EXPECT().Close(gomock.Any()).Return(nil) err := s.env.StopInstances(s.callCtx, "vm-0", "vm-1") diff --git a/internal/provider/vsphere/mocks/client_mock.go b/internal/provider/vsphere/mocks/client_mock.go index 41fe582a8f1..b0553c22719 100644 --- a/internal/provider/vsphere/mocks/client_mock.go +++ b/internal/provider/vsphere/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/provider/vsphere Client +// mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/provider/vsphere Client // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockClient) Close(arg0 context.Context) error { } // Close indicates an expected call of Close. -func (mr *MockClientMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Close(arg0 any) *MockClientCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClient)(nil).Close), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClient)(nil).Close), arg0) + return &MockClientCloseCall{Call: call} +} + +// MockClientCloseCall wrap *gomock.Call +type MockClientCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCloseCall) Return(arg0 error) *MockClientCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCloseCall) Do(f func(context.Context) error) *MockClientCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCloseCall) DoAndReturn(f func(context.Context) error) *MockClientCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ComputeResources mocks base method. @@ -67,9 +91,33 @@ func (m *MockClient) ComputeResources(arg0 context.Context) ([]vsphereclient.Com } // ComputeResources indicates an expected call of ComputeResources. -func (mr *MockClientMockRecorder) ComputeResources(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) ComputeResources(arg0 any) *MockClientComputeResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComputeResources", reflect.TypeOf((*MockClient)(nil).ComputeResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ComputeResources", reflect.TypeOf((*MockClient)(nil).ComputeResources), arg0) + return &MockClientComputeResourcesCall{Call: call} +} + +// MockClientComputeResourcesCall wrap *gomock.Call +type MockClientComputeResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientComputeResourcesCall) Return(arg0 []vsphereclient.ComputeResource, arg1 error) *MockClientComputeResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientComputeResourcesCall) Do(f func(context.Context) ([]vsphereclient.ComputeResource, error)) *MockClientComputeResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientComputeResourcesCall) DoAndReturn(f func(context.Context) ([]vsphereclient.ComputeResource, error)) *MockClientComputeResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateTemplateVM mocks base method. @@ -82,9 +130,33 @@ func (m *MockClient) CreateTemplateVM(arg0 context.Context, arg1 vsphereclient.I } // CreateTemplateVM indicates an expected call of CreateTemplateVM. -func (mr *MockClientMockRecorder) CreateTemplateVM(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) CreateTemplateVM(arg0, arg1 any) *MockClientCreateTemplateVMCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTemplateVM", reflect.TypeOf((*MockClient)(nil).CreateTemplateVM), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTemplateVM", reflect.TypeOf((*MockClient)(nil).CreateTemplateVM), arg0, arg1) + return &MockClientCreateTemplateVMCall{Call: call} +} + +// MockClientCreateTemplateVMCall wrap *gomock.Call +type MockClientCreateTemplateVMCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCreateTemplateVMCall) Return(arg0 *object.VirtualMachine, arg1 error) *MockClientCreateTemplateVMCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCreateTemplateVMCall) Do(f func(context.Context, vsphereclient.ImportOVAParameters) (*object.VirtualMachine, error)) *MockClientCreateTemplateVMCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCreateTemplateVMCall) DoAndReturn(f func(context.Context, vsphereclient.ImportOVAParameters) (*object.VirtualMachine, error)) *MockClientCreateTemplateVMCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateVirtualMachine mocks base method. @@ -97,9 +169,33 @@ func (m *MockClient) CreateVirtualMachine(arg0 context.Context, arg1 vsphereclie } // CreateVirtualMachine indicates an expected call of CreateVirtualMachine. -func (mr *MockClientMockRecorder) CreateVirtualMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) CreateVirtualMachine(arg0, arg1 any) *MockClientCreateVirtualMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVirtualMachine", reflect.TypeOf((*MockClient)(nil).CreateVirtualMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVirtualMachine", reflect.TypeOf((*MockClient)(nil).CreateVirtualMachine), arg0, arg1) + return &MockClientCreateVirtualMachineCall{Call: call} +} + +// MockClientCreateVirtualMachineCall wrap *gomock.Call +type MockClientCreateVirtualMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCreateVirtualMachineCall) Return(arg0 *mo.VirtualMachine, arg1 error) *MockClientCreateVirtualMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCreateVirtualMachineCall) Do(f func(context.Context, vsphereclient.CreateVirtualMachineParams) (*mo.VirtualMachine, error)) *MockClientCreateVirtualMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCreateVirtualMachineCall) DoAndReturn(f func(context.Context, vsphereclient.CreateVirtualMachineParams) (*mo.VirtualMachine, error)) *MockClientCreateVirtualMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Datastores mocks base method. @@ -112,9 +208,33 @@ func (m *MockClient) Datastores(arg0 context.Context) ([]mo.Datastore, error) { } // Datastores indicates an expected call of Datastores. -func (mr *MockClientMockRecorder) Datastores(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Datastores(arg0 any) *MockClientDatastoresCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Datastores", reflect.TypeOf((*MockClient)(nil).Datastores), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Datastores", reflect.TypeOf((*MockClient)(nil).Datastores), arg0) + return &MockClientDatastoresCall{Call: call} +} + +// MockClientDatastoresCall wrap *gomock.Call +type MockClientDatastoresCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientDatastoresCall) Return(arg0 []mo.Datastore, arg1 error) *MockClientDatastoresCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientDatastoresCall) Do(f func(context.Context) ([]mo.Datastore, error)) *MockClientDatastoresCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientDatastoresCall) DoAndReturn(f func(context.Context) ([]mo.Datastore, error)) *MockClientDatastoresCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteDatastoreFile mocks base method. @@ -126,9 +246,33 @@ func (m *MockClient) DeleteDatastoreFile(arg0 context.Context, arg1 string) erro } // DeleteDatastoreFile indicates an expected call of DeleteDatastoreFile. -func (mr *MockClientMockRecorder) DeleteDatastoreFile(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteDatastoreFile(arg0, arg1 any) *MockClientDeleteDatastoreFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDatastoreFile", reflect.TypeOf((*MockClient)(nil).DeleteDatastoreFile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDatastoreFile", reflect.TypeOf((*MockClient)(nil).DeleteDatastoreFile), arg0, arg1) + return &MockClientDeleteDatastoreFileCall{Call: call} +} + +// MockClientDeleteDatastoreFileCall wrap *gomock.Call +type MockClientDeleteDatastoreFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientDeleteDatastoreFileCall) Return(arg0 error) *MockClientDeleteDatastoreFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientDeleteDatastoreFileCall) Do(f func(context.Context, string) error) *MockClientDeleteDatastoreFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientDeleteDatastoreFileCall) DoAndReturn(f func(context.Context, string) error) *MockClientDeleteDatastoreFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyVMFolder mocks base method. @@ -140,9 +284,33 @@ func (m *MockClient) DestroyVMFolder(arg0 context.Context, arg1 string) error { } // DestroyVMFolder indicates an expected call of DestroyVMFolder. -func (mr *MockClientMockRecorder) DestroyVMFolder(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) DestroyVMFolder(arg0, arg1 any) *MockClientDestroyVMFolderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyVMFolder", reflect.TypeOf((*MockClient)(nil).DestroyVMFolder), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyVMFolder", reflect.TypeOf((*MockClient)(nil).DestroyVMFolder), arg0, arg1) + return &MockClientDestroyVMFolderCall{Call: call} +} + +// MockClientDestroyVMFolderCall wrap *gomock.Call +type MockClientDestroyVMFolderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientDestroyVMFolderCall) Return(arg0 error) *MockClientDestroyVMFolderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientDestroyVMFolderCall) Do(f func(context.Context, string) error) *MockClientDestroyVMFolderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientDestroyVMFolderCall) DoAndReturn(f func(context.Context, string) error) *MockClientDestroyVMFolderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureVMFolder mocks base method. @@ -155,9 +323,33 @@ func (m *MockClient) EnsureVMFolder(arg0 context.Context, arg1, arg2 string) (*o } // EnsureVMFolder indicates an expected call of EnsureVMFolder. -func (mr *MockClientMockRecorder) EnsureVMFolder(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientMockRecorder) EnsureVMFolder(arg0, arg1, arg2 any) *MockClientEnsureVMFolderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureVMFolder", reflect.TypeOf((*MockClient)(nil).EnsureVMFolder), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureVMFolder", reflect.TypeOf((*MockClient)(nil).EnsureVMFolder), arg0, arg1, arg2) + return &MockClientEnsureVMFolderCall{Call: call} +} + +// MockClientEnsureVMFolderCall wrap *gomock.Call +type MockClientEnsureVMFolderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientEnsureVMFolderCall) Return(arg0 *object.Folder, arg1 error) *MockClientEnsureVMFolderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientEnsureVMFolderCall) Do(f func(context.Context, string, string) (*object.Folder, error)) *MockClientEnsureVMFolderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientEnsureVMFolderCall) DoAndReturn(f func(context.Context, string, string) (*object.Folder, error)) *MockClientEnsureVMFolderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindFolder mocks base method. @@ -170,9 +362,33 @@ func (m *MockClient) FindFolder(arg0 context.Context, arg1 string) (*object.Fold } // FindFolder indicates an expected call of FindFolder. -func (mr *MockClientMockRecorder) FindFolder(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) FindFolder(arg0, arg1 any) *MockClientFindFolderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindFolder", reflect.TypeOf((*MockClient)(nil).FindFolder), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindFolder", reflect.TypeOf((*MockClient)(nil).FindFolder), arg0, arg1) + return &MockClientFindFolderCall{Call: call} +} + +// MockClientFindFolderCall wrap *gomock.Call +type MockClientFindFolderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientFindFolderCall) Return(arg0 *object.Folder, arg1 error) *MockClientFindFolderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientFindFolderCall) Do(f func(context.Context, string) (*object.Folder, error)) *MockClientFindFolderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientFindFolderCall) DoAndReturn(f func(context.Context, string) (*object.Folder, error)) *MockClientFindFolderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Folders mocks base method. @@ -185,9 +401,33 @@ func (m *MockClient) Folders(arg0 context.Context) (*object.DatacenterFolders, e } // Folders indicates an expected call of Folders. -func (mr *MockClientMockRecorder) Folders(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Folders(arg0 any) *MockClientFoldersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Folders", reflect.TypeOf((*MockClient)(nil).Folders), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Folders", reflect.TypeOf((*MockClient)(nil).Folders), arg0) + return &MockClientFoldersCall{Call: call} +} + +// MockClientFoldersCall wrap *gomock.Call +type MockClientFoldersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientFoldersCall) Return(arg0 *object.DatacenterFolders, arg1 error) *MockClientFoldersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientFoldersCall) Do(f func(context.Context) (*object.DatacenterFolders, error)) *MockClientFoldersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientFoldersCall) DoAndReturn(f func(context.Context) (*object.DatacenterFolders, error)) *MockClientFoldersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetTargetDatastore mocks base method. @@ -200,9 +440,33 @@ func (m *MockClient) GetTargetDatastore(arg0 context.Context, arg1 *mo.ComputeRe } // GetTargetDatastore indicates an expected call of GetTargetDatastore. -func (mr *MockClientMockRecorder) GetTargetDatastore(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientMockRecorder) GetTargetDatastore(arg0, arg1, arg2 any) *MockClientGetTargetDatastoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTargetDatastore", reflect.TypeOf((*MockClient)(nil).GetTargetDatastore), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTargetDatastore", reflect.TypeOf((*MockClient)(nil).GetTargetDatastore), arg0, arg1, arg2) + return &MockClientGetTargetDatastoreCall{Call: call} +} + +// MockClientGetTargetDatastoreCall wrap *gomock.Call +type MockClientGetTargetDatastoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientGetTargetDatastoreCall) Return(arg0 *object.Datastore, arg1 error) *MockClientGetTargetDatastoreCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientGetTargetDatastoreCall) Do(f func(context.Context, *mo.ComputeResource, string) (*object.Datastore, error)) *MockClientGetTargetDatastoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientGetTargetDatastoreCall) DoAndReturn(f func(context.Context, *mo.ComputeResource, string) (*object.Datastore, error)) *MockClientGetTargetDatastoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListVMTemplates mocks base method. @@ -215,9 +479,33 @@ func (m *MockClient) ListVMTemplates(arg0 context.Context, arg1 string) ([]*obje } // ListVMTemplates indicates an expected call of ListVMTemplates. -func (mr *MockClientMockRecorder) ListVMTemplates(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) ListVMTemplates(arg0, arg1 any) *MockClientListVMTemplatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVMTemplates", reflect.TypeOf((*MockClient)(nil).ListVMTemplates), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVMTemplates", reflect.TypeOf((*MockClient)(nil).ListVMTemplates), arg0, arg1) + return &MockClientListVMTemplatesCall{Call: call} +} + +// MockClientListVMTemplatesCall wrap *gomock.Call +type MockClientListVMTemplatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientListVMTemplatesCall) Return(arg0 []*object.VirtualMachine, arg1 error) *MockClientListVMTemplatesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientListVMTemplatesCall) Do(f func(context.Context, string) ([]*object.VirtualMachine, error)) *MockClientListVMTemplatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientListVMTemplatesCall) DoAndReturn(f func(context.Context, string) ([]*object.VirtualMachine, error)) *MockClientListVMTemplatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MoveVMFolderInto mocks base method. @@ -229,9 +517,33 @@ func (m *MockClient) MoveVMFolderInto(arg0 context.Context, arg1, arg2 string) e } // MoveVMFolderInto indicates an expected call of MoveVMFolderInto. -func (mr *MockClientMockRecorder) MoveVMFolderInto(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientMockRecorder) MoveVMFolderInto(arg0, arg1, arg2 any) *MockClientMoveVMFolderIntoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveVMFolderInto", reflect.TypeOf((*MockClient)(nil).MoveVMFolderInto), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveVMFolderInto", reflect.TypeOf((*MockClient)(nil).MoveVMFolderInto), arg0, arg1, arg2) + return &MockClientMoveVMFolderIntoCall{Call: call} +} + +// MockClientMoveVMFolderIntoCall wrap *gomock.Call +type MockClientMoveVMFolderIntoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientMoveVMFolderIntoCall) Return(arg0 error) *MockClientMoveVMFolderIntoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientMoveVMFolderIntoCall) Do(f func(context.Context, string, string) error) *MockClientMoveVMFolderIntoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientMoveVMFolderIntoCall) DoAndReturn(f func(context.Context, string, string) error) *MockClientMoveVMFolderIntoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MoveVMsInto mocks base method. @@ -247,10 +559,34 @@ func (m *MockClient) MoveVMsInto(arg0 context.Context, arg1 string, arg2 ...type } // MoveVMsInto indicates an expected call of MoveVMsInto. -func (mr *MockClientMockRecorder) MoveVMsInto(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockClientMockRecorder) MoveVMsInto(arg0, arg1 any, arg2 ...any) *MockClientMoveVMsIntoCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveVMsInto", reflect.TypeOf((*MockClient)(nil).MoveVMsInto), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MoveVMsInto", reflect.TypeOf((*MockClient)(nil).MoveVMsInto), varargs...) + return &MockClientMoveVMsIntoCall{Call: call} +} + +// MockClientMoveVMsIntoCall wrap *gomock.Call +type MockClientMoveVMsIntoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientMoveVMsIntoCall) Return(arg0 error) *MockClientMoveVMsIntoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientMoveVMsIntoCall) Do(f func(context.Context, string, ...types.ManagedObjectReference) error) *MockClientMoveVMsIntoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientMoveVMsIntoCall) DoAndReturn(f func(context.Context, string, ...types.ManagedObjectReference) error) *MockClientMoveVMsIntoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveVirtualMachines mocks base method. @@ -262,9 +598,33 @@ func (m *MockClient) RemoveVirtualMachines(arg0 context.Context, arg1 string) er } // RemoveVirtualMachines indicates an expected call of RemoveVirtualMachines. -func (mr *MockClientMockRecorder) RemoveVirtualMachines(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) RemoveVirtualMachines(arg0, arg1 any) *MockClientRemoveVirtualMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveVirtualMachines", reflect.TypeOf((*MockClient)(nil).RemoveVirtualMachines), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveVirtualMachines", reflect.TypeOf((*MockClient)(nil).RemoveVirtualMachines), arg0, arg1) + return &MockClientRemoveVirtualMachinesCall{Call: call} +} + +// MockClientRemoveVirtualMachinesCall wrap *gomock.Call +type MockClientRemoveVirtualMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientRemoveVirtualMachinesCall) Return(arg0 error) *MockClientRemoveVirtualMachinesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientRemoveVirtualMachinesCall) Do(f func(context.Context, string) error) *MockClientRemoveVirtualMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientRemoveVirtualMachinesCall) DoAndReturn(f func(context.Context, string) error) *MockClientRemoveVirtualMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResourcePools mocks base method. @@ -277,9 +637,33 @@ func (m *MockClient) ResourcePools(arg0 context.Context, arg1 string) ([]*object } // ResourcePools indicates an expected call of ResourcePools. -func (mr *MockClientMockRecorder) ResourcePools(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) ResourcePools(arg0, arg1 any) *MockClientResourcePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourcePools", reflect.TypeOf((*MockClient)(nil).ResourcePools), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourcePools", reflect.TypeOf((*MockClient)(nil).ResourcePools), arg0, arg1) + return &MockClientResourcePoolsCall{Call: call} +} + +// MockClientResourcePoolsCall wrap *gomock.Call +type MockClientResourcePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientResourcePoolsCall) Return(arg0 []*object.ResourcePool, arg1 error) *MockClientResourcePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientResourcePoolsCall) Do(f func(context.Context, string) ([]*object.ResourcePool, error)) *MockClientResourcePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientResourcePoolsCall) DoAndReturn(f func(context.Context, string) ([]*object.ResourcePool, error)) *MockClientResourcePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateVirtualMachineExtraConfig mocks base method. @@ -291,9 +675,33 @@ func (m *MockClient) UpdateVirtualMachineExtraConfig(arg0 context.Context, arg1 } // UpdateVirtualMachineExtraConfig indicates an expected call of UpdateVirtualMachineExtraConfig. -func (mr *MockClientMockRecorder) UpdateVirtualMachineExtraConfig(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockClientMockRecorder) UpdateVirtualMachineExtraConfig(arg0, arg1, arg2 any) *MockClientUpdateVirtualMachineExtraConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVirtualMachineExtraConfig", reflect.TypeOf((*MockClient)(nil).UpdateVirtualMachineExtraConfig), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVirtualMachineExtraConfig", reflect.TypeOf((*MockClient)(nil).UpdateVirtualMachineExtraConfig), arg0, arg1, arg2) + return &MockClientUpdateVirtualMachineExtraConfigCall{Call: call} +} + +// MockClientUpdateVirtualMachineExtraConfigCall wrap *gomock.Call +type MockClientUpdateVirtualMachineExtraConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientUpdateVirtualMachineExtraConfigCall) Return(arg0 error) *MockClientUpdateVirtualMachineExtraConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientUpdateVirtualMachineExtraConfigCall) Do(f func(context.Context, *mo.VirtualMachine, map[string]string) error) *MockClientUpdateVirtualMachineExtraConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientUpdateVirtualMachineExtraConfigCall) DoAndReturn(f func(context.Context, *mo.VirtualMachine, map[string]string) error) *MockClientUpdateVirtualMachineExtraConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserHasRootLevelPrivilege mocks base method. @@ -306,9 +714,33 @@ func (m *MockClient) UserHasRootLevelPrivilege(arg0 context.Context, arg1 string } // UserHasRootLevelPrivilege indicates an expected call of UserHasRootLevelPrivilege. -func (mr *MockClientMockRecorder) UserHasRootLevelPrivilege(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) UserHasRootLevelPrivilege(arg0, arg1 any) *MockClientUserHasRootLevelPrivilegeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserHasRootLevelPrivilege", reflect.TypeOf((*MockClient)(nil).UserHasRootLevelPrivilege), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserHasRootLevelPrivilege", reflect.TypeOf((*MockClient)(nil).UserHasRootLevelPrivilege), arg0, arg1) + return &MockClientUserHasRootLevelPrivilegeCall{Call: call} +} + +// MockClientUserHasRootLevelPrivilegeCall wrap *gomock.Call +type MockClientUserHasRootLevelPrivilegeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientUserHasRootLevelPrivilegeCall) Return(arg0 bool, arg1 error) *MockClientUserHasRootLevelPrivilegeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientUserHasRootLevelPrivilegeCall) Do(f func(context.Context, string) (bool, error)) *MockClientUserHasRootLevelPrivilegeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientUserHasRootLevelPrivilegeCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockClientUserHasRootLevelPrivilegeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VirtualMachineObjectToManagedObject mocks base method. @@ -321,9 +753,33 @@ func (m *MockClient) VirtualMachineObjectToManagedObject(arg0 context.Context, a } // VirtualMachineObjectToManagedObject indicates an expected call of VirtualMachineObjectToManagedObject. -func (mr *MockClientMockRecorder) VirtualMachineObjectToManagedObject(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) VirtualMachineObjectToManagedObject(arg0, arg1 any) *MockClientVirtualMachineObjectToManagedObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualMachineObjectToManagedObject", reflect.TypeOf((*MockClient)(nil).VirtualMachineObjectToManagedObject), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualMachineObjectToManagedObject", reflect.TypeOf((*MockClient)(nil).VirtualMachineObjectToManagedObject), arg0, arg1) + return &MockClientVirtualMachineObjectToManagedObjectCall{Call: call} +} + +// MockClientVirtualMachineObjectToManagedObjectCall wrap *gomock.Call +type MockClientVirtualMachineObjectToManagedObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientVirtualMachineObjectToManagedObjectCall) Return(arg0 mo.VirtualMachine, arg1 error) *MockClientVirtualMachineObjectToManagedObjectCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientVirtualMachineObjectToManagedObjectCall) Do(f func(context.Context, *object.VirtualMachine) (mo.VirtualMachine, error)) *MockClientVirtualMachineObjectToManagedObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientVirtualMachineObjectToManagedObjectCall) DoAndReturn(f func(context.Context, *object.VirtualMachine) (mo.VirtualMachine, error)) *MockClientVirtualMachineObjectToManagedObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VirtualMachines mocks base method. @@ -336,7 +792,31 @@ func (m *MockClient) VirtualMachines(arg0 context.Context, arg1 string) ([]*mo.V } // VirtualMachines indicates an expected call of VirtualMachines. -func (mr *MockClientMockRecorder) VirtualMachines(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) VirtualMachines(arg0, arg1 any) *MockClientVirtualMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualMachines", reflect.TypeOf((*MockClient)(nil).VirtualMachines), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualMachines", reflect.TypeOf((*MockClient)(nil).VirtualMachines), arg0, arg1) + return &MockClientVirtualMachinesCall{Call: call} +} + +// MockClientVirtualMachinesCall wrap *gomock.Call +type MockClientVirtualMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientVirtualMachinesCall) Return(arg0 []*mo.VirtualMachine, arg1 error) *MockClientVirtualMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientVirtualMachinesCall) Do(f func(context.Context, string) ([]*mo.VirtualMachine, error)) *MockClientVirtualMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientVirtualMachinesCall) DoAndReturn(f func(context.Context, string) ([]*mo.VirtualMachine, error)) *MockClientVirtualMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/pubsub/centralhub/gauge_mock_test.go b/internal/pubsub/centralhub/gauge_mock_test.go index e7d7bfc2648..16ed7bd29be 100644 --- a/internal/pubsub/centralhub/gauge_mock_test.go +++ b/internal/pubsub/centralhub/gauge_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package centralhub -destination gauge_mock_test.go github.com/juju/juju/internal/pubsub/centralhub GaugeVec +// mockgen -typed -package centralhub -destination gauge_mock_test.go github.com/juju/juju/internal/pubsub/centralhub GaugeVec // // Package centralhub is a generated GoMock package. @@ -46,9 +46,33 @@ func (m *MockGaugeVec) Collect(arg0 chan<- prometheus.Metric) { } // Collect indicates an expected call of Collect. -func (mr *MockGaugeVecMockRecorder) Collect(arg0 any) *gomock.Call { +func (mr *MockGaugeVecMockRecorder) Collect(arg0 any) *MockGaugeVecCollectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGaugeVec)(nil).Collect), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGaugeVec)(nil).Collect), arg0) + return &MockGaugeVecCollectCall{Call: call} +} + +// MockGaugeVecCollectCall wrap *gomock.Call +type MockGaugeVecCollectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeVecCollectCall) Return() *MockGaugeVecCollectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeVecCollectCall) Do(f func(chan<- prometheus.Metric)) *MockGaugeVecCollectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeVecCollectCall) DoAndReturn(f func(chan<- prometheus.Metric)) *MockGaugeVecCollectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Describe mocks base method. @@ -58,9 +82,33 @@ func (m *MockGaugeVec) Describe(arg0 chan<- *prometheus.Desc) { } // Describe indicates an expected call of Describe. -func (mr *MockGaugeVecMockRecorder) Describe(arg0 any) *gomock.Call { +func (mr *MockGaugeVecMockRecorder) Describe(arg0 any) *MockGaugeVecDescribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGaugeVec)(nil).Describe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGaugeVec)(nil).Describe), arg0) + return &MockGaugeVecDescribeCall{Call: call} +} + +// MockGaugeVecDescribeCall wrap *gomock.Call +type MockGaugeVecDescribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeVecDescribeCall) Return() *MockGaugeVecDescribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeVecDescribeCall) Do(f func(chan<- *prometheus.Desc)) *MockGaugeVecDescribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeVecDescribeCall) DoAndReturn(f func(chan<- *prometheus.Desc)) *MockGaugeVecDescribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // With mocks base method. @@ -72,7 +120,31 @@ func (m *MockGaugeVec) With(arg0 prometheus.Labels) prometheus.Gauge { } // With indicates an expected call of With. -func (mr *MockGaugeVecMockRecorder) With(arg0 any) *gomock.Call { +func (mr *MockGaugeVecMockRecorder) With(arg0 any) *MockGaugeVecWithCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockGaugeVec)(nil).With), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockGaugeVec)(nil).With), arg0) + return &MockGaugeVecWithCall{Call: call} +} + +// MockGaugeVecWithCall wrap *gomock.Call +type MockGaugeVecWithCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeVecWithCall) Return(arg0 prometheus.Gauge) *MockGaugeVecWithCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeVecWithCall) Do(f func(prometheus.Labels) prometheus.Gauge) *MockGaugeVecWithCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeVecWithCall) DoAndReturn(f func(prometheus.Labels) prometheus.Gauge) *MockGaugeVecWithCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/pubsub/centralhub/package_test.go b/internal/pubsub/centralhub/package_test.go index ec14ab4713a..416a43f28b1 100644 --- a/internal/pubsub/centralhub/package_test.go +++ b/internal/pubsub/centralhub/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package centralhub -destination gauge_mock_test.go github.com/juju/juju/internal/pubsub/centralhub GaugeVec -//go:generate go run go.uber.org/mock/mockgen -package centralhub -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Gauge +//go:generate go run go.uber.org/mock/mockgen -typed -package centralhub -destination gauge_mock_test.go github.com/juju/juju/internal/pubsub/centralhub GaugeVec +//go:generate go run go.uber.org/mock/mockgen -typed -package centralhub -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Gauge func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/pubsub/centralhub/prometheus_mock_test.go b/internal/pubsub/centralhub/prometheus_mock_test.go index c862a691de2..79c4bf3dd9c 100644 --- a/internal/pubsub/centralhub/prometheus_mock_test.go +++ b/internal/pubsub/centralhub/prometheus_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package centralhub -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Gauge +// mockgen -typed -package centralhub -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Gauge // // Package centralhub is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockGauge) Add(arg0 float64) { } // Add indicates an expected call of Add. -func (mr *MockGaugeMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Add(arg0 any) *MockGaugeAddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockGauge)(nil).Add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockGauge)(nil).Add), arg0) + return &MockGaugeAddCall{Call: call} +} + +// MockGaugeAddCall wrap *gomock.Call +type MockGaugeAddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeAddCall) Return() *MockGaugeAddCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeAddCall) Do(f func(float64)) *MockGaugeAddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeAddCall) DoAndReturn(f func(float64)) *MockGaugeAddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Collect mocks base method. @@ -59,9 +83,33 @@ func (m *MockGauge) Collect(arg0 chan<- prometheus.Metric) { } // Collect indicates an expected call of Collect. -func (mr *MockGaugeMockRecorder) Collect(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Collect(arg0 any) *MockGaugeCollectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGauge)(nil).Collect), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Collect", reflect.TypeOf((*MockGauge)(nil).Collect), arg0) + return &MockGaugeCollectCall{Call: call} +} + +// MockGaugeCollectCall wrap *gomock.Call +type MockGaugeCollectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeCollectCall) Return() *MockGaugeCollectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeCollectCall) Do(f func(chan<- prometheus.Metric)) *MockGaugeCollectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeCollectCall) DoAndReturn(f func(chan<- prometheus.Metric)) *MockGaugeCollectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dec mocks base method. @@ -71,9 +119,33 @@ func (m *MockGauge) Dec() { } // Dec indicates an expected call of Dec. -func (mr *MockGaugeMockRecorder) Dec() *gomock.Call { +func (mr *MockGaugeMockRecorder) Dec() *MockGaugeDecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dec", reflect.TypeOf((*MockGauge)(nil).Dec)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dec", reflect.TypeOf((*MockGauge)(nil).Dec)) + return &MockGaugeDecCall{Call: call} +} + +// MockGaugeDecCall wrap *gomock.Call +type MockGaugeDecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDecCall) Return() *MockGaugeDecCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDecCall) Do(f func()) *MockGaugeDecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDecCall) DoAndReturn(f func()) *MockGaugeDecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Desc mocks base method. @@ -85,9 +157,33 @@ func (m *MockGauge) Desc() *prometheus.Desc { } // Desc indicates an expected call of Desc. -func (mr *MockGaugeMockRecorder) Desc() *gomock.Call { +func (mr *MockGaugeMockRecorder) Desc() *MockGaugeDescCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockGauge)(nil).Desc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Desc", reflect.TypeOf((*MockGauge)(nil).Desc)) + return &MockGaugeDescCall{Call: call} +} + +// MockGaugeDescCall wrap *gomock.Call +type MockGaugeDescCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDescCall) Return(arg0 *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDescCall) Do(f func() *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDescCall) DoAndReturn(f func() *prometheus.Desc) *MockGaugeDescCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Describe mocks base method. @@ -97,9 +193,33 @@ func (m *MockGauge) Describe(arg0 chan<- *prometheus.Desc) { } // Describe indicates an expected call of Describe. -func (mr *MockGaugeMockRecorder) Describe(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Describe(arg0 any) *MockGaugeDescribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGauge)(nil).Describe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockGauge)(nil).Describe), arg0) + return &MockGaugeDescribeCall{Call: call} +} + +// MockGaugeDescribeCall wrap *gomock.Call +type MockGaugeDescribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeDescribeCall) Return() *MockGaugeDescribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeDescribeCall) Do(f func(chan<- *prometheus.Desc)) *MockGaugeDescribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeDescribeCall) DoAndReturn(f func(chan<- *prometheus.Desc)) *MockGaugeDescribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Inc mocks base method. @@ -109,9 +229,33 @@ func (m *MockGauge) Inc() { } // Inc indicates an expected call of Inc. -func (mr *MockGaugeMockRecorder) Inc() *gomock.Call { +func (mr *MockGaugeMockRecorder) Inc() *MockGaugeIncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockGauge)(nil).Inc)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inc", reflect.TypeOf((*MockGauge)(nil).Inc)) + return &MockGaugeIncCall{Call: call} +} + +// MockGaugeIncCall wrap *gomock.Call +type MockGaugeIncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeIncCall) Return() *MockGaugeIncCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeIncCall) Do(f func()) *MockGaugeIncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeIncCall) DoAndReturn(f func()) *MockGaugeIncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Set mocks base method. @@ -121,9 +265,33 @@ func (m *MockGauge) Set(arg0 float64) { } // Set indicates an expected call of Set. -func (mr *MockGaugeMockRecorder) Set(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Set(arg0 any) *MockGaugeSetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockGauge)(nil).Set), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockGauge)(nil).Set), arg0) + return &MockGaugeSetCall{Call: call} +} + +// MockGaugeSetCall wrap *gomock.Call +type MockGaugeSetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSetCall) Return() *MockGaugeSetCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSetCall) Do(f func(float64)) *MockGaugeSetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSetCall) DoAndReturn(f func(float64)) *MockGaugeSetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetToCurrentTime mocks base method. @@ -133,9 +301,33 @@ func (m *MockGauge) SetToCurrentTime() { } // SetToCurrentTime indicates an expected call of SetToCurrentTime. -func (mr *MockGaugeMockRecorder) SetToCurrentTime() *gomock.Call { +func (mr *MockGaugeMockRecorder) SetToCurrentTime() *MockGaugeSetToCurrentTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToCurrentTime", reflect.TypeOf((*MockGauge)(nil).SetToCurrentTime)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToCurrentTime", reflect.TypeOf((*MockGauge)(nil).SetToCurrentTime)) + return &MockGaugeSetToCurrentTimeCall{Call: call} +} + +// MockGaugeSetToCurrentTimeCall wrap *gomock.Call +type MockGaugeSetToCurrentTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSetToCurrentTimeCall) Return() *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSetToCurrentTimeCall) Do(f func()) *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSetToCurrentTimeCall) DoAndReturn(f func()) *MockGaugeSetToCurrentTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sub mocks base method. @@ -145,9 +337,33 @@ func (m *MockGauge) Sub(arg0 float64) { } // Sub indicates an expected call of Sub. -func (mr *MockGaugeMockRecorder) Sub(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Sub(arg0 any) *MockGaugeSubCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sub", reflect.TypeOf((*MockGauge)(nil).Sub), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sub", reflect.TypeOf((*MockGauge)(nil).Sub), arg0) + return &MockGaugeSubCall{Call: call} +} + +// MockGaugeSubCall wrap *gomock.Call +type MockGaugeSubCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeSubCall) Return() *MockGaugeSubCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeSubCall) Do(f func(float64)) *MockGaugeSubCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeSubCall) DoAndReturn(f func(float64)) *MockGaugeSubCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Write mocks base method. @@ -159,7 +375,31 @@ func (m *MockGauge) Write(arg0 *io_prometheus_client.Metric) error { } // Write indicates an expected call of Write. -func (mr *MockGaugeMockRecorder) Write(arg0 any) *gomock.Call { +func (mr *MockGaugeMockRecorder) Write(arg0 any) *MockGaugeWriteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockGauge)(nil).Write), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockGauge)(nil).Write), arg0) + return &MockGaugeWriteCall{Call: call} +} + +// MockGaugeWriteCall wrap *gomock.Call +type MockGaugeWriteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGaugeWriteCall) Return(arg0 error) *MockGaugeWriteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGaugeWriteCall) Do(f func(*io_prometheus_client.Metric) error) *MockGaugeWriteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGaugeWriteCall) DoAndReturn(f func(*io_prometheus_client.Metric) error) *MockGaugeWriteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/resource/mocks/cache_mock.go b/internal/resource/mocks/cache_mock.go index 2c5106ba3f3..9e630a67adc 100644 --- a/internal/resource/mocks/cache_mock.go +++ b/internal/resource/mocks/cache_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/cache_mock.go github.com/juju/juju/internal/resource Resources +// mockgen -typed -package mocks -destination mocks/cache_mock.go github.com/juju/juju/internal/resource Resources // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockResources) GetResource(arg0, arg1 string) (resources.Resource, erro } // GetResource indicates an expected call of GetResource. -func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *MockResourcesGetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + return &MockResourcesGetResourceCall{Call: call} +} + +// MockResourcesGetResourceCall wrap *gomock.Call +type MockResourcesGetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesGetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetResourceCall) Do(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetResourceCall) DoAndReturn(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResource mocks base method. @@ -68,9 +92,33 @@ func (m *MockResources) OpenResource(arg0, arg1 string) (resources.Resource, io. } // OpenResource indicates an expected call of OpenResource. -func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *MockResourcesOpenResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + return &MockResourcesOpenResourceCall{Call: call} +} + +// MockResourcesOpenResourceCall wrap *gomock.Call +type MockResourcesOpenResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResourceForUniter mocks base method. @@ -84,9 +132,33 @@ func (m *MockResources) OpenResourceForUniter(arg0, arg1 string) (resources.Reso } // OpenResourceForUniter indicates an expected call of OpenResourceForUniter. -func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *MockResourcesOpenResourceForUniterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + return &MockResourcesOpenResourceForUniterCall{Call: call} +} + +// MockResourcesOpenResourceForUniterCall wrap *gomock.Call +type MockResourcesOpenResourceForUniterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceForUniterCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceForUniterCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceForUniterCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetResource mocks base method. @@ -99,7 +171,31 @@ func (m *MockResources) SetResource(arg0, arg1 string, arg2 resource.Resource, a } // SetResource indicates an expected call of SetResource. -func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *MockResourcesSetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + return &MockResourcesSetResourceCall{Call: call} +} + +// MockResourcesSetResourceCall wrap *gomock.Call +type MockResourcesSetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesSetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetResourceCall) Do(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetResourceCall) DoAndReturn(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/resource/mocks/charmhub_mock.go b/internal/resource/mocks/charmhub_mock.go index 4dae49f1a10..94bcc4fa698 100644 --- a/internal/resource/mocks/charmhub_mock.go +++ b/internal/resource/mocks/charmhub_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/charmhub_mock.go github.com/juju/juju/internal/resource CharmHub +// mockgen -typed -package mocks -destination mocks/charmhub_mock.go github.com/juju/juju/internal/resource CharmHub // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockCharmHub) DownloadResource(arg0 context.Context, arg1 *url.URL) (io } // DownloadResource indicates an expected call of DownloadResource. -func (mr *MockCharmHubMockRecorder) DownloadResource(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmHubMockRecorder) DownloadResource(arg0, arg1 any) *MockCharmHubDownloadResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockCharmHub)(nil).DownloadResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockCharmHub)(nil).DownloadResource), arg0, arg1) + return &MockCharmHubDownloadResourceCall{Call: call} +} + +// MockCharmHubDownloadResourceCall wrap *gomock.Call +type MockCharmHubDownloadResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubDownloadResourceCall) Return(arg0 io.ReadCloser, arg1 error) *MockCharmHubDownloadResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubDownloadResourceCall) Do(f func(context.Context, *url.URL) (io.ReadCloser, error)) *MockCharmHubDownloadResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubDownloadResourceCall) DoAndReturn(f func(context.Context, *url.URL) (io.ReadCloser, error)) *MockCharmHubDownloadResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -68,7 +92,31 @@ func (m *MockCharmHub) Refresh(arg0 context.Context, arg1 charmhub.RefreshConfig } // Refresh indicates an expected call of Refresh. -func (mr *MockCharmHubMockRecorder) Refresh(arg0, arg1 any) *gomock.Call { +func (mr *MockCharmHubMockRecorder) Refresh(arg0, arg1 any) *MockCharmHubRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHub)(nil).Refresh), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockCharmHub)(nil).Refresh), arg0, arg1) + return &MockCharmHubRefreshCall{Call: call} +} + +// MockCharmHubRefreshCall wrap *gomock.Call +type MockCharmHubRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmHubRefreshCall) Return(arg0 []transport.RefreshResponse, arg1 error) *MockCharmHubRefreshCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmHubRefreshCall) Do(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmHubRefreshCall) DoAndReturn(f func(context.Context, charmhub.RefreshConfig) ([]transport.RefreshResponse, error)) *MockCharmHubRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/resource/mocks/opener_mock.go b/internal/resource/mocks/opener_mock.go index 166b5fd0c68..fd20d2e0f30 100644 --- a/internal/resource/mocks/opener_mock.go +++ b/internal/resource/mocks/opener_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/opener_mock.go github.com/juju/juju/internal/resource ResourceGetter,ResourceDownloadLock +// mockgen -typed -package mocks -destination mocks/opener_mock.go github.com/juju/juju/internal/resource ResourceGetter,ResourceDownloadLock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockResourceGetter) GetResource(arg0 resource.ResourceRequest) (resourc } // GetResource indicates an expected call of GetResource. -func (mr *MockResourceGetterMockRecorder) GetResource(arg0 any) *gomock.Call { +func (mr *MockResourceGetterMockRecorder) GetResource(arg0 any) *MockResourceGetterGetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResourceGetter)(nil).GetResource), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResourceGetter)(nil).GetResource), arg0) + return &MockResourceGetterGetResourceCall{Call: call} +} + +// MockResourceGetterGetResourceCall wrap *gomock.Call +type MockResourceGetterGetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceGetterGetResourceCall) Return(arg0 resource.ResourceData, arg1 error) *MockResourceGetterGetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceGetterGetResourceCall) Do(f func(resource.ResourceRequest) (resource.ResourceData, error)) *MockResourceGetterGetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceGetterGetResourceCall) DoAndReturn(f func(resource.ResourceRequest) (resource.ResourceData, error)) *MockResourceGetterGetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockResourceDownloadLock is a mock of ResourceDownloadLock interface. @@ -84,9 +108,33 @@ func (m *MockResourceDownloadLock) Acquire(arg0 string) { } // Acquire indicates an expected call of Acquire. -func (mr *MockResourceDownloadLockMockRecorder) Acquire(arg0 any) *gomock.Call { +func (mr *MockResourceDownloadLockMockRecorder) Acquire(arg0 any) *MockResourceDownloadLockAcquireCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockResourceDownloadLock)(nil).Acquire), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockResourceDownloadLock)(nil).Acquire), arg0) + return &MockResourceDownloadLockAcquireCall{Call: call} +} + +// MockResourceDownloadLockAcquireCall wrap *gomock.Call +type MockResourceDownloadLockAcquireCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceDownloadLockAcquireCall) Return() *MockResourceDownloadLockAcquireCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceDownloadLockAcquireCall) Do(f func(string)) *MockResourceDownloadLockAcquireCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceDownloadLockAcquireCall) DoAndReturn(f func(string)) *MockResourceDownloadLockAcquireCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Release mocks base method. @@ -96,7 +144,31 @@ func (m *MockResourceDownloadLock) Release(arg0 string) { } // Release indicates an expected call of Release. -func (mr *MockResourceDownloadLockMockRecorder) Release(arg0 any) *gomock.Call { +func (mr *MockResourceDownloadLockMockRecorder) Release(arg0 any) *MockResourceDownloadLockReleaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockResourceDownloadLock)(nil).Release), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockResourceDownloadLock)(nil).Release), arg0) + return &MockResourceDownloadLockReleaseCall{Call: call} +} + +// MockResourceDownloadLockReleaseCall wrap *gomock.Call +type MockResourceDownloadLockReleaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourceDownloadLockReleaseCall) Return() *MockResourceDownloadLockReleaseCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourceDownloadLockReleaseCall) Do(f func(string)) *MockResourceDownloadLockReleaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourceDownloadLockReleaseCall) DoAndReturn(f func(string)) *MockResourceDownloadLockReleaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/resource/package_test.go b/internal/resource/package_test.go index 3471e96d32a..4aef9fa2f98 100644 --- a/internal/resource/package_test.go +++ b/internal/resource/package_test.go @@ -13,6 +13,6 @@ func Test(t *testing.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/charmhub_mock.go github.com/juju/juju/internal/resource CharmHub -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/cache_mock.go github.com/juju/juju/internal/resource Resources -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/opener_mock.go github.com/juju/juju/internal/resource ResourceGetter,ResourceDownloadLock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/charmhub_mock.go github.com/juju/juju/internal/resource CharmHub +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/cache_mock.go github.com/juju/juju/internal/resource Resources +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/opener_mock.go github.com/juju/juju/internal/resource ResourceGetter,ResourceDownloadLock diff --git a/internal/s3client/package_test.go b/internal/s3client/package_test.go index 2c9ad606b0b..d0425bf6f8a 100644 --- a/internal/s3client/package_test.go +++ b/internal/s3client/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package s3client -destination session_mock_test.go github.com/juju/juju/core/objectstore Session +//go:generate go run go.uber.org/mock/mockgen -typed -package s3client -destination session_mock_test.go github.com/juju/juju/core/objectstore Session func TestSuite(t *testing.T) { gc.TestingT(t) diff --git a/internal/s3client/session_mock_test.go b/internal/s3client/session_mock_test.go index 040cbfd06d7..26586acee26 100644 --- a/internal/s3client/session_mock_test.go +++ b/internal/s3client/session_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package s3client -destination session_mock_test.go github.com/juju/juju/core/objectstore Session +// mockgen -typed -package s3client -destination session_mock_test.go github.com/juju/juju/core/objectstore Session // // Package s3client is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSession) CreateBucket(arg0 context.Context, arg1 string) error { } // CreateBucket indicates an expected call of CreateBucket. -func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *MockSessionCreateBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + return &MockSessionCreateBucketCall{Call: call} +} + +// MockSessionCreateBucketCall wrap *gomock.Call +type MockSessionCreateBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionCreateBucketCall) Return(arg0 error) *MockSessionCreateBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionCreateBucketCall) Do(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionCreateBucketCall) DoAndReturn(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteObject mocks base method. @@ -63,9 +87,33 @@ func (m *MockSession) DeleteObject(arg0 context.Context, arg1, arg2 string) erro } // DeleteObject indicates an expected call of DeleteObject. -func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *MockSessionDeleteObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + return &MockSessionDeleteObjectCall{Call: call} +} + +// MockSessionDeleteObjectCall wrap *gomock.Call +type MockSessionDeleteObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionDeleteObjectCall) Return(arg0 error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionDeleteObjectCall) Do(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionDeleteObjectCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObject mocks base method. @@ -80,9 +128,33 @@ func (m *MockSession) GetObject(arg0 context.Context, arg1, arg2 string) (io.Rea } // GetObject indicates an expected call of GetObject. -func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *MockSessionGetObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + return &MockSessionGetObjectCall{Call: call} +} + +// MockSessionGetObjectCall wrap *gomock.Call +type MockSessionGetObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionGetObjectCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 string, arg3 error) *MockSessionGetObjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionGetObjectCall) Do(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionGetObjectCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListObjects mocks base method. @@ -95,9 +167,33 @@ func (m *MockSession) ListObjects(arg0 context.Context, arg1 string) ([]string, } // ListObjects indicates an expected call of ListObjects. -func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *MockSessionListObjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + return &MockSessionListObjectsCall{Call: call} +} + +// MockSessionListObjectsCall wrap *gomock.Call +type MockSessionListObjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionListObjectsCall) Return(arg0 []string, arg1 error) *MockSessionListObjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionListObjectsCall) Do(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionListObjectsCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectExists mocks base method. @@ -109,9 +205,33 @@ func (m *MockSession) ObjectExists(arg0 context.Context, arg1, arg2 string) erro } // ObjectExists indicates an expected call of ObjectExists. -func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *MockSessionObjectExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + return &MockSessionObjectExistsCall{Call: call} +} + +// MockSessionObjectExistsCall wrap *gomock.Call +type MockSessionObjectExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionObjectExistsCall) Return(arg0 error) *MockSessionObjectExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionObjectExistsCall) Do(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionObjectExistsCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutObject mocks base method. @@ -123,7 +243,31 @@ func (m *MockSession) PutObject(arg0 context.Context, arg1, arg2 string, arg3 io } // PutObject indicates an expected call of PutObject. -func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *MockSessionPutObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + return &MockSessionPutObjectCall{Call: call} +} + +// MockSessionPutObjectCall wrap *gomock.Call +type MockSessionPutObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionPutObjectCall) Return(arg0 error) *MockSessionPutObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionPutObjectCall) Do(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionPutObjectCall) DoAndReturn(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/secrets/mocks/backend_mocks.go b/internal/secrets/mocks/backend_mocks.go index 68d058b0efa..5ea84bc6a48 100644 --- a/internal/secrets/mocks/backend_mocks.go +++ b/internal/secrets/mocks/backend_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/backend_mocks.go github.com/juju/juju/internal/secrets/provider SecretsBackend +// mockgen -typed -package mocks -destination mocks/backend_mocks.go github.com/juju/juju/internal/secrets/provider SecretsBackend // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSecretsBackend) DeleteContent(arg0 context.Context, arg1 string) er } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *MockSecretsBackendDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + return &MockSecretsBackendDeleteContentCall{Call: call} +} + +// MockSecretsBackendDeleteContentCall wrap *gomock.Call +type MockSecretsBackendDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteContentCall) Return(arg0 error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteContentCall) Do(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteContentCall) DoAndReturn(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -64,9 +88,33 @@ func (m *MockSecretsBackend) GetContent(arg0 context.Context, arg1 string) (secr } // GetContent indicates an expected call of GetContent. -func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *MockSecretsBackendGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + return &MockSecretsBackendGetContentCall{Call: call} +} + +// MockSecretsBackendGetContentCall wrap *gomock.Call +type MockSecretsBackendGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendGetContentCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendGetContentCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -78,9 +126,33 @@ func (m *MockSecretsBackend) Ping() error { } // Ping indicates an expected call of Ping. -func (mr *MockSecretsBackendMockRecorder) Ping() *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) Ping() *MockSecretsBackendPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + return &MockSecretsBackendPingCall{Call: call} +} + +// MockSecretsBackendPingCall wrap *gomock.Call +type MockSecretsBackendPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendPingCall) Return(arg0 error) *MockSecretsBackendPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendPingCall) Do(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendPingCall) DoAndReturn(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -93,7 +165,31 @@ func (m *MockSecretsBackend) SaveContent(arg0 context.Context, arg1 *secrets.URI } // SaveContent indicates an expected call of SaveContent. -func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *MockSecretsBackendSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + return &MockSecretsBackendSaveContentCall{Call: call} +} + +// MockSecretsBackendSaveContentCall wrap *gomock.Call +type MockSecretsBackendSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendSaveContentCall) Return(arg0 string, arg1 error) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendSaveContentCall) Do(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendSaveContentCall) DoAndReturn(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/secrets/mocks/jujuapi_mocks.go b/internal/secrets/mocks/jujuapi_mocks.go index 9aeb89a4f86..e9057b9baf0 100644 --- a/internal/secrets/mocks/jujuapi_mocks.go +++ b/internal/secrets/mocks/jujuapi_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/jujuapi_mocks.go github.com/juju/juju/internal/secrets JujuAPIClient +// mockgen -typed -package mocks -destination mocks/jujuapi_mocks.go github.com/juju/juju/internal/secrets JujuAPIClient // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockJujuAPIClient) GetBackendConfigForDrain(arg0 *string) (*provider.Mo } // GetBackendConfigForDrain indicates an expected call of GetBackendConfigForDrain. -func (mr *MockJujuAPIClientMockRecorder) GetBackendConfigForDrain(arg0 any) *gomock.Call { +func (mr *MockJujuAPIClientMockRecorder) GetBackendConfigForDrain(arg0 any) *MockJujuAPIClientGetBackendConfigForDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackendConfigForDrain", reflect.TypeOf((*MockJujuAPIClient)(nil).GetBackendConfigForDrain), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackendConfigForDrain", reflect.TypeOf((*MockJujuAPIClient)(nil).GetBackendConfigForDrain), arg0) + return &MockJujuAPIClientGetBackendConfigForDrainCall{Call: call} +} + +// MockJujuAPIClientGetBackendConfigForDrainCall wrap *gomock.Call +type MockJujuAPIClientGetBackendConfigForDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuAPIClientGetBackendConfigForDrainCall) Return(arg0 *provider.ModelBackendConfig, arg1 string, arg2 error) *MockJujuAPIClientGetBackendConfigForDrainCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuAPIClientGetBackendConfigForDrainCall) Do(f func(*string) (*provider.ModelBackendConfig, string, error)) *MockJujuAPIClientGetBackendConfigForDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuAPIClientGetBackendConfigForDrainCall) DoAndReturn(f func(*string) (*provider.ModelBackendConfig, string, error)) *MockJujuAPIClientGetBackendConfigForDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContentInfo mocks base method. @@ -69,9 +93,33 @@ func (m *MockJujuAPIClient) GetContentInfo(arg0 *secrets.URI, arg1 string, arg2, } // GetContentInfo indicates an expected call of GetContentInfo. -func (mr *MockJujuAPIClientMockRecorder) GetContentInfo(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockJujuAPIClientMockRecorder) GetContentInfo(arg0, arg1, arg2, arg3 any) *MockJujuAPIClientGetContentInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContentInfo", reflect.TypeOf((*MockJujuAPIClient)(nil).GetContentInfo), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContentInfo", reflect.TypeOf((*MockJujuAPIClient)(nil).GetContentInfo), arg0, arg1, arg2, arg3) + return &MockJujuAPIClientGetContentInfoCall{Call: call} +} + +// MockJujuAPIClientGetContentInfoCall wrap *gomock.Call +type MockJujuAPIClientGetContentInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuAPIClientGetContentInfoCall) Return(arg0 *secrets0.ContentParams, arg1 *provider.ModelBackendConfig, arg2 bool, arg3 error) *MockJujuAPIClientGetContentInfoCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuAPIClientGetContentInfoCall) Do(f func(*secrets.URI, string, bool, bool) (*secrets0.ContentParams, *provider.ModelBackendConfig, bool, error)) *MockJujuAPIClientGetContentInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuAPIClientGetContentInfoCall) DoAndReturn(f func(*secrets.URI, string, bool, bool) (*secrets0.ContentParams, *provider.ModelBackendConfig, bool, error)) *MockJujuAPIClientGetContentInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRevisionContentInfo mocks base method. @@ -86,9 +134,33 @@ func (m *MockJujuAPIClient) GetRevisionContentInfo(arg0 *secrets.URI, arg1 int, } // GetRevisionContentInfo indicates an expected call of GetRevisionContentInfo. -func (mr *MockJujuAPIClientMockRecorder) GetRevisionContentInfo(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockJujuAPIClientMockRecorder) GetRevisionContentInfo(arg0, arg1, arg2 any) *MockJujuAPIClientGetRevisionContentInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionContentInfo", reflect.TypeOf((*MockJujuAPIClient)(nil).GetRevisionContentInfo), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionContentInfo", reflect.TypeOf((*MockJujuAPIClient)(nil).GetRevisionContentInfo), arg0, arg1, arg2) + return &MockJujuAPIClientGetRevisionContentInfoCall{Call: call} +} + +// MockJujuAPIClientGetRevisionContentInfoCall wrap *gomock.Call +type MockJujuAPIClientGetRevisionContentInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuAPIClientGetRevisionContentInfoCall) Return(arg0 *secrets0.ContentParams, arg1 *provider.ModelBackendConfig, arg2 bool, arg3 error) *MockJujuAPIClientGetRevisionContentInfoCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuAPIClientGetRevisionContentInfoCall) Do(f func(*secrets.URI, int, bool) (*secrets0.ContentParams, *provider.ModelBackendConfig, bool, error)) *MockJujuAPIClientGetRevisionContentInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuAPIClientGetRevisionContentInfoCall) DoAndReturn(f func(*secrets.URI, int, bool) (*secrets0.ContentParams, *provider.ModelBackendConfig, bool, error)) *MockJujuAPIClientGetRevisionContentInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretBackendConfig mocks base method. @@ -101,7 +173,31 @@ func (m *MockJujuAPIClient) GetSecretBackendConfig(arg0 *string) (*provider.Mode } // GetSecretBackendConfig indicates an expected call of GetSecretBackendConfig. -func (mr *MockJujuAPIClientMockRecorder) GetSecretBackendConfig(arg0 any) *gomock.Call { +func (mr *MockJujuAPIClientMockRecorder) GetSecretBackendConfig(arg0 any) *MockJujuAPIClientGetSecretBackendConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfig", reflect.TypeOf((*MockJujuAPIClient)(nil).GetSecretBackendConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretBackendConfig", reflect.TypeOf((*MockJujuAPIClient)(nil).GetSecretBackendConfig), arg0) + return &MockJujuAPIClientGetSecretBackendConfigCall{Call: call} +} + +// MockJujuAPIClientGetSecretBackendConfigCall wrap *gomock.Call +type MockJujuAPIClientGetSecretBackendConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuAPIClientGetSecretBackendConfigCall) Return(arg0 *provider.ModelBackendConfigInfo, arg1 error) *MockJujuAPIClientGetSecretBackendConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuAPIClientGetSecretBackendConfigCall) Do(f func(*string) (*provider.ModelBackendConfigInfo, error)) *MockJujuAPIClientGetSecretBackendConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuAPIClientGetSecretBackendConfigCall) DoAndReturn(f func(*string) (*provider.ModelBackendConfigInfo, error)) *MockJujuAPIClientGetSecretBackendConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/secrets/package_test.go b/internal/secrets/package_test.go index b6f21bd700b..6bc2bfb4019 100644 --- a/internal/secrets/package_test.go +++ b/internal/secrets/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/jujuapi_mocks.go github.com/juju/juju/internal/secrets JujuAPIClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/backend_mocks.go github.com/juju/juju/internal/secrets/provider SecretsBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/jujuapi_mocks.go github.com/juju/juju/internal/secrets JujuAPIClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/backend_mocks.go github.com/juju/juju/internal/secrets/provider SecretsBackend func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/secrets/provider/kubernetes/mocks/kubernetes_mocks.go b/internal/secrets/provider/kubernetes/mocks/kubernetes_mocks.go index 9aeb80a04e1..69685f19753 100644 --- a/internal/secrets/provider/kubernetes/mocks/kubernetes_mocks.go +++ b/internal/secrets/provider/kubernetes/mocks/kubernetes_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/kubernetes_mocks.go github.com/juju/juju/internal/secrets/provider/kubernetes Broker +// mockgen -typed -package mocks -destination mocks/kubernetes_mocks.go github.com/juju/juju/internal/secrets/provider/kubernetes Broker // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockBroker) DeleteJujuSecret(arg0 context.Context, arg1 string) error { } // DeleteJujuSecret indicates an expected call of DeleteJujuSecret. -func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *MockBrokerDeleteJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + return &MockBrokerDeleteJujuSecretCall{Call: call} +} + +// MockBrokerDeleteJujuSecretCall wrap *gomock.Call +type MockBrokerDeleteJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDeleteJujuSecretCall) Return(arg0 error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDeleteJujuSecretCall) Do(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDeleteJujuSecretCall) DoAndReturn(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureSecretAccessToken mocks base method. @@ -65,9 +89,33 @@ func (m *MockBroker) EnsureSecretAccessToken(arg0 context.Context, arg1 string, } // EnsureSecretAccessToken indicates an expected call of EnsureSecretAccessToken. -func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *MockBrokerEnsureSecretAccessTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + return &MockBrokerEnsureSecretAccessTokenCall{Call: call} +} + +// MockBrokerEnsureSecretAccessTokenCall wrap *gomock.Call +type MockBrokerEnsureSecretAccessTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureSecretAccessTokenCall) Return(arg0 string, arg1 error) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureSecretAccessTokenCall) Do(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureSecretAccessTokenCall) DoAndReturn(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetJujuSecret mocks base method. @@ -80,9 +128,33 @@ func (m *MockBroker) GetJujuSecret(arg0 context.Context, arg1 string) (secrets.S } // GetJujuSecret indicates an expected call of GetJujuSecret. -func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *MockBrokerGetJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + return &MockBrokerGetJujuSecretCall{Call: call} +} + +// MockBrokerGetJujuSecretCall wrap *gomock.Call +type MockBrokerGetJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetJujuSecretCall) Return(arg0 secrets.SecretValue, arg1 error) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetJujuSecretCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetJujuSecretCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveJujuSecret mocks base method. @@ -95,9 +167,33 @@ func (m *MockBroker) SaveJujuSecret(arg0 context.Context, arg1 string, arg2 secr } // SaveJujuSecret indicates an expected call of SaveJujuSecret. -func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *MockBrokerSaveJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + return &MockBrokerSaveJujuSecretCall{Call: call} +} + +// MockBrokerSaveJujuSecretCall wrap *gomock.Call +type MockBrokerSaveJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerSaveJujuSecretCall) Return(arg0 string, arg1 error) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerSaveJujuSecretCall) Do(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerSaveJujuSecretCall) DoAndReturn(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -110,7 +206,31 @@ func (m *MockBroker) Version() (*version.Number, error) { } // Version indicates an expected call of Version. -func (mr *MockBrokerMockRecorder) Version() *gomock.Call { +func (mr *MockBrokerMockRecorder) Version() *MockBrokerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + return &MockBrokerVersionCall{Call: call} +} + +// MockBrokerVersionCall wrap *gomock.Call +type MockBrokerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerVersionCall) Return(arg0 *version.Number, arg1 error) *MockBrokerVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerVersionCall) Do(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/secrets/provider/kubernetes/package_test.go b/internal/secrets/provider/kubernetes/package_test.go index 07e3460988e..2b394f0f06f 100644 --- a/internal/secrets/provider/kubernetes/package_test.go +++ b/internal/secrets/provider/kubernetes/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/kubernetes_mocks.go github.com/juju/juju/internal/secrets/provider/kubernetes Broker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/kubernetes_mocks.go github.com/juju/juju/internal/secrets/provider/kubernetes Broker func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/secrets/provider/vault/mocks/http_mock.go b/internal/secrets/provider/vault/mocks/http_mock.go index f245fa98fcf..2de021172fb 100644 --- a/internal/secrets/provider/vault/mocks/http_mock.go +++ b/internal/secrets/provider/vault/mocks/http_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper +// mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockRoundTripper) RoundTrip(arg0 *http.Request) (*http.Response, error) } // RoundTrip indicates an expected call of RoundTrip. -func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *gomock.Call { +func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 any) *MockRoundTripperRoundTripCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0) + return &MockRoundTripperRoundTripCall{Call: call} +} + +// MockRoundTripperRoundTripCall wrap *gomock.Call +type MockRoundTripperRoundTripCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRoundTripperRoundTripCall) Return(arg0 *http.Response, arg1 error) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRoundTripperRoundTripCall) Do(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRoundTripperRoundTripCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockRoundTripperRoundTripCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/secrets/provider/vault/package_test.go b/internal/secrets/provider/vault/package_test.go index a8f67759e18..8dbb53babcd 100644 --- a/internal/secrets/provider/vault/package_test.go +++ b/internal/secrets/provider/vault/package_test.go @@ -11,7 +11,7 @@ import ( "github.com/juju/juju/internal/secrets/provider" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/http_mock.go net/http RoundTripper func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/service/mocks/service.go b/internal/service/mocks/service.go index 96548441317..7ea524df928 100644 --- a/internal/service/mocks/service.go +++ b/internal/service/mocks/service.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/service.go github.com/juju/juju/internal/service Service +// mockgen -typed -package mocks -destination mocks/service.go github.com/juju/juju/internal/service Service // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockService) Conf() common.Conf { } // Conf indicates an expected call of Conf. -func (mr *MockServiceMockRecorder) Conf() *gomock.Call { +func (mr *MockServiceMockRecorder) Conf() *MockServiceConfCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Conf", reflect.TypeOf((*MockService)(nil).Conf)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Conf", reflect.TypeOf((*MockService)(nil).Conf)) + return &MockServiceConfCall{Call: call} +} + +// MockServiceConfCall wrap *gomock.Call +type MockServiceConfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceConfCall) Return(arg0 common.Conf) *MockServiceConfCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceConfCall) Do(f func() common.Conf) *MockServiceConfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceConfCall) DoAndReturn(f func() common.Conf) *MockServiceConfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Exists mocks base method. @@ -63,9 +87,33 @@ func (m *MockService) Exists() (bool, error) { } // Exists indicates an expected call of Exists. -func (mr *MockServiceMockRecorder) Exists() *gomock.Call { +func (mr *MockServiceMockRecorder) Exists() *MockServiceExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockService)(nil).Exists)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockService)(nil).Exists)) + return &MockServiceExistsCall{Call: call} +} + +// MockServiceExistsCall wrap *gomock.Call +type MockServiceExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceExistsCall) Return(arg0 bool, arg1 error) *MockServiceExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceExistsCall) Do(f func() (bool, error)) *MockServiceExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceExistsCall) DoAndReturn(f func() (bool, error)) *MockServiceExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Install mocks base method. @@ -77,9 +125,33 @@ func (m *MockService) Install() error { } // Install indicates an expected call of Install. -func (mr *MockServiceMockRecorder) Install() *gomock.Call { +func (mr *MockServiceMockRecorder) Install() *MockServiceInstallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Install", reflect.TypeOf((*MockService)(nil).Install)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Install", reflect.TypeOf((*MockService)(nil).Install)) + return &MockServiceInstallCall{Call: call} +} + +// MockServiceInstallCall wrap *gomock.Call +type MockServiceInstallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInstallCall) Return(arg0 error) *MockServiceInstallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInstallCall) Do(f func() error) *MockServiceInstallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInstallCall) DoAndReturn(f func() error) *MockServiceInstallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstallCommands mocks base method. @@ -92,9 +164,33 @@ func (m *MockService) InstallCommands() ([]string, error) { } // InstallCommands indicates an expected call of InstallCommands. -func (mr *MockServiceMockRecorder) InstallCommands() *gomock.Call { +func (mr *MockServiceMockRecorder) InstallCommands() *MockServiceInstallCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallCommands", reflect.TypeOf((*MockService)(nil).InstallCommands)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallCommands", reflect.TypeOf((*MockService)(nil).InstallCommands)) + return &MockServiceInstallCommandsCall{Call: call} +} + +// MockServiceInstallCommandsCall wrap *gomock.Call +type MockServiceInstallCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInstallCommandsCall) Return(arg0 []string, arg1 error) *MockServiceInstallCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInstallCommandsCall) Do(f func() ([]string, error)) *MockServiceInstallCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInstallCommandsCall) DoAndReturn(f func() ([]string, error)) *MockServiceInstallCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Installed mocks base method. @@ -107,9 +203,33 @@ func (m *MockService) Installed() (bool, error) { } // Installed indicates an expected call of Installed. -func (mr *MockServiceMockRecorder) Installed() *gomock.Call { +func (mr *MockServiceMockRecorder) Installed() *MockServiceInstalledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Installed", reflect.TypeOf((*MockService)(nil).Installed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Installed", reflect.TypeOf((*MockService)(nil).Installed)) + return &MockServiceInstalledCall{Call: call} +} + +// MockServiceInstalledCall wrap *gomock.Call +type MockServiceInstalledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceInstalledCall) Return(arg0 bool, arg1 error) *MockServiceInstalledCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceInstalledCall) Do(f func() (bool, error)) *MockServiceInstalledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceInstalledCall) DoAndReturn(f func() (bool, error)) *MockServiceInstalledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -121,9 +241,33 @@ func (m *MockService) Name() string { } // Name indicates an expected call of Name. -func (mr *MockServiceMockRecorder) Name() *gomock.Call { +func (mr *MockServiceMockRecorder) Name() *MockServiceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockService)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockService)(nil).Name)) + return &MockServiceNameCall{Call: call} +} + +// MockServiceNameCall wrap *gomock.Call +type MockServiceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceNameCall) Return(arg0 string) *MockServiceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceNameCall) Do(f func() string) *MockServiceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceNameCall) DoAndReturn(f func() string) *MockServiceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -135,9 +279,33 @@ func (m *MockService) Remove() error { } // Remove indicates an expected call of Remove. -func (mr *MockServiceMockRecorder) Remove() *gomock.Call { +func (mr *MockServiceMockRecorder) Remove() *MockServiceRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockService)(nil).Remove)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockService)(nil).Remove)) + return &MockServiceRemoveCall{Call: call} +} + +// MockServiceRemoveCall wrap *gomock.Call +type MockServiceRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceRemoveCall) Return(arg0 error) *MockServiceRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceRemoveCall) Do(f func() error) *MockServiceRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceRemoveCall) DoAndReturn(f func() error) *MockServiceRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Running mocks base method. @@ -150,9 +318,33 @@ func (m *MockService) Running() (bool, error) { } // Running indicates an expected call of Running. -func (mr *MockServiceMockRecorder) Running() *gomock.Call { +func (mr *MockServiceMockRecorder) Running() *MockServiceRunningCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Running", reflect.TypeOf((*MockService)(nil).Running)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Running", reflect.TypeOf((*MockService)(nil).Running)) + return &MockServiceRunningCall{Call: call} +} + +// MockServiceRunningCall wrap *gomock.Call +type MockServiceRunningCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceRunningCall) Return(arg0 bool, arg1 error) *MockServiceRunningCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceRunningCall) Do(f func() (bool, error)) *MockServiceRunningCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceRunningCall) DoAndReturn(f func() (bool, error)) *MockServiceRunningCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Start mocks base method. @@ -164,9 +356,33 @@ func (m *MockService) Start() error { } // Start indicates an expected call of Start. -func (mr *MockServiceMockRecorder) Start() *gomock.Call { +func (mr *MockServiceMockRecorder) Start() *MockServiceStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockService)(nil).Start)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockService)(nil).Start)) + return &MockServiceStartCall{Call: call} +} + +// MockServiceStartCall wrap *gomock.Call +type MockServiceStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceStartCall) Return(arg0 error) *MockServiceStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceStartCall) Do(f func() error) *MockServiceStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceStartCall) DoAndReturn(f func() error) *MockServiceStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartCommands mocks base method. @@ -179,9 +395,33 @@ func (m *MockService) StartCommands() ([]string, error) { } // StartCommands indicates an expected call of StartCommands. -func (mr *MockServiceMockRecorder) StartCommands() *gomock.Call { +func (mr *MockServiceMockRecorder) StartCommands() *MockServiceStartCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartCommands", reflect.TypeOf((*MockService)(nil).StartCommands)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartCommands", reflect.TypeOf((*MockService)(nil).StartCommands)) + return &MockServiceStartCommandsCall{Call: call} +} + +// MockServiceStartCommandsCall wrap *gomock.Call +type MockServiceStartCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceStartCommandsCall) Return(arg0 []string, arg1 error) *MockServiceStartCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceStartCommandsCall) Do(f func() ([]string, error)) *MockServiceStartCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceStartCommandsCall) DoAndReturn(f func() ([]string, error)) *MockServiceStartCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -193,9 +433,33 @@ func (m *MockService) Stop() error { } // Stop indicates an expected call of Stop. -func (mr *MockServiceMockRecorder) Stop() *gomock.Call { +func (mr *MockServiceMockRecorder) Stop() *MockServiceStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockService)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockService)(nil).Stop)) + return &MockServiceStopCall{Call: call} +} + +// MockServiceStopCall wrap *gomock.Call +type MockServiceStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceStopCall) Return(arg0 error) *MockServiceStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceStopCall) Do(f func() error) *MockServiceStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceStopCall) DoAndReturn(f func() error) *MockServiceStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteService mocks base method. @@ -207,7 +471,31 @@ func (m *MockService) WriteService() error { } // WriteService indicates an expected call of WriteService. -func (mr *MockServiceMockRecorder) WriteService() *gomock.Call { +func (mr *MockServiceMockRecorder) WriteService() *MockServiceWriteServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteService", reflect.TypeOf((*MockService)(nil).WriteService)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteService", reflect.TypeOf((*MockService)(nil).WriteService)) + return &MockServiceWriteServiceCall{Call: call} +} + +// MockServiceWriteServiceCall wrap *gomock.Call +type MockServiceWriteServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceWriteServiceCall) Return(arg0 error) *MockServiceWriteServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceWriteServiceCall) Do(f func() error) *MockServiceWriteServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceWriteServiceCall) DoAndReturn(f func() error) *MockServiceWriteServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/service/package_test.go b/internal/service/package_test.go index 75820fc1109..25b4012894e 100644 --- a/internal/service/package_test.go +++ b/internal/service/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/service.go github.com/juju/juju/internal/service Service +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/service.go github.com/juju/juju/internal/service Service func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/service/snap/clock_mock_test.go b/internal/service/snap/clock_mock_test.go index 74cedcff667..bb0c95414a6 100644 --- a/internal/service/snap/clock_mock_test.go +++ b/internal/service/snap/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package snap -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package snap -destination clock_mock_test.go github.com/juju/clock Clock // // Package snap is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/service/snap/package_test.go b/internal/service/snap/package_test.go index b1569a2b2f1..e2ede88fdee 100644 --- a/internal/service/snap/package_test.go +++ b/internal/service/snap/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package snap -destination runnable_mock_test.go github.com/juju/juju/internal/service/snap Runnable -//go:generate go run go.uber.org/mock/mockgen -package snap -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package snap -destination runnable_mock_test.go github.com/juju/juju/internal/service/snap Runnable +//go:generate go run go.uber.org/mock/mockgen -typed -package snap -destination clock_mock_test.go github.com/juju/clock Clock func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/service/snap/runnable_mock_test.go b/internal/service/snap/runnable_mock_test.go index af329749f16..083acc6b7b2 100644 --- a/internal/service/snap/runnable_mock_test.go +++ b/internal/service/snap/runnable_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package snap -destination runnable_mock_test.go github.com/juju/juju/internal/service/snap Runnable +// mockgen -typed -package snap -destination runnable_mock_test.go github.com/juju/juju/internal/service/snap Runnable // // Package snap is a generated GoMock package. @@ -52,8 +52,32 @@ func (m *MockRunnable) Execute(arg0 string, arg1 ...string) (string, error) { } // Execute indicates an expected call of Execute. -func (mr *MockRunnableMockRecorder) Execute(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockRunnableMockRecorder) Execute(arg0 any, arg1 ...any) *MockRunnableExecuteCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockRunnable)(nil).Execute), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockRunnable)(nil).Execute), varargs...) + return &MockRunnableExecuteCall{Call: call} +} + +// MockRunnableExecuteCall wrap *gomock.Call +type MockRunnableExecuteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnableExecuteCall) Return(arg0 string, arg1 error) *MockRunnableExecuteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnableExecuteCall) Do(f func(string, ...string) (string, error)) *MockRunnableExecuteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnableExecuteCall) DoAndReturn(f func(string, ...string) (string, error)) *MockRunnableExecuteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/service/systemd/package_mock_test.go b/internal/service/systemd/package_mock_test.go index fc8a1a0a333..b48533dc190 100644 --- a/internal/service/systemd/package_mock_test.go +++ b/internal/service/systemd/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package systemd_test -destination package_mock_test.go github.com/juju/juju/internal/service/systemd DBusAPI,FileSystemOps +// mockgen -typed -package systemd_test -destination package_mock_test.go github.com/juju/juju/internal/service/systemd DBusAPI,FileSystemOps // // Package systemd_test is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockDBusAPI) Close() { } // Close indicates an expected call of Close. -func (mr *MockDBusAPIMockRecorder) Close() *gomock.Call { +func (mr *MockDBusAPIMockRecorder) Close() *MockDBusAPICloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBusAPI)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBusAPI)(nil).Close)) + return &MockDBusAPICloseCall{Call: call} +} + +// MockDBusAPICloseCall wrap *gomock.Call +type MockDBusAPICloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPICloseCall) Return() *MockDBusAPICloseCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPICloseCall) Do(f func()) *MockDBusAPICloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPICloseCall) DoAndReturn(f func()) *MockDBusAPICloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DisableUnitFiles mocks base method. @@ -62,9 +86,33 @@ func (m *MockDBusAPI) DisableUnitFiles(arg0 []string, arg1 bool) ([]dbus.Disable } // DisableUnitFiles indicates an expected call of DisableUnitFiles. -func (mr *MockDBusAPIMockRecorder) DisableUnitFiles(arg0, arg1 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) DisableUnitFiles(arg0, arg1 any) *MockDBusAPIDisableUnitFilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).DisableUnitFiles), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).DisableUnitFiles), arg0, arg1) + return &MockDBusAPIDisableUnitFilesCall{Call: call} +} + +// MockDBusAPIDisableUnitFilesCall wrap *gomock.Call +type MockDBusAPIDisableUnitFilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIDisableUnitFilesCall) Return(arg0 []dbus.DisableUnitFileChange, arg1 error) *MockDBusAPIDisableUnitFilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIDisableUnitFilesCall) Do(f func([]string, bool) ([]dbus.DisableUnitFileChange, error)) *MockDBusAPIDisableUnitFilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIDisableUnitFilesCall) DoAndReturn(f func([]string, bool) ([]dbus.DisableUnitFileChange, error)) *MockDBusAPIDisableUnitFilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableUnitFiles mocks base method. @@ -78,9 +126,33 @@ func (m *MockDBusAPI) EnableUnitFiles(arg0 []string, arg1, arg2 bool) (bool, []d } // EnableUnitFiles indicates an expected call of EnableUnitFiles. -func (mr *MockDBusAPIMockRecorder) EnableUnitFiles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) EnableUnitFiles(arg0, arg1, arg2 any) *MockDBusAPIEnableUnitFilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).EnableUnitFiles), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).EnableUnitFiles), arg0, arg1, arg2) + return &MockDBusAPIEnableUnitFilesCall{Call: call} +} + +// MockDBusAPIEnableUnitFilesCall wrap *gomock.Call +type MockDBusAPIEnableUnitFilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIEnableUnitFilesCall) Return(arg0 bool, arg1 []dbus.EnableUnitFileChange, arg2 error) *MockDBusAPIEnableUnitFilesCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIEnableUnitFilesCall) Do(f func([]string, bool, bool) (bool, []dbus.EnableUnitFileChange, error)) *MockDBusAPIEnableUnitFilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIEnableUnitFilesCall) DoAndReturn(f func([]string, bool, bool) (bool, []dbus.EnableUnitFileChange, error)) *MockDBusAPIEnableUnitFilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUnitProperties mocks base method. @@ -93,9 +165,33 @@ func (m *MockDBusAPI) GetUnitProperties(arg0 string) (map[string]any, error) { } // GetUnitProperties indicates an expected call of GetUnitProperties. -func (mr *MockDBusAPIMockRecorder) GetUnitProperties(arg0 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) GetUnitProperties(arg0 any) *MockDBusAPIGetUnitPropertiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitProperties), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitProperties), arg0) + return &MockDBusAPIGetUnitPropertiesCall{Call: call} +} + +// MockDBusAPIGetUnitPropertiesCall wrap *gomock.Call +type MockDBusAPIGetUnitPropertiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIGetUnitPropertiesCall) Return(arg0 map[string]any, arg1 error) *MockDBusAPIGetUnitPropertiesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIGetUnitPropertiesCall) Do(f func(string) (map[string]any, error)) *MockDBusAPIGetUnitPropertiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIGetUnitPropertiesCall) DoAndReturn(f func(string) (map[string]any, error)) *MockDBusAPIGetUnitPropertiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUnitTypeProperties mocks base method. @@ -108,9 +204,33 @@ func (m *MockDBusAPI) GetUnitTypeProperties(arg0, arg1 string) (map[string]any, } // GetUnitTypeProperties indicates an expected call of GetUnitTypeProperties. -func (mr *MockDBusAPIMockRecorder) GetUnitTypeProperties(arg0, arg1 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) GetUnitTypeProperties(arg0, arg1 any) *MockDBusAPIGetUnitTypePropertiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitTypeProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitTypeProperties), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitTypeProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitTypeProperties), arg0, arg1) + return &MockDBusAPIGetUnitTypePropertiesCall{Call: call} +} + +// MockDBusAPIGetUnitTypePropertiesCall wrap *gomock.Call +type MockDBusAPIGetUnitTypePropertiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIGetUnitTypePropertiesCall) Return(arg0 map[string]any, arg1 error) *MockDBusAPIGetUnitTypePropertiesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIGetUnitTypePropertiesCall) Do(f func(string, string) (map[string]any, error)) *MockDBusAPIGetUnitTypePropertiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIGetUnitTypePropertiesCall) DoAndReturn(f func(string, string) (map[string]any, error)) *MockDBusAPIGetUnitTypePropertiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LinkUnitFiles mocks base method. @@ -123,9 +243,33 @@ func (m *MockDBusAPI) LinkUnitFiles(arg0 []string, arg1, arg2 bool) ([]dbus.Link } // LinkUnitFiles indicates an expected call of LinkUnitFiles. -func (mr *MockDBusAPIMockRecorder) LinkUnitFiles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) LinkUnitFiles(arg0, arg1, arg2 any) *MockDBusAPILinkUnitFilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).LinkUnitFiles), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).LinkUnitFiles), arg0, arg1, arg2) + return &MockDBusAPILinkUnitFilesCall{Call: call} +} + +// MockDBusAPILinkUnitFilesCall wrap *gomock.Call +type MockDBusAPILinkUnitFilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPILinkUnitFilesCall) Return(arg0 []dbus.LinkUnitFileChange, arg1 error) *MockDBusAPILinkUnitFilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPILinkUnitFilesCall) Do(f func([]string, bool, bool) ([]dbus.LinkUnitFileChange, error)) *MockDBusAPILinkUnitFilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPILinkUnitFilesCall) DoAndReturn(f func([]string, bool, bool) ([]dbus.LinkUnitFileChange, error)) *MockDBusAPILinkUnitFilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListUnits mocks base method. @@ -138,9 +282,33 @@ func (m *MockDBusAPI) ListUnits() ([]dbus.UnitStatus, error) { } // ListUnits indicates an expected call of ListUnits. -func (mr *MockDBusAPIMockRecorder) ListUnits() *gomock.Call { +func (mr *MockDBusAPIMockRecorder) ListUnits() *MockDBusAPIListUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUnits", reflect.TypeOf((*MockDBusAPI)(nil).ListUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUnits", reflect.TypeOf((*MockDBusAPI)(nil).ListUnits)) + return &MockDBusAPIListUnitsCall{Call: call} +} + +// MockDBusAPIListUnitsCall wrap *gomock.Call +type MockDBusAPIListUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIListUnitsCall) Return(arg0 []dbus.UnitStatus, arg1 error) *MockDBusAPIListUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIListUnitsCall) Do(f func() ([]dbus.UnitStatus, error)) *MockDBusAPIListUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIListUnitsCall) DoAndReturn(f func() ([]dbus.UnitStatus, error)) *MockDBusAPIListUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reload mocks base method. @@ -152,9 +320,33 @@ func (m *MockDBusAPI) Reload() error { } // Reload indicates an expected call of Reload. -func (mr *MockDBusAPIMockRecorder) Reload() *gomock.Call { +func (mr *MockDBusAPIMockRecorder) Reload() *MockDBusAPIReloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reload", reflect.TypeOf((*MockDBusAPI)(nil).Reload)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reload", reflect.TypeOf((*MockDBusAPI)(nil).Reload)) + return &MockDBusAPIReloadCall{Call: call} +} + +// MockDBusAPIReloadCall wrap *gomock.Call +type MockDBusAPIReloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIReloadCall) Return(arg0 error) *MockDBusAPIReloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIReloadCall) Do(f func() error) *MockDBusAPIReloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIReloadCall) DoAndReturn(f func() error) *MockDBusAPIReloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartUnit mocks base method. @@ -167,9 +359,33 @@ func (m *MockDBusAPI) StartUnit(arg0, arg1 string, arg2 chan<- string) (int, err } // StartUnit indicates an expected call of StartUnit. -func (mr *MockDBusAPIMockRecorder) StartUnit(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) StartUnit(arg0, arg1, arg2 any) *MockDBusAPIStartUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUnit", reflect.TypeOf((*MockDBusAPI)(nil).StartUnit), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUnit", reflect.TypeOf((*MockDBusAPI)(nil).StartUnit), arg0, arg1, arg2) + return &MockDBusAPIStartUnitCall{Call: call} +} + +// MockDBusAPIStartUnitCall wrap *gomock.Call +type MockDBusAPIStartUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIStartUnitCall) Return(arg0 int, arg1 error) *MockDBusAPIStartUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIStartUnitCall) Do(f func(string, string, chan<- string) (int, error)) *MockDBusAPIStartUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIStartUnitCall) DoAndReturn(f func(string, string, chan<- string) (int, error)) *MockDBusAPIStartUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopUnit mocks base method. @@ -182,9 +398,33 @@ func (m *MockDBusAPI) StopUnit(arg0, arg1 string, arg2 chan<- string) (int, erro } // StopUnit indicates an expected call of StopUnit. -func (mr *MockDBusAPIMockRecorder) StopUnit(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDBusAPIMockRecorder) StopUnit(arg0, arg1, arg2 any) *MockDBusAPIStopUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopUnit", reflect.TypeOf((*MockDBusAPI)(nil).StopUnit), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopUnit", reflect.TypeOf((*MockDBusAPI)(nil).StopUnit), arg0, arg1, arg2) + return &MockDBusAPIStopUnitCall{Call: call} +} + +// MockDBusAPIStopUnitCall wrap *gomock.Call +type MockDBusAPIStopUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBusAPIStopUnitCall) Return(arg0 int, arg1 error) *MockDBusAPIStopUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBusAPIStopUnitCall) Do(f func(string, string, chan<- string) (int, error)) *MockDBusAPIStopUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBusAPIStopUnitCall) DoAndReturn(f func(string, string, chan<- string) (int, error)) *MockDBusAPIStopUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFileSystemOps is a mock of FileSystemOps interface. @@ -219,9 +459,33 @@ func (m *MockFileSystemOps) Remove(arg0 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockFileSystemOpsMockRecorder) Remove(arg0 any) *gomock.Call { +func (mr *MockFileSystemOpsMockRecorder) Remove(arg0 any) *MockFileSystemOpsRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockFileSystemOps)(nil).Remove), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockFileSystemOps)(nil).Remove), arg0) + return &MockFileSystemOpsRemoveCall{Call: call} +} + +// MockFileSystemOpsRemoveCall wrap *gomock.Call +type MockFileSystemOpsRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileSystemOpsRemoveCall) Return(arg0 error) *MockFileSystemOpsRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileSystemOpsRemoveCall) Do(f func(string) error) *MockFileSystemOpsRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileSystemOpsRemoveCall) DoAndReturn(f func(string) error) *MockFileSystemOpsRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveAll mocks base method. @@ -233,9 +497,33 @@ func (m *MockFileSystemOps) RemoveAll(arg0 string) error { } // RemoveAll indicates an expected call of RemoveAll. -func (mr *MockFileSystemOpsMockRecorder) RemoveAll(arg0 any) *gomock.Call { +func (mr *MockFileSystemOpsMockRecorder) RemoveAll(arg0 any) *MockFileSystemOpsRemoveAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFileSystemOps)(nil).RemoveAll), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFileSystemOps)(nil).RemoveAll), arg0) + return &MockFileSystemOpsRemoveAllCall{Call: call} +} + +// MockFileSystemOpsRemoveAllCall wrap *gomock.Call +type MockFileSystemOpsRemoveAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileSystemOpsRemoveAllCall) Return(arg0 error) *MockFileSystemOpsRemoveAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileSystemOpsRemoveAllCall) Do(f func(string) error) *MockFileSystemOpsRemoveAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileSystemOpsRemoveAllCall) DoAndReturn(f func(string) error) *MockFileSystemOpsRemoveAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteFile mocks base method. @@ -247,7 +535,31 @@ func (m *MockFileSystemOps) WriteFile(arg0 string, arg1 []byte, arg2 fs.FileMode } // WriteFile indicates an expected call of WriteFile. -func (mr *MockFileSystemOpsMockRecorder) WriteFile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFileSystemOpsMockRecorder) WriteFile(arg0, arg1, arg2 any) *MockFileSystemOpsWriteFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockFileSystemOps)(nil).WriteFile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockFileSystemOps)(nil).WriteFile), arg0, arg1, arg2) + return &MockFileSystemOpsWriteFileCall{Call: call} +} + +// MockFileSystemOpsWriteFileCall wrap *gomock.Call +type MockFileSystemOpsWriteFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileSystemOpsWriteFileCall) Return(arg0 error) *MockFileSystemOpsWriteFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileSystemOpsWriteFileCall) Do(f func(string, []byte, fs.FileMode) error) *MockFileSystemOpsWriteFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileSystemOpsWriteFileCall) DoAndReturn(f func(string, []byte, fs.FileMode) error) *MockFileSystemOpsWriteFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/service/systemd/package_test.go b/internal/service/systemd/package_test.go index b8cfec7d9a4..c01197f77b1 100644 --- a/internal/service/systemd/package_test.go +++ b/internal/service/systemd/package_test.go @@ -9,11 +9,11 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package systemd_test -destination package_mock_test.go github.com/juju/juju/internal/service/systemd DBusAPI,FileSystemOps +//go:generate go run go.uber.org/mock/mockgen -typed -package systemd_test -destination package_mock_test.go github.com/juju/juju/internal/service/systemd DBusAPI,FileSystemOps // TODO (manadart 2020-01-28): Phase this out // and generate all mocks with the command above. -//go:generate go run go.uber.org/mock/mockgen -package systemd -destination shims_mock_test.go github.com/juju/juju/internal/service/systemd ShimExec +//go:generate go run go.uber.org/mock/mockgen -typed -package systemd -destination shims_mock_test.go github.com/juju/juju/internal/service/systemd ShimExec func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/service/systemd/service_test.go b/internal/service/systemd/service_test.go index 2ac4519a4db..fdc955f9275 100644 --- a/internal/service/systemd/service_test.go +++ b/internal/service/systemd/service_test.go @@ -120,7 +120,7 @@ func (s *initSystemSuite) expectConf(c *gc.C, conf common.Conf) *gomock.Call { exec.RunParams{ Commands: "cat /etc/systemd/system/jujud-machine-0.service", }, - ).Return(&exec.ExecResponse{Stdout: data}, nil) + ).Return(&exec.ExecResponse{Stdout: data}, nil).Call } func (s *initSystemSuite) newConfStr(name string) string { @@ -452,9 +452,11 @@ func (s *initSystemSuite) TestStart(c *gc.C) { // Equality check for the channel fails here, so we use Any(). // We know this is safe, because we notify on the channel we got from // the patched call and everything proceeds happily. - s.dBus.EXPECT().StartUnit(svc.UnitName, "fail", gomock.Any()).Return(1, nil).Do( - func(string, string, chan<- string) { s.ch <- "done" }, - ), + s.dBus.EXPECT().StartUnit(svc.UnitName, "fail", gomock.Any()). + DoAndReturn(func(string, string, chan<- string) (int, error) { + s.ch <- "done" + return 1, nil + }), s.dBus.EXPECT().Close(), ) @@ -507,9 +509,11 @@ func (s *initSystemSuite) TestStop(c *gc.C) { // Equality check for the channel fails here, so we use Any(). // We know this is safe, because we notify on the channel we got from // the patched call and everything proceeds happily. - s.dBus.EXPECT().StopUnit(svc.UnitName, "fail", gomock.Any()).Return(1, nil).Do( - func(string, string, chan<- string) { s.ch <- "done" }, - ), + s.dBus.EXPECT().StopUnit(svc.UnitName, "fail", gomock.Any()). + DoAndReturn(func(string, string, chan<- string) (int, error) { + s.ch <- "done" + return 1, nil + }), s.dBus.EXPECT().Close(), ) diff --git a/internal/service/systemd/shims_mock_test.go b/internal/service/systemd/shims_mock_test.go index e7ad7f6611d..8ef3f865aeb 100644 --- a/internal/service/systemd/shims_mock_test.go +++ b/internal/service/systemd/shims_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package systemd -destination shims_mock_test.go github.com/juju/juju/internal/service/systemd ShimExec +// mockgen -typed -package systemd -destination shims_mock_test.go github.com/juju/juju/internal/service/systemd ShimExec // // Package systemd is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockShimExec) RunCommands(arg0 exec.RunParams) (*exec.ExecResponse, err } // RunCommands indicates an expected call of RunCommands. -func (mr *MockShimExecMockRecorder) RunCommands(arg0 any) *gomock.Call { +func (mr *MockShimExecMockRecorder) RunCommands(arg0 any) *MockShimExecRunCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockShimExec)(nil).RunCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockShimExec)(nil).RunCommands), arg0) + return &MockShimExecRunCommandsCall{Call: call} +} + +// MockShimExecRunCommandsCall wrap *gomock.Call +type MockShimExecRunCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockShimExecRunCommandsCall) Return(arg0 *exec.ExecResponse, arg1 error) *MockShimExecRunCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockShimExecRunCommandsCall) Do(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockShimExecRunCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockShimExecRunCommandsCall) DoAndReturn(f func(exec.RunParams) (*exec.ExecResponse, error)) *MockShimExecRunCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrade/agent_mock_test.go b/internal/upgrade/agent_mock_test.go index 739b986806b..ec13c8289fc 100644 --- a/internal/upgrade/agent_mock_test.go +++ b/internal/upgrade/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgrade -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package upgrade -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config // // Package upgrade is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrade/lock_mock_test.go b/internal/upgrade/lock_mock_test.go index b37f02b7173..cf3c6351b4e 100644 --- a/internal/upgrade/lock_mock_test.go +++ b/internal/upgrade/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgrade -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +// mockgen -typed -package upgrade -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock // // Package upgrade is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLock) IsUnlocked() bool { } // IsUnlocked indicates an expected call of IsUnlocked. -func (mr *MockLockMockRecorder) IsUnlocked() *gomock.Call { +func (mr *MockLockMockRecorder) IsUnlocked() *MockLockIsUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + return &MockLockIsUnlockedCall{Call: call} +} + +// MockLockIsUnlockedCall wrap *gomock.Call +type MockLockIsUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockIsUnlockedCall) Return(arg0 bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockIsUnlockedCall) Do(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockIsUnlockedCall) DoAndReturn(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -59,9 +83,33 @@ func (m *MockLock) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockLockMockRecorder) Unlock() *gomock.Call { +func (mr *MockLockMockRecorder) Unlock() *MockLockUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + return &MockLockUnlockCall{Call: call} +} + +// MockLockUnlockCall wrap *gomock.Call +type MockLockUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockCall) Return() *MockLockUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockCall) Do(f func()) *MockLockUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockCall) DoAndReturn(f func()) *MockLockUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlocked mocks base method. @@ -73,7 +121,31 @@ func (m *MockLock) Unlocked() <-chan struct{} { } // Unlocked indicates an expected call of Unlocked. -func (mr *MockLockMockRecorder) Unlocked() *gomock.Call { +func (mr *MockLockMockRecorder) Unlocked() *MockLockUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + return &MockLockUnlockedCall{Call: call} +} + +// MockLockUnlockedCall wrap *gomock.Call +type MockLockUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockedCall) Return(arg0 <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockedCall) Do(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockedCall) DoAndReturn(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrade/package_test.go b/internal/upgrade/package_test.go index 2c2cec80e87..a5fb86f98d6 100644 --- a/internal/upgrade/package_test.go +++ b/internal/upgrade/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package upgrade -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock -//go:generate go run go.uber.org/mock/mockgen -package upgrade -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package upgrade -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgrade -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/upgrades/mocks/context_mock.go b/internal/upgrades/mocks/context_mock.go index 9924cb91f5b..ef727e26ddb 100644 --- a/internal/upgrades/mocks/context_mock.go +++ b/internal/upgrades/mocks/context_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/upgrades Context +// mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/upgrades Context // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockContext) APIContext() upgrades.Context { } // APIContext indicates an expected call of APIContext. -func (mr *MockContextMockRecorder) APIContext() *gomock.Call { +func (mr *MockContextMockRecorder) APIContext() *MockContextAPIContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIContext", reflect.TypeOf((*MockContext)(nil).APIContext)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIContext", reflect.TypeOf((*MockContext)(nil).APIContext)) + return &MockContextAPIContextCall{Call: call} +} + +// MockContextAPIContextCall wrap *gomock.Call +type MockContextAPIContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAPIContextCall) Return(arg0 upgrades.Context) *MockContextAPIContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAPIContextCall) Do(f func() upgrades.Context) *MockContextAPIContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAPIContextCall) DoAndReturn(f func() upgrades.Context) *MockContextAPIContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIState mocks base method. @@ -64,9 +88,33 @@ func (m *MockContext) APIState() base.APICaller { } // APIState indicates an expected call of APIState. -func (mr *MockContextMockRecorder) APIState() *gomock.Call { +func (mr *MockContextMockRecorder) APIState() *MockContextAPIStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIState", reflect.TypeOf((*MockContext)(nil).APIState)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIState", reflect.TypeOf((*MockContext)(nil).APIState)) + return &MockContextAPIStateCall{Call: call} +} + +// MockContextAPIStateCall wrap *gomock.Call +type MockContextAPIStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAPIStateCall) Return(arg0 base.APICaller) *MockContextAPIStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAPIStateCall) Do(f func() base.APICaller) *MockContextAPIStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAPIStateCall) DoAndReturn(f func() base.APICaller) *MockContextAPIStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentConfig mocks base method. @@ -78,7 +126,31 @@ func (m *MockContext) AgentConfig() agent.ConfigSetter { } // AgentConfig indicates an expected call of AgentConfig. -func (mr *MockContextMockRecorder) AgentConfig() *gomock.Call { +func (mr *MockContextMockRecorder) AgentConfig() *MockContextAgentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentConfig", reflect.TypeOf((*MockContext)(nil).AgentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentConfig", reflect.TypeOf((*MockContext)(nil).AgentConfig)) + return &MockContextAgentConfigCall{Call: call} +} + +// MockContextAgentConfigCall wrap *gomock.Call +type MockContextAgentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAgentConfigCall) Return(arg0 agent.ConfigSetter) *MockContextAgentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAgentConfigCall) Do(f func() agent.ConfigSetter) *MockContextAgentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAgentConfigCall) DoAndReturn(f func() agent.ConfigSetter) *MockContextAgentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrades/package_test.go b/internal/upgrades/package_test.go index 8b4a63a1667..c8878243178 100644 --- a/internal/upgrades/package_test.go +++ b/internal/upgrades/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/upgrades Context +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/upgrades Context func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/upgrades/upgradevalidation/mocks/lxd_mock.go b/internal/upgrades/upgradevalidation/mocks/lxd_mock.go index 7a2597c042f..a8590b12ac0 100644 --- a/internal/upgrades/upgradevalidation/mocks/lxd_mock.go +++ b/internal/upgrades/upgradevalidation/mocks/lxd_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/lxd_mock.go github.com/juju/juju/internal/provider/lxd ServerFactory,Server +// mockgen -typed -package mocks -destination mocks/lxd_mock.go github.com/juju/juju/internal/provider/lxd ServerFactory,Server // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockServerFactory) InsecureRemoteServer(arg0 lxd1.CloudSpec) (lxd1.Serv } // InsecureRemoteServer indicates an expected call of InsecureRemoteServer. -func (mr *MockServerFactoryMockRecorder) InsecureRemoteServer(arg0 any) *gomock.Call { +func (mr *MockServerFactoryMockRecorder) InsecureRemoteServer(arg0 any) *MockServerFactoryInsecureRemoteServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsecureRemoteServer", reflect.TypeOf((*MockServerFactory)(nil).InsecureRemoteServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsecureRemoteServer", reflect.TypeOf((*MockServerFactory)(nil).InsecureRemoteServer), arg0) + return &MockServerFactoryInsecureRemoteServerCall{Call: call} +} + +// MockServerFactoryInsecureRemoteServerCall wrap *gomock.Call +type MockServerFactoryInsecureRemoteServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryInsecureRemoteServerCall) Return(arg0 lxd1.Server, arg1 error) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryInsecureRemoteServerCall) Do(f func(lxd1.CloudSpec) (lxd1.Server, error)) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryInsecureRemoteServerCall) DoAndReturn(f func(lxd1.CloudSpec) (lxd1.Server, error)) *MockServerFactoryInsecureRemoteServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalServer mocks base method. @@ -72,9 +96,33 @@ func (m *MockServerFactory) LocalServer() (lxd1.Server, error) { } // LocalServer indicates an expected call of LocalServer. -func (mr *MockServerFactoryMockRecorder) LocalServer() *gomock.Call { +func (mr *MockServerFactoryMockRecorder) LocalServer() *MockServerFactoryLocalServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServer", reflect.TypeOf((*MockServerFactory)(nil).LocalServer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServer", reflect.TypeOf((*MockServerFactory)(nil).LocalServer)) + return &MockServerFactoryLocalServerCall{Call: call} +} + +// MockServerFactoryLocalServerCall wrap *gomock.Call +type MockServerFactoryLocalServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryLocalServerCall) Return(arg0 lxd1.Server, arg1 error) *MockServerFactoryLocalServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryLocalServerCall) Do(f func() (lxd1.Server, error)) *MockServerFactoryLocalServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryLocalServerCall) DoAndReturn(f func() (lxd1.Server, error)) *MockServerFactoryLocalServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalServerAddress mocks base method. @@ -87,9 +135,33 @@ func (m *MockServerFactory) LocalServerAddress() (string, error) { } // LocalServerAddress indicates an expected call of LocalServerAddress. -func (mr *MockServerFactoryMockRecorder) LocalServerAddress() *gomock.Call { +func (mr *MockServerFactoryMockRecorder) LocalServerAddress() *MockServerFactoryLocalServerAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServerAddress", reflect.TypeOf((*MockServerFactory)(nil).LocalServerAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalServerAddress", reflect.TypeOf((*MockServerFactory)(nil).LocalServerAddress)) + return &MockServerFactoryLocalServerAddressCall{Call: call} +} + +// MockServerFactoryLocalServerAddressCall wrap *gomock.Call +type MockServerFactoryLocalServerAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryLocalServerAddressCall) Return(arg0 string, arg1 error) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryLocalServerAddressCall) Do(f func() (string, error)) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryLocalServerAddressCall) DoAndReturn(f func() (string, error)) *MockServerFactoryLocalServerAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteServer mocks base method. @@ -102,9 +174,33 @@ func (m *MockServerFactory) RemoteServer(arg0 lxd1.CloudSpec) (lxd1.Server, erro } // RemoteServer indicates an expected call of RemoteServer. -func (mr *MockServerFactoryMockRecorder) RemoteServer(arg0 any) *gomock.Call { +func (mr *MockServerFactoryMockRecorder) RemoteServer(arg0 any) *MockServerFactoryRemoteServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteServer", reflect.TypeOf((*MockServerFactory)(nil).RemoteServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteServer", reflect.TypeOf((*MockServerFactory)(nil).RemoteServer), arg0) + return &MockServerFactoryRemoteServerCall{Call: call} +} + +// MockServerFactoryRemoteServerCall wrap *gomock.Call +type MockServerFactoryRemoteServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFactoryRemoteServerCall) Return(arg0 lxd1.Server, arg1 error) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFactoryRemoteServerCall) Do(f func(lxd1.CloudSpec) (lxd1.Server, error)) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFactoryRemoteServerCall) DoAndReturn(f func(lxd1.CloudSpec) (lxd1.Server, error)) *MockServerFactoryRemoteServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServer is a mock of Server interface. @@ -140,9 +236,33 @@ func (m *MockServer) AliveContainers(arg0 string) ([]lxd0.Container, error) { } // AliveContainers indicates an expected call of AliveContainers. -func (mr *MockServerMockRecorder) AliveContainers(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) AliveContainers(arg0 any) *MockServerAliveContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveContainers", reflect.TypeOf((*MockServer)(nil).AliveContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AliveContainers", reflect.TypeOf((*MockServer)(nil).AliveContainers), arg0) + return &MockServerAliveContainersCall{Call: call} +} + +// MockServerAliveContainersCall wrap *gomock.Call +type MockServerAliveContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerAliveContainersCall) Return(arg0 []lxd0.Container, arg1 error) *MockServerAliveContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerAliveContainersCall) Do(f func(string) ([]lxd0.Container, error)) *MockServerAliveContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerAliveContainersCall) DoAndReturn(f func(string) ([]lxd0.Container, error)) *MockServerAliveContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerAddresses mocks base method. @@ -155,9 +275,33 @@ func (m *MockServer) ContainerAddresses(arg0 string) ([]network.ProviderAddress, } // ContainerAddresses indicates an expected call of ContainerAddresses. -func (mr *MockServerMockRecorder) ContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) ContainerAddresses(arg0 any) *MockServerContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerAddresses", reflect.TypeOf((*MockServer)(nil).ContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerAddresses", reflect.TypeOf((*MockServer)(nil).ContainerAddresses), arg0) + return &MockServerContainerAddressesCall{Call: call} +} + +// MockServerContainerAddressesCall wrap *gomock.Call +type MockServerContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerContainerAddressesCall) Return(arg0 []network.ProviderAddress, arg1 error) *MockServerContainerAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerContainerAddressesCall) Do(f func(string) ([]network.ProviderAddress, error)) *MockServerContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerContainerAddressesCall) DoAndReturn(f func(string) ([]network.ProviderAddress, error)) *MockServerContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateCertificate mocks base method. @@ -169,9 +313,33 @@ func (m *MockServer) CreateCertificate(arg0 api.CertificatesPost) error { } // CreateCertificate indicates an expected call of CreateCertificate. -func (mr *MockServerMockRecorder) CreateCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateCertificate(arg0 any) *MockServerCreateCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockServer)(nil).CreateCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockServer)(nil).CreateCertificate), arg0) + return &MockServerCreateCertificateCall{Call: call} +} + +// MockServerCreateCertificateCall wrap *gomock.Call +type MockServerCreateCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateCertificateCall) Return(arg0 error) *MockServerCreateCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateCertificateCall) Do(f func(api.CertificatesPost) error) *MockServerCreateCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateCertificateCall) DoAndReturn(f func(api.CertificatesPost) error) *MockServerCreateCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateClientCertificate mocks base method. @@ -183,9 +351,33 @@ func (m *MockServer) CreateClientCertificate(arg0 *lxd0.Certificate) error { } // CreateClientCertificate indicates an expected call of CreateClientCertificate. -func (mr *MockServerMockRecorder) CreateClientCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateClientCertificate(arg0 any) *MockServerCreateClientCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientCertificate", reflect.TypeOf((*MockServer)(nil).CreateClientCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientCertificate", reflect.TypeOf((*MockServer)(nil).CreateClientCertificate), arg0) + return &MockServerCreateClientCertificateCall{Call: call} +} + +// MockServerCreateClientCertificateCall wrap *gomock.Call +type MockServerCreateClientCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateClientCertificateCall) Return(arg0 error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateClientCertificateCall) Do(f func(*lxd0.Certificate) error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateClientCertificateCall) DoAndReturn(f func(*lxd0.Certificate) error) *MockServerCreateClientCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateContainerFromSpec mocks base method. @@ -198,9 +390,33 @@ func (m *MockServer) CreateContainerFromSpec(arg0 lxd0.ContainerSpec) (*lxd0.Con } // CreateContainerFromSpec indicates an expected call of CreateContainerFromSpec. -func (mr *MockServerMockRecorder) CreateContainerFromSpec(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateContainerFromSpec(arg0 any) *MockServerCreateContainerFromSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromSpec", reflect.TypeOf((*MockServer)(nil).CreateContainerFromSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateContainerFromSpec", reflect.TypeOf((*MockServer)(nil).CreateContainerFromSpec), arg0) + return &MockServerCreateContainerFromSpecCall{Call: call} +} + +// MockServerCreateContainerFromSpecCall wrap *gomock.Call +type MockServerCreateContainerFromSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateContainerFromSpecCall) Return(arg0 *lxd0.Container, arg1 error) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateContainerFromSpecCall) Do(f func(lxd0.ContainerSpec) (*lxd0.Container, error)) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateContainerFromSpecCall) DoAndReturn(f func(lxd0.ContainerSpec) (*lxd0.Container, error)) *MockServerCreateContainerFromSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreatePool mocks base method. @@ -212,9 +428,33 @@ func (m *MockServer) CreatePool(arg0, arg1 string, arg2 map[string]string) error } // CreatePool indicates an expected call of CreatePool. -func (mr *MockServerMockRecorder) CreatePool(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreatePool(arg0, arg1, arg2 any) *MockServerCreatePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePool", reflect.TypeOf((*MockServer)(nil).CreatePool), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePool", reflect.TypeOf((*MockServer)(nil).CreatePool), arg0, arg1, arg2) + return &MockServerCreatePoolCall{Call: call} +} + +// MockServerCreatePoolCall wrap *gomock.Call +type MockServerCreatePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreatePoolCall) Return(arg0 error) *MockServerCreatePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreatePoolCall) Do(f func(string, string, map[string]string) error) *MockServerCreatePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreatePoolCall) DoAndReturn(f func(string, string, map[string]string) error) *MockServerCreatePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProfile mocks base method. @@ -226,9 +466,33 @@ func (m *MockServer) CreateProfile(arg0 api.ProfilesPost) error { } // CreateProfile indicates an expected call of CreateProfile. -func (mr *MockServerMockRecorder) CreateProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateProfile(arg0 any) *MockServerCreateProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockServer)(nil).CreateProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockServer)(nil).CreateProfile), arg0) + return &MockServerCreateProfileCall{Call: call} +} + +// MockServerCreateProfileCall wrap *gomock.Call +type MockServerCreateProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateProfileCall) Return(arg0 error) *MockServerCreateProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateProfileCall) Do(f func(api.ProfilesPost) error) *MockServerCreateProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateProfileCall) DoAndReturn(f func(api.ProfilesPost) error) *MockServerCreateProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateProfileWithConfig mocks base method. @@ -240,9 +504,33 @@ func (m *MockServer) CreateProfileWithConfig(arg0 string, arg1 map[string]string } // CreateProfileWithConfig indicates an expected call of CreateProfileWithConfig. -func (mr *MockServerMockRecorder) CreateProfileWithConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateProfileWithConfig(arg0, arg1 any) *MockServerCreateProfileWithConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfileWithConfig", reflect.TypeOf((*MockServer)(nil).CreateProfileWithConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfileWithConfig", reflect.TypeOf((*MockServer)(nil).CreateProfileWithConfig), arg0, arg1) + return &MockServerCreateProfileWithConfigCall{Call: call} +} + +// MockServerCreateProfileWithConfigCall wrap *gomock.Call +type MockServerCreateProfileWithConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateProfileWithConfigCall) Return(arg0 error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateProfileWithConfigCall) Do(f func(string, map[string]string) error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateProfileWithConfigCall) DoAndReturn(f func(string, map[string]string) error) *MockServerCreateProfileWithConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateVolume mocks base method. @@ -254,9 +542,33 @@ func (m *MockServer) CreateVolume(arg0, arg1 string, arg2 map[string]string) err } // CreateVolume indicates an expected call of CreateVolume. -func (mr *MockServerMockRecorder) CreateVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) CreateVolume(arg0, arg1, arg2 any) *MockServerCreateVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockServer)(nil).CreateVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockServer)(nil).CreateVolume), arg0, arg1, arg2) + return &MockServerCreateVolumeCall{Call: call} +} + +// MockServerCreateVolumeCall wrap *gomock.Call +type MockServerCreateVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerCreateVolumeCall) Return(arg0 error) *MockServerCreateVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerCreateVolumeCall) Do(f func(string, string, map[string]string) error) *MockServerCreateVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerCreateVolumeCall) DoAndReturn(f func(string, string, map[string]string) error) *MockServerCreateVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCertificate mocks base method. @@ -268,9 +580,33 @@ func (m *MockServer) DeleteCertificate(arg0 string) error { } // DeleteCertificate indicates an expected call of DeleteCertificate. -func (mr *MockServerMockRecorder) DeleteCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteCertificate(arg0 any) *MockServerDeleteCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockServer)(nil).DeleteCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCertificate", reflect.TypeOf((*MockServer)(nil).DeleteCertificate), arg0) + return &MockServerDeleteCertificateCall{Call: call} +} + +// MockServerDeleteCertificateCall wrap *gomock.Call +type MockServerDeleteCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteCertificateCall) Return(arg0 error) *MockServerDeleteCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteCertificateCall) Do(f func(string) error) *MockServerDeleteCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteCertificateCall) DoAndReturn(f func(string) error) *MockServerDeleteCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteProfile mocks base method. @@ -282,9 +618,33 @@ func (m *MockServer) DeleteProfile(arg0 string) error { } // DeleteProfile indicates an expected call of DeleteProfile. -func (mr *MockServerMockRecorder) DeleteProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteProfile(arg0 any) *MockServerDeleteProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockServer)(nil).DeleteProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockServer)(nil).DeleteProfile), arg0) + return &MockServerDeleteProfileCall{Call: call} +} + +// MockServerDeleteProfileCall wrap *gomock.Call +type MockServerDeleteProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteProfileCall) Return(arg0 error) *MockServerDeleteProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteProfileCall) Do(f func(string) error) *MockServerDeleteProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteProfileCall) DoAndReturn(f func(string) error) *MockServerDeleteProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteStoragePoolVolume mocks base method. @@ -296,9 +656,33 @@ func (m *MockServer) DeleteStoragePoolVolume(arg0, arg1, arg2 string) error { } // DeleteStoragePoolVolume indicates an expected call of DeleteStoragePoolVolume. -func (mr *MockServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) DeleteStoragePoolVolume(arg0, arg1, arg2 any) *MockServerDeleteStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).DeleteStoragePoolVolume), arg0, arg1, arg2) + return &MockServerDeleteStoragePoolVolumeCall{Call: call} +} + +// MockServerDeleteStoragePoolVolumeCall wrap *gomock.Call +type MockServerDeleteStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerDeleteStoragePoolVolumeCall) Return(arg0 error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerDeleteStoragePoolVolumeCall) Do(f func(string, string, string) error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerDeleteStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) error) *MockServerDeleteStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnableHTTPSListener mocks base method. @@ -310,9 +694,33 @@ func (m *MockServer) EnableHTTPSListener() error { } // EnableHTTPSListener indicates an expected call of EnableHTTPSListener. -func (mr *MockServerMockRecorder) EnableHTTPSListener() *gomock.Call { +func (mr *MockServerMockRecorder) EnableHTTPSListener() *MockServerEnableHTTPSListenerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableHTTPSListener", reflect.TypeOf((*MockServer)(nil).EnableHTTPSListener)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableHTTPSListener", reflect.TypeOf((*MockServer)(nil).EnableHTTPSListener)) + return &MockServerEnableHTTPSListenerCall{Call: call} +} + +// MockServerEnableHTTPSListenerCall wrap *gomock.Call +type MockServerEnableHTTPSListenerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerEnableHTTPSListenerCall) Return(arg0 error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerEnableHTTPSListenerCall) Do(f func() error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerEnableHTTPSListenerCall) DoAndReturn(f func() error) *MockServerEnableHTTPSListenerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDefaultStorage mocks base method. @@ -324,9 +732,33 @@ func (m *MockServer) EnsureDefaultStorage(arg0 *api.Profile, arg1 string) error } // EnsureDefaultStorage indicates an expected call of EnsureDefaultStorage. -func (mr *MockServerMockRecorder) EnsureDefaultStorage(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) EnsureDefaultStorage(arg0, arg1 any) *MockServerEnsureDefaultStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDefaultStorage", reflect.TypeOf((*MockServer)(nil).EnsureDefaultStorage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDefaultStorage", reflect.TypeOf((*MockServer)(nil).EnsureDefaultStorage), arg0, arg1) + return &MockServerEnsureDefaultStorageCall{Call: call} +} + +// MockServerEnsureDefaultStorageCall wrap *gomock.Call +type MockServerEnsureDefaultStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerEnsureDefaultStorageCall) Return(arg0 error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerEnsureDefaultStorageCall) Do(f func(*api.Profile, string) error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerEnsureDefaultStorageCall) DoAndReturn(f func(*api.Profile, string) error) *MockServerEnsureDefaultStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FilterContainers mocks base method. @@ -343,10 +775,34 @@ func (m *MockServer) FilterContainers(arg0 string, arg1 ...string) ([]lxd0.Conta } // FilterContainers indicates an expected call of FilterContainers. -func (mr *MockServerMockRecorder) FilterContainers(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockServerMockRecorder) FilterContainers(arg0 any, arg1 ...any) *MockServerFilterContainersCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterContainers", reflect.TypeOf((*MockServer)(nil).FilterContainers), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterContainers", reflect.TypeOf((*MockServer)(nil).FilterContainers), varargs...) + return &MockServerFilterContainersCall{Call: call} +} + +// MockServerFilterContainersCall wrap *gomock.Call +type MockServerFilterContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFilterContainersCall) Return(arg0 []lxd0.Container, arg1 error) *MockServerFilterContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFilterContainersCall) Do(f func(string, ...string) ([]lxd0.Container, error)) *MockServerFilterContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFilterContainersCall) DoAndReturn(f func(string, ...string) ([]lxd0.Container, error)) *MockServerFilterContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindImage mocks base method. @@ -359,9 +815,33 @@ func (m *MockServer) FindImage(arg0 context.Context, arg1 base.Base, arg2 string } // FindImage indicates an expected call of FindImage. -func (mr *MockServerMockRecorder) FindImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockServerMockRecorder) FindImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockServerFindImageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindImage", reflect.TypeOf((*MockServer)(nil).FindImage), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindImage", reflect.TypeOf((*MockServer)(nil).FindImage), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockServerFindImageCall{Call: call} +} + +// MockServerFindImageCall wrap *gomock.Call +type MockServerFindImageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerFindImageCall) Return(arg0 lxd0.SourcedImage, arg1 error) *MockServerFindImageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerFindImageCall) Do(f func(context.Context, base.Base, string, instance.VirtType, []lxd0.ServerSpec, bool, environs.StatusCallbackFunc) (lxd0.SourcedImage, error)) *MockServerFindImageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerFindImageCall) DoAndReturn(f func(context.Context, base.Base, string, instance.VirtType, []lxd0.ServerSpec, bool, environs.StatusCallbackFunc) (lxd0.SourcedImage, error)) *MockServerFindImageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCertificate mocks base method. @@ -375,9 +855,33 @@ func (m *MockServer) GetCertificate(arg0 string) (*api.Certificate, string, erro } // GetCertificate indicates an expected call of GetCertificate. -func (mr *MockServerMockRecorder) GetCertificate(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetCertificate(arg0 any) *MockServerGetCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockServer)(nil).GetCertificate), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificate", reflect.TypeOf((*MockServer)(nil).GetCertificate), arg0) + return &MockServerGetCertificateCall{Call: call} +} + +// MockServerGetCertificateCall wrap *gomock.Call +type MockServerGetCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetCertificateCall) Return(arg0 *api.Certificate, arg1 string, arg2 error) *MockServerGetCertificateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetCertificateCall) Do(f func(string) (*api.Certificate, string, error)) *MockServerGetCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetCertificateCall) DoAndReturn(f func(string) (*api.Certificate, string, error)) *MockServerGetCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetClusterMembers mocks base method. @@ -390,9 +894,33 @@ func (m *MockServer) GetClusterMembers() ([]api.ClusterMember, error) { } // GetClusterMembers indicates an expected call of GetClusterMembers. -func (mr *MockServerMockRecorder) GetClusterMembers() *gomock.Call { +func (mr *MockServerMockRecorder) GetClusterMembers() *MockServerGetClusterMembersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockServer)(nil).GetClusterMembers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterMembers", reflect.TypeOf((*MockServer)(nil).GetClusterMembers)) + return &MockServerGetClusterMembersCall{Call: call} +} + +// MockServerGetClusterMembersCall wrap *gomock.Call +type MockServerGetClusterMembersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetClusterMembersCall) Return(arg0 []api.ClusterMember, arg1 error) *MockServerGetClusterMembersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetClusterMembersCall) Do(f func() ([]api.ClusterMember, error)) *MockServerGetClusterMembersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetClusterMembersCall) DoAndReturn(f func() ([]api.ClusterMember, error)) *MockServerGetClusterMembersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConnectionInfo mocks base method. @@ -405,9 +933,33 @@ func (m *MockServer) GetConnectionInfo() (*lxd.ConnectionInfo, error) { } // GetConnectionInfo indicates an expected call of GetConnectionInfo. -func (mr *MockServerMockRecorder) GetConnectionInfo() *gomock.Call { +func (mr *MockServerMockRecorder) GetConnectionInfo() *MockServerGetConnectionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnectionInfo", reflect.TypeOf((*MockServer)(nil).GetConnectionInfo)) + return &MockServerGetConnectionInfoCall{Call: call} +} + +// MockServerGetConnectionInfoCall wrap *gomock.Call +type MockServerGetConnectionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetConnectionInfoCall) Return(arg0 *lxd.ConnectionInfo, arg1 error) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetConnectionInfoCall) Do(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetConnectionInfoCall) DoAndReturn(f func() (*lxd.ConnectionInfo, error)) *MockServerGetConnectionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerProfiles mocks base method. @@ -420,9 +972,33 @@ func (m *MockServer) GetContainerProfiles(arg0 string) ([]string, error) { } // GetContainerProfiles indicates an expected call of GetContainerProfiles. -func (mr *MockServerMockRecorder) GetContainerProfiles(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetContainerProfiles(arg0 any) *MockServerGetContainerProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfiles", reflect.TypeOf((*MockServer)(nil).GetContainerProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfiles", reflect.TypeOf((*MockServer)(nil).GetContainerProfiles), arg0) + return &MockServerGetContainerProfilesCall{Call: call} +} + +// MockServerGetContainerProfilesCall wrap *gomock.Call +type MockServerGetContainerProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetContainerProfilesCall) Return(arg0 []string, arg1 error) *MockServerGetContainerProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetContainerProfilesCall) Do(f func(string) ([]string, error)) *MockServerGetContainerProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetContainerProfilesCall) DoAndReturn(f func(string) ([]string, error)) *MockServerGetContainerProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstance mocks base method. @@ -436,9 +1012,33 @@ func (m *MockServer) GetInstance(arg0 string) (*api.Instance, string, error) { } // GetInstance indicates an expected call of GetInstance. -func (mr *MockServerMockRecorder) GetInstance(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetInstance(arg0 any) *MockServerGetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockServer)(nil).GetInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstance", reflect.TypeOf((*MockServer)(nil).GetInstance), arg0) + return &MockServerGetInstanceCall{Call: call} +} + +// MockServerGetInstanceCall wrap *gomock.Call +type MockServerGetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetInstanceCall) Return(arg0 *api.Instance, arg1 string, arg2 error) *MockServerGetInstanceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetInstanceCall) Do(f func(string) (*api.Instance, string, error)) *MockServerGetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetInstanceCall) DoAndReturn(f func(string) (*api.Instance, string, error)) *MockServerGetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInstanceState mocks base method. @@ -452,9 +1052,33 @@ func (m *MockServer) GetInstanceState(arg0 string) (*api.InstanceState, string, } // GetInstanceState indicates an expected call of GetInstanceState. -func (mr *MockServerMockRecorder) GetInstanceState(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetInstanceState(arg0 any) *MockServerGetInstanceStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockServer)(nil).GetInstanceState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceState", reflect.TypeOf((*MockServer)(nil).GetInstanceState), arg0) + return &MockServerGetInstanceStateCall{Call: call} +} + +// MockServerGetInstanceStateCall wrap *gomock.Call +type MockServerGetInstanceStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetInstanceStateCall) Return(arg0 *api.InstanceState, arg1 string, arg2 error) *MockServerGetInstanceStateCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetInstanceStateCall) Do(f func(string) (*api.InstanceState, string, error)) *MockServerGetInstanceStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetInstanceStateCall) DoAndReturn(f func(string) (*api.InstanceState, string, error)) *MockServerGetInstanceStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNICsFromProfile mocks base method. @@ -467,9 +1091,33 @@ func (m *MockServer) GetNICsFromProfile(arg0 string) (map[string]map[string]stri } // GetNICsFromProfile indicates an expected call of GetNICsFromProfile. -func (mr *MockServerMockRecorder) GetNICsFromProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetNICsFromProfile(arg0 any) *MockServerGetNICsFromProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNICsFromProfile", reflect.TypeOf((*MockServer)(nil).GetNICsFromProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNICsFromProfile", reflect.TypeOf((*MockServer)(nil).GetNICsFromProfile), arg0) + return &MockServerGetNICsFromProfileCall{Call: call} +} + +// MockServerGetNICsFromProfileCall wrap *gomock.Call +type MockServerGetNICsFromProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNICsFromProfileCall) Return(arg0 map[string]map[string]string, arg1 error) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNICsFromProfileCall) Do(f func(string) (map[string]map[string]string, error)) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNICsFromProfileCall) DoAndReturn(f func(string) (map[string]map[string]string, error)) *MockServerGetNICsFromProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworkState mocks base method. @@ -482,9 +1130,33 @@ func (m *MockServer) GetNetworkState(arg0 string) (*api.NetworkState, error) { } // GetNetworkState indicates an expected call of GetNetworkState. -func (mr *MockServerMockRecorder) GetNetworkState(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetNetworkState(arg0 any) *MockServerGetNetworkStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockServer)(nil).GetNetworkState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkState", reflect.TypeOf((*MockServer)(nil).GetNetworkState), arg0) + return &MockServerGetNetworkStateCall{Call: call} +} + +// MockServerGetNetworkStateCall wrap *gomock.Call +type MockServerGetNetworkStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNetworkStateCall) Return(arg0 *api.NetworkState, arg1 error) *MockServerGetNetworkStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNetworkStateCall) Do(f func(string) (*api.NetworkState, error)) *MockServerGetNetworkStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNetworkStateCall) DoAndReturn(f func(string) (*api.NetworkState, error)) *MockServerGetNetworkStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetNetworks mocks base method. @@ -497,9 +1169,33 @@ func (m *MockServer) GetNetworks() ([]api.Network, error) { } // GetNetworks indicates an expected call of GetNetworks. -func (mr *MockServerMockRecorder) GetNetworks() *gomock.Call { +func (mr *MockServerMockRecorder) GetNetworks() *MockServerGetNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockServer)(nil).GetNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworks", reflect.TypeOf((*MockServer)(nil).GetNetworks)) + return &MockServerGetNetworksCall{Call: call} +} + +// MockServerGetNetworksCall wrap *gomock.Call +type MockServerGetNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetNetworksCall) Return(arg0 []api.Network, arg1 error) *MockServerGetNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetNetworksCall) Do(f func() ([]api.Network, error)) *MockServerGetNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetNetworksCall) DoAndReturn(f func() ([]api.Network, error)) *MockServerGetNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetProfile mocks base method. @@ -513,9 +1209,33 @@ func (m *MockServer) GetProfile(arg0 string) (*api.Profile, string, error) { } // GetProfile indicates an expected call of GetProfile. -func (mr *MockServerMockRecorder) GetProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetProfile(arg0 any) *MockServerGetProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockServer)(nil).GetProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfile", reflect.TypeOf((*MockServer)(nil).GetProfile), arg0) + return &MockServerGetProfileCall{Call: call} +} + +// MockServerGetProfileCall wrap *gomock.Call +type MockServerGetProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetProfileCall) Return(arg0 *api.Profile, arg1 string, arg2 error) *MockServerGetProfileCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetProfileCall) Do(f func(string) (*api.Profile, string, error)) *MockServerGetProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetProfileCall) DoAndReturn(f func(string) (*api.Profile, string, error)) *MockServerGetProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetServer mocks base method. @@ -529,9 +1249,33 @@ func (m *MockServer) GetServer() (*api.Server, string, error) { } // GetServer indicates an expected call of GetServer. -func (mr *MockServerMockRecorder) GetServer() *gomock.Call { +func (mr *MockServerMockRecorder) GetServer() *MockServerGetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockServer)(nil).GetServer)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServer", reflect.TypeOf((*MockServer)(nil).GetServer)) + return &MockServerGetServerCall{Call: call} +} + +// MockServerGetServerCall wrap *gomock.Call +type MockServerGetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetServerCall) Return(arg0 *api.Server, arg1 string, arg2 error) *MockServerGetServerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetServerCall) Do(f func() (*api.Server, string, error)) *MockServerGetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetServerCall) DoAndReturn(f func() (*api.Server, string, error)) *MockServerGetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePool mocks base method. @@ -545,9 +1289,33 @@ func (m *MockServer) GetStoragePool(arg0 string) (*api.StoragePool, string, erro } // GetStoragePool indicates an expected call of GetStoragePool. -func (mr *MockServerMockRecorder) GetStoragePool(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePool(arg0 any) *MockServerGetStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockServer)(nil).GetStoragePool), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePool", reflect.TypeOf((*MockServer)(nil).GetStoragePool), arg0) + return &MockServerGetStoragePoolCall{Call: call} +} + +// MockServerGetStoragePoolCall wrap *gomock.Call +type MockServerGetStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolCall) Return(arg0 *api.StoragePool, arg1 string, arg2 error) *MockServerGetStoragePoolCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolCall) Do(f func(string) (*api.StoragePool, string, error)) *MockServerGetStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolCall) DoAndReturn(f func(string) (*api.StoragePool, string, error)) *MockServerGetStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolume mocks base method. @@ -561,9 +1329,33 @@ func (m *MockServer) GetStoragePoolVolume(arg0, arg1, arg2 string) (*api.Storage } // GetStoragePoolVolume indicates an expected call of GetStoragePoolVolume. -func (mr *MockServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePoolVolume(arg0, arg1, arg2 any) *MockServerGetStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolume), arg0, arg1, arg2) + return &MockServerGetStoragePoolVolumeCall{Call: call} +} + +// MockServerGetStoragePoolVolumeCall wrap *gomock.Call +type MockServerGetStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolVolumeCall) Return(arg0 *api.StorageVolume, arg1 string, arg2 error) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolVolumeCall) Do(f func(string, string, string) (*api.StorageVolume, string, error)) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolVolumeCall) DoAndReturn(f func(string, string, string) (*api.StorageVolume, string, error)) *MockServerGetStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePoolVolumes mocks base method. @@ -576,9 +1368,33 @@ func (m *MockServer) GetStoragePoolVolumes(arg0 string) ([]api.StorageVolume, er } // GetStoragePoolVolumes indicates an expected call of GetStoragePoolVolumes. -func (mr *MockServerMockRecorder) GetStoragePoolVolumes(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePoolVolumes(arg0 any) *MockServerGetStoragePoolVolumesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolumes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePoolVolumes", reflect.TypeOf((*MockServer)(nil).GetStoragePoolVolumes), arg0) + return &MockServerGetStoragePoolVolumesCall{Call: call} +} + +// MockServerGetStoragePoolVolumesCall wrap *gomock.Call +type MockServerGetStoragePoolVolumesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolVolumesCall) Return(arg0 []api.StorageVolume, arg1 error) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolVolumesCall) Do(f func(string) ([]api.StorageVolume, error)) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolVolumesCall) DoAndReturn(f func(string) ([]api.StorageVolume, error)) *MockServerGetStoragePoolVolumesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetStoragePools mocks base method. @@ -591,9 +1407,33 @@ func (m *MockServer) GetStoragePools() ([]api.StoragePool, error) { } // GetStoragePools indicates an expected call of GetStoragePools. -func (mr *MockServerMockRecorder) GetStoragePools() *gomock.Call { +func (mr *MockServerMockRecorder) GetStoragePools() *MockServerGetStoragePoolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockServer)(nil).GetStoragePools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStoragePools", reflect.TypeOf((*MockServer)(nil).GetStoragePools)) + return &MockServerGetStoragePoolsCall{Call: call} +} + +// MockServerGetStoragePoolsCall wrap *gomock.Call +type MockServerGetStoragePoolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerGetStoragePoolsCall) Return(arg0 []api.StoragePool, arg1 error) *MockServerGetStoragePoolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerGetStoragePoolsCall) Do(f func() ([]api.StoragePool, error)) *MockServerGetStoragePoolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerGetStoragePoolsCall) DoAndReturn(f func() ([]api.StoragePool, error)) *MockServerGetStoragePoolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasExtension mocks base method. @@ -605,9 +1445,33 @@ func (m *MockServer) HasExtension(arg0 string) bool { } // HasExtension indicates an expected call of HasExtension. -func (mr *MockServerMockRecorder) HasExtension(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) HasExtension(arg0 any) *MockServerHasExtensionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockServer)(nil).HasExtension), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExtension", reflect.TypeOf((*MockServer)(nil).HasExtension), arg0) + return &MockServerHasExtensionCall{Call: call} +} + +// MockServerHasExtensionCall wrap *gomock.Call +type MockServerHasExtensionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHasExtensionCall) Return(arg0 bool) *MockServerHasExtensionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHasExtensionCall) Do(f func(string) bool) *MockServerHasExtensionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHasExtensionCall) DoAndReturn(f func(string) bool) *MockServerHasExtensionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasProfile mocks base method. @@ -620,9 +1484,33 @@ func (m *MockServer) HasProfile(arg0 string) (bool, error) { } // HasProfile indicates an expected call of HasProfile. -func (mr *MockServerMockRecorder) HasProfile(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) HasProfile(arg0 any) *MockServerHasProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasProfile", reflect.TypeOf((*MockServer)(nil).HasProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasProfile", reflect.TypeOf((*MockServer)(nil).HasProfile), arg0) + return &MockServerHasProfileCall{Call: call} +} + +// MockServerHasProfileCall wrap *gomock.Call +type MockServerHasProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHasProfileCall) Return(arg0 bool, arg1 error) *MockServerHasProfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHasProfileCall) Do(f func(string) (bool, error)) *MockServerHasProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHasProfileCall) DoAndReturn(f func(string) (bool, error)) *MockServerHasProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HostArch mocks base method. @@ -634,9 +1522,33 @@ func (m *MockServer) HostArch() string { } // HostArch indicates an expected call of HostArch. -func (mr *MockServerMockRecorder) HostArch() *gomock.Call { +func (mr *MockServerMockRecorder) HostArch() *MockServerHostArchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostArch", reflect.TypeOf((*MockServer)(nil).HostArch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostArch", reflect.TypeOf((*MockServer)(nil).HostArch)) + return &MockServerHostArchCall{Call: call} +} + +// MockServerHostArchCall wrap *gomock.Call +type MockServerHostArchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerHostArchCall) Return(arg0 string) *MockServerHostArchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerHostArchCall) Do(f func() string) *MockServerHostArchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerHostArchCall) DoAndReturn(f func() string) *MockServerHostArchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsClustered mocks base method. @@ -648,9 +1560,33 @@ func (m *MockServer) IsClustered() bool { } // IsClustered indicates an expected call of IsClustered. -func (mr *MockServerMockRecorder) IsClustered() *gomock.Call { +func (mr *MockServerMockRecorder) IsClustered() *MockServerIsClusteredCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockServer)(nil).IsClustered)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClustered", reflect.TypeOf((*MockServer)(nil).IsClustered)) + return &MockServerIsClusteredCall{Call: call} +} + +// MockServerIsClusteredCall wrap *gomock.Call +type MockServerIsClusteredCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerIsClusteredCall) Return(arg0 bool) *MockServerIsClusteredCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerIsClusteredCall) Do(f func() bool) *MockServerIsClusteredCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerIsClusteredCall) DoAndReturn(f func() bool) *MockServerIsClusteredCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalBridgeName mocks base method. @@ -662,9 +1598,33 @@ func (m *MockServer) LocalBridgeName() string { } // LocalBridgeName indicates an expected call of LocalBridgeName. -func (mr *MockServerMockRecorder) LocalBridgeName() *gomock.Call { +func (mr *MockServerMockRecorder) LocalBridgeName() *MockServerLocalBridgeNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalBridgeName", reflect.TypeOf((*MockServer)(nil).LocalBridgeName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalBridgeName", reflect.TypeOf((*MockServer)(nil).LocalBridgeName)) + return &MockServerLocalBridgeNameCall{Call: call} +} + +// MockServerLocalBridgeNameCall wrap *gomock.Call +type MockServerLocalBridgeNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerLocalBridgeNameCall) Return(arg0 string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerLocalBridgeNameCall) Do(f func() string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerLocalBridgeNameCall) DoAndReturn(f func() string) *MockServerLocalBridgeNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -676,9 +1636,33 @@ func (m *MockServer) Name() string { } // Name indicates an expected call of Name. -func (mr *MockServerMockRecorder) Name() *gomock.Call { +func (mr *MockServerMockRecorder) Name() *MockServerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockServer)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockServer)(nil).Name)) + return &MockServerNameCall{Call: call} +} + +// MockServerNameCall wrap *gomock.Call +type MockServerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerNameCall) Return(arg0 string) *MockServerNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerNameCall) Do(f func() string) *MockServerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerNameCall) DoAndReturn(f func() string) *MockServerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveContainer mocks base method. @@ -690,9 +1674,33 @@ func (m *MockServer) RemoveContainer(arg0 string) error { } // RemoveContainer indicates an expected call of RemoveContainer. -func (mr *MockServerMockRecorder) RemoveContainer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) RemoveContainer(arg0 any) *MockServerRemoveContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainer", reflect.TypeOf((*MockServer)(nil).RemoveContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainer", reflect.TypeOf((*MockServer)(nil).RemoveContainer), arg0) + return &MockServerRemoveContainerCall{Call: call} +} + +// MockServerRemoveContainerCall wrap *gomock.Call +type MockServerRemoveContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerRemoveContainerCall) Return(arg0 error) *MockServerRemoveContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerRemoveContainerCall) Do(f func(string) error) *MockServerRemoveContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerRemoveContainerCall) DoAndReturn(f func(string) error) *MockServerRemoveContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveContainers mocks base method. @@ -704,9 +1712,33 @@ func (m *MockServer) RemoveContainers(arg0 []string) error { } // RemoveContainers indicates an expected call of RemoveContainers. -func (mr *MockServerMockRecorder) RemoveContainers(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) RemoveContainers(arg0 any) *MockServerRemoveContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainers", reflect.TypeOf((*MockServer)(nil).RemoveContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveContainers", reflect.TypeOf((*MockServer)(nil).RemoveContainers), arg0) + return &MockServerRemoveContainersCall{Call: call} +} + +// MockServerRemoveContainersCall wrap *gomock.Call +type MockServerRemoveContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerRemoveContainersCall) Return(arg0 error) *MockServerRemoveContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerRemoveContainersCall) Do(f func([]string) error) *MockServerRemoveContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerRemoveContainersCall) DoAndReturn(f func([]string) error) *MockServerRemoveContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReplaceOrAddContainerProfile mocks base method. @@ -718,9 +1750,33 @@ func (m *MockServer) ReplaceOrAddContainerProfile(arg0, arg1, arg2 string) error } // ReplaceOrAddContainerProfile indicates an expected call of ReplaceOrAddContainerProfile. -func (mr *MockServerMockRecorder) ReplaceOrAddContainerProfile(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServerMockRecorder) ReplaceOrAddContainerProfile(arg0, arg1, arg2 any) *MockServerReplaceOrAddContainerProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceOrAddContainerProfile", reflect.TypeOf((*MockServer)(nil).ReplaceOrAddContainerProfile), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceOrAddContainerProfile", reflect.TypeOf((*MockServer)(nil).ReplaceOrAddContainerProfile), arg0, arg1, arg2) + return &MockServerReplaceOrAddContainerProfileCall{Call: call} +} + +// MockServerReplaceOrAddContainerProfileCall wrap *gomock.Call +type MockServerReplaceOrAddContainerProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerReplaceOrAddContainerProfileCall) Return(arg0 error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerReplaceOrAddContainerProfileCall) Do(f func(string, string, string) error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerReplaceOrAddContainerProfileCall) DoAndReturn(f func(string, string, string) error) *MockServerReplaceOrAddContainerProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerCertificate mocks base method. @@ -732,9 +1788,33 @@ func (m *MockServer) ServerCertificate() string { } // ServerCertificate indicates an expected call of ServerCertificate. -func (mr *MockServerMockRecorder) ServerCertificate() *gomock.Call { +func (mr *MockServerMockRecorder) ServerCertificate() *MockServerServerCertificateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerCertificate", reflect.TypeOf((*MockServer)(nil).ServerCertificate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerCertificate", reflect.TypeOf((*MockServer)(nil).ServerCertificate)) + return &MockServerServerCertificateCall{Call: call} +} + +// MockServerServerCertificateCall wrap *gomock.Call +type MockServerServerCertificateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerServerCertificateCall) Return(arg0 string) *MockServerServerCertificateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerServerCertificateCall) Do(f func() string) *MockServerServerCertificateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerServerCertificateCall) DoAndReturn(f func() string) *MockServerServerCertificateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerVersion mocks base method. @@ -746,9 +1826,33 @@ func (m *MockServer) ServerVersion() string { } // ServerVersion indicates an expected call of ServerVersion. -func (mr *MockServerMockRecorder) ServerVersion() *gomock.Call { +func (mr *MockServerMockRecorder) ServerVersion() *MockServerServerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockServer)(nil).ServerVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockServer)(nil).ServerVersion)) + return &MockServerServerVersionCall{Call: call} +} + +// MockServerServerVersionCall wrap *gomock.Call +type MockServerServerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerServerVersionCall) Return(arg0 string) *MockServerServerVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerServerVersionCall) Do(f func() string) *MockServerServerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerServerVersionCall) DoAndReturn(f func() string) *MockServerServerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageSupported mocks base method. @@ -760,9 +1864,33 @@ func (m *MockServer) StorageSupported() bool { } // StorageSupported indicates an expected call of StorageSupported. -func (mr *MockServerMockRecorder) StorageSupported() *gomock.Call { +func (mr *MockServerMockRecorder) StorageSupported() *MockServerStorageSupportedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageSupported", reflect.TypeOf((*MockServer)(nil).StorageSupported)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageSupported", reflect.TypeOf((*MockServer)(nil).StorageSupported)) + return &MockServerStorageSupportedCall{Call: call} +} + +// MockServerStorageSupportedCall wrap *gomock.Call +type MockServerStorageSupportedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerStorageSupportedCall) Return(arg0 bool) *MockServerStorageSupportedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerStorageSupportedCall) Do(f func() bool) *MockServerStorageSupportedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerStorageSupportedCall) DoAndReturn(f func() bool) *MockServerStorageSupportedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedArches mocks base method. @@ -774,9 +1902,33 @@ func (m *MockServer) SupportedArches() []string { } // SupportedArches indicates an expected call of SupportedArches. -func (mr *MockServerMockRecorder) SupportedArches() *gomock.Call { +func (mr *MockServerMockRecorder) SupportedArches() *MockServerSupportedArchesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedArches", reflect.TypeOf((*MockServer)(nil).SupportedArches)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedArches", reflect.TypeOf((*MockServer)(nil).SupportedArches)) + return &MockServerSupportedArchesCall{Call: call} +} + +// MockServerSupportedArchesCall wrap *gomock.Call +type MockServerSupportedArchesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerSupportedArchesCall) Return(arg0 []string) *MockServerSupportedArchesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerSupportedArchesCall) Do(f func() []string) *MockServerSupportedArchesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerSupportedArchesCall) DoAndReturn(f func() []string) *MockServerSupportedArchesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerConfig mocks base method. @@ -788,9 +1940,33 @@ func (m *MockServer) UpdateContainerConfig(arg0 string, arg1 map[string]string) } // UpdateContainerConfig indicates an expected call of UpdateContainerConfig. -func (mr *MockServerMockRecorder) UpdateContainerConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateContainerConfig(arg0, arg1 any) *MockServerUpdateContainerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerConfig", reflect.TypeOf((*MockServer)(nil).UpdateContainerConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerConfig", reflect.TypeOf((*MockServer)(nil).UpdateContainerConfig), arg0, arg1) + return &MockServerUpdateContainerConfigCall{Call: call} +} + +// MockServerUpdateContainerConfigCall wrap *gomock.Call +type MockServerUpdateContainerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateContainerConfigCall) Return(arg0 error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateContainerConfigCall) Do(f func(string, map[string]string) error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateContainerConfigCall) DoAndReturn(f func(string, map[string]string) error) *MockServerUpdateContainerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateContainerProfiles mocks base method. @@ -802,9 +1978,33 @@ func (m *MockServer) UpdateContainerProfiles(arg0 string, arg1 []string) error { } // UpdateContainerProfiles indicates an expected call of UpdateContainerProfiles. -func (mr *MockServerMockRecorder) UpdateContainerProfiles(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateContainerProfiles(arg0, arg1 any) *MockServerUpdateContainerProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerProfiles", reflect.TypeOf((*MockServer)(nil).UpdateContainerProfiles), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContainerProfiles", reflect.TypeOf((*MockServer)(nil).UpdateContainerProfiles), arg0, arg1) + return &MockServerUpdateContainerProfilesCall{Call: call} +} + +// MockServerUpdateContainerProfilesCall wrap *gomock.Call +type MockServerUpdateContainerProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateContainerProfilesCall) Return(arg0 error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateContainerProfilesCall) Do(f func(string, []string) error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateContainerProfilesCall) DoAndReturn(f func(string, []string) error) *MockServerUpdateContainerProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateServerConfig mocks base method. @@ -816,9 +2016,33 @@ func (m *MockServer) UpdateServerConfig(arg0 map[string]string) error { } // UpdateServerConfig indicates an expected call of UpdateServerConfig. -func (mr *MockServerMockRecorder) UpdateServerConfig(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateServerConfig(arg0 any) *MockServerUpdateServerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServerConfig", reflect.TypeOf((*MockServer)(nil).UpdateServerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServerConfig", reflect.TypeOf((*MockServer)(nil).UpdateServerConfig), arg0) + return &MockServerUpdateServerConfigCall{Call: call} +} + +// MockServerUpdateServerConfigCall wrap *gomock.Call +type MockServerUpdateServerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateServerConfigCall) Return(arg0 error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateServerConfigCall) Do(f func(map[string]string) error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateServerConfigCall) DoAndReturn(f func(map[string]string) error) *MockServerUpdateServerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStoragePoolVolume mocks base method. @@ -830,9 +2054,33 @@ func (m *MockServer) UpdateStoragePoolVolume(arg0, arg1, arg2 string, arg3 api.S } // UpdateStoragePoolVolume indicates an expected call of UpdateStoragePoolVolume. -func (mr *MockServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockServerMockRecorder) UpdateStoragePoolVolume(arg0, arg1, arg2, arg3, arg4 any) *MockServerUpdateStoragePoolVolumeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStoragePoolVolume", reflect.TypeOf((*MockServer)(nil).UpdateStoragePoolVolume), arg0, arg1, arg2, arg3, arg4) + return &MockServerUpdateStoragePoolVolumeCall{Call: call} +} + +// MockServerUpdateStoragePoolVolumeCall wrap *gomock.Call +type MockServerUpdateStoragePoolVolumeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUpdateStoragePoolVolumeCall) Return(arg0 error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUpdateStoragePoolVolumeCall) Do(f func(string, string, string, api.StorageVolumePut, string) error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUpdateStoragePoolVolumeCall) DoAndReturn(f func(string, string, string, api.StorageVolumePut, string) error) *MockServerUpdateStoragePoolVolumeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseProject mocks base method. @@ -842,9 +2090,33 @@ func (m *MockServer) UseProject(arg0 string) { } // UseProject indicates an expected call of UseProject. -func (mr *MockServerMockRecorder) UseProject(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UseProject(arg0 any) *MockServerUseProjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockServer)(nil).UseProject), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseProject", reflect.TypeOf((*MockServer)(nil).UseProject), arg0) + return &MockServerUseProjectCall{Call: call} +} + +// MockServerUseProjectCall wrap *gomock.Call +type MockServerUseProjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUseProjectCall) Return() *MockServerUseProjectCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUseProjectCall) Do(f func(string)) *MockServerUseProjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUseProjectCall) DoAndReturn(f func(string)) *MockServerUseProjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UseTargetServer mocks base method. @@ -857,9 +2129,33 @@ func (m *MockServer) UseTargetServer(arg0 string) (*lxd0.Server, error) { } // UseTargetServer indicates an expected call of UseTargetServer. -func (mr *MockServerMockRecorder) UseTargetServer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) UseTargetServer(arg0 any) *MockServerUseTargetServerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTargetServer", reflect.TypeOf((*MockServer)(nil).UseTargetServer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseTargetServer", reflect.TypeOf((*MockServer)(nil).UseTargetServer), arg0) + return &MockServerUseTargetServerCall{Call: call} +} + +// MockServerUseTargetServerCall wrap *gomock.Call +type MockServerUseTargetServerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerUseTargetServerCall) Return(arg0 *lxd0.Server, arg1 error) *MockServerUseTargetServerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerUseTargetServerCall) Do(f func(string) (*lxd0.Server, error)) *MockServerUseTargetServerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerUseTargetServerCall) DoAndReturn(f func(string) (*lxd0.Server, error)) *MockServerUseTargetServerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // VerifyNetworkDevice mocks base method. @@ -871,9 +2167,33 @@ func (m *MockServer) VerifyNetworkDevice(arg0 *api.Profile, arg1 string) error { } // VerifyNetworkDevice indicates an expected call of VerifyNetworkDevice. -func (mr *MockServerMockRecorder) VerifyNetworkDevice(arg0, arg1 any) *gomock.Call { +func (mr *MockServerMockRecorder) VerifyNetworkDevice(arg0, arg1 any) *MockServerVerifyNetworkDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyNetworkDevice", reflect.TypeOf((*MockServer)(nil).VerifyNetworkDevice), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyNetworkDevice", reflect.TypeOf((*MockServer)(nil).VerifyNetworkDevice), arg0, arg1) + return &MockServerVerifyNetworkDeviceCall{Call: call} +} + +// MockServerVerifyNetworkDeviceCall wrap *gomock.Call +type MockServerVerifyNetworkDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerVerifyNetworkDeviceCall) Return(arg0 error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerVerifyNetworkDeviceCall) Do(f func(*api.Profile, string) error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerVerifyNetworkDeviceCall) DoAndReturn(f func(*api.Profile, string) error) *MockServerVerifyNetworkDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteContainer mocks base method. @@ -885,7 +2205,31 @@ func (m *MockServer) WriteContainer(arg0 *lxd0.Container) error { } // WriteContainer indicates an expected call of WriteContainer. -func (mr *MockServerMockRecorder) WriteContainer(arg0 any) *gomock.Call { +func (mr *MockServerMockRecorder) WriteContainer(arg0 any) *MockServerWriteContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteContainer", reflect.TypeOf((*MockServer)(nil).WriteContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteContainer", reflect.TypeOf((*MockServer)(nil).WriteContainer), arg0) + return &MockServerWriteContainerCall{Call: call} +} + +// MockServerWriteContainerCall wrap *gomock.Call +type MockServerWriteContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServerWriteContainerCall) Return(arg0 error) *MockServerWriteContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServerWriteContainerCall) Do(f func(*lxd0.Container) error) *MockServerWriteContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServerWriteContainerCall) DoAndReturn(f func(*lxd0.Container) error) *MockServerWriteContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrades/upgradevalidation/mocks/state_mock.go b/internal/upgrades/upgradevalidation/mocks/state_mock.go index bb47e64a122..ff1f16029d2 100644 --- a/internal/upgrades/upgradevalidation/mocks/state_mock.go +++ b/internal/upgrades/upgradevalidation/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/upgrades/upgradevalidation StatePool,State,Model +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/upgrades/upgradevalidation StatePool,State,Model // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockStatePool) MongoVersion() (string, error) { } // MongoVersion indicates an expected call of MongoVersion. -func (mr *MockStatePoolMockRecorder) MongoVersion() *gomock.Call { +func (mr *MockStatePoolMockRecorder) MongoVersion() *MockStatePoolMongoVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockStatePool)(nil).MongoVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoVersion", reflect.TypeOf((*MockStatePool)(nil).MongoVersion)) + return &MockStatePoolMongoVersionCall{Call: call} +} + +// MockStatePoolMongoVersionCall wrap *gomock.Call +type MockStatePoolMongoVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePoolMongoVersionCall) Return(arg0 string, arg1 error) *MockStatePoolMongoVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePoolMongoVersionCall) Do(f func() (string, error)) *MockStatePoolMongoVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePoolMongoVersionCall) DoAndReturn(f func() (string, error)) *MockStatePoolMongoVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockState is a mock of State interface. @@ -90,9 +114,33 @@ func (m *MockState) HasUpgradeSeriesLocks() (bool, error) { } // HasUpgradeSeriesLocks indicates an expected call of HasUpgradeSeriesLocks. -func (mr *MockStateMockRecorder) HasUpgradeSeriesLocks() *gomock.Call { +func (mr *MockStateMockRecorder) HasUpgradeSeriesLocks() *MockStateHasUpgradeSeriesLocksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockState)(nil).HasUpgradeSeriesLocks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasUpgradeSeriesLocks", reflect.TypeOf((*MockState)(nil).HasUpgradeSeriesLocks)) + return &MockStateHasUpgradeSeriesLocksCall{Call: call} +} + +// MockStateHasUpgradeSeriesLocksCall wrap *gomock.Call +type MockStateHasUpgradeSeriesLocksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateHasUpgradeSeriesLocksCall) Return(arg0 bool, arg1 error) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateHasUpgradeSeriesLocksCall) Do(f func() (bool, error)) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateHasUpgradeSeriesLocksCall) DoAndReturn(f func() (bool, error)) *MockStateHasUpgradeSeriesLocksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineCountForBase mocks base method. @@ -109,9 +157,33 @@ func (m *MockState) MachineCountForBase(arg0 ...state.Base) (map[string]int, err } // MachineCountForBase indicates an expected call of MachineCountForBase. -func (mr *MockStateMockRecorder) MachineCountForBase(arg0 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) MachineCountForBase(arg0 ...any) *MockStateMachineCountForBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockState)(nil).MachineCountForBase), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineCountForBase", reflect.TypeOf((*MockState)(nil).MachineCountForBase), arg0...) + return &MockStateMachineCountForBaseCall{Call: call} +} + +// MockStateMachineCountForBaseCall wrap *gomock.Call +type MockStateMachineCountForBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMachineCountForBaseCall) Return(arg0 map[string]int, arg1 error) *MockStateMachineCountForBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMachineCountForBaseCall) Do(f func(...state.Base) (map[string]int, error)) *MockStateMachineCountForBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMachineCountForBaseCall) DoAndReturn(f func(...state.Base) (map[string]int, error)) *MockStateMachineCountForBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoCurrentStatus mocks base method. @@ -124,9 +196,33 @@ func (m *MockState) MongoCurrentStatus() (*replicaset.Status, error) { } // MongoCurrentStatus indicates an expected call of MongoCurrentStatus. -func (mr *MockStateMockRecorder) MongoCurrentStatus() *gomock.Call { +func (mr *MockStateMockRecorder) MongoCurrentStatus() *MockStateMongoCurrentStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockState)(nil).MongoCurrentStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoCurrentStatus", reflect.TypeOf((*MockState)(nil).MongoCurrentStatus)) + return &MockStateMongoCurrentStatusCall{Call: call} +} + +// MockStateMongoCurrentStatusCall wrap *gomock.Call +type MockStateMongoCurrentStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMongoCurrentStatusCall) Return(arg0 *replicaset.Status, arg1 error) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMongoCurrentStatusCall) Do(f func() (*replicaset.Status, error)) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMongoCurrentStatusCall) DoAndReturn(f func() (*replicaset.Status, error)) *MockStateMongoCurrentStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModel is a mock of Model interface. @@ -162,9 +258,33 @@ func (m *MockModel) AgentVersion() (version.Number, error) { } // AgentVersion indicates an expected call of AgentVersion. -func (mr *MockModelMockRecorder) AgentVersion() *gomock.Call { +func (mr *MockModelMockRecorder) AgentVersion() *MockModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentVersion", reflect.TypeOf((*MockModel)(nil).AgentVersion)) + return &MockModelAgentVersionCall{Call: call} +} + +// MockModelAgentVersionCall wrap *gomock.Call +type MockModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelAgentVersionCall) Return(arg0 version.Number, arg1 error) *MockModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelAgentVersionCall) Do(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelAgentVersionCall) DoAndReturn(f func() (version.Number, error)) *MockModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MigrationMode mocks base method. @@ -176,9 +296,33 @@ func (m *MockModel) MigrationMode() state.MigrationMode { } // MigrationMode indicates an expected call of MigrationMode. -func (mr *MockModelMockRecorder) MigrationMode() *gomock.Call { +func (mr *MockModelMockRecorder) MigrationMode() *MockModelMigrationModeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrationMode", reflect.TypeOf((*MockModel)(nil).MigrationMode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrationMode", reflect.TypeOf((*MockModel)(nil).MigrationMode)) + return &MockModelMigrationModeCall{Call: call} +} + +// MockModelMigrationModeCall wrap *gomock.Call +type MockModelMigrationModeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelMigrationModeCall) Return(arg0 state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelMigrationModeCall) Do(f func() state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelMigrationModeCall) DoAndReturn(f func() state.MigrationMode) *MockModelMigrationModeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -190,9 +334,33 @@ func (m *MockModel) Name() string { } // Name indicates an expected call of Name. -func (mr *MockModelMockRecorder) Name() *gomock.Call { +func (mr *MockModelMockRecorder) Name() *MockModelNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockModel)(nil).Name)) + return &MockModelNameCall{Call: call} +} + +// MockModelNameCall wrap *gomock.Call +type MockModelNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelNameCall) Return(arg0 string) *MockModelNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelNameCall) Do(f func() string) *MockModelNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelNameCall) DoAndReturn(f func() string) *MockModelNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Owner mocks base method. @@ -204,7 +372,31 @@ func (m *MockModel) Owner() names.UserTag { } // Owner indicates an expected call of Owner. -func (mr *MockModelMockRecorder) Owner() *gomock.Call { +func (mr *MockModelMockRecorder) Owner() *MockModelOwnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Owner", reflect.TypeOf((*MockModel)(nil).Owner)) + return &MockModelOwnerCall{Call: call} +} + +// MockModelOwnerCall wrap *gomock.Call +type MockModelOwnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOwnerCall) Return(arg0 names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOwnerCall) Do(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOwnerCall) DoAndReturn(f func() names.UserTag) *MockModelOwnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgrades/upgradevalidation/package_test.go b/internal/upgrades/upgradevalidation/package_test.go index 2f2e9d3c46b..4b5c6a1f542 100644 --- a/internal/upgrades/upgradevalidation/package_test.go +++ b/internal/upgrades/upgradevalidation/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/upgrades/upgradevalidation StatePool,State,Model -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/lxd_mock.go github.com/juju/juju/internal/provider/lxd ServerFactory,Server +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/upgrades/upgradevalidation StatePool,State,Model +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/lxd_mock.go github.com/juju/juju/internal/provider/lxd ServerFactory,Server func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/upgradesteps/agent_mock_test.go b/internal/upgradesteps/agent_mock_test.go index f270687a724..df593f6cb90 100644 --- a/internal/upgradesteps/agent_mock_test.go +++ b/internal/upgradesteps/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +// mockgen -typed -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter // // Package upgradesteps is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -72,9 +96,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -110,9 +158,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -125,9 +197,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -139,9 +235,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -153,9 +273,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -167,9 +311,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -181,9 +349,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -195,9 +387,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -209,9 +425,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -224,9 +464,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -238,9 +502,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -252,9 +540,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -266,9 +578,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -280,9 +616,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -294,9 +654,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -308,9 +692,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -323,9 +731,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -337,9 +769,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -351,9 +807,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -365,9 +845,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -379,9 +883,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -393,9 +921,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -407,9 +959,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -421,9 +997,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -435,9 +1035,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -449,9 +1073,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -463,9 +1111,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -477,9 +1149,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -492,9 +1188,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -506,9 +1226,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -520,9 +1264,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -534,9 +1302,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -548,9 +1340,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -562,9 +1378,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -577,9 +1417,33 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSetter is a mock of ConfigSetter interface. @@ -615,9 +1479,33 @@ func (m *MockConfigSetter) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigSetterMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIAddresses() *MockConfigSetterAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + return &MockConfigSetterAPIAddressesCall{Call: call} +} + +// MockConfigSetterAPIAddressesCall wrap *gomock.Call +type MockConfigSetterAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -630,9 +1518,33 @@ func (m *MockConfigSetter) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigSetterMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIInfo() *MockConfigSetterAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + return &MockConfigSetterAPIInfoCall{Call: call} +} + +// MockConfigSetterAPIInfoCall wrap *gomock.Call +type MockConfigSetterAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -644,9 +1556,33 @@ func (m *MockConfigSetter) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *MockConfigSetterAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + return &MockConfigSetterAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -658,9 +1594,33 @@ func (m *MockConfigSetter) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *MockConfigSetterAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigSetterAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -672,9 +1632,33 @@ func (m *MockConfigSetter) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigSetterMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) CACert() *MockConfigSetterCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + return &MockConfigSetterCACertCall{Call: call} +} + +// MockConfigSetterCACertCall wrap *gomock.Call +type MockConfigSetterCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCACertCall) Return(arg0 string) *MockConfigSetterCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCACertCall) Do(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCACertCall) DoAndReturn(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clone mocks base method. @@ -686,9 +1670,33 @@ func (m *MockConfigSetter) Clone() agent.Config { } // Clone indicates an expected call of Clone. -func (mr *MockConfigSetterMockRecorder) Clone() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Clone() *MockConfigSetterCloneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + return &MockConfigSetterCloneCall{Call: call} +} + +// MockConfigSetterCloneCall wrap *gomock.Call +type MockConfigSetterCloneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCloneCall) Return(arg0 agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCloneCall) Do(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCloneCall) DoAndReturn(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -700,9 +1708,33 @@ func (m *MockConfigSetter) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigSetterMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Controller() *MockConfigSetterControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + return &MockConfigSetterControllerCall{Call: call} +} + +// MockConfigSetterControllerCall wrap *gomock.Call +type MockConfigSetterControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterControllerCall) Return(arg0 names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterControllerCall) Do(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -714,9 +1746,33 @@ func (m *MockConfigSetter) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigSetterMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DataDir() *MockConfigSetterDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + return &MockConfigSetterDataDirCall{Call: call} +} + +// MockConfigSetterDataDirCall wrap *gomock.Call +type MockConfigSetterDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDataDirCall) Return(arg0 string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDataDirCall) Do(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDataDirCall) DoAndReturn(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -728,9 +1784,33 @@ func (m *MockConfigSetter) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigSetterMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Dir() *MockConfigSetterDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + return &MockConfigSetterDirCall{Call: call} +} + +// MockConfigSetterDirCall wrap *gomock.Call +type MockConfigSetterDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDirCall) Return(arg0 string) *MockConfigSetterDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDirCall) Do(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDirCall) DoAndReturn(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -743,9 +1823,33 @@ func (m *MockConfigSetter) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigSetterMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DqlitePort() *MockConfigSetterDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + return &MockConfigSetterDqlitePortCall{Call: call} +} + +// MockConfigSetterDqlitePortCall wrap *gomock.Call +type MockConfigSetterDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDqlitePortCall) Do(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -757,9 +1861,33 @@ func (m *MockConfigSetter) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigSetterMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Jobs() *MockConfigSetterJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + return &MockConfigSetterJobsCall{Call: call} +} + +// MockConfigSetterJobsCall wrap *gomock.Call +type MockConfigSetterJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJobsCall) Return(arg0 []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJobsCall) Do(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -771,9 +1899,33 @@ func (m *MockConfigSetter) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *MockConfigSetterJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + return &MockConfigSetterJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJujuDBSnapChannelCall) Return(arg0 string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJujuDBSnapChannelCall) Do(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -785,9 +1937,33 @@ func (m *MockConfigSetter) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigSetterMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LogDir() *MockConfigSetterLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + return &MockConfigSetterLogDirCall{Call: call} +} + +// MockConfigSetterLogDirCall wrap *gomock.Call +type MockConfigSetterLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLogDirCall) Return(arg0 string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLogDirCall) Do(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLogDirCall) DoAndReturn(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -799,9 +1975,33 @@ func (m *MockConfigSetter) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigSetterMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LoggingConfig() *MockConfigSetterLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + return &MockConfigSetterLoggingConfigCall{Call: call} +} + +// MockConfigSetterLoggingConfigCall wrap *gomock.Call +type MockConfigSetterLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLoggingConfigCall) Return(arg0 string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLoggingConfigCall) Do(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLoggingConfigCall) DoAndReturn(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -813,9 +2013,33 @@ func (m *MockConfigSetter) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *MockConfigSetterMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + return &MockConfigSetterMetricsSpoolDirCall{Call: call} +} + +// MockConfigSetterMetricsSpoolDirCall wrap *gomock.Call +type MockConfigSetterMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMetricsSpoolDirCall) Return(arg0 string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMetricsSpoolDirCall) Do(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -827,9 +2051,33 @@ func (m *MockConfigSetter) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigSetterMockRecorder) Model() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Model() *MockConfigSetterModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + return &MockConfigSetterModelCall{Call: call} +} + +// MockConfigSetterModelCall wrap *gomock.Call +type MockConfigSetterModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterModelCall) Return(arg0 names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterModelCall) Do(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -842,9 +2090,33 @@ func (m *MockConfigSetter) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigSetterMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoInfo() *MockConfigSetterMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + return &MockConfigSetterMongoInfoCall{Call: call} +} + +// MockConfigSetterMongoInfoCall wrap *gomock.Call +type MockConfigSetterMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -856,9 +2128,33 @@ func (m *MockConfigSetter) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *MockConfigSetterMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + return &MockConfigSetterMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -870,9 +2166,33 @@ func (m *MockConfigSetter) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigSetterMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Nonce() *MockConfigSetterNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + return &MockConfigSetterNonceCall{Call: call} +} + +// MockConfigSetterNonceCall wrap *gomock.Call +type MockConfigSetterNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterNonceCall) Return(arg0 string) *MockConfigSetterNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterNonceCall) Do(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterNonceCall) DoAndReturn(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -884,9 +2204,33 @@ func (m *MockConfigSetter) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *MockConfigSetterObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + return &MockConfigSetterObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -898,9 +2242,33 @@ func (m *MockConfigSetter) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigSetterMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OldPassword() *MockConfigSetterOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + return &MockConfigSetterOldPasswordCall{Call: call} +} + +// MockConfigSetterOldPasswordCall wrap *gomock.Call +type MockConfigSetterOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOldPasswordCall) Return(arg0 string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOldPasswordCall) Do(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOldPasswordCall) DoAndReturn(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -912,9 +2280,33 @@ func (m *MockConfigSetter) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *MockConfigSetterOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + return &MockConfigSetterOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -926,9 +2318,33 @@ func (m *MockConfigSetter) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *MockConfigSetterOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + return &MockConfigSetterOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEndpointCall) Do(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -940,9 +2356,33 @@ func (m *MockConfigSetter) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *MockConfigSetterOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + return &MockConfigSetterOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -954,9 +2394,33 @@ func (m *MockConfigSetter) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *MockConfigSetterOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + return &MockConfigSetterOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -968,9 +2432,33 @@ func (m *MockConfigSetter) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *MockConfigSetterOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + return &MockConfigSetterOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -982,9 +2470,33 @@ func (m *MockConfigSetter) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *MockConfigSetterQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + return &MockConfigSetterQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingEnabledCall) Return(arg0 bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingEnabledCall) Do(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -996,9 +2508,33 @@ func (m *MockConfigSetter) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *MockConfigSetterQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + return &MockConfigSetterQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAPIHostPorts mocks base method. @@ -1010,9 +2546,33 @@ func (m *MockConfigSetter) SetAPIHostPorts(arg0 []network.HostPorts) error { } // SetAPIHostPorts indicates an expected call of SetAPIHostPorts. -func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *MockConfigSetterSetAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + return &MockConfigSetterSetAPIHostPortsCall{Call: call} +} + +// MockConfigSetterSetAPIHostPortsCall wrap *gomock.Call +type MockConfigSetterSetAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetAPIHostPortsCall) Return(arg0 error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetAPIHostPortsCall) Do(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetAPIHostPortsCall) DoAndReturn(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCACert mocks base method. @@ -1022,9 +2582,33 @@ func (m *MockConfigSetter) SetCACert(arg0 string) { } // SetCACert indicates an expected call of SetCACert. -func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *MockConfigSetterSetCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + return &MockConfigSetterSetCACertCall{Call: call} +} + +// MockConfigSetterSetCACertCall wrap *gomock.Call +type MockConfigSetterSetCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetCACertCall) Return() *MockConfigSetterSetCACertCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetCACertCall) Do(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetCACertCall) DoAndReturn(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerAPIPort mocks base method. @@ -1034,9 +2618,33 @@ func (m *MockConfigSetter) SetControllerAPIPort(arg0 int) { } // SetControllerAPIPort indicates an expected call of SetControllerAPIPort. -func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *MockConfigSetterSetControllerAPIPortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + return &MockConfigSetterSetControllerAPIPortCall{Call: call} +} + +// MockConfigSetterSetControllerAPIPortCall wrap *gomock.Call +type MockConfigSetterSetControllerAPIPortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetControllerAPIPortCall) Return() *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetControllerAPIPortCall) Do(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetControllerAPIPortCall) DoAndReturn(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetJujuDBSnapChannel mocks base method. @@ -1046,9 +2654,33 @@ func (m *MockConfigSetter) SetJujuDBSnapChannel(arg0 string) { } // SetJujuDBSnapChannel indicates an expected call of SetJujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *MockConfigSetterSetJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + return &MockConfigSetterSetJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterSetJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterSetJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Return() *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Do(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetJujuDBSnapChannelCall) DoAndReturn(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLoggingConfig mocks base method. @@ -1058,9 +2690,33 @@ func (m *MockConfigSetter) SetLoggingConfig(arg0 string) { } // SetLoggingConfig indicates an expected call of SetLoggingConfig. -func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *MockConfigSetterSetLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + return &MockConfigSetterSetLoggingConfigCall{Call: call} +} + +// MockConfigSetterSetLoggingConfigCall wrap *gomock.Call +type MockConfigSetterSetLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetLoggingConfigCall) Return() *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetLoggingConfigCall) Do(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetLoggingConfigCall) DoAndReturn(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMongoMemoryProfile mocks base method. @@ -1070,9 +2726,33 @@ func (m *MockConfigSetter) SetMongoMemoryProfile(arg0 mongo.MemoryProfile) { } // SetMongoMemoryProfile indicates an expected call of SetMongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *MockConfigSetterSetMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + return &MockConfigSetterSetMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterSetMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterSetMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetMongoMemoryProfileCall) Return() *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetMongoMemoryProfileCall) Do(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetMongoMemoryProfileCall) DoAndReturn(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetObjectStoreType mocks base method. @@ -1082,9 +2762,33 @@ func (m *MockConfigSetter) SetObjectStoreType(arg0 objectstore.BackendType) { } // SetObjectStoreType indicates an expected call of SetObjectStoreType. -func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *MockConfigSetterSetObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + return &MockConfigSetterSetObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterSetObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterSetObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetObjectStoreTypeCall) Return() *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetObjectStoreTypeCall) Do(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetObjectStoreTypeCall) DoAndReturn(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOldPassword mocks base method. @@ -1094,9 +2798,33 @@ func (m *MockConfigSetter) SetOldPassword(arg0 string) { } // SetOldPassword indicates an expected call of SetOldPassword. -func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *MockConfigSetterSetOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + return &MockConfigSetterSetOldPasswordCall{Call: call} +} + +// MockConfigSetterSetOldPasswordCall wrap *gomock.Call +type MockConfigSetterSetOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOldPasswordCall) Return() *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOldPasswordCall) Do(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOldPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEnabled mocks base method. @@ -1106,9 +2834,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEnabled(arg0 bool) { } // SetOpenTelemetryEnabled indicates an expected call of SetOpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *MockConfigSetterSetOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + return &MockConfigSetterSetOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Return() *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEndpoint mocks base method. @@ -1118,9 +2870,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEndpoint(arg0 string) { } // SetOpenTelemetryEndpoint indicates an expected call of SetOpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *MockConfigSetterSetOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + return &MockConfigSetterSetOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Return() *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Do(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) DoAndReturn(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryInsecure mocks base method. @@ -1130,9 +2906,33 @@ func (m *MockConfigSetter) SetOpenTelemetryInsecure(arg0 bool) { } // SetOpenTelemetryInsecure indicates an expected call of SetOpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *MockConfigSetterSetOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + return &MockConfigSetterSetOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Return() *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetrySampleRatio mocks base method. @@ -1142,9 +2942,33 @@ func (m *MockConfigSetter) SetOpenTelemetrySampleRatio(arg0 float64) { } // SetOpenTelemetrySampleRatio indicates an expected call of SetOpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *MockConfigSetterSetOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + return &MockConfigSetterSetOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Return() *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Do(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) DoAndReturn(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryStackTraces mocks base method. @@ -1154,9 +2978,33 @@ func (m *MockConfigSetter) SetOpenTelemetryStackTraces(arg0 bool) { } // SetOpenTelemetryStackTraces indicates an expected call of SetOpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *MockConfigSetterSetOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + return &MockConfigSetterSetOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Return() *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -1166,9 +3014,33 @@ func (m *MockConfigSetter) SetPassword(arg0 string) { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *MockConfigSetterSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + return &MockConfigSetterSetPasswordCall{Call: call} +} + +// MockConfigSetterSetPasswordCall wrap *gomock.Call +type MockConfigSetterSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetPasswordCall) Return() *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetPasswordCall) Do(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingEnabled mocks base method. @@ -1178,9 +3050,33 @@ func (m *MockConfigSetter) SetQueryTracingEnabled(arg0 bool) { } // SetQueryTracingEnabled indicates an expected call of SetQueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *MockConfigSetterSetQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + return &MockConfigSetterSetQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterSetQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingEnabledCall) Return() *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingEnabledCall) Do(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingThreshold mocks base method. @@ -1190,9 +3086,33 @@ func (m *MockConfigSetter) SetQueryTracingThreshold(arg0 time.Duration) { } // SetQueryTracingThreshold indicates an expected call of SetQueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *MockConfigSetterSetQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + return &MockConfigSetterSetQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterSetQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingThresholdCall) Return() *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingThresholdCall) Do(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingThresholdCall) DoAndReturn(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStateServingInfo mocks base method. @@ -1202,9 +3122,33 @@ func (m *MockConfigSetter) SetStateServingInfo(arg0 controller.StateServingInfo) } // SetStateServingInfo indicates an expected call of SetStateServingInfo. -func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *MockConfigSetterSetStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + return &MockConfigSetterSetStateServingInfoCall{Call: call} +} + +// MockConfigSetterSetStateServingInfoCall wrap *gomock.Call +type MockConfigSetterSetStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetStateServingInfoCall) Return() *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetStateServingInfoCall) Do(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetStateServingInfoCall) DoAndReturn(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradedToVersion mocks base method. @@ -1214,9 +3158,33 @@ func (m *MockConfigSetter) SetUpgradedToVersion(arg0 version.Number) { } // SetUpgradedToVersion indicates an expected call of SetUpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *MockConfigSetterSetUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + return &MockConfigSetterSetUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterSetUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterSetUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetUpgradedToVersionCall) Return() *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetUpgradedToVersionCall) Do(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetUpgradedToVersionCall) DoAndReturn(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetValue mocks base method. @@ -1226,9 +3194,33 @@ func (m *MockConfigSetter) SetValue(arg0, arg1 string) { } // SetValue indicates an expected call of SetValue. -func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *MockConfigSetterSetValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + return &MockConfigSetterSetValueCall{Call: call} +} + +// MockConfigSetterSetValueCall wrap *gomock.Call +type MockConfigSetterSetValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetValueCall) Return() *MockConfigSetterSetValueCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetValueCall) Do(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetValueCall) DoAndReturn(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -1241,9 +3233,33 @@ func (m *MockConfigSetter) StateServingInfo() (controller.StateServingInfo, bool } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigSetterMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) StateServingInfo() *MockConfigSetterStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + return &MockConfigSetterStateServingInfoCall{Call: call} +} + +// MockConfigSetterStateServingInfoCall wrap *gomock.Call +type MockConfigSetterStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -1255,9 +3271,33 @@ func (m *MockConfigSetter) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *MockConfigSetterSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + return &MockConfigSetterSystemIdentityPathCall{Call: call} +} + +// MockConfigSetterSystemIdentityPathCall wrap *gomock.Call +type MockConfigSetterSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSystemIdentityPathCall) Return(arg0 string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSystemIdentityPathCall) Do(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1269,9 +3309,33 @@ func (m *MockConfigSetter) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigSetterMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Tag() *MockConfigSetterTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + return &MockConfigSetterTagCall{Call: call} +} + +// MockConfigSetterTagCall wrap *gomock.Call +type MockConfigSetterTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTagCall) Return(arg0 names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTagCall) Do(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTagCall) DoAndReturn(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -1283,9 +3347,33 @@ func (m *MockConfigSetter) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigSetterMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) TransientDataDir() *MockConfigSetterTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + return &MockConfigSetterTransientDataDirCall{Call: call} +} + +// MockConfigSetterTransientDataDirCall wrap *gomock.Call +type MockConfigSetterTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTransientDataDirCall) Return(arg0 string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTransientDataDirCall) Do(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTransientDataDirCall) DoAndReturn(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -1297,9 +3385,33 @@ func (m *MockConfigSetter) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *MockConfigSetterUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + return &MockConfigSetterUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterUpgradedToVersionCall) Do(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -1311,9 +3423,33 @@ func (m *MockConfigSetter) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *MockConfigSetterValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + return &MockConfigSetterValueCall{Call: call} +} + +// MockConfigSetterValueCall wrap *gomock.Call +type MockConfigSetterValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterValueCall) Return(arg0 string) *MockConfigSetterValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterValueCall) Do(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterValueCall) DoAndReturn(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -1326,7 +3462,31 @@ func (m *MockConfigSetter) WriteCommands(arg0 shell.Renderer) ([]string, error) } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *MockConfigSetterWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + return &MockConfigSetterWriteCommandsCall{Call: call} +} + +// MockConfigSetterWriteCommandsCall wrap *gomock.Call +type MockConfigSetterWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgradesteps/api_mock_test.go b/internal/upgradesteps/api_mock_test.go index 52c400b8a1c..73d657a2198 100644 --- a/internal/upgradesteps/api_mock_test.go +++ b/internal/upgradesteps/api_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller // // Package upgradesteps is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgradesteps/clock_mock_test.go b/internal/upgradesteps/clock_mock_test.go index 0db2c8a4817..b22202afc76 100644 --- a/internal/upgradesteps/clock_mock_test.go +++ b/internal/upgradesteps/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock // // Package upgradesteps is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgradesteps/lock_mock_test.go b/internal/upgradesteps/lock_mock_test.go index cebf5e89935..28a5aad29e8 100644 --- a/internal/upgradesteps/lock_mock_test.go +++ b/internal/upgradesteps/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +// mockgen -typed -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock // // Package upgradesteps is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLock) IsUnlocked() bool { } // IsUnlocked indicates an expected call of IsUnlocked. -func (mr *MockLockMockRecorder) IsUnlocked() *gomock.Call { +func (mr *MockLockMockRecorder) IsUnlocked() *MockLockIsUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + return &MockLockIsUnlockedCall{Call: call} +} + +// MockLockIsUnlockedCall wrap *gomock.Call +type MockLockIsUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockIsUnlockedCall) Return(arg0 bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockIsUnlockedCall) Do(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockIsUnlockedCall) DoAndReturn(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -59,9 +83,33 @@ func (m *MockLock) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockLockMockRecorder) Unlock() *gomock.Call { +func (mr *MockLockMockRecorder) Unlock() *MockLockUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + return &MockLockUnlockCall{Call: call} +} + +// MockLockUnlockCall wrap *gomock.Call +type MockLockUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockCall) Return() *MockLockUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockCall) Do(f func()) *MockLockUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockCall) DoAndReturn(f func()) *MockLockUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlocked mocks base method. @@ -73,7 +121,31 @@ func (m *MockLock) Unlocked() <-chan struct{} { } // Unlocked indicates an expected call of Unlocked. -func (mr *MockLockMockRecorder) Unlocked() *gomock.Call { +func (mr *MockLockMockRecorder) Unlocked() *MockLockUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + return &MockLockUnlockedCall{Call: call} +} + +// MockLockUnlockedCall wrap *gomock.Call +type MockLockUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockedCall) Return(arg0 <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockedCall) Do(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockedCall) DoAndReturn(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/upgradesteps/package_test.go b/internal/upgradesteps/package_test.go index 81336afa7e1..5600a4bfd31 100644 --- a/internal/upgradesteps/package_test.go +++ b/internal/upgradesteps/package_test.go @@ -19,11 +19,11 @@ import ( jujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/upgradesteps/status_mock_test.go b/internal/upgradesteps/status_mock_test.go index f4dcb5eaee5..8ac7ce7bafb 100644 --- a/internal/upgradesteps/status_mock_test.go +++ b/internal/upgradesteps/status_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter +// mockgen -typed -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter // // Package upgradesteps is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockStatusSetter) SetStatus(arg0 status.Status, arg1 string, arg2 map[s } // SetStatus indicates an expected call of SetStatus. -func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockStatusSetterSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + return &MockStatusSetterSetStatusCall{Call: call} +} + +// MockStatusSetterSetStatusCall wrap *gomock.Call +type MockStatusSetterSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusSetterSetStatusCall) Return(arg0 error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusSetterSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusSetterSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/apiaddressupdater/mocks/facade_mock.go b/internal/worker/apiaddressupdater/mocks/facade_mock.go index dcb6f3809d1..0369449cf58 100644 --- a/internal/worker/apiaddressupdater/mocks/facade_mock.go +++ b/internal/worker/apiaddressupdater/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/apiaddressupdater APIAddresser +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/apiaddressupdater APIAddresser // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockAPIAddresser) APIHostPorts() ([]network.ProviderHostPorts, error) { } // APIHostPorts indicates an expected call of APIHostPorts. -func (mr *MockAPIAddresserMockRecorder) APIHostPorts() *gomock.Call { +func (mr *MockAPIAddresserMockRecorder) APIHostPorts() *MockAPIAddresserAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPorts", reflect.TypeOf((*MockAPIAddresser)(nil).APIHostPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPorts", reflect.TypeOf((*MockAPIAddresser)(nil).APIHostPorts)) + return &MockAPIAddresserAPIHostPortsCall{Call: call} +} + +// MockAPIAddresserAPIHostPortsCall wrap *gomock.Call +type MockAPIAddresserAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIAddresserAPIHostPortsCall) Return(arg0 []network.ProviderHostPorts, arg1 error) *MockAPIAddresserAPIHostPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIAddresserAPIHostPortsCall) Do(f func() ([]network.ProviderHostPorts, error)) *MockAPIAddresserAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIAddresserAPIHostPortsCall) DoAndReturn(f func() ([]network.ProviderHostPorts, error)) *MockAPIAddresserAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchAPIHostPorts mocks base method. @@ -65,7 +89,31 @@ func (m *MockAPIAddresser) WatchAPIHostPorts() (watcher.Watcher[struct{}], error } // WatchAPIHostPorts indicates an expected call of WatchAPIHostPorts. -func (mr *MockAPIAddresserMockRecorder) WatchAPIHostPorts() *gomock.Call { +func (mr *MockAPIAddresserMockRecorder) WatchAPIHostPorts() *MockAPIAddresserWatchAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAPIHostPorts", reflect.TypeOf((*MockAPIAddresser)(nil).WatchAPIHostPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAPIHostPorts", reflect.TypeOf((*MockAPIAddresser)(nil).WatchAPIHostPorts)) + return &MockAPIAddresserWatchAPIHostPortsCall{Call: call} +} + +// MockAPIAddresserWatchAPIHostPortsCall wrap *gomock.Call +type MockAPIAddresserWatchAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPIAddresserWatchAPIHostPortsCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockAPIAddresserWatchAPIHostPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPIAddresserWatchAPIHostPortsCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockAPIAddresserWatchAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPIAddresserWatchAPIHostPortsCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockAPIAddresserWatchAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/apiaddressupdater/package_test.go b/internal/worker/apiaddressupdater/package_test.go index c0eb87e705c..e4118d6dbfa 100644 --- a/internal/worker/apiaddressupdater/package_test.go +++ b/internal/worker/apiaddressupdater/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/apiaddressupdater APIAddresser +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/apiaddressupdater APIAddresser func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/apiserver/controllerconfig_mock_test.go b/internal/worker/apiserver/controllerconfig_mock_test.go index 023e588d7fa..5bca130bac7 100644 --- a/internal/worker/apiserver/controllerconfig_mock_test.go +++ b/internal/worker/apiserver/controllerconfig_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package apiserver_test -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/apiserver ControllerConfigService +// mockgen -typed -package apiserver_test -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/apiserver ControllerConfigService // // Package apiserver_test is a generated GoMock package. @@ -50,7 +50,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/apiserver/package_test.go b/internal/worker/apiserver/package_test.go index 5dabf307901..bed10db50ce 100644 --- a/internal/worker/apiserver/package_test.go +++ b/internal/worker/apiserver/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package apiserver_test -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/apiserver ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package apiserver_test -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package apiserver_test -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/apiserver ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package apiserver_test -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/apiserver/service_mock_test.go b/internal/worker/apiserver/service_mock_test.go index ad8571877a3..e77813d12f1 100644 --- a/internal/worker/apiserver/service_mock_test.go +++ b/internal/worker/apiserver/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package apiserver_test -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter +// mockgen -typed -package apiserver_test -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ServiceFactoryGetter // // Package apiserver_test is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockServiceFactoryGetter) FactoryForModel(arg0 string) servicefactory.S } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryGetterFactoryForModelCall) Return(arg0 servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryGetterFactoryForModelCall) Do(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/auditconfigupdater/agent_mock_test.go b/internal/worker/auditconfigupdater/agent_mock_test.go index 93694e827d1..ff09cb6614c 100644 --- a/internal/worker/auditconfigupdater/agent_mock_test.go +++ b/internal/worker/auditconfigupdater/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package auditconfigupdater -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package auditconfigupdater -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config // // Package auditconfigupdater is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/auditconfigupdater/package_test.go b/internal/worker/auditconfigupdater/package_test.go index adab84a7c6b..1d85fef641b 100644 --- a/internal/worker/auditconfigupdater/package_test.go +++ b/internal/worker/auditconfigupdater/package_test.go @@ -14,8 +14,8 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package auditconfigupdater -destination servicefactory_mock_test.go github.com/juju/juju/internal/worker/auditconfigupdater ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package auditconfigupdater -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package auditconfigupdater -destination servicefactory_mock_test.go github.com/juju/juju/internal/worker/auditconfigupdater ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package auditconfigupdater -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/auditconfigupdater/servicefactory_mock_test.go b/internal/worker/auditconfigupdater/servicefactory_mock_test.go index 302caa800d9..38371543981 100644 --- a/internal/worker/auditconfigupdater/servicefactory_mock_test.go +++ b/internal/worker/auditconfigupdater/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package auditconfigupdater -destination servicefactory_mock_test.go github.com/juju/juju/internal/worker/auditconfigupdater ControllerConfigService +// mockgen -typed -package auditconfigupdater -destination servicefactory_mock_test.go github.com/juju/juju/internal/worker/auditconfigupdater ControllerConfigService // // Package auditconfigupdater is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockControllerConfigService) Watch() (watcher.Watcher[[]string], error) } // Watch indicates an expected call of Watch. -func (mr *MockControllerConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) Watch() *MockControllerConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + return &MockControllerConfigServiceWatchCall{Call: call} +} + +// MockControllerConfigServiceWatchCall wrap *gomock.Call +type MockControllerConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/authenticationworker/mocks/updater_mocks.go b/internal/worker/authenticationworker/mocks/updater_mocks.go index 5b9e1be8226..2054c07bebe 100644 --- a/internal/worker/authenticationworker/mocks/updater_mocks.go +++ b/internal/worker/authenticationworker/mocks/updater_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/updater_mocks.go github.com/juju/juju/internal/worker/authenticationworker Client +// mockgen -typed -package mocks -destination mocks/updater_mocks.go github.com/juju/juju/internal/worker/authenticationworker Client // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockClient) AuthorisedKeys(arg0 names.MachineTag) ([]string, error) { } // AuthorisedKeys indicates an expected call of AuthorisedKeys. -func (mr *MockClientMockRecorder) AuthorisedKeys(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) AuthorisedKeys(arg0 any) *MockClientAuthorisedKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorisedKeys", reflect.TypeOf((*MockClient)(nil).AuthorisedKeys), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorisedKeys", reflect.TypeOf((*MockClient)(nil).AuthorisedKeys), arg0) + return &MockClientAuthorisedKeysCall{Call: call} +} + +// MockClientAuthorisedKeysCall wrap *gomock.Call +type MockClientAuthorisedKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientAuthorisedKeysCall) Return(arg0 []string, arg1 error) *MockClientAuthorisedKeysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientAuthorisedKeysCall) Do(f func(names.MachineTag) ([]string, error)) *MockClientAuthorisedKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientAuthorisedKeysCall) DoAndReturn(f func(names.MachineTag) ([]string, error)) *MockClientAuthorisedKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchAuthorisedKeys mocks base method. @@ -65,7 +89,31 @@ func (m *MockClient) WatchAuthorisedKeys(arg0 names.MachineTag) (watcher.Watcher } // WatchAuthorisedKeys indicates an expected call of WatchAuthorisedKeys. -func (mr *MockClientMockRecorder) WatchAuthorisedKeys(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) WatchAuthorisedKeys(arg0 any) *MockClientWatchAuthorisedKeysCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAuthorisedKeys", reflect.TypeOf((*MockClient)(nil).WatchAuthorisedKeys), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAuthorisedKeys", reflect.TypeOf((*MockClient)(nil).WatchAuthorisedKeys), arg0) + return &MockClientWatchAuthorisedKeysCall{Call: call} +} + +// MockClientWatchAuthorisedKeysCall wrap *gomock.Call +type MockClientWatchAuthorisedKeysCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientWatchAuthorisedKeysCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockClientWatchAuthorisedKeysCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientWatchAuthorisedKeysCall) Do(f func(names.MachineTag) (watcher.Watcher[struct{}], error)) *MockClientWatchAuthorisedKeysCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientWatchAuthorisedKeysCall) DoAndReturn(f func(names.MachineTag) (watcher.Watcher[struct{}], error)) *MockClientWatchAuthorisedKeysCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/authenticationworker/package_test.go b/internal/worker/authenticationworker/package_test.go index 0f475697c37..43444621fd6 100644 --- a/internal/worker/authenticationworker/package_test.go +++ b/internal/worker/authenticationworker/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/updater_mocks.go github.com/juju/juju/internal/worker/authenticationworker Client +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/updater_mocks.go github.com/juju/juju/internal/worker/authenticationworker Client func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/bootstrap/agent_mock_test.go b/internal/worker/bootstrap/agent_mock_test.go index 64f33a19014..5eb83b4ec21 100644 --- a/internal/worker/bootstrap/agent_mock_test.go +++ b/internal/worker/bootstrap/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package bootstrap -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config // // Package bootstrap is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/bootstrap/bootstrap_mock_test.go b/internal/worker/bootstrap/bootstrap_mock_test.go index a32a1a81afc..c2e27e379a4 100644 --- a/internal/worker/bootstrap/bootstrap_mock_test.go +++ b/internal/worker/bootstrap/bootstrap_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/worker/bootstrap ControllerConfigService,FlagService,ObjectStoreGetter,SystemState,HTTPClient,CredentialService,CloudService,StorageService,ApplicationService,NetworkService,UserService +// mockgen -typed -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/worker/bootstrap ControllerConfigService,FlagService,ObjectStoreGetter,SystemState,HTTPClient,CredentialService,CloudService,StorageService,ApplicationService,NetworkService,UserService // // Package bootstrap is a generated GoMock package. @@ -65,9 +65,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFlagService is a mock of FlagService interface. @@ -103,9 +127,33 @@ func (m *MockFlagService) GetFlag(arg0 context.Context, arg1 string) (bool, erro } // GetFlag indicates an expected call of GetFlag. -func (mr *MockFlagServiceMockRecorder) GetFlag(arg0, arg1 any) *gomock.Call { +func (mr *MockFlagServiceMockRecorder) GetFlag(arg0, arg1 any) *MockFlagServiceGetFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlag", reflect.TypeOf((*MockFlagService)(nil).GetFlag), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlag", reflect.TypeOf((*MockFlagService)(nil).GetFlag), arg0, arg1) + return &MockFlagServiceGetFlagCall{Call: call} +} + +// MockFlagServiceGetFlagCall wrap *gomock.Call +type MockFlagServiceGetFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFlagServiceGetFlagCall) Return(arg0 bool, arg1 error) *MockFlagServiceGetFlagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFlagServiceGetFlagCall) Do(f func(context.Context, string) (bool, error)) *MockFlagServiceGetFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFlagServiceGetFlagCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockFlagServiceGetFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetFlag mocks base method. @@ -117,9 +165,33 @@ func (m *MockFlagService) SetFlag(arg0 context.Context, arg1 string, arg2 bool, } // SetFlag indicates an expected call of SetFlag. -func (mr *MockFlagServiceMockRecorder) SetFlag(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFlagServiceMockRecorder) SetFlag(arg0, arg1, arg2, arg3 any) *MockFlagServiceSetFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlag", reflect.TypeOf((*MockFlagService)(nil).SetFlag), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlag", reflect.TypeOf((*MockFlagService)(nil).SetFlag), arg0, arg1, arg2, arg3) + return &MockFlagServiceSetFlagCall{Call: call} +} + +// MockFlagServiceSetFlagCall wrap *gomock.Call +type MockFlagServiceSetFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFlagServiceSetFlagCall) Return(arg0 error) *MockFlagServiceSetFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFlagServiceSetFlagCall) Do(f func(context.Context, string, bool, string) error) *MockFlagServiceSetFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFlagServiceSetFlagCall) DoAndReturn(f func(context.Context, string, bool, string) error) *MockFlagServiceSetFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockObjectStoreGetter is a mock of ObjectStoreGetter interface. @@ -155,9 +227,33 @@ func (m *MockObjectStoreGetter) GetObjectStore(arg0 context.Context, arg1 string } // GetObjectStore indicates an expected call of GetObjectStore. -func (mr *MockObjectStoreGetterMockRecorder) GetObjectStore(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreGetterMockRecorder) GetObjectStore(arg0, arg1 any) *MockObjectStoreGetterGetObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectStore", reflect.TypeOf((*MockObjectStoreGetter)(nil).GetObjectStore), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectStore", reflect.TypeOf((*MockObjectStoreGetter)(nil).GetObjectStore), arg0, arg1) + return &MockObjectStoreGetterGetObjectStoreCall{Call: call} +} + +// MockObjectStoreGetterGetObjectStoreCall wrap *gomock.Call +type MockObjectStoreGetterGetObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetterGetObjectStoreCall) Return(arg0 objectstore.ObjectStore, arg1 error) *MockObjectStoreGetterGetObjectStoreCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetterGetObjectStoreCall) Do(f func(context.Context, string) (objectstore.ObjectStore, error)) *MockObjectStoreGetterGetObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetterGetObjectStoreCall) DoAndReturn(f func(context.Context, string) (objectstore.ObjectStore, error)) *MockObjectStoreGetterGetObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSystemState is a mock of SystemState interface. @@ -193,9 +289,33 @@ func (m *MockSystemState) AddApplication(arg0 state.AddApplicationArgs, arg1 obj } // AddApplication indicates an expected call of AddApplication. -func (mr *MockSystemStateMockRecorder) AddApplication(arg0, arg1 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) AddApplication(arg0, arg1 any) *MockSystemStateAddApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockSystemState)(nil).AddApplication), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddApplication", reflect.TypeOf((*MockSystemState)(nil).AddApplication), arg0, arg1) + return &MockSystemStateAddApplicationCall{Call: call} +} + +// MockSystemStateAddApplicationCall wrap *gomock.Call +type MockSystemStateAddApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateAddApplicationCall) Return(arg0 bootstrap.Application, arg1 error) *MockSystemStateAddApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateAddApplicationCall) Do(f func(state.AddApplicationArgs, objectstore.ObjectStore) (bootstrap.Application, error)) *MockSystemStateAddApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateAddApplicationCall) DoAndReturn(f func(state.AddApplicationArgs, objectstore.ObjectStore) (bootstrap.Application, error)) *MockSystemStateAddApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplyOperation mocks base method. @@ -207,9 +327,33 @@ func (m *MockSystemState) ApplyOperation(arg0 *state.UpdateUnitOperation) error } // ApplyOperation indicates an expected call of ApplyOperation. -func (mr *MockSystemStateMockRecorder) ApplyOperation(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) ApplyOperation(arg0 any) *MockSystemStateApplyOperationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockSystemState)(nil).ApplyOperation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockSystemState)(nil).ApplyOperation), arg0) + return &MockSystemStateApplyOperationCall{Call: call} +} + +// MockSystemStateApplyOperationCall wrap *gomock.Call +type MockSystemStateApplyOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateApplyOperationCall) Return(arg0 error) *MockSystemStateApplyOperationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateApplyOperationCall) Do(f func(*state.UpdateUnitOperation) error) *MockSystemStateApplyOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateApplyOperationCall) DoAndReturn(f func(*state.UpdateUnitOperation) error) *MockSystemStateApplyOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -222,9 +366,33 @@ func (m *MockSystemState) Charm(arg0 string) (bootstrap.Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockSystemStateMockRecorder) Charm(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) Charm(arg0 any) *MockSystemStateCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockSystemState)(nil).Charm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockSystemState)(nil).Charm), arg0) + return &MockSystemStateCharmCall{Call: call} +} + +// MockSystemStateCharmCall wrap *gomock.Call +type MockSystemStateCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateCharmCall) Return(arg0 bootstrap.Charm, arg1 error) *MockSystemStateCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateCharmCall) Do(f func(string) (bootstrap.Charm, error)) *MockSystemStateCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateCharmCall) DoAndReturn(f func(string) (bootstrap.Charm, error)) *MockSystemStateCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudService mocks base method. @@ -237,9 +405,33 @@ func (m *MockSystemState) CloudService(arg0 string) (bootstrap.CloudService, err } // CloudService indicates an expected call of CloudService. -func (mr *MockSystemStateMockRecorder) CloudService(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) CloudService(arg0 any) *MockSystemStateCloudServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockSystemState)(nil).CloudService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockSystemState)(nil).CloudService), arg0) + return &MockSystemStateCloudServiceCall{Call: call} +} + +// MockSystemStateCloudServiceCall wrap *gomock.Call +type MockSystemStateCloudServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateCloudServiceCall) Return(arg0 bootstrap.CloudService, arg1 error) *MockSystemStateCloudServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateCloudServiceCall) Do(f func(string) (bootstrap.CloudService, error)) *MockSystemStateCloudServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateCloudServiceCall) DoAndReturn(f func(string) (bootstrap.CloudService, error)) *MockSystemStateCloudServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerModelUUID mocks base method. @@ -251,9 +443,33 @@ func (m *MockSystemState) ControllerModelUUID() string { } // ControllerModelUUID indicates an expected call of ControllerModelUUID. -func (mr *MockSystemStateMockRecorder) ControllerModelUUID() *gomock.Call { +func (mr *MockSystemStateMockRecorder) ControllerModelUUID() *MockSystemStateControllerModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModelUUID", reflect.TypeOf((*MockSystemState)(nil).ControllerModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModelUUID", reflect.TypeOf((*MockSystemState)(nil).ControllerModelUUID)) + return &MockSystemStateControllerModelUUIDCall{Call: call} +} + +// MockSystemStateControllerModelUUIDCall wrap *gomock.Call +type MockSystemStateControllerModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateControllerModelUUIDCall) Return(arg0 string) *MockSystemStateControllerModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateControllerModelUUIDCall) Do(f func() string) *MockSystemStateControllerModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateControllerModelUUIDCall) DoAndReturn(f func() string) *MockSystemStateControllerModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -266,9 +482,33 @@ func (m *MockSystemState) Machine(arg0 string) (bootstrap.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockSystemStateMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) Machine(arg0 any) *MockSystemStateMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockSystemState)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockSystemState)(nil).Machine), arg0) + return &MockSystemStateMachineCall{Call: call} +} + +// MockSystemStateMachineCall wrap *gomock.Call +type MockSystemStateMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateMachineCall) Return(arg0 bootstrap.Machine, arg1 error) *MockSystemStateMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateMachineCall) Do(f func(string) (bootstrap.Machine, error)) *MockSystemStateMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateMachineCall) DoAndReturn(f func(string) (bootstrap.Machine, error)) *MockSystemStateMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -281,9 +521,33 @@ func (m *MockSystemState) Model() (bootstrap.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockSystemStateMockRecorder) Model() *gomock.Call { +func (mr *MockSystemStateMockRecorder) Model() *MockSystemStateModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockSystemState)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockSystemState)(nil).Model)) + return &MockSystemStateModelCall{Call: call} +} + +// MockSystemStateModelCall wrap *gomock.Call +type MockSystemStateModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateModelCall) Return(arg0 bootstrap.Model, arg1 error) *MockSystemStateModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateModelCall) Do(f func() (bootstrap.Model, error)) *MockSystemStateModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateModelCall) DoAndReturn(f func() (bootstrap.Model, error)) *MockSystemStateModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -295,9 +559,33 @@ func (m *MockSystemState) ModelUUID() string { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockSystemStateMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockSystemStateMockRecorder) ModelUUID() *MockSystemStateModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockSystemState)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockSystemState)(nil).ModelUUID)) + return &MockSystemStateModelUUIDCall{Call: call} +} + +// MockSystemStateModelUUIDCall wrap *gomock.Call +type MockSystemStateModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateModelUUIDCall) Return(arg0 string) *MockSystemStateModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateModelUUIDCall) Do(f func() string) *MockSystemStateModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateModelUUIDCall) DoAndReturn(f func() string) *MockSystemStateModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareCharmUpload mocks base method. @@ -310,9 +598,33 @@ func (m *MockSystemState) PrepareCharmUpload(arg0 string) (services.UploadedChar } // PrepareCharmUpload indicates an expected call of PrepareCharmUpload. -func (mr *MockSystemStateMockRecorder) PrepareCharmUpload(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) PrepareCharmUpload(arg0 any) *MockSystemStatePrepareCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockSystemState)(nil).PrepareCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCharmUpload", reflect.TypeOf((*MockSystemState)(nil).PrepareCharmUpload), arg0) + return &MockSystemStatePrepareCharmUploadCall{Call: call} +} + +// MockSystemStatePrepareCharmUploadCall wrap *gomock.Call +type MockSystemStatePrepareCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStatePrepareCharmUploadCall) Return(arg0 services.UploadedCharm, arg1 error) *MockSystemStatePrepareCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStatePrepareCharmUploadCall) Do(f func(string) (services.UploadedCharm, error)) *MockSystemStatePrepareCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStatePrepareCharmUploadCall) DoAndReturn(f func(string) (services.UploadedCharm, error)) *MockSystemStatePrepareCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareLocalCharmUpload mocks base method. @@ -325,9 +637,33 @@ func (m *MockSystemState) PrepareLocalCharmUpload(arg0 string) (*charm.URL, erro } // PrepareLocalCharmUpload indicates an expected call of PrepareLocalCharmUpload. -func (mr *MockSystemStateMockRecorder) PrepareLocalCharmUpload(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) PrepareLocalCharmUpload(arg0 any) *MockSystemStatePrepareLocalCharmUploadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareLocalCharmUpload", reflect.TypeOf((*MockSystemState)(nil).PrepareLocalCharmUpload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareLocalCharmUpload", reflect.TypeOf((*MockSystemState)(nil).PrepareLocalCharmUpload), arg0) + return &MockSystemStatePrepareLocalCharmUploadCall{Call: call} +} + +// MockSystemStatePrepareLocalCharmUploadCall wrap *gomock.Call +type MockSystemStatePrepareLocalCharmUploadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStatePrepareLocalCharmUploadCall) Return(arg0 *charm.URL, arg1 error) *MockSystemStatePrepareLocalCharmUploadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStatePrepareLocalCharmUploadCall) Do(f func(string) (*charm.URL, error)) *MockSystemStatePrepareLocalCharmUploadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStatePrepareLocalCharmUploadCall) DoAndReturn(f func(string) (*charm.URL, error)) *MockSystemStatePrepareLocalCharmUploadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveCloudService mocks base method. @@ -340,9 +676,33 @@ func (m *MockSystemState) SaveCloudService(arg0 state.SaveCloudServiceArgs) (*st } // SaveCloudService indicates an expected call of SaveCloudService. -func (mr *MockSystemStateMockRecorder) SaveCloudService(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) SaveCloudService(arg0 any) *MockSystemStateSaveCloudServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveCloudService", reflect.TypeOf((*MockSystemState)(nil).SaveCloudService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveCloudService", reflect.TypeOf((*MockSystemState)(nil).SaveCloudService), arg0) + return &MockSystemStateSaveCloudServiceCall{Call: call} +} + +// MockSystemStateSaveCloudServiceCall wrap *gomock.Call +type MockSystemStateSaveCloudServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateSaveCloudServiceCall) Return(arg0 *state.CloudService, arg1 error) *MockSystemStateSaveCloudServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateSaveCloudServiceCall) Do(f func(state.SaveCloudServiceArgs) (*state.CloudService, error)) *MockSystemStateSaveCloudServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateSaveCloudServiceCall) DoAndReturn(f func(state.SaveCloudServiceArgs) (*state.CloudService, error)) *MockSystemStateSaveCloudServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAPIHostPorts mocks base method. @@ -354,9 +714,33 @@ func (m *MockSystemState) SetAPIHostPorts(arg0 controller.Config, arg1, arg2 []n } // SetAPIHostPorts indicates an expected call of SetAPIHostPorts. -func (mr *MockSystemStateMockRecorder) SetAPIHostPorts(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) SetAPIHostPorts(arg0, arg1, arg2 any) *MockSystemStateSetAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockSystemState)(nil).SetAPIHostPorts), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockSystemState)(nil).SetAPIHostPorts), arg0, arg1, arg2) + return &MockSystemStateSetAPIHostPortsCall{Call: call} +} + +// MockSystemStateSetAPIHostPortsCall wrap *gomock.Call +type MockSystemStateSetAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateSetAPIHostPortsCall) Return(arg0 error) *MockSystemStateSetAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateSetAPIHostPortsCall) Do(f func(controller.Config, []network.SpaceHostPorts, []network.SpaceHostPorts) error) *MockSystemStateSetAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateSetAPIHostPortsCall) DoAndReturn(f func(controller.Config, []network.SpaceHostPorts, []network.SpaceHostPorts) error) *MockSystemStateSetAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ToolsStorage mocks base method. @@ -369,9 +753,33 @@ func (m *MockSystemState) ToolsStorage(arg0 objectstore.ObjectStore) (binarystor } // ToolsStorage indicates an expected call of ToolsStorage. -func (mr *MockSystemStateMockRecorder) ToolsStorage(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) ToolsStorage(arg0 any) *MockSystemStateToolsStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockSystemState)(nil).ToolsStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToolsStorage", reflect.TypeOf((*MockSystemState)(nil).ToolsStorage), arg0) + return &MockSystemStateToolsStorageCall{Call: call} +} + +// MockSystemStateToolsStorageCall wrap *gomock.Call +type MockSystemStateToolsStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateToolsStorageCall) Return(arg0 binarystorage.StorageCloser, arg1 error) *MockSystemStateToolsStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateToolsStorageCall) Do(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockSystemStateToolsStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateToolsStorageCall) DoAndReturn(f func(objectstore.ObjectStore) (binarystorage.StorageCloser, error)) *MockSystemStateToolsStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -384,9 +792,33 @@ func (m *MockSystemState) Unit(arg0 string) (bootstrap.Unit, error) { } // Unit indicates an expected call of Unit. -func (mr *MockSystemStateMockRecorder) Unit(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) Unit(arg0 any) *MockSystemStateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockSystemState)(nil).Unit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockSystemState)(nil).Unit), arg0) + return &MockSystemStateUnitCall{Call: call} +} + +// MockSystemStateUnitCall wrap *gomock.Call +type MockSystemStateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateUnitCall) Return(arg0 bootstrap.Unit, arg1 error) *MockSystemStateUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateUnitCall) Do(f func(string) (bootstrap.Unit, error)) *MockSystemStateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateUnitCall) DoAndReturn(f func(string) (bootstrap.Unit, error)) *MockSystemStateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUploadedCharm mocks base method. @@ -399,9 +831,33 @@ func (m *MockSystemState) UpdateUploadedCharm(arg0 state.CharmInfo) (services.Up } // UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm. -func (mr *MockSystemStateMockRecorder) UpdateUploadedCharm(arg0 any) *gomock.Call { +func (mr *MockSystemStateMockRecorder) UpdateUploadedCharm(arg0 any) *MockSystemStateUpdateUploadedCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockSystemState)(nil).UpdateUploadedCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUploadedCharm", reflect.TypeOf((*MockSystemState)(nil).UpdateUploadedCharm), arg0) + return &MockSystemStateUpdateUploadedCharmCall{Call: call} +} + +// MockSystemStateUpdateUploadedCharmCall wrap *gomock.Call +type MockSystemStateUpdateUploadedCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemStateUpdateUploadedCharmCall) Return(arg0 services.UploadedCharm, arg1 error) *MockSystemStateUpdateUploadedCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemStateUpdateUploadedCharmCall) Do(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockSystemStateUpdateUploadedCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemStateUpdateUploadedCharmCall) DoAndReturn(f func(state.CharmInfo) (services.UploadedCharm, error)) *MockSystemStateUpdateUploadedCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockHTTPClient is a mock of HTTPClient interface. @@ -437,9 +893,33 @@ func (m *MockHTTPClient) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *MockHTTPClientDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + return &MockHTTPClientDoCall{Call: call} +} + +// MockHTTPClientDoCall wrap *gomock.Call +type MockHTTPClientDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPClientDoCall) Return(arg0 *http.Response, arg1 error) *MockHTTPClientDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPClientDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPClientDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCredentialService is a mock of CredentialService interface. @@ -475,9 +955,33 @@ func (m *MockCredentialService) CloudCredential(arg0 context.Context, arg1 crede } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockCredentialServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + return &MockCredentialServiceCloudCredentialCall{Call: call} +} + +// MockCredentialServiceCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudService is a mock of CloudService interface. @@ -513,9 +1017,33 @@ func (m *MockCloudService) Cloud(arg0 context.Context, arg1 string) (*cloud.Clou } // Cloud indicates an expected call of Cloud. -func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *MockCloudServiceCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + return &MockCloudServiceCloudCall{Call: call} +} + +// MockCloudServiceCloudCall wrap *gomock.Call +type MockCloudServiceCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceCloudCall) Return(arg0 *cloud.Cloud, arg1 error) *MockCloudServiceCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceCloudCall) Do(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceCloudCall) DoAndReturn(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStorageService is a mock of StorageService interface. @@ -550,9 +1078,33 @@ func (m *MockStorageService) CreateStoragePool(arg0 context.Context, arg1 string } // CreateStoragePool indicates an expected call of CreateStoragePool. -func (mr *MockStorageServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageServiceMockRecorder) CreateStoragePool(arg0, arg1, arg2, arg3 any) *MockStorageServiceCreateStoragePoolCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStorageService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStoragePool", reflect.TypeOf((*MockStorageService)(nil).CreateStoragePool), arg0, arg1, arg2, arg3) + return &MockStorageServiceCreateStoragePoolCall{Call: call} +} + +// MockStorageServiceCreateStoragePoolCall wrap *gomock.Call +type MockStorageServiceCreateStoragePoolCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStorageServiceCreateStoragePoolCall) Return(arg0 error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStorageServiceCreateStoragePoolCall) Do(f func(context.Context, string, storage.ProviderType, service1.PoolAttrs) error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStorageServiceCreateStoragePoolCall) DoAndReturn(f func(context.Context, string, storage.ProviderType, service1.PoolAttrs) error) *MockStorageServiceCreateStoragePoolCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationService is a mock of ApplicationService interface. @@ -591,10 +1143,34 @@ func (m *MockApplicationService) CreateApplication(arg0 context.Context, arg1 st } // CreateApplication indicates an expected call of CreateApplication. -func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) CreateApplication(arg0, arg1, arg2 any, arg3 ...any) *MockApplicationServiceCreateApplicationCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApplication", reflect.TypeOf((*MockApplicationService)(nil).CreateApplication), varargs...) + return &MockApplicationServiceCreateApplicationCall{Call: call} +} + +// MockApplicationServiceCreateApplicationCall wrap *gomock.Call +type MockApplicationServiceCreateApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationServiceCreateApplicationCall) Return(arg0 error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationServiceCreateApplicationCall) Do(f func(context.Context, string, service0.AddApplicationParams, ...service0.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationServiceCreateApplicationCall) DoAndReturn(f func(context.Context, string, service0.AddApplicationParams, ...service0.AddUnitParams) error) *MockApplicationServiceCreateApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNetworkService is a mock of NetworkService interface. @@ -630,9 +1206,33 @@ func (m *MockNetworkService) GetAllSpaces(arg0 context.Context) (network.SpaceIn } // GetAllSpaces indicates an expected call of GetAllSpaces. -func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) GetAllSpaces(arg0 any) *MockNetworkServiceGetAllSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSpaces", reflect.TypeOf((*MockNetworkService)(nil).GetAllSpaces), arg0) + return &MockNetworkServiceGetAllSpacesCall{Call: call} +} + +// MockNetworkServiceGetAllSpacesCall wrap *gomock.Call +type MockNetworkServiceGetAllSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetAllSpacesCall) Return(arg0 network.SpaceInfos, arg1 error) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetAllSpacesCall) Do(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetAllSpacesCall) DoAndReturn(f func(context.Context) (network.SpaceInfos, error)) *MockNetworkServiceGetAllSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReloadSpaces mocks base method. @@ -644,9 +1244,33 @@ func (m *MockNetworkService) ReloadSpaces(arg0 context.Context) error { } // ReloadSpaces indicates an expected call of ReloadSpaces. -func (mr *MockNetworkServiceMockRecorder) ReloadSpaces(arg0 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) ReloadSpaces(arg0 any) *MockNetworkServiceReloadSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockNetworkService)(nil).ReloadSpaces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadSpaces", reflect.TypeOf((*MockNetworkService)(nil).ReloadSpaces), arg0) + return &MockNetworkServiceReloadSpacesCall{Call: call} +} + +// MockNetworkServiceReloadSpacesCall wrap *gomock.Call +type MockNetworkServiceReloadSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceReloadSpacesCall) Return(arg0 error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceReloadSpacesCall) Do(f func(context.Context) error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceReloadSpacesCall) DoAndReturn(f func(context.Context) error) *MockNetworkServiceReloadSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Space mocks base method. @@ -659,9 +1283,33 @@ func (m *MockNetworkService) Space(arg0 context.Context, arg1 string) (*network. } // Space indicates an expected call of Space. -func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) Space(arg0, arg1 any) *MockNetworkServiceSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Space", reflect.TypeOf((*MockNetworkService)(nil).Space), arg0, arg1) + return &MockNetworkServiceSpaceCall{Call: call} +} + +// MockNetworkServiceSpaceCall wrap *gomock.Call +type MockNetworkServiceSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpaceByName mocks base method. @@ -674,9 +1322,33 @@ func (m *MockNetworkService) SpaceByName(arg0 context.Context, arg1 string) (*ne } // SpaceByName indicates an expected call of SpaceByName. -func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *gomock.Call { +func (mr *MockNetworkServiceMockRecorder) SpaceByName(arg0, arg1 any) *MockNetworkServiceSpaceByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceByName", reflect.TypeOf((*MockNetworkService)(nil).SpaceByName), arg0, arg1) + return &MockNetworkServiceSpaceByNameCall{Call: call} +} + +// MockNetworkServiceSpaceByNameCall wrap *gomock.Call +type MockNetworkServiceSpaceByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceSpaceByNameCall) Return(arg0 *network.SpaceInfo, arg1 error) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceSpaceByNameCall) Do(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceSpaceByNameCall) DoAndReturn(f func(context.Context, string) (*network.SpaceInfo, error)) *MockNetworkServiceSpaceByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUserService is a mock of UserService interface. @@ -713,9 +1385,33 @@ func (m *MockUserService) AddUser(arg0 context.Context, arg1 service.AddUserArg) } // AddUser indicates an expected call of AddUser. -func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *MockUserServiceAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + return &MockUserServiceAddUserCall{Call: call} +} + +// MockUserServiceAddUserCall wrap *gomock.Call +type MockUserServiceAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceAddUserCall) Return(arg0 user.UUID, arg1 []byte, arg2 error) *MockUserServiceAddUserCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceAddUserCall) Do(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceAddUserCall) DoAndReturn(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -728,7 +1424,31 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/bootstrap/deployer_mock_test.go b/internal/worker/bootstrap/deployer_mock_test.go index 06a44f4e5ae..bb0f701ad41 100644 --- a/internal/worker/bootstrap/deployer_mock_test.go +++ b/internal/worker/bootstrap/deployer_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination deployer_mock_test.go github.com/juju/juju/internal/bootstrap Model +// mockgen -typed -package bootstrap -destination deployer_mock_test.go github.com/juju/juju/internal/bootstrap Model // // Package bootstrap is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockModel) CloudCredentialTag() (names.CloudCredentialTag, bool) { } // CloudCredentialTag indicates an expected call of CloudCredentialTag. -func (mr *MockModelMockRecorder) CloudCredentialTag() *gomock.Call { +func (mr *MockModelMockRecorder) CloudCredentialTag() *MockModelCloudCredentialTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialTag", reflect.TypeOf((*MockModel)(nil).CloudCredentialTag)) + return &MockModelCloudCredentialTagCall{Call: call} +} + +// MockModelCloudCredentialTagCall wrap *gomock.Call +type MockModelCloudCredentialTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudCredentialTagCall) Return(arg0 names.CloudCredentialTag, arg1 bool) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudCredentialTagCall) Do(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudCredentialTagCall) DoAndReturn(f func() (names.CloudCredentialTag, bool)) *MockModelCloudCredentialTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudName mocks base method. @@ -64,9 +88,33 @@ func (m *MockModel) CloudName() string { } // CloudName indicates an expected call of CloudName. -func (mr *MockModelMockRecorder) CloudName() *gomock.Call { +func (mr *MockModelMockRecorder) CloudName() *MockModelCloudNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudName", reflect.TypeOf((*MockModel)(nil).CloudName)) + return &MockModelCloudNameCall{Call: call} +} + +// MockModelCloudNameCall wrap *gomock.Call +type MockModelCloudNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudNameCall) Return(arg0 string) *MockModelCloudNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudNameCall) Do(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudNameCall) DoAndReturn(f func() string) *MockModelCloudNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudRegion mocks base method. @@ -78,9 +126,33 @@ func (m *MockModel) CloudRegion() string { } // CloudRegion indicates an expected call of CloudRegion. -func (mr *MockModelMockRecorder) CloudRegion() *gomock.Call { +func (mr *MockModelMockRecorder) CloudRegion() *MockModelCloudRegionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudRegion", reflect.TypeOf((*MockModel)(nil).CloudRegion)) + return &MockModelCloudRegionCall{Call: call} +} + +// MockModelCloudRegionCall wrap *gomock.Call +type MockModelCloudRegionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelCloudRegionCall) Return(arg0 string) *MockModelCloudRegionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelCloudRegionCall) Do(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelCloudRegionCall) DoAndReturn(f func() string) *MockModelCloudRegionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -93,7 +165,31 @@ func (m *MockModel) Config() (*config.Config, error) { } // Config indicates an expected call of Config. -func (mr *MockModelMockRecorder) Config() *gomock.Call { +func (mr *MockModelMockRecorder) Config() *MockModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModel)(nil).Config)) + return &MockModelConfigCall{Call: call} +} + +// MockModelConfigCall wrap *gomock.Call +type MockModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigCall) Do(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigCall) DoAndReturn(f func() (*config.Config, error)) *MockModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/bootstrap/lock_mock_test.go b/internal/worker/bootstrap/lock_mock_test.go index e1934d3f11b..a05d4d1688c 100644 --- a/internal/worker/bootstrap/lock_mock_test.go +++ b/internal/worker/bootstrap/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Unlocker +// mockgen -typed -package bootstrap -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Unlocker // // Package bootstrap is a generated GoMock package. @@ -45,7 +45,31 @@ func (m *MockUnlocker) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockUnlockerMockRecorder) Unlock() *gomock.Call { +func (mr *MockUnlockerMockRecorder) Unlock() *MockUnlockerUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockUnlocker)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockUnlocker)(nil).Unlock)) + return &MockUnlockerUnlockCall{Call: call} +} + +// MockUnlockerUnlockCall wrap *gomock.Call +type MockUnlockerUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnlockerUnlockCall) Return() *MockUnlockerUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnlockerUnlockCall) Do(f func()) *MockUnlockerUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnlockerUnlockCall) DoAndReturn(f func()) *MockUnlockerUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/bootstrap/objectstore_mock_test.go b/internal/worker/bootstrap/objectstore_mock_test.go index cdb8ba5fdec..974e8ce96b6 100644 --- a/internal/worker/bootstrap/objectstore_mock_test.go +++ b/internal/worker/bootstrap/objectstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +// mockgen -typed -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore // // Package bootstrap is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, } // Get indicates an expected call of Get. -func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1) + return &MockObjectStoreGetCall{Call: call} +} + +// MockObjectStoreGetCall wrap *gomock.Call +type MockObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -65,9 +89,33 @@ func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, } // Put indicates an expected call of Put. -func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockObjectStorePutCall{Call: call} +} + +// MockObjectStorePutCall wrap *gomock.Call +type MockObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutCall) Return(arg0 error) *MockObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -79,9 +127,33 @@ func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockObjectStorePutAndCheckHashCall{Call: call} +} + +// MockObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -93,7 +165,31 @@ func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error { } // Remove indicates an expected call of Remove. -func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1) + return &MockObjectStoreRemoveCall{Call: call} +} + +// MockObjectStoreRemoveCall wrap *gomock.Call +type MockObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/bootstrap/package_test.go b/internal/worker/bootstrap/package_test.go index 5a98443f17a..259a5161735 100644 --- a/internal/worker/bootstrap/package_test.go +++ b/internal/worker/bootstrap/package_test.go @@ -16,12 +16,12 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination state_mock_test.go github.com/juju/juju/internal/worker/state StateTracker -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Unlocker -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/worker/bootstrap ControllerConfigService,FlagService,ObjectStoreGetter,SystemState,HTTPClient,CredentialService,CloudService,StorageService,ApplicationService,NetworkService,UserService -//go:generate go run go.uber.org/mock/mockgen -package bootstrap -destination deployer_mock_test.go github.com/juju/juju/internal/bootstrap Model +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination state_mock_test.go github.com/juju/juju/internal/worker/state StateTracker +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Unlocker +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination bootstrap_mock_test.go github.com/juju/juju/internal/worker/bootstrap ControllerConfigService,FlagService,ObjectStoreGetter,SystemState,HTTPClient,CredentialService,CloudService,StorageService,ApplicationService,NetworkService,UserService +//go:generate go run go.uber.org/mock/mockgen -typed -package bootstrap -destination deployer_mock_test.go github.com/juju/juju/internal/bootstrap Model func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/bootstrap/state_mock_test.go b/internal/worker/bootstrap/state_mock_test.go index 23f0a8afa5e..ebbd43f2022 100644 --- a/internal/worker/bootstrap/state_mock_test.go +++ b/internal/worker/bootstrap/state_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package bootstrap -destination state_mock_test.go github.com/juju/juju/internal/worker/state StateTracker +// mockgen -typed -package bootstrap -destination state_mock_test.go github.com/juju/juju/internal/worker/state StateTracker // // Package bootstrap is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockStateTracker) Done() error { } // Done indicates an expected call of Done. -func (mr *MockStateTrackerMockRecorder) Done() *gomock.Call { +func (mr *MockStateTrackerMockRecorder) Done() *MockStateTrackerDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockStateTracker)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockStateTracker)(nil).Done)) + return &MockStateTrackerDoneCall{Call: call} +} + +// MockStateTrackerDoneCall wrap *gomock.Call +type MockStateTrackerDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerDoneCall) Return(arg0 error) *MockStateTrackerDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerDoneCall) Do(f func() error) *MockStateTrackerDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerDoneCall) DoAndReturn(f func() error) *MockStateTrackerDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -62,9 +86,33 @@ func (m *MockStateTracker) Report() map[string]any { } // Report indicates an expected call of Report. -func (mr *MockStateTrackerMockRecorder) Report() *gomock.Call { +func (mr *MockStateTrackerMockRecorder) Report() *MockStateTrackerReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockStateTracker)(nil).Report)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockStateTracker)(nil).Report)) + return &MockStateTrackerReportCall{Call: call} +} + +// MockStateTrackerReportCall wrap *gomock.Call +type MockStateTrackerReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerReportCall) Return(arg0 map[string]any) *MockStateTrackerReportCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerReportCall) Do(f func() map[string]any) *MockStateTrackerReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerReportCall) DoAndReturn(f func() map[string]any) *MockStateTrackerReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Use mocks base method. @@ -78,7 +126,31 @@ func (m *MockStateTracker) Use() (*state.StatePool, *state.State, error) { } // Use indicates an expected call of Use. -func (mr *MockStateTrackerMockRecorder) Use() *gomock.Call { +func (mr *MockStateTrackerMockRecorder) Use() *MockStateTrackerUseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Use", reflect.TypeOf((*MockStateTracker)(nil).Use)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Use", reflect.TypeOf((*MockStateTracker)(nil).Use)) + return &MockStateTrackerUseCall{Call: call} +} + +// MockStateTrackerUseCall wrap *gomock.Call +type MockStateTrackerUseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerUseCall) Return(arg0 *state.StatePool, arg1 *state.State, arg2 error) *MockStateTrackerUseCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerUseCall) Do(f func() (*state.StatePool, *state.State, error)) *MockStateTrackerUseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerUseCall) DoAndReturn(f func() (*state.StatePool, *state.State, error)) *MockStateTrackerUseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasapplicationprovisioner/application_test.go b/internal/worker/caasapplicationprovisioner/application_test.go index 7a4559cb833..e74b1bbdadd 100644 --- a/internal/worker/caasapplicationprovisioner/application_test.go +++ b/internal/worker/caasapplicationprovisioner/application_test.go @@ -121,10 +121,13 @@ func (s *ApplicationWorkerSuite) TestLifeDead(c *gc.C) { broker.EXPECT().Application("test", caas.DeploymentStateful).Return(app), facade.EXPECT().Life("test").Return(life.Dead, nil), ops.EXPECT().AppDying("test", app, life.Dead, facade, unitFacade, s.logger).Return(nil), - ops.EXPECT().AppDead("test", app, broker, facade, unitFacade, clk, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) error { - close(done) - return nil - }), + ops.EXPECT().AppDead("test", app, broker, facade, unitFacade, clk, s.logger). + DoAndReturn(func(_ string, _ caas.Application, _ caasapplicationprovisioner.CAASBroker, + _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, + _ clock.Clock, _ caasapplicationprovisioner.Logger) error { + close(done) + return nil + }), ) appWorker := s.startAppWorker(c, clk, facade, broker, unitFacade, ops, false) @@ -180,14 +183,14 @@ func (s *ApplicationWorkerSuite) TestWorker(c *gc.C) { // scaleChan fired ops.EXPECT().EnsureScale("test", app, life.Alive, facade, unitFacade, s.logger).Return(errors.NotFound), ops.EXPECT().EnsureScale("test", app, life.Alive, facade, unitFacade, s.logger).Return(errors.ConstError("try again")), - ops.EXPECT().EnsureScale("test", app, life.Alive, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _ any) error { + ops.EXPECT().EnsureScale("test", app, life.Alive, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, v life.Value, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) error { trustChan <- nil return nil }), // trustChan fired ops.EXPECT().EnsureTrust("test", app, unitFacade, s.logger).Return(errors.NotFound), - ops.EXPECT().EnsureTrust("test", app, unitFacade, s.logger).DoAndReturn(func(_, _, _, _ any) error { + ops.EXPECT().EnsureTrust("test", app, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) error { appUnitsChan <- nil return nil }), @@ -195,36 +198,36 @@ func (s *ApplicationWorkerSuite) TestWorker(c *gc.C) { // appUnitsChan fired ops.EXPECT().ReconcileDeadUnitScale("test", app, facade, s.logger).Return(errors.NotFound), ops.EXPECT().ReconcileDeadUnitScale("test", app, facade, s.logger).Return(errors.ConstError("try again")), - ops.EXPECT().ReconcileDeadUnitScale("test", app, facade, s.logger).DoAndReturn(func(_, _, _, _ any) error { + ops.EXPECT().ReconcileDeadUnitScale("test", app, facade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.Logger) error { appChan <- struct{}{} return nil }), // appChan fired - ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) (map[string]status.StatusInfo, error) { + ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ map[string]status.StatusInfo, _ caasapplicationprovisioner.CAASBroker, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error) { appReplicasChan <- struct{}{} return nil, nil }), // appReplicasChan fired - ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) (map[string]status.StatusInfo, error) { + ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ map[string]status.StatusInfo, _ caasapplicationprovisioner.CAASBroker, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error) { provisioningInfoChan <- struct{}{} return nil, nil }), // provisioningInfoChan fired facade.EXPECT().Life("test").Return(life.Alive, nil), - ops.EXPECT().AppAlive("test", app, gomock.Any(), gomock.Any(), facade, clk, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) error { + ops.EXPECT().AppAlive("test", app, gomock.Any(), gomock.Any(), facade, clk, s.logger).DoAndReturn(func(s1 string, _ caas.Application, s2 string, ac *caas.ApplicationConfig, _ caasapplicationprovisioner.CAASProvisionerFacade, c clock.Clock, _ caasapplicationprovisioner.Logger) error { provisioningInfoChan <- struct{}{} return nil }), facade.EXPECT().Life("test").Return(life.Dying, nil), - ops.EXPECT().AppDying("test", app, life.Dying, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _ any) error { + ops.EXPECT().AppDying("test", app, life.Dying, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, v life.Value, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) error { provisioningInfoChan <- struct{}{} return nil }), facade.EXPECT().Life("test").Return(life.Dead, nil), ops.EXPECT().AppDying("test", app, life.Dead, facade, unitFacade, s.logger).Return(nil), - ops.EXPECT().AppDead("test", app, broker, facade, unitFacade, clk, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) error { + ops.EXPECT().AppDead("test", app, broker, facade, unitFacade, clk, s.logger).DoAndReturn(func(_ string, _ caas.Application, c1 caasapplicationprovisioner.CAASBroker, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, c2 clock.Clock, _ caasapplicationprovisioner.Logger) error { close(done) return nil }), @@ -279,12 +282,12 @@ func (s *ApplicationWorkerSuite) TestWorkerStatusOnly(c *gc.C) { }), // appChan fired - ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) (map[string]status.StatusInfo, error) { + ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ map[string]status.StatusInfo, _ caasapplicationprovisioner.CAASBroker, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error) { appReplicasChan <- struct{}{} return nil, nil }), // appReplicasChan fired - ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_, _, _, _, _, _, _ any) (map[string]status.StatusInfo, error) { + ops.EXPECT().UpdateState("test", app, gomock.Any(), broker, facade, unitFacade, s.logger).DoAndReturn(func(_ string, _ caas.Application, _ map[string]status.StatusInfo, _ caasapplicationprovisioner.CAASBroker, _ caasapplicationprovisioner.CAASProvisionerFacade, _ caasapplicationprovisioner.CAASUnitProvisionerFacade, _ caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error) { provisioningInfoChan <- struct{}{} return nil, nil }), diff --git a/internal/worker/caasapplicationprovisioner/mock_test.go b/internal/worker/caasapplicationprovisioner/mock_test.go index 583ab43075d..2f5b5b21adf 100644 --- a/internal/worker/caasapplicationprovisioner/mock_test.go +++ b/internal/worker/caasapplicationprovisioner/mock_test.go @@ -8,11 +8,11 @@ import ( "github.com/juju/worker/v4" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASBroker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASProvisionerFacade -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/unitfacade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASUnitProvisionerFacade -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/runner_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner Runner -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/ops_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner ApplicationOps +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASBroker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASProvisionerFacade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/unitfacade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASUnitProvisionerFacade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/runner_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner Runner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/ops_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner ApplicationOps type mockNotifyWorker struct { worker.Worker diff --git a/internal/worker/caasapplicationprovisioner/mocks/broker_mock.go b/internal/worker/caasapplicationprovisioner/mocks/broker_mock.go index 5cdfd7b756a..344021b8e12 100644 --- a/internal/worker/caasapplicationprovisioner/mocks/broker_mock.go +++ b/internal/worker/caasapplicationprovisioner/mocks/broker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASBroker +// mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASBroker // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockCAASBroker) AnnotateUnit(arg0 context.Context, arg1, arg2 string, a } // AnnotateUnit indicates an expected call of AnnotateUnit. -func (mr *MockCAASBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCAASBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *MockCAASBrokerAnnotateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockCAASBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockCAASBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + return &MockCAASBrokerAnnotateUnitCall{Call: call} +} + +// MockCAASBrokerAnnotateUnitCall wrap *gomock.Call +type MockCAASBrokerAnnotateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASBrokerAnnotateUnitCall) Return(arg0 error) *MockCAASBrokerAnnotateUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASBrokerAnnotateUnitCall) Do(f func(context.Context, string, string, names.UnitTag) error) *MockCAASBrokerAnnotateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASBrokerAnnotateUnitCall) DoAndReturn(f func(context.Context, string, string, names.UnitTag) error) *MockCAASBrokerAnnotateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -64,9 +88,33 @@ func (m *MockCAASBroker) Application(arg0 string, arg1 caas.DeploymentType) caas } // Application indicates an expected call of Application. -func (mr *MockCAASBrokerMockRecorder) Application(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASBrokerMockRecorder) Application(arg0, arg1 any) *MockCAASBrokerApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockCAASBroker)(nil).Application), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockCAASBroker)(nil).Application), arg0, arg1) + return &MockCAASBrokerApplicationCall{Call: call} +} + +// MockCAASBrokerApplicationCall wrap *gomock.Call +type MockCAASBrokerApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASBrokerApplicationCall) Return(arg0 caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASBrokerApplicationCall) Do(f func(string, caas.DeploymentType) caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASBrokerApplicationCall) DoAndReturn(f func(string, caas.DeploymentType) caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -79,7 +127,31 @@ func (m *MockCAASBroker) Units(arg0 context.Context, arg1 string) ([]caas.Unit, } // Units indicates an expected call of Units. -func (mr *MockCAASBrokerMockRecorder) Units(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASBrokerMockRecorder) Units(arg0, arg1 any) *MockCAASBrokerUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockCAASBroker)(nil).Units), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockCAASBroker)(nil).Units), arg0, arg1) + return &MockCAASBrokerUnitsCall{Call: call} +} + +// MockCAASBrokerUnitsCall wrap *gomock.Call +type MockCAASBrokerUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASBrokerUnitsCall) Return(arg0 []caas.Unit, arg1 error) *MockCAASBrokerUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASBrokerUnitsCall) Do(f func(context.Context, string) ([]caas.Unit, error)) *MockCAASBrokerUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASBrokerUnitsCall) DoAndReturn(f func(context.Context, string) ([]caas.Unit, error)) *MockCAASBrokerUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasapplicationprovisioner/mocks/facade_mock.go b/internal/worker/caasapplicationprovisioner/mocks/facade_mock.go index 300efc2bd1a..35e803eebd7 100644 --- a/internal/worker/caasapplicationprovisioner/mocks/facade_mock.go +++ b/internal/worker/caasapplicationprovisioner/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASProvisionerFacade +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASProvisionerFacade // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockCAASProvisionerFacade) ApplicationCharmInfo(arg0 string) (*charms.C } // ApplicationCharmInfo indicates an expected call of ApplicationCharmInfo. -func (mr *MockCAASProvisionerFacadeMockRecorder) ApplicationCharmInfo(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ApplicationCharmInfo(arg0 any) *MockCAASProvisionerFacadeApplicationCharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ApplicationCharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ApplicationCharmInfo), arg0) + return &MockCAASProvisionerFacadeApplicationCharmInfoCall{Call: call} +} + +// MockCAASProvisionerFacadeApplicationCharmInfoCall wrap *gomock.Call +type MockCAASProvisionerFacadeApplicationCharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeApplicationCharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockCAASProvisionerFacadeApplicationCharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeApplicationCharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockCAASProvisionerFacadeApplicationCharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeApplicationCharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockCAASProvisionerFacadeApplicationCharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationOCIResources mocks base method. @@ -70,9 +94,33 @@ func (m *MockCAASProvisionerFacade) ApplicationOCIResources(arg0 string) (map[st } // ApplicationOCIResources indicates an expected call of ApplicationOCIResources. -func (mr *MockCAASProvisionerFacadeMockRecorder) ApplicationOCIResources(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ApplicationOCIResources(arg0 any) *MockCAASProvisionerFacadeApplicationOCIResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOCIResources", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ApplicationOCIResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationOCIResources", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ApplicationOCIResources), arg0) + return &MockCAASProvisionerFacadeApplicationOCIResourcesCall{Call: call} +} + +// MockCAASProvisionerFacadeApplicationOCIResourcesCall wrap *gomock.Call +type MockCAASProvisionerFacadeApplicationOCIResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeApplicationOCIResourcesCall) Return(arg0 map[string]resources.DockerImageDetails, arg1 error) *MockCAASProvisionerFacadeApplicationOCIResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeApplicationOCIResourcesCall) Do(f func(string) (map[string]resources.DockerImageDetails, error)) *MockCAASProvisionerFacadeApplicationOCIResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeApplicationOCIResourcesCall) DoAndReturn(f func(string) (map[string]resources.DockerImageDetails, error)) *MockCAASProvisionerFacadeApplicationOCIResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmInfo mocks base method. @@ -85,9 +133,33 @@ func (m *MockCAASProvisionerFacade) CharmInfo(arg0 string) (*charms.CharmInfo, e } // CharmInfo indicates an expected call of CharmInfo. -func (mr *MockCAASProvisionerFacadeMockRecorder) CharmInfo(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) CharmInfo(arg0 any) *MockCAASProvisionerFacadeCharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).CharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).CharmInfo), arg0) + return &MockCAASProvisionerFacadeCharmInfoCall{Call: call} +} + +// MockCAASProvisionerFacadeCharmInfoCall wrap *gomock.Call +type MockCAASProvisionerFacadeCharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeCharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockCAASProvisionerFacadeCharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeCharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockCAASProvisionerFacadeCharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeCharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockCAASProvisionerFacadeCharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClearApplicationResources mocks base method. @@ -99,9 +171,33 @@ func (m *MockCAASProvisionerFacade) ClearApplicationResources(arg0 string) error } // ClearApplicationResources indicates an expected call of ClearApplicationResources. -func (mr *MockCAASProvisionerFacadeMockRecorder) ClearApplicationResources(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ClearApplicationResources(arg0 any) *MockCAASProvisionerFacadeClearApplicationResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearApplicationResources", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ClearApplicationResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearApplicationResources", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ClearApplicationResources), arg0) + return &MockCAASProvisionerFacadeClearApplicationResourcesCall{Call: call} +} + +// MockCAASProvisionerFacadeClearApplicationResourcesCall wrap *gomock.Call +type MockCAASProvisionerFacadeClearApplicationResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeClearApplicationResourcesCall) Return(arg0 error) *MockCAASProvisionerFacadeClearApplicationResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeClearApplicationResourcesCall) Do(f func(string) error) *MockCAASProvisionerFacadeClearApplicationResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeClearApplicationResourcesCall) DoAndReturn(f func(string) error) *MockCAASProvisionerFacadeClearApplicationResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyUnits mocks base method. @@ -113,9 +209,33 @@ func (m *MockCAASProvisionerFacade) DestroyUnits(arg0 []string) error { } // DestroyUnits indicates an expected call of DestroyUnits. -func (mr *MockCAASProvisionerFacadeMockRecorder) DestroyUnits(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) DestroyUnits(arg0 any) *MockCAASProvisionerFacadeDestroyUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).DestroyUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).DestroyUnits), arg0) + return &MockCAASProvisionerFacadeDestroyUnitsCall{Call: call} +} + +// MockCAASProvisionerFacadeDestroyUnitsCall wrap *gomock.Call +type MockCAASProvisionerFacadeDestroyUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeDestroyUnitsCall) Return(arg0 error) *MockCAASProvisionerFacadeDestroyUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeDestroyUnitsCall) Do(f func([]string) error) *MockCAASProvisionerFacadeDestroyUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeDestroyUnitsCall) DoAndReturn(f func([]string) error) *MockCAASProvisionerFacadeDestroyUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -128,9 +248,33 @@ func (m *MockCAASProvisionerFacade) Life(arg0 string) (life.Value, error) { } // Life indicates an expected call of Life. -func (mr *MockCAASProvisionerFacadeMockRecorder) Life(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) Life(arg0 any) *MockCAASProvisionerFacadeLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).Life), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).Life), arg0) + return &MockCAASProvisionerFacadeLifeCall{Call: call} +} + +// MockCAASProvisionerFacadeLifeCall wrap *gomock.Call +type MockCAASProvisionerFacadeLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeLifeCall) Return(arg0 life.Value, arg1 error) *MockCAASProvisionerFacadeLifeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeLifeCall) Do(f func(string) (life.Value, error)) *MockCAASProvisionerFacadeLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeLifeCall) DoAndReturn(f func(string) (life.Value, error)) *MockCAASProvisionerFacadeLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProvisionerConfig mocks base method. @@ -143,9 +287,33 @@ func (m *MockCAASProvisionerFacade) ProvisionerConfig() (params.CAASApplicationP } // ProvisionerConfig indicates an expected call of ProvisionerConfig. -func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisionerConfig() *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisionerConfig() *MockCAASProvisionerFacadeProvisionerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisionerConfig", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisionerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisionerConfig", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisionerConfig)) + return &MockCAASProvisionerFacadeProvisionerConfigCall{Call: call} +} + +// MockCAASProvisionerFacadeProvisionerConfigCall wrap *gomock.Call +type MockCAASProvisionerFacadeProvisionerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeProvisionerConfigCall) Return(arg0 params.CAASApplicationProvisionerConfig, arg1 error) *MockCAASProvisionerFacadeProvisionerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeProvisionerConfigCall) Do(f func() (params.CAASApplicationProvisionerConfig, error)) *MockCAASProvisionerFacadeProvisionerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeProvisionerConfigCall) DoAndReturn(f func() (params.CAASApplicationProvisionerConfig, error)) *MockCAASProvisionerFacadeProvisionerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProvisioningInfo mocks base method. @@ -158,9 +326,33 @@ func (m *MockCAASProvisionerFacade) ProvisioningInfo(arg0 string) (caasapplicati } // ProvisioningInfo indicates an expected call of ProvisioningInfo. -func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisioningInfo(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisioningInfo(arg0 any) *MockCAASProvisionerFacadeProvisioningInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisioningInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisioningInfo), arg0) + return &MockCAASProvisionerFacadeProvisioningInfoCall{Call: call} +} + +// MockCAASProvisionerFacadeProvisioningInfoCall wrap *gomock.Call +type MockCAASProvisionerFacadeProvisioningInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeProvisioningInfoCall) Return(arg0 caasapplicationprovisioner.ProvisioningInfo, arg1 error) *MockCAASProvisionerFacadeProvisioningInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeProvisioningInfoCall) Do(f func(string) (caasapplicationprovisioner.ProvisioningInfo, error)) *MockCAASProvisionerFacadeProvisioningInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeProvisioningInfoCall) DoAndReturn(f func(string) (caasapplicationprovisioner.ProvisioningInfo, error)) *MockCAASProvisionerFacadeProvisioningInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProvisioningState mocks base method. @@ -173,9 +365,33 @@ func (m *MockCAASProvisionerFacade) ProvisioningState(arg0 string) (*params.CAAS } // ProvisioningState indicates an expected call of ProvisioningState. -func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisioningState(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) ProvisioningState(arg0 any) *MockCAASProvisionerFacadeProvisioningStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningState", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisioningState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningState", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).ProvisioningState), arg0) + return &MockCAASProvisionerFacadeProvisioningStateCall{Call: call} +} + +// MockCAASProvisionerFacadeProvisioningStateCall wrap *gomock.Call +type MockCAASProvisionerFacadeProvisioningStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeProvisioningStateCall) Return(arg0 *params.CAASApplicationProvisioningState, arg1 error) *MockCAASProvisionerFacadeProvisioningStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeProvisioningStateCall) Do(f func(string) (*params.CAASApplicationProvisioningState, error)) *MockCAASProvisionerFacadeProvisioningStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeProvisioningStateCall) DoAndReturn(f func(string) (*params.CAASApplicationProvisioningState, error)) *MockCAASProvisionerFacadeProvisioningStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUnit mocks base method. @@ -187,9 +403,33 @@ func (m *MockCAASProvisionerFacade) RemoveUnit(arg0 string) error { } // RemoveUnit indicates an expected call of RemoveUnit. -func (mr *MockCAASProvisionerFacadeMockRecorder) RemoveUnit(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) RemoveUnit(arg0 any) *MockCAASProvisionerFacadeRemoveUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUnit", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).RemoveUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUnit", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).RemoveUnit), arg0) + return &MockCAASProvisionerFacadeRemoveUnitCall{Call: call} +} + +// MockCAASProvisionerFacadeRemoveUnitCall wrap *gomock.Call +type MockCAASProvisionerFacadeRemoveUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeRemoveUnitCall) Return(arg0 error) *MockCAASProvisionerFacadeRemoveUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeRemoveUnitCall) Do(f func(string) error) *MockCAASProvisionerFacadeRemoveUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeRemoveUnitCall) DoAndReturn(f func(string) error) *MockCAASProvisionerFacadeRemoveUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOperatorStatus mocks base method. @@ -201,9 +441,33 @@ func (m *MockCAASProvisionerFacade) SetOperatorStatus(arg0 string, arg1 status.S } // SetOperatorStatus indicates an expected call of SetOperatorStatus. -func (mr *MockCAASProvisionerFacadeMockRecorder) SetOperatorStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) SetOperatorStatus(arg0, arg1, arg2, arg3 any) *MockCAASProvisionerFacadeSetOperatorStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOperatorStatus", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetOperatorStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOperatorStatus", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetOperatorStatus), arg0, arg1, arg2, arg3) + return &MockCAASProvisionerFacadeSetOperatorStatusCall{Call: call} +} + +// MockCAASProvisionerFacadeSetOperatorStatusCall wrap *gomock.Call +type MockCAASProvisionerFacadeSetOperatorStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeSetOperatorStatusCall) Return(arg0 error) *MockCAASProvisionerFacadeSetOperatorStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeSetOperatorStatusCall) Do(f func(string, status.Status, string, map[string]any) error) *MockCAASProvisionerFacadeSetOperatorStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeSetOperatorStatusCall) DoAndReturn(f func(string, status.Status, string, map[string]any) error) *MockCAASProvisionerFacadeSetOperatorStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -215,9 +479,33 @@ func (m *MockCAASProvisionerFacade) SetPassword(arg0, arg1 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockCAASProvisionerFacadeMockRecorder) SetPassword(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) SetPassword(arg0, arg1 any) *MockCAASProvisionerFacadeSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetPassword), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetPassword), arg0, arg1) + return &MockCAASProvisionerFacadeSetPasswordCall{Call: call} +} + +// MockCAASProvisionerFacadeSetPasswordCall wrap *gomock.Call +type MockCAASProvisionerFacadeSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeSetPasswordCall) Return(arg0 error) *MockCAASProvisionerFacadeSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeSetPasswordCall) Do(f func(string, string) error) *MockCAASProvisionerFacadeSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeSetPasswordCall) DoAndReturn(f func(string, string) error) *MockCAASProvisionerFacadeSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProvisioningState mocks base method. @@ -229,9 +517,33 @@ func (m *MockCAASProvisionerFacade) SetProvisioningState(arg0 string, arg1 param } // SetProvisioningState indicates an expected call of SetProvisioningState. -func (mr *MockCAASProvisionerFacadeMockRecorder) SetProvisioningState(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) SetProvisioningState(arg0, arg1 any) *MockCAASProvisionerFacadeSetProvisioningStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProvisioningState", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetProvisioningState), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProvisioningState", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).SetProvisioningState), arg0, arg1) + return &MockCAASProvisionerFacadeSetProvisioningStateCall{Call: call} +} + +// MockCAASProvisionerFacadeSetProvisioningStateCall wrap *gomock.Call +type MockCAASProvisionerFacadeSetProvisioningStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeSetProvisioningStateCall) Return(arg0 error) *MockCAASProvisionerFacadeSetProvisioningStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeSetProvisioningStateCall) Do(f func(string, params.CAASApplicationProvisioningState) error) *MockCAASProvisionerFacadeSetProvisioningStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeSetProvisioningStateCall) DoAndReturn(f func(string, params.CAASApplicationProvisioningState) error) *MockCAASProvisionerFacadeSetProvisioningStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -244,9 +556,33 @@ func (m *MockCAASProvisionerFacade) Units(arg0 string) ([]params.CAASUnit, error } // Units indicates an expected call of Units. -func (mr *MockCAASProvisionerFacadeMockRecorder) Units(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) Units(arg0 any) *MockCAASProvisionerFacadeUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).Units), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).Units), arg0) + return &MockCAASProvisionerFacadeUnitsCall{Call: call} +} + +// MockCAASProvisionerFacadeUnitsCall wrap *gomock.Call +type MockCAASProvisionerFacadeUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeUnitsCall) Return(arg0 []params.CAASUnit, arg1 error) *MockCAASProvisionerFacadeUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeUnitsCall) Do(f func(string) ([]params.CAASUnit, error)) *MockCAASProvisionerFacadeUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeUnitsCall) DoAndReturn(f func(string) ([]params.CAASUnit, error)) *MockCAASProvisionerFacadeUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateUnits mocks base method. @@ -259,9 +595,33 @@ func (m *MockCAASProvisionerFacade) UpdateUnits(arg0 params.UpdateApplicationUni } // UpdateUnits indicates an expected call of UpdateUnits. -func (mr *MockCAASProvisionerFacadeMockRecorder) UpdateUnits(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) UpdateUnits(arg0 any) *MockCAASProvisionerFacadeUpdateUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).UpdateUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).UpdateUnits), arg0) + return &MockCAASProvisionerFacadeUpdateUnitsCall{Call: call} +} + +// MockCAASProvisionerFacadeUpdateUnitsCall wrap *gomock.Call +type MockCAASProvisionerFacadeUpdateUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeUpdateUnitsCall) Return(arg0 *params.UpdateApplicationUnitsInfo, arg1 error) *MockCAASProvisionerFacadeUpdateUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeUpdateUnitsCall) Do(f func(params.UpdateApplicationUnits) (*params.UpdateApplicationUnitsInfo, error)) *MockCAASProvisionerFacadeUpdateUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeUpdateUnitsCall) DoAndReturn(f func(params.UpdateApplicationUnits) (*params.UpdateApplicationUnitsInfo, error)) *MockCAASProvisionerFacadeUpdateUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplication mocks base method. @@ -274,9 +634,33 @@ func (m *MockCAASProvisionerFacade) WatchApplication(arg0 string) (watcher.Watch } // WatchApplication indicates an expected call of WatchApplication. -func (mr *MockCAASProvisionerFacadeMockRecorder) WatchApplication(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) WatchApplication(arg0 any) *MockCAASProvisionerFacadeWatchApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchApplication), arg0) + return &MockCAASProvisionerFacadeWatchApplicationCall{Call: call} +} + +// MockCAASProvisionerFacadeWatchApplicationCall wrap *gomock.Call +type MockCAASProvisionerFacadeWatchApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeWatchApplicationCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCAASProvisionerFacadeWatchApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeWatchApplicationCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASProvisionerFacadeWatchApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeWatchApplicationCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASProvisionerFacadeWatchApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplications mocks base method. @@ -289,9 +673,33 @@ func (m *MockCAASProvisionerFacade) WatchApplications() (watcher.Watcher[[]strin } // WatchApplications indicates an expected call of WatchApplications. -func (mr *MockCAASProvisionerFacadeMockRecorder) WatchApplications() *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) WatchApplications() *MockCAASProvisionerFacadeWatchApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchApplications)) + return &MockCAASProvisionerFacadeWatchApplicationsCall{Call: call} +} + +// MockCAASProvisionerFacadeWatchApplicationsCall wrap *gomock.Call +type MockCAASProvisionerFacadeWatchApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeWatchApplicationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCAASProvisionerFacadeWatchApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeWatchApplicationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockCAASProvisionerFacadeWatchApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeWatchApplicationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockCAASProvisionerFacadeWatchApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchProvisioningInfo mocks base method. @@ -304,9 +712,33 @@ func (m *MockCAASProvisionerFacade) WatchProvisioningInfo(arg0 string) (watcher. } // WatchProvisioningInfo indicates an expected call of WatchProvisioningInfo. -func (mr *MockCAASProvisionerFacadeMockRecorder) WatchProvisioningInfo(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) WatchProvisioningInfo(arg0 any) *MockCAASProvisionerFacadeWatchProvisioningInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchProvisioningInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchProvisioningInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchProvisioningInfo", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchProvisioningInfo), arg0) + return &MockCAASProvisionerFacadeWatchProvisioningInfoCall{Call: call} +} + +// MockCAASProvisionerFacadeWatchProvisioningInfoCall wrap *gomock.Call +type MockCAASProvisionerFacadeWatchProvisioningInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeWatchProvisioningInfoCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCAASProvisionerFacadeWatchProvisioningInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeWatchProvisioningInfoCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASProvisionerFacadeWatchProvisioningInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeWatchProvisioningInfoCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASProvisionerFacadeWatchProvisioningInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUnits mocks base method. @@ -319,7 +751,31 @@ func (m *MockCAASProvisionerFacade) WatchUnits(arg0 string) (watcher.Watcher[[]s } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockCAASProvisionerFacadeMockRecorder) WatchUnits(arg0 any) *gomock.Call { +func (mr *MockCAASProvisionerFacadeMockRecorder) WatchUnits(arg0 any) *MockCAASProvisionerFacadeWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockCAASProvisionerFacade)(nil).WatchUnits), arg0) + return &MockCAASProvisionerFacadeWatchUnitsCall{Call: call} +} + +// MockCAASProvisionerFacadeWatchUnitsCall wrap *gomock.Call +type MockCAASProvisionerFacadeWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASProvisionerFacadeWatchUnitsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCAASProvisionerFacadeWatchUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASProvisionerFacadeWatchUnitsCall) Do(f func(string) (watcher.Watcher[[]string], error)) *MockCAASProvisionerFacadeWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASProvisionerFacadeWatchUnitsCall) DoAndReturn(f func(string) (watcher.Watcher[[]string], error)) *MockCAASProvisionerFacadeWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasapplicationprovisioner/mocks/ops_mock.go b/internal/worker/caasapplicationprovisioner/mocks/ops_mock.go index 1f72c3341e2..1d83389a27c 100644 --- a/internal/worker/caasapplicationprovisioner/mocks/ops_mock.go +++ b/internal/worker/caasapplicationprovisioner/mocks/ops_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/ops_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner ApplicationOps +// mockgen -typed -package mocks -destination mocks/ops_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner ApplicationOps // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockApplicationOps) AppAlive(arg0 string, arg1 caas.Application, arg2 s } // AppAlive indicates an expected call of AppAlive. -func (mr *MockApplicationOpsMockRecorder) AppAlive(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) AppAlive(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockApplicationOpsAppAliveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppAlive", reflect.TypeOf((*MockApplicationOps)(nil).AppAlive), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppAlive", reflect.TypeOf((*MockApplicationOps)(nil).AppAlive), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockApplicationOpsAppAliveCall{Call: call} +} + +// MockApplicationOpsAppAliveCall wrap *gomock.Call +type MockApplicationOpsAppAliveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsAppAliveCall) Return(arg0 error) *MockApplicationOpsAppAliveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsAppAliveCall) Do(f func(string, caas.Application, string, *caas.ApplicationConfig, caasapplicationprovisioner.CAASProvisionerFacade, clock.Clock, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppAliveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsAppAliveCall) DoAndReturn(f func(string, caas.Application, string, *caas.ApplicationConfig, caasapplicationprovisioner.CAASProvisionerFacade, clock.Clock, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppAliveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AppDead mocks base method. @@ -66,9 +90,33 @@ func (m *MockApplicationOps) AppDead(arg0 string, arg1 caas.Application, arg2 ca } // AppDead indicates an expected call of AppDead. -func (mr *MockApplicationOpsMockRecorder) AppDead(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) AppDead(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockApplicationOpsAppDeadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppDead", reflect.TypeOf((*MockApplicationOps)(nil).AppDead), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppDead", reflect.TypeOf((*MockApplicationOps)(nil).AppDead), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockApplicationOpsAppDeadCall{Call: call} +} + +// MockApplicationOpsAppDeadCall wrap *gomock.Call +type MockApplicationOpsAppDeadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsAppDeadCall) Return(arg0 error) *MockApplicationOpsAppDeadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsAppDeadCall) Do(f func(string, caas.Application, caasapplicationprovisioner.CAASBroker, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, clock.Clock, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppDeadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsAppDeadCall) DoAndReturn(f func(string, caas.Application, caasapplicationprovisioner.CAASBroker, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, clock.Clock, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppDeadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AppDying mocks base method. @@ -80,9 +128,33 @@ func (m *MockApplicationOps) AppDying(arg0 string, arg1 caas.Application, arg2 l } // AppDying indicates an expected call of AppDying. -func (mr *MockApplicationOpsMockRecorder) AppDying(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) AppDying(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockApplicationOpsAppDyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppDying", reflect.TypeOf((*MockApplicationOps)(nil).AppDying), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppDying", reflect.TypeOf((*MockApplicationOps)(nil).AppDying), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockApplicationOpsAppDyingCall{Call: call} +} + +// MockApplicationOpsAppDyingCall wrap *gomock.Call +type MockApplicationOpsAppDyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsAppDyingCall) Return(arg0 error) *MockApplicationOpsAppDyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsAppDyingCall) Do(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppDyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsAppDyingCall) DoAndReturn(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsAppDyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCharmFormat mocks base method. @@ -95,9 +167,33 @@ func (m *MockApplicationOps) CheckCharmFormat(arg0 string, arg1 caasapplicationp } // CheckCharmFormat indicates an expected call of CheckCharmFormat. -func (mr *MockApplicationOpsMockRecorder) CheckCharmFormat(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) CheckCharmFormat(arg0, arg1, arg2 any) *MockApplicationOpsCheckCharmFormatCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmFormat", reflect.TypeOf((*MockApplicationOps)(nil).CheckCharmFormat), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCharmFormat", reflect.TypeOf((*MockApplicationOps)(nil).CheckCharmFormat), arg0, arg1, arg2) + return &MockApplicationOpsCheckCharmFormatCall{Call: call} +} + +// MockApplicationOpsCheckCharmFormatCall wrap *gomock.Call +type MockApplicationOpsCheckCharmFormatCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsCheckCharmFormatCall) Return(arg0 bool, arg1 error) *MockApplicationOpsCheckCharmFormatCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsCheckCharmFormatCall) Do(f func(string, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) (bool, error)) *MockApplicationOpsCheckCharmFormatCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsCheckCharmFormatCall) DoAndReturn(f func(string, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) (bool, error)) *MockApplicationOpsCheckCharmFormatCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureScale mocks base method. @@ -109,9 +205,33 @@ func (m *MockApplicationOps) EnsureScale(arg0 string, arg1 caas.Application, arg } // EnsureScale indicates an expected call of EnsureScale. -func (mr *MockApplicationOpsMockRecorder) EnsureScale(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) EnsureScale(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockApplicationOpsEnsureScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureScale", reflect.TypeOf((*MockApplicationOps)(nil).EnsureScale), arg0, arg1, arg2, arg3, arg4, arg5) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureScale", reflect.TypeOf((*MockApplicationOps)(nil).EnsureScale), arg0, arg1, arg2, arg3, arg4, arg5) + return &MockApplicationOpsEnsureScaleCall{Call: call} +} + +// MockApplicationOpsEnsureScaleCall wrap *gomock.Call +type MockApplicationOpsEnsureScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsEnsureScaleCall) Return(arg0 error) *MockApplicationOpsEnsureScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsEnsureScaleCall) Do(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsEnsureScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsEnsureScaleCall) DoAndReturn(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsEnsureScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureTrust mocks base method. @@ -123,9 +243,33 @@ func (m *MockApplicationOps) EnsureTrust(arg0 string, arg1 caas.Application, arg } // EnsureTrust indicates an expected call of EnsureTrust. -func (mr *MockApplicationOpsMockRecorder) EnsureTrust(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) EnsureTrust(arg0, arg1, arg2, arg3 any) *MockApplicationOpsEnsureTrustCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTrust", reflect.TypeOf((*MockApplicationOps)(nil).EnsureTrust), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTrust", reflect.TypeOf((*MockApplicationOps)(nil).EnsureTrust), arg0, arg1, arg2, arg3) + return &MockApplicationOpsEnsureTrustCall{Call: call} +} + +// MockApplicationOpsEnsureTrustCall wrap *gomock.Call +type MockApplicationOpsEnsureTrustCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsEnsureTrustCall) Return(arg0 error) *MockApplicationOpsEnsureTrustCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsEnsureTrustCall) Do(f func(string, caas.Application, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsEnsureTrustCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsEnsureTrustCall) DoAndReturn(f func(string, caas.Application, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsEnsureTrustCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReconcileDeadUnitScale mocks base method. @@ -137,9 +281,33 @@ func (m *MockApplicationOps) ReconcileDeadUnitScale(arg0 string, arg1 caas.Appli } // ReconcileDeadUnitScale indicates an expected call of ReconcileDeadUnitScale. -func (mr *MockApplicationOpsMockRecorder) ReconcileDeadUnitScale(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) ReconcileDeadUnitScale(arg0, arg1, arg2, arg3 any) *MockApplicationOpsReconcileDeadUnitScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileDeadUnitScale", reflect.TypeOf((*MockApplicationOps)(nil).ReconcileDeadUnitScale), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileDeadUnitScale", reflect.TypeOf((*MockApplicationOps)(nil).ReconcileDeadUnitScale), arg0, arg1, arg2, arg3) + return &MockApplicationOpsReconcileDeadUnitScaleCall{Call: call} +} + +// MockApplicationOpsReconcileDeadUnitScaleCall wrap *gomock.Call +type MockApplicationOpsReconcileDeadUnitScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsReconcileDeadUnitScaleCall) Return(arg0 error) *MockApplicationOpsReconcileDeadUnitScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsReconcileDeadUnitScaleCall) Do(f func(string, caas.Application, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsReconcileDeadUnitScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsReconcileDeadUnitScaleCall) DoAndReturn(f func(string, caas.Application, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsReconcileDeadUnitScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RefreshApplicationStatus mocks base method. @@ -151,9 +319,33 @@ func (m *MockApplicationOps) RefreshApplicationStatus(arg0 string, arg1 caas.App } // RefreshApplicationStatus indicates an expected call of RefreshApplicationStatus. -func (mr *MockApplicationOpsMockRecorder) RefreshApplicationStatus(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) RefreshApplicationStatus(arg0, arg1, arg2, arg3, arg4 any) *MockApplicationOpsRefreshApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshApplicationStatus", reflect.TypeOf((*MockApplicationOps)(nil).RefreshApplicationStatus), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshApplicationStatus", reflect.TypeOf((*MockApplicationOps)(nil).RefreshApplicationStatus), arg0, arg1, arg2, arg3, arg4) + return &MockApplicationOpsRefreshApplicationStatusCall{Call: call} +} + +// MockApplicationOpsRefreshApplicationStatusCall wrap *gomock.Call +type MockApplicationOpsRefreshApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsRefreshApplicationStatusCall) Return(arg0 error) *MockApplicationOpsRefreshApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsRefreshApplicationStatusCall) Do(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsRefreshApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsRefreshApplicationStatusCall) DoAndReturn(f func(string, caas.Application, life.Value, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.Logger) error) *MockApplicationOpsRefreshApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateState mocks base method. @@ -166,9 +358,33 @@ func (m *MockApplicationOps) UpdateState(arg0 string, arg1 caas.Application, arg } // UpdateState indicates an expected call of UpdateState. -func (mr *MockApplicationOpsMockRecorder) UpdateState(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) UpdateState(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockApplicationOpsUpdateStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateState", reflect.TypeOf((*MockApplicationOps)(nil).UpdateState), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateState", reflect.TypeOf((*MockApplicationOps)(nil).UpdateState), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockApplicationOpsUpdateStateCall{Call: call} +} + +// MockApplicationOpsUpdateStateCall wrap *gomock.Call +type MockApplicationOpsUpdateStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsUpdateStateCall) Return(arg0 map[string]status.StatusInfo, arg1 error) *MockApplicationOpsUpdateStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsUpdateStateCall) Do(f func(string, caas.Application, map[string]status.StatusInfo, caasapplicationprovisioner.CAASBroker, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error)) *MockApplicationOpsUpdateStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsUpdateStateCall) DoAndReturn(f func(string, caas.Application, map[string]status.StatusInfo, caasapplicationprovisioner.CAASBroker, caasapplicationprovisioner.CAASProvisionerFacade, caasapplicationprovisioner.CAASUnitProvisionerFacade, caasapplicationprovisioner.Logger) (map[string]status.StatusInfo, error)) *MockApplicationOpsUpdateStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WaitForTerminated mocks base method. @@ -180,7 +396,31 @@ func (m *MockApplicationOps) WaitForTerminated(arg0 string, arg1 caas.Applicatio } // WaitForTerminated indicates an expected call of WaitForTerminated. -func (mr *MockApplicationOpsMockRecorder) WaitForTerminated(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApplicationOpsMockRecorder) WaitForTerminated(arg0, arg1, arg2 any) *MockApplicationOpsWaitForTerminatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForTerminated", reflect.TypeOf((*MockApplicationOps)(nil).WaitForTerminated), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForTerminated", reflect.TypeOf((*MockApplicationOps)(nil).WaitForTerminated), arg0, arg1, arg2) + return &MockApplicationOpsWaitForTerminatedCall{Call: call} +} + +// MockApplicationOpsWaitForTerminatedCall wrap *gomock.Call +type MockApplicationOpsWaitForTerminatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpsWaitForTerminatedCall) Return(arg0 error) *MockApplicationOpsWaitForTerminatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpsWaitForTerminatedCall) Do(f func(string, caas.Application, clock.Clock) error) *MockApplicationOpsWaitForTerminatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpsWaitForTerminatedCall) DoAndReturn(f func(string, caas.Application, clock.Clock) error) *MockApplicationOpsWaitForTerminatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasapplicationprovisioner/mocks/runner_mock.go b/internal/worker/caasapplicationprovisioner/mocks/runner_mock.go index 9d13a7a139b..d95be836148 100644 --- a/internal/worker/caasapplicationprovisioner/mocks/runner_mock.go +++ b/internal/worker/caasapplicationprovisioner/mocks/runner_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/runner_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner Runner +// mockgen -typed -package mocks -destination mocks/runner_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner Runner // // Package mocks is a generated GoMock package. @@ -46,9 +46,33 @@ func (m *MockRunner) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockRunnerMockRecorder) Kill() *gomock.Call { +func (mr *MockRunnerMockRecorder) Kill() *MockRunnerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockRunner)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockRunner)(nil).Kill)) + return &MockRunnerKillCall{Call: call} +} + +// MockRunnerKillCall wrap *gomock.Call +type MockRunnerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerKillCall) Return() *MockRunnerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerKillCall) Do(f func()) *MockRunnerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerKillCall) DoAndReturn(f func()) *MockRunnerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartWorker mocks base method. @@ -60,9 +84,33 @@ func (m *MockRunner) StartWorker(arg0 string, arg1 func() (worker.Worker, error) } // StartWorker indicates an expected call of StartWorker. -func (mr *MockRunnerMockRecorder) StartWorker(arg0, arg1 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) StartWorker(arg0, arg1 any) *MockRunnerStartWorkerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartWorker", reflect.TypeOf((*MockRunner)(nil).StartWorker), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartWorker", reflect.TypeOf((*MockRunner)(nil).StartWorker), arg0, arg1) + return &MockRunnerStartWorkerCall{Call: call} +} + +// MockRunnerStartWorkerCall wrap *gomock.Call +type MockRunnerStartWorkerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerStartWorkerCall) Return(arg0 error) *MockRunnerStartWorkerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerStartWorkerCall) Do(f func(string, func() (worker.Worker, error)) error) *MockRunnerStartWorkerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerStartWorkerCall) DoAndReturn(f func(string, func() (worker.Worker, error)) error) *MockRunnerStartWorkerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopAndRemoveWorker mocks base method. @@ -74,9 +122,33 @@ func (m *MockRunner) StopAndRemoveWorker(arg0 string, arg1 <-chan struct{}) erro } // StopAndRemoveWorker indicates an expected call of StopAndRemoveWorker. -func (mr *MockRunnerMockRecorder) StopAndRemoveWorker(arg0, arg1 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) StopAndRemoveWorker(arg0, arg1 any) *MockRunnerStopAndRemoveWorkerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopAndRemoveWorker", reflect.TypeOf((*MockRunner)(nil).StopAndRemoveWorker), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopAndRemoveWorker", reflect.TypeOf((*MockRunner)(nil).StopAndRemoveWorker), arg0, arg1) + return &MockRunnerStopAndRemoveWorkerCall{Call: call} +} + +// MockRunnerStopAndRemoveWorkerCall wrap *gomock.Call +type MockRunnerStopAndRemoveWorkerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerStopAndRemoveWorkerCall) Return(arg0 error) *MockRunnerStopAndRemoveWorkerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerStopAndRemoveWorkerCall) Do(f func(string, <-chan struct{}) error) *MockRunnerStopAndRemoveWorkerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerStopAndRemoveWorkerCall) DoAndReturn(f func(string, <-chan struct{}) error) *MockRunnerStopAndRemoveWorkerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -88,9 +160,33 @@ func (m *MockRunner) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockRunnerMockRecorder) Wait() *gomock.Call { +func (mr *MockRunnerMockRecorder) Wait() *MockRunnerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockRunner)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockRunner)(nil).Wait)) + return &MockRunnerWaitCall{Call: call} +} + +// MockRunnerWaitCall wrap *gomock.Call +type MockRunnerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerWaitCall) Return(arg0 error) *MockRunnerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerWaitCall) Do(f func() error) *MockRunnerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerWaitCall) DoAndReturn(f func() error) *MockRunnerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Worker mocks base method. @@ -103,7 +199,31 @@ func (m *MockRunner) Worker(arg0 string, arg1 <-chan struct{}) (worker.Worker, e } // Worker indicates an expected call of Worker. -func (mr *MockRunnerMockRecorder) Worker(arg0, arg1 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) Worker(arg0, arg1 any) *MockRunnerWorkerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Worker", reflect.TypeOf((*MockRunner)(nil).Worker), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Worker", reflect.TypeOf((*MockRunner)(nil).Worker), arg0, arg1) + return &MockRunnerWorkerCall{Call: call} +} + +// MockRunnerWorkerCall wrap *gomock.Call +type MockRunnerWorkerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerWorkerCall) Return(arg0 worker.Worker, arg1 error) *MockRunnerWorkerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerWorkerCall) Do(f func(string, <-chan struct{}) (worker.Worker, error)) *MockRunnerWorkerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerWorkerCall) DoAndReturn(f func(string, <-chan struct{}) (worker.Worker, error)) *MockRunnerWorkerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasapplicationprovisioner/mocks/unitfacade_mock.go b/internal/worker/caasapplicationprovisioner/mocks/unitfacade_mock.go index adc6c6ef305..467b82b43eb 100644 --- a/internal/worker/caasapplicationprovisioner/mocks/unitfacade_mock.go +++ b/internal/worker/caasapplicationprovisioner/mocks/unitfacade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/unitfacade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASUnitProvisionerFacade +// mockgen -typed -package mocks -destination mocks/unitfacade_mock.go github.com/juju/juju/internal/worker/caasapplicationprovisioner CAASUnitProvisionerFacade // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockCAASUnitProvisionerFacade) ApplicationScale(arg0 string) (int, erro } // ApplicationScale indicates an expected call of ApplicationScale. -func (mr *MockCAASUnitProvisionerFacadeMockRecorder) ApplicationScale(arg0 any) *gomock.Call { +func (mr *MockCAASUnitProvisionerFacadeMockRecorder) ApplicationScale(arg0 any) *MockCAASUnitProvisionerFacadeApplicationScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationScale", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).ApplicationScale), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationScale", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).ApplicationScale), arg0) + return &MockCAASUnitProvisionerFacadeApplicationScaleCall{Call: call} +} + +// MockCAASUnitProvisionerFacadeApplicationScaleCall wrap *gomock.Call +type MockCAASUnitProvisionerFacadeApplicationScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASUnitProvisionerFacadeApplicationScaleCall) Return(arg0 int, arg1 error) *MockCAASUnitProvisionerFacadeApplicationScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASUnitProvisionerFacadeApplicationScaleCall) Do(f func(string) (int, error)) *MockCAASUnitProvisionerFacadeApplicationScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASUnitProvisionerFacadeApplicationScaleCall) DoAndReturn(f func(string) (int, error)) *MockCAASUnitProvisionerFacadeApplicationScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationTrust mocks base method. @@ -65,9 +89,33 @@ func (m *MockCAASUnitProvisionerFacade) ApplicationTrust(arg0 string) (bool, err } // ApplicationTrust indicates an expected call of ApplicationTrust. -func (mr *MockCAASUnitProvisionerFacadeMockRecorder) ApplicationTrust(arg0 any) *gomock.Call { +func (mr *MockCAASUnitProvisionerFacadeMockRecorder) ApplicationTrust(arg0 any) *MockCAASUnitProvisionerFacadeApplicationTrustCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTrust", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).ApplicationTrust), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTrust", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).ApplicationTrust), arg0) + return &MockCAASUnitProvisionerFacadeApplicationTrustCall{Call: call} +} + +// MockCAASUnitProvisionerFacadeApplicationTrustCall wrap *gomock.Call +type MockCAASUnitProvisionerFacadeApplicationTrustCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASUnitProvisionerFacadeApplicationTrustCall) Return(arg0 bool, arg1 error) *MockCAASUnitProvisionerFacadeApplicationTrustCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASUnitProvisionerFacadeApplicationTrustCall) Do(f func(string) (bool, error)) *MockCAASUnitProvisionerFacadeApplicationTrustCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASUnitProvisionerFacadeApplicationTrustCall) DoAndReturn(f func(string) (bool, error)) *MockCAASUnitProvisionerFacadeApplicationTrustCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateApplicationService mocks base method. @@ -79,9 +127,33 @@ func (m *MockCAASUnitProvisionerFacade) UpdateApplicationService(arg0 params.Upd } // UpdateApplicationService indicates an expected call of UpdateApplicationService. -func (mr *MockCAASUnitProvisionerFacadeMockRecorder) UpdateApplicationService(arg0 any) *gomock.Call { +func (mr *MockCAASUnitProvisionerFacadeMockRecorder) UpdateApplicationService(arg0 any) *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationService", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).UpdateApplicationService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApplicationService", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).UpdateApplicationService), arg0) + return &MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall{Call: call} +} + +// MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall wrap *gomock.Call +type MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall) Return(arg0 error) *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall) Do(f func(params.UpdateApplicationServiceArg) error) *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall) DoAndReturn(f func(params.UpdateApplicationServiceArg) error) *MockCAASUnitProvisionerFacadeUpdateApplicationServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplicationScale mocks base method. @@ -94,9 +166,33 @@ func (m *MockCAASUnitProvisionerFacade) WatchApplicationScale(arg0 string) (watc } // WatchApplicationScale indicates an expected call of WatchApplicationScale. -func (mr *MockCAASUnitProvisionerFacadeMockRecorder) WatchApplicationScale(arg0 any) *gomock.Call { +func (mr *MockCAASUnitProvisionerFacadeMockRecorder) WatchApplicationScale(arg0 any) *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationScale", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).WatchApplicationScale), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationScale", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).WatchApplicationScale), arg0) + return &MockCAASUnitProvisionerFacadeWatchApplicationScaleCall{Call: call} +} + +// MockCAASUnitProvisionerFacadeWatchApplicationScaleCall wrap *gomock.Call +type MockCAASUnitProvisionerFacadeWatchApplicationScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASUnitProvisionerFacadeWatchApplicationScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplicationTrustHash mocks base method. @@ -109,7 +205,31 @@ func (m *MockCAASUnitProvisionerFacade) WatchApplicationTrustHash(arg0 string) ( } // WatchApplicationTrustHash indicates an expected call of WatchApplicationTrustHash. -func (mr *MockCAASUnitProvisionerFacadeMockRecorder) WatchApplicationTrustHash(arg0 any) *gomock.Call { +func (mr *MockCAASUnitProvisionerFacadeMockRecorder) WatchApplicationTrustHash(arg0 any) *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationTrustHash", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).WatchApplicationTrustHash), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationTrustHash", reflect.TypeOf((*MockCAASUnitProvisionerFacade)(nil).WatchApplicationTrustHash), arg0) + return &MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall{Call: call} +} + +// MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall wrap *gomock.Call +type MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall) Do(f func(string) (watcher.Watcher[[]string], error)) *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall) DoAndReturn(f func(string) (watcher.Watcher[[]string], error)) *MockCAASUnitProvisionerFacadeWatchApplicationTrustHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasfirewaller/mocks/api_base_mock.go b/internal/worker/caasfirewaller/mocks/api_base_mock.go index 30307b96011..c9f0cfc51d2 100644 --- a/internal/worker/caasfirewaller/mocks/api_base_mock.go +++ b/internal/worker/caasfirewaller/mocks/api_base_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/api_base_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/api_base_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasfirewaller/mocks/broker_mock.go b/internal/worker/caasfirewaller/mocks/broker_mock.go index a3334ef7a8a..218534d2f67 100644 --- a/internal/worker/caasfirewaller/mocks/broker_mock.go +++ b/internal/worker/caasfirewaller/mocks/broker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasfirewaller CAASBroker,PortMutator,ServiceUpdater +// mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasfirewaller CAASBroker,PortMutator,ServiceUpdater // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockCAASBroker) Application(arg0 string, arg1 caas.DeploymentType) caas } // Application indicates an expected call of Application. -func (mr *MockCAASBrokerMockRecorder) Application(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASBrokerMockRecorder) Application(arg0, arg1 any) *MockCAASBrokerApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockCAASBroker)(nil).Application), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockCAASBroker)(nil).Application), arg0, arg1) + return &MockCAASBrokerApplicationCall{Call: call} +} + +// MockCAASBrokerApplicationCall wrap *gomock.Call +type MockCAASBrokerApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASBrokerApplicationCall) Return(arg0 caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASBrokerApplicationCall) Do(f func(string, caas.DeploymentType) caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASBrokerApplicationCall) DoAndReturn(f func(string, caas.DeploymentType) caas.Application) *MockCAASBrokerApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPortMutator is a mock of PortMutator interface. @@ -85,9 +109,33 @@ func (m *MockPortMutator) UpdatePorts(arg0 []caas.ServicePort, arg1 bool) error } // UpdatePorts indicates an expected call of UpdatePorts. -func (mr *MockPortMutatorMockRecorder) UpdatePorts(arg0, arg1 any) *gomock.Call { +func (mr *MockPortMutatorMockRecorder) UpdatePorts(arg0, arg1 any) *MockPortMutatorUpdatePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePorts", reflect.TypeOf((*MockPortMutator)(nil).UpdatePorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePorts", reflect.TypeOf((*MockPortMutator)(nil).UpdatePorts), arg0, arg1) + return &MockPortMutatorUpdatePortsCall{Call: call} +} + +// MockPortMutatorUpdatePortsCall wrap *gomock.Call +type MockPortMutatorUpdatePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPortMutatorUpdatePortsCall) Return(arg0 error) *MockPortMutatorUpdatePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPortMutatorUpdatePortsCall) Do(f func([]caas.ServicePort, bool) error) *MockPortMutatorUpdatePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPortMutatorUpdatePortsCall) DoAndReturn(f func([]caas.ServicePort, bool) error) *MockPortMutatorUpdatePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceUpdater is a mock of ServiceUpdater interface. @@ -122,7 +170,31 @@ func (m *MockServiceUpdater) UpdateService(arg0 caas.ServiceParam) error { } // UpdateService indicates an expected call of UpdateService. -func (mr *MockServiceUpdaterMockRecorder) UpdateService(arg0 any) *gomock.Call { +func (mr *MockServiceUpdaterMockRecorder) UpdateService(arg0 any) *MockServiceUpdaterUpdateServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockServiceUpdater)(nil).UpdateService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockServiceUpdater)(nil).UpdateService), arg0) + return &MockServiceUpdaterUpdateServiceCall{Call: call} +} + +// MockServiceUpdaterUpdateServiceCall wrap *gomock.Call +type MockServiceUpdaterUpdateServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceUpdaterUpdateServiceCall) Return(arg0 error) *MockServiceUpdaterUpdateServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceUpdaterUpdateServiceCall) Do(f func(caas.ServiceParam) error) *MockServiceUpdaterUpdateServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceUpdaterUpdateServiceCall) DoAndReturn(f func(caas.ServiceParam) error) *MockServiceUpdaterUpdateServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasfirewaller/mocks/client_mock.go b/internal/worker/caasfirewaller/mocks/client_mock.go index 292477823e0..1d4a66d1dfb 100644 --- a/internal/worker/caasfirewaller/mocks/client_mock.go +++ b/internal/worker/caasfirewaller/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/caasfirewaller Client,CAASFirewallerAPI,LifeGetter +// mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/caasfirewaller Client,CAASFirewallerAPI,LifeGetter // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockClient) ApplicationCharmInfo(arg0 string) (*charms.CharmInfo, error } // ApplicationCharmInfo indicates an expected call of ApplicationCharmInfo. -func (mr *MockClientMockRecorder) ApplicationCharmInfo(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) ApplicationCharmInfo(arg0 any) *MockClientApplicationCharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockClient)(nil).ApplicationCharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockClient)(nil).ApplicationCharmInfo), arg0) + return &MockClientApplicationCharmInfoCall{Call: call} +} + +// MockClientApplicationCharmInfoCall wrap *gomock.Call +type MockClientApplicationCharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientApplicationCharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockClientApplicationCharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientApplicationCharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockClientApplicationCharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientApplicationCharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockClientApplicationCharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationConfig mocks base method. @@ -68,9 +92,33 @@ func (m *MockClient) ApplicationConfig(arg0 string) (config.ConfigAttributes, er } // ApplicationConfig indicates an expected call of ApplicationConfig. -func (mr *MockClientMockRecorder) ApplicationConfig(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) ApplicationConfig(arg0 any) *MockClientApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockClient)(nil).ApplicationConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockClient)(nil).ApplicationConfig), arg0) + return &MockClientApplicationConfigCall{Call: call} +} + +// MockClientApplicationConfigCall wrap *gomock.Call +type MockClientApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientApplicationConfigCall) Return(arg0 config.ConfigAttributes, arg1 error) *MockClientApplicationConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientApplicationConfigCall) Do(f func(string) (config.ConfigAttributes, error)) *MockClientApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientApplicationConfigCall) DoAndReturn(f func(string) (config.ConfigAttributes, error)) *MockClientApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOpenedPorts mocks base method. @@ -83,9 +131,33 @@ func (m *MockClient) GetOpenedPorts(arg0 string) (network.GroupedPortRanges, err } // GetOpenedPorts indicates an expected call of GetOpenedPorts. -func (mr *MockClientMockRecorder) GetOpenedPorts(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) GetOpenedPorts(arg0 any) *MockClientGetOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenedPorts", reflect.TypeOf((*MockClient)(nil).GetOpenedPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenedPorts", reflect.TypeOf((*MockClient)(nil).GetOpenedPorts), arg0) + return &MockClientGetOpenedPortsCall{Call: call} +} + +// MockClientGetOpenedPortsCall wrap *gomock.Call +type MockClientGetOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientGetOpenedPortsCall) Return(arg0 network.GroupedPortRanges, arg1 error) *MockClientGetOpenedPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientGetOpenedPortsCall) Do(f func(string) (network.GroupedPortRanges, error)) *MockClientGetOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientGetOpenedPortsCall) DoAndReturn(f func(string) (network.GroupedPortRanges, error)) *MockClientGetOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsExposed mocks base method. @@ -98,9 +170,33 @@ func (m *MockClient) IsExposed(arg0 string) (bool, error) { } // IsExposed indicates an expected call of IsExposed. -func (mr *MockClientMockRecorder) IsExposed(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) IsExposed(arg0 any) *MockClientIsExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockClient)(nil).IsExposed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockClient)(nil).IsExposed), arg0) + return &MockClientIsExposedCall{Call: call} +} + +// MockClientIsExposedCall wrap *gomock.Call +type MockClientIsExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientIsExposedCall) Return(arg0 bool, arg1 error) *MockClientIsExposedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientIsExposedCall) Do(f func(string) (bool, error)) *MockClientIsExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientIsExposedCall) DoAndReturn(f func(string) (bool, error)) *MockClientIsExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -113,9 +209,33 @@ func (m *MockClient) Life(arg0 string) (life.Value, error) { } // Life indicates an expected call of Life. -func (mr *MockClientMockRecorder) Life(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Life(arg0 any) *MockClientLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockClient)(nil).Life), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockClient)(nil).Life), arg0) + return &MockClientLifeCall{Call: call} +} + +// MockClientLifeCall wrap *gomock.Call +type MockClientLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientLifeCall) Return(arg0 life.Value, arg1 error) *MockClientLifeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientLifeCall) Do(f func(string) (life.Value, error)) *MockClientLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientLifeCall) DoAndReturn(f func(string) (life.Value, error)) *MockClientLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplication mocks base method. @@ -128,9 +248,33 @@ func (m *MockClient) WatchApplication(arg0 string) (watcher.Watcher[struct{}], e } // WatchApplication indicates an expected call of WatchApplication. -func (mr *MockClientMockRecorder) WatchApplication(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) WatchApplication(arg0 any) *MockClientWatchApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockClient)(nil).WatchApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockClient)(nil).WatchApplication), arg0) + return &MockClientWatchApplicationCall{Call: call} +} + +// MockClientWatchApplicationCall wrap *gomock.Call +type MockClientWatchApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientWatchApplicationCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockClientWatchApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientWatchApplicationCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockClientWatchApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientWatchApplicationCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockClientWatchApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplications mocks base method. @@ -143,9 +287,33 @@ func (m *MockClient) WatchApplications() (watcher.Watcher[[]string], error) { } // WatchApplications indicates an expected call of WatchApplications. -func (mr *MockClientMockRecorder) WatchApplications() *gomock.Call { +func (mr *MockClientMockRecorder) WatchApplications() *MockClientWatchApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockClient)(nil).WatchApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockClient)(nil).WatchApplications)) + return &MockClientWatchApplicationsCall{Call: call} +} + +// MockClientWatchApplicationsCall wrap *gomock.Call +type MockClientWatchApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientWatchApplicationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockClientWatchApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientWatchApplicationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockClientWatchApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientWatchApplicationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockClientWatchApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOpenedPorts mocks base method. @@ -158,9 +326,33 @@ func (m *MockClient) WatchOpenedPorts() (watcher.Watcher[[]string], error) { } // WatchOpenedPorts indicates an expected call of WatchOpenedPorts. -func (mr *MockClientMockRecorder) WatchOpenedPorts() *gomock.Call { +func (mr *MockClientMockRecorder) WatchOpenedPorts() *MockClientWatchOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockClient)(nil).WatchOpenedPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockClient)(nil).WatchOpenedPorts)) + return &MockClientWatchOpenedPortsCall{Call: call} +} + +// MockClientWatchOpenedPortsCall wrap *gomock.Call +type MockClientWatchOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientWatchOpenedPortsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockClientWatchOpenedPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientWatchOpenedPortsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockClientWatchOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientWatchOpenedPortsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockClientWatchOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCAASFirewallerAPI is a mock of CAASFirewallerAPI interface. @@ -196,9 +388,33 @@ func (m *MockCAASFirewallerAPI) ApplicationCharmInfo(arg0 string) (*charms.Charm } // ApplicationCharmInfo indicates an expected call of ApplicationCharmInfo. -func (mr *MockCAASFirewallerAPIMockRecorder) ApplicationCharmInfo(arg0 any) *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) ApplicationCharmInfo(arg0 any) *MockCAASFirewallerAPIApplicationCharmInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).ApplicationCharmInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationCharmInfo", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).ApplicationCharmInfo), arg0) + return &MockCAASFirewallerAPIApplicationCharmInfoCall{Call: call} +} + +// MockCAASFirewallerAPIApplicationCharmInfoCall wrap *gomock.Call +type MockCAASFirewallerAPIApplicationCharmInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIApplicationCharmInfoCall) Return(arg0 *charms.CharmInfo, arg1 error) *MockCAASFirewallerAPIApplicationCharmInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIApplicationCharmInfoCall) Do(f func(string) (*charms.CharmInfo, error)) *MockCAASFirewallerAPIApplicationCharmInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIApplicationCharmInfoCall) DoAndReturn(f func(string) (*charms.CharmInfo, error)) *MockCAASFirewallerAPIApplicationCharmInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationConfig mocks base method. @@ -211,9 +427,33 @@ func (m *MockCAASFirewallerAPI) ApplicationConfig(arg0 string) (config.ConfigAtt } // ApplicationConfig indicates an expected call of ApplicationConfig. -func (mr *MockCAASFirewallerAPIMockRecorder) ApplicationConfig(arg0 any) *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) ApplicationConfig(arg0 any) *MockCAASFirewallerAPIApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).ApplicationConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).ApplicationConfig), arg0) + return &MockCAASFirewallerAPIApplicationConfigCall{Call: call} +} + +// MockCAASFirewallerAPIApplicationConfigCall wrap *gomock.Call +type MockCAASFirewallerAPIApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIApplicationConfigCall) Return(arg0 config.ConfigAttributes, arg1 error) *MockCAASFirewallerAPIApplicationConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIApplicationConfigCall) Do(f func(string) (config.ConfigAttributes, error)) *MockCAASFirewallerAPIApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIApplicationConfigCall) DoAndReturn(f func(string) (config.ConfigAttributes, error)) *MockCAASFirewallerAPIApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetOpenedPorts mocks base method. @@ -226,9 +466,33 @@ func (m *MockCAASFirewallerAPI) GetOpenedPorts(arg0 string) (network.GroupedPort } // GetOpenedPorts indicates an expected call of GetOpenedPorts. -func (mr *MockCAASFirewallerAPIMockRecorder) GetOpenedPorts(arg0 any) *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) GetOpenedPorts(arg0 any) *MockCAASFirewallerAPIGetOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenedPorts", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).GetOpenedPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenedPorts", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).GetOpenedPorts), arg0) + return &MockCAASFirewallerAPIGetOpenedPortsCall{Call: call} +} + +// MockCAASFirewallerAPIGetOpenedPortsCall wrap *gomock.Call +type MockCAASFirewallerAPIGetOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIGetOpenedPortsCall) Return(arg0 network.GroupedPortRanges, arg1 error) *MockCAASFirewallerAPIGetOpenedPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIGetOpenedPortsCall) Do(f func(string) (network.GroupedPortRanges, error)) *MockCAASFirewallerAPIGetOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIGetOpenedPortsCall) DoAndReturn(f func(string) (network.GroupedPortRanges, error)) *MockCAASFirewallerAPIGetOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsExposed mocks base method. @@ -241,9 +505,33 @@ func (m *MockCAASFirewallerAPI) IsExposed(arg0 string) (bool, error) { } // IsExposed indicates an expected call of IsExposed. -func (mr *MockCAASFirewallerAPIMockRecorder) IsExposed(arg0 any) *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) IsExposed(arg0 any) *MockCAASFirewallerAPIIsExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).IsExposed), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExposed", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).IsExposed), arg0) + return &MockCAASFirewallerAPIIsExposedCall{Call: call} +} + +// MockCAASFirewallerAPIIsExposedCall wrap *gomock.Call +type MockCAASFirewallerAPIIsExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIIsExposedCall) Return(arg0 bool, arg1 error) *MockCAASFirewallerAPIIsExposedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIIsExposedCall) Do(f func(string) (bool, error)) *MockCAASFirewallerAPIIsExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIIsExposedCall) DoAndReturn(f func(string) (bool, error)) *MockCAASFirewallerAPIIsExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplication mocks base method. @@ -256,9 +544,33 @@ func (m *MockCAASFirewallerAPI) WatchApplication(arg0 string) (watcher.Watcher[s } // WatchApplication indicates an expected call of WatchApplication. -func (mr *MockCAASFirewallerAPIMockRecorder) WatchApplication(arg0 any) *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) WatchApplication(arg0 any) *MockCAASFirewallerAPIWatchApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplication", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchApplication), arg0) + return &MockCAASFirewallerAPIWatchApplicationCall{Call: call} +} + +// MockCAASFirewallerAPIWatchApplicationCall wrap *gomock.Call +type MockCAASFirewallerAPIWatchApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIWatchApplicationCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCAASFirewallerAPIWatchApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIWatchApplicationCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASFirewallerAPIWatchApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIWatchApplicationCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockCAASFirewallerAPIWatchApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplications mocks base method. @@ -271,9 +583,33 @@ func (m *MockCAASFirewallerAPI) WatchApplications() (watcher.Watcher[[]string], } // WatchApplications indicates an expected call of WatchApplications. -func (mr *MockCAASFirewallerAPIMockRecorder) WatchApplications() *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) WatchApplications() *MockCAASFirewallerAPIWatchApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplications", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchApplications)) + return &MockCAASFirewallerAPIWatchApplicationsCall{Call: call} +} + +// MockCAASFirewallerAPIWatchApplicationsCall wrap *gomock.Call +type MockCAASFirewallerAPIWatchApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIWatchApplicationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCAASFirewallerAPIWatchApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIWatchApplicationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockCAASFirewallerAPIWatchApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIWatchApplicationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockCAASFirewallerAPIWatchApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOpenedPorts mocks base method. @@ -286,9 +622,33 @@ func (m *MockCAASFirewallerAPI) WatchOpenedPorts() (watcher.Watcher[[]string], e } // WatchOpenedPorts indicates an expected call of WatchOpenedPorts. -func (mr *MockCAASFirewallerAPIMockRecorder) WatchOpenedPorts() *gomock.Call { +func (mr *MockCAASFirewallerAPIMockRecorder) WatchOpenedPorts() *MockCAASFirewallerAPIWatchOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchOpenedPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockCAASFirewallerAPI)(nil).WatchOpenedPorts)) + return &MockCAASFirewallerAPIWatchOpenedPortsCall{Call: call} +} + +// MockCAASFirewallerAPIWatchOpenedPortsCall wrap *gomock.Call +type MockCAASFirewallerAPIWatchOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASFirewallerAPIWatchOpenedPortsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCAASFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASFirewallerAPIWatchOpenedPortsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockCAASFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASFirewallerAPIWatchOpenedPortsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockCAASFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLifeGetter is a mock of LifeGetter interface. @@ -324,7 +684,31 @@ func (m *MockLifeGetter) Life(arg0 string) (life.Value, error) { } // Life indicates an expected call of Life. -func (mr *MockLifeGetterMockRecorder) Life(arg0 any) *gomock.Call { +func (mr *MockLifeGetterMockRecorder) Life(arg0 any) *MockLifeGetterLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockLifeGetter)(nil).Life), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockLifeGetter)(nil).Life), arg0) + return &MockLifeGetterLifeCall{Call: call} +} + +// MockLifeGetterLifeCall wrap *gomock.Call +type MockLifeGetterLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLifeGetterLifeCall) Return(arg0 life.Value, arg1 error) *MockLifeGetterLifeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLifeGetterLifeCall) Do(f func(string) (life.Value, error)) *MockLifeGetterLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLifeGetterLifeCall) DoAndReturn(f func(string) (life.Value, error)) *MockLifeGetterLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasfirewaller/mocks/worker_mock.go b/internal/worker/caasfirewaller/mocks/worker_mock.go index 1a02fa88c36..487ebe35e5f 100644 --- a/internal/worker/caasfirewaller/mocks/worker_mock.go +++ b/internal/worker/caasfirewaller/mocks/worker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +// mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker // // Package mocks is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasfirewaller/package_test.go b/internal/worker/caasfirewaller/package_test.go index ab5c552bfe8..f77319887f0 100644 --- a/internal/worker/caasfirewaller/package_test.go +++ b/internal/worker/caasfirewaller/package_test.go @@ -12,10 +12,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasfirewaller CAASBroker,PortMutator,ServiceUpdater -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/caasfirewaller Client,CAASFirewallerAPI,LifeGetter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/api_base_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasfirewaller CAASBroker,PortMutator,ServiceUpdater +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/caasfirewaller Client,CAASFirewallerAPI,LifeGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/api_base_mock.go github.com/juju/juju/api/base APICaller func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/caasmodelconfigmanager/mocks/broker_mock.go b/internal/worker/caasmodelconfigmanager/mocks/broker_mock.go index 2a79ed0dc8a..5a09a75cd2b 100644 --- a/internal/worker/caasmodelconfigmanager/mocks/broker_mock.go +++ b/internal/worker/caasmodelconfigmanager/mocks/broker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager CAASBroker +// mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager CAASBroker // // Package mocks is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockCAASBroker) EnsureImageRepoSecret(arg0 context.Context, arg1 docker } // EnsureImageRepoSecret indicates an expected call of EnsureImageRepoSecret. -func (mr *MockCAASBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockCAASBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *MockCAASBrokerEnsureImageRepoSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockCAASBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockCAASBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + return &MockCAASBrokerEnsureImageRepoSecretCall{Call: call} +} + +// MockCAASBrokerEnsureImageRepoSecretCall wrap *gomock.Call +type MockCAASBrokerEnsureImageRepoSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCAASBrokerEnsureImageRepoSecretCall) Return(arg0 error) *MockCAASBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCAASBrokerEnsureImageRepoSecretCall) Do(f func(context.Context, docker.ImageRepoDetails) error) *MockCAASBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCAASBrokerEnsureImageRepoSecretCall) DoAndReturn(f func(context.Context, docker.ImageRepoDetails) error) *MockCAASBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasmodelconfigmanager/mocks/facade_mock.go b/internal/worker/caasmodelconfigmanager/mocks/facade_mock.go index 92fca410df1..d5566bab903 100644 --- a/internal/worker/caasmodelconfigmanager/mocks/facade_mock.go +++ b/internal/worker/caasmodelconfigmanager/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager Facade +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager Facade // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockFacade) ControllerConfig() (controller.Config, error) { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockFacadeMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockFacadeMockRecorder) ControllerConfig() *MockFacadeControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockFacade)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockFacade)(nil).ControllerConfig)) + return &MockFacadeControllerConfigCall{Call: call} +} + +// MockFacadeControllerConfigCall wrap *gomock.Call +type MockFacadeControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockFacadeControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeControllerConfigCall) Do(f func() (controller.Config, error)) *MockFacadeControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeControllerConfigCall) DoAndReturn(f func() (controller.Config, error)) *MockFacadeControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchControllerConfig mocks base method. @@ -65,7 +89,31 @@ func (m *MockFacade) WatchControllerConfig() (watcher.Watcher[[]string], error) } // WatchControllerConfig indicates an expected call of WatchControllerConfig. -func (mr *MockFacadeMockRecorder) WatchControllerConfig() *gomock.Call { +func (mr *MockFacadeMockRecorder) WatchControllerConfig() *MockFacadeWatchControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchControllerConfig", reflect.TypeOf((*MockFacade)(nil).WatchControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchControllerConfig", reflect.TypeOf((*MockFacade)(nil).WatchControllerConfig)) + return &MockFacadeWatchControllerConfigCall{Call: call} +} + +// MockFacadeWatchControllerConfigCall wrap *gomock.Call +type MockFacadeWatchControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeWatchControllerConfigCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFacadeWatchControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeWatchControllerConfigCall) Do(f func() (watcher.Watcher[[]string], error)) *MockFacadeWatchControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeWatchControllerConfigCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockFacadeWatchControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasmodelconfigmanager/worker.go b/internal/worker/caasmodelconfigmanager/worker.go index 97570d12c66..eea28512be7 100644 --- a/internal/worker/caasmodelconfigmanager/worker.go +++ b/internal/worker/caasmodelconfigmanager/worker.go @@ -39,13 +39,13 @@ type Logger interface { Child(string) loggo.Logger } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager Facade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager Facade type Facade interface { ControllerConfig() (controller.Config, error) WatchControllerConfig() (watcher.StringsWatcher, error) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager CAASBroker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/broker_mock.go github.com/juju/juju/internal/worker/caasmodelconfigmanager CAASBroker type CAASBroker interface { EnsureImageRepoSecret(context.Context, docker.ImageRepoDetails) error } diff --git a/internal/worker/caasrbacmapper/mapper_test.go b/internal/worker/caasrbacmapper/mapper_test.go index 03a547f4789..1fd82bf4df1 100644 --- a/internal/worker/caasrbacmapper/mapper_test.go +++ b/internal/worker/caasrbacmapper/mapper_test.go @@ -52,12 +52,13 @@ func (m *MapperSuite) TestMapperAdditionSync(c *gc.C) { defer m.ctrl.Finish() waitGroup := sync.WaitGroup{} waitGroup.Add(1) - var eventHandlers cache.ResourceEventHandlerFuncs + var eventHandlers cache.ResourceEventHandler m.mockSharedIndexInformer.EXPECT().AddEventHandler(gomock.Any()). - DoAndReturn(func(h cache.ResourceEventHandlerFuncs) { + DoAndReturn(func(h cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { eventHandlers = h waitGroup.Done() - }).Return(m.mockSharedIndexInformer, nil) + return m.mockSharedIndexInformer, nil + }) mapper, err := caasrbacmapper.NewMapper(loggo.Logger{}, m.mockSAInformer) c.Assert(err, jc.ErrorIsNil) @@ -107,12 +108,13 @@ func (m *MapperSuite) TestRBACMapperUpdateSync(c *gc.C) { defer m.ctrl.Finish() waitGroup := sync.WaitGroup{} waitGroup.Add(1) - var eventHandlers cache.ResourceEventHandlerFuncs + var eventHandlers cache.ResourceEventHandler m.mockSharedIndexInformer.EXPECT().AddEventHandler(gomock.Any()). - DoAndReturn(func(h cache.ResourceEventHandlerFuncs) { + DoAndReturn(func(h cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { eventHandlers = h waitGroup.Done() - }).Return(m.mockSharedIndexInformer, nil) + return m.mockSharedIndexInformer, nil + }) mapper, err := caasrbacmapper.NewMapper(loggo.Logger{}, m.mockSAInformer) c.Assert(err, jc.ErrorIsNil) @@ -188,12 +190,13 @@ func (m *MapperSuite) TestRBACMapperDeleteSync(c *gc.C) { defer m.ctrl.Finish() waitGroup := sync.WaitGroup{} waitGroup.Add(1) - var eventHandlers cache.ResourceEventHandlerFuncs + var eventHandlers cache.ResourceEventHandler m.mockSharedIndexInformer.EXPECT().AddEventHandler(gomock.Any()). - DoAndReturn(func(h cache.ResourceEventHandlerFuncs) { + DoAndReturn(func(h cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { eventHandlers = h waitGroup.Done() - }).Return(m.mockSharedIndexInformer, nil) + return m.mockSharedIndexInformer, nil + }) mapper, err := caasrbacmapper.NewMapper(loggo.Logger{}, m.mockSAInformer) c.Assert(err, jc.ErrorIsNil) diff --git a/internal/worker/caasunitsmanager/mocks/hub_mock.go b/internal/worker/caasunitsmanager/mocks/hub_mock.go index ba20a0f80f8..fd9f33ea458 100644 --- a/internal/worker/caasunitsmanager/mocks/hub_mock.go +++ b/internal/worker/caasunitsmanager/mocks/hub_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/hub_mock.go github.com/juju/juju/internal/worker/caasunitsmanager Hub +// mockgen -typed -package mocks -destination mocks/hub_mock.go github.com/juju/juju/internal/worker/caasunitsmanager Hub // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockHub) Publish(arg0 string, arg1 any) func() { } // Publish indicates an expected call of Publish. -func (mr *MockHubMockRecorder) Publish(arg0, arg1 any) *gomock.Call { +func (mr *MockHubMockRecorder) Publish(arg0, arg1 any) *MockHubPublishCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockHub)(nil).Publish), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockHub)(nil).Publish), arg0, arg1) + return &MockHubPublishCall{Call: call} +} + +// MockHubPublishCall wrap *gomock.Call +type MockHubPublishCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHubPublishCall) Return(arg0 func()) *MockHubPublishCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHubPublishCall) Do(f func(string, any) func()) *MockHubPublishCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHubPublishCall) DoAndReturn(f func(string, any) func()) *MockHubPublishCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subscribe mocks base method. @@ -61,7 +85,31 @@ func (m *MockHub) Subscribe(arg0 string, arg1 func(string, any)) func() { } // Subscribe indicates an expected call of Subscribe. -func (mr *MockHubMockRecorder) Subscribe(arg0, arg1 any) *gomock.Call { +func (mr *MockHubMockRecorder) Subscribe(arg0, arg1 any) *MockHubSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockHub)(nil).Subscribe), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockHub)(nil).Subscribe), arg0, arg1) + return &MockHubSubscribeCall{Call: call} +} + +// MockHubSubscribeCall wrap *gomock.Call +type MockHubSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHubSubscribeCall) Return(arg0 func()) *MockHubSubscribeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHubSubscribeCall) Do(f func(string, func(string, any)) func()) *MockHubSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHubSubscribeCall) DoAndReturn(f func(string, func(string, any)) func()) *MockHubSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/caasunitsmanager/package_test.go b/internal/worker/caasunitsmanager/package_test.go index 237424cd3b0..a0fe82ecb18 100644 --- a/internal/worker/caasunitsmanager/package_test.go +++ b/internal/worker/caasunitsmanager/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/hub_mock.go github.com/juju/juju/internal/worker/caasunitsmanager Hub +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/hub_mock.go github.com/juju/juju/internal/worker/caasunitsmanager Hub func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/changestream/clock_mock_test.go b/internal/worker/changestream/clock_mock_test.go index 742d9f45e59..80860475882 100644 --- a/internal/worker/changestream/clock_mock_test.go +++ b/internal/worker/changestream/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestream -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package changestream -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package changestream is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestream/metrics_mock_test.go b/internal/worker/changestream/metrics_mock_test.go index 35a082abe13..8c96c1094ba 100644 --- a/internal/worker/changestream/metrics_mock_test.go +++ b/internal/worker/changestream/metrics_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestream -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +// mockgen -typed -package changestream -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer // // Package changestream is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRegisterer) MustRegister(arg0 ...prometheus.Collector) { } // MustRegister indicates an expected call of MustRegister. -func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *gomock.Call { +func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *MockRegistererMustRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + return &MockRegistererMustRegisterCall{Call: call} +} + +// MockRegistererMustRegisterCall wrap *gomock.Call +type MockRegistererMustRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererMustRegisterCall) Return() *MockRegistererMustRegisterCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererMustRegisterCall) Do(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererMustRegisterCall) DoAndReturn(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockRegisterer) Register(arg0 prometheus.Collector) error { } // Register indicates an expected call of Register. -func (mr *MockRegistererMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Register(arg0 any) *MockRegistererRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + return &MockRegistererRegisterCall{Call: call} +} + +// MockRegistererRegisterCall wrap *gomock.Call +type MockRegistererRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererRegisterCall) Return(arg0 error) *MockRegistererRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererRegisterCall) Do(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererRegisterCall) DoAndReturn(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unregister mocks base method. @@ -78,7 +126,31 @@ func (m *MockRegisterer) Unregister(arg0 prometheus.Collector) bool { } // Unregister indicates an expected call of Unregister. -func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *MockRegistererUnregisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + return &MockRegistererUnregisterCall{Call: call} +} + +// MockRegistererUnregisterCall wrap *gomock.Call +type MockRegistererUnregisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererUnregisterCall) Return(arg0 bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererUnregisterCall) Do(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererUnregisterCall) DoAndReturn(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestream/package_test.go b/internal/worker/changestream/package_test.go index f93ea3a536c..dea9a8f578c 100644 --- a/internal/worker/changestream/package_test.go +++ b/internal/worker/changestream/package_test.go @@ -14,10 +14,10 @@ import ( domaintesting "github.com/juju/juju/domain/schema/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package changestream -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestream DBGetter,Logger,WatchableDBWorker,FileNotifyWatcher -//go:generate go run go.uber.org/mock/mockgen -package changestream -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package changestream -destination source_mock_test.go github.com/juju/juju/core/changestream EventSource -//go:generate go run go.uber.org/mock/mockgen -package changestream -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +//go:generate go run go.uber.org/mock/mockgen -typed -package changestream -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestream DBGetter,Logger,WatchableDBWorker,FileNotifyWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package changestream -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package changestream -destination source_mock_test.go github.com/juju/juju/core/changestream EventSource +//go:generate go run go.uber.org/mock/mockgen -typed -package changestream -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/changestream/source_mock_test.go b/internal/worker/changestream/source_mock_test.go index 49a7a3c5288..5742e55e391 100644 --- a/internal/worker/changestream/source_mock_test.go +++ b/internal/worker/changestream/source_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestream -destination source_mock_test.go github.com/juju/juju/core/changestream EventSource +// mockgen -typed -package changestream -destination source_mock_test.go github.com/juju/juju/core/changestream EventSource // // Package changestream is a generated GoMock package. @@ -53,7 +53,31 @@ func (m *MockEventSource) Subscribe(arg0 ...changestream.SubscriptionOption) (ch } // Subscribe indicates an expected call of Subscribe. -func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *gomock.Call { +func (mr *MockEventSourceMockRecorder) Subscribe(arg0 ...any) *MockEventSourceSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockEventSource)(nil).Subscribe), arg0...) + return &MockEventSourceSubscribeCall{Call: call} +} + +// MockEventSourceSubscribeCall wrap *gomock.Call +type MockEventSourceSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEventSourceSubscribeCall) Return(arg0 changestream.Subscription, arg1 error) *MockEventSourceSubscribeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEventSourceSubscribeCall) Do(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEventSourceSubscribeCall) DoAndReturn(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockEventSourceSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestream/stream_mock_test.go b/internal/worker/changestream/stream_mock_test.go index 2d33b177b79..8bc1f541c28 100644 --- a/internal/worker/changestream/stream_mock_test.go +++ b/internal/worker/changestream/stream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestream -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestream DBGetter,Logger,WatchableDBWorker,FileNotifyWatcher +// mockgen -typed -package changestream -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestream DBGetter,Logger,WatchableDBWorker,FileNotifyWatcher // // Package changestream is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockDBGetter) GetDB(arg0 string) (database.TxnRunner, error) { } // GetDB indicates an expected call of GetDB. -func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *gomock.Call { +func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *MockDBGetterGetDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + return &MockDBGetterGetDBCall{Call: call} +} + +// MockDBGetterGetDBCall wrap *gomock.Call +type MockDBGetterGetDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBGetterGetDBCall) Return(arg0 database.TxnRunner, arg1 error) *MockDBGetterGetDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBGetterGetDBCall) Do(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBGetterGetDBCall) DoAndReturn(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -92,10 +116,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -109,10 +157,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -126,10 +198,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -141,9 +237,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -157,10 +277,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -174,10 +318,34 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockWatchableDBWorker is a mock of WatchableDBWorker interface. @@ -210,9 +378,33 @@ func (m *MockWatchableDBWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWatchableDBWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWatchableDBWorkerMockRecorder) Kill() *MockWatchableDBWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatchableDBWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWatchableDBWorker)(nil).Kill)) + return &MockWatchableDBWorkerKillCall{Call: call} +} + +// MockWatchableDBWorkerKillCall wrap *gomock.Call +type MockWatchableDBWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBWorkerKillCall) Return() *MockWatchableDBWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBWorkerKillCall) Do(f func()) *MockWatchableDBWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBWorkerKillCall) DoAndReturn(f func()) *MockWatchableDBWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StdTxn mocks base method. @@ -224,9 +416,33 @@ func (m *MockWatchableDBWorker) StdTxn(arg0 context.Context, arg1 func(context.C } // StdTxn indicates an expected call of StdTxn. -func (mr *MockWatchableDBWorkerMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockWatchableDBWorkerMockRecorder) StdTxn(arg0, arg1 any) *MockWatchableDBWorkerStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockWatchableDBWorker)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockWatchableDBWorker)(nil).StdTxn), arg0, arg1) + return &MockWatchableDBWorkerStdTxnCall{Call: call} +} + +// MockWatchableDBWorkerStdTxnCall wrap *gomock.Call +type MockWatchableDBWorkerStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBWorkerStdTxnCall) Return(arg0 error) *MockWatchableDBWorkerStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBWorkerStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockWatchableDBWorkerStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBWorkerStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockWatchableDBWorkerStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subscribe mocks base method. @@ -243,9 +459,33 @@ func (m *MockWatchableDBWorker) Subscribe(arg0 ...changestream.SubscriptionOptio } // Subscribe indicates an expected call of Subscribe. -func (mr *MockWatchableDBWorkerMockRecorder) Subscribe(arg0 ...any) *gomock.Call { +func (mr *MockWatchableDBWorkerMockRecorder) Subscribe(arg0 ...any) *MockWatchableDBWorkerSubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockWatchableDBWorker)(nil).Subscribe), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockWatchableDBWorker)(nil).Subscribe), arg0...) + return &MockWatchableDBWorkerSubscribeCall{Call: call} +} + +// MockWatchableDBWorkerSubscribeCall wrap *gomock.Call +type MockWatchableDBWorkerSubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBWorkerSubscribeCall) Return(arg0 changestream.Subscription, arg1 error) *MockWatchableDBWorkerSubscribeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBWorkerSubscribeCall) Do(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockWatchableDBWorkerSubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBWorkerSubscribeCall) DoAndReturn(f func(...changestream.SubscriptionOption) (changestream.Subscription, error)) *MockWatchableDBWorkerSubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -257,9 +497,33 @@ func (m *MockWatchableDBWorker) Txn(arg0 context.Context, arg1 func(context.Cont } // Txn indicates an expected call of Txn. -func (mr *MockWatchableDBWorkerMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockWatchableDBWorkerMockRecorder) Txn(arg0, arg1 any) *MockWatchableDBWorkerTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockWatchableDBWorker)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockWatchableDBWorker)(nil).Txn), arg0, arg1) + return &MockWatchableDBWorkerTxnCall{Call: call} +} + +// MockWatchableDBWorkerTxnCall wrap *gomock.Call +type MockWatchableDBWorkerTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBWorkerTxnCall) Return(arg0 error) *MockWatchableDBWorkerTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBWorkerTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockWatchableDBWorkerTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBWorkerTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockWatchableDBWorkerTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -271,9 +535,33 @@ func (m *MockWatchableDBWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWatchableDBWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWatchableDBWorkerMockRecorder) Wait() *MockWatchableDBWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatchableDBWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWatchableDBWorker)(nil).Wait)) + return &MockWatchableDBWorkerWaitCall{Call: call} +} + +// MockWatchableDBWorkerWaitCall wrap *gomock.Call +type MockWatchableDBWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBWorkerWaitCall) Return(arg0 error) *MockWatchableDBWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBWorkerWaitCall) Do(f func() error) *MockWatchableDBWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBWorkerWaitCall) DoAndReturn(f func() error) *MockWatchableDBWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFileNotifyWatcher is a mock of FileNotifyWatcher interface. @@ -309,7 +597,31 @@ func (m *MockFileNotifyWatcher) Changes(arg0 string) (<-chan bool, error) { } // Changes indicates an expected call of Changes. -func (mr *MockFileNotifyWatcherMockRecorder) Changes(arg0 any) *gomock.Call { +func (mr *MockFileNotifyWatcherMockRecorder) Changes(arg0 any) *MockFileNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifyWatcher)(nil).Changes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifyWatcher)(nil).Changes), arg0) + return &MockFileNotifyWatcherChangesCall{Call: call} +} + +// MockFileNotifyWatcherChangesCall wrap *gomock.Call +type MockFileNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileNotifyWatcherChangesCall) Return(arg0 <-chan bool, arg1 error) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileNotifyWatcherChangesCall) Do(f func(string) (<-chan bool, error)) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileNotifyWatcherChangesCall) DoAndReturn(f func(string) (<-chan bool, error)) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestreampruner/clock_mock_test.go b/internal/worker/changestreampruner/clock_mock_test.go index ee2b2aa4d6b..9aa7d88edf6 100644 --- a/internal/worker/changestreampruner/clock_mock_test.go +++ b/internal/worker/changestreampruner/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestreampruner -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package changestreampruner -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package changestreampruner is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestreampruner/package_test.go b/internal/worker/changestreampruner/package_test.go index 0bc00883fab..504bbd63437 100644 --- a/internal/worker/changestreampruner/package_test.go +++ b/internal/worker/changestreampruner/package_test.go @@ -17,9 +17,9 @@ import ( databasetesting "github.com/juju/juju/internal/database/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package changestreampruner -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestreampruner DBGetter,Logger -//go:generate go run go.uber.org/mock/mockgen -package changestreampruner -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package changestreampruner -destination worker_mock_test.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package changestreampruner -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestreampruner DBGetter,Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package changestreampruner -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package changestreampruner -destination worker_mock_test.go github.com/juju/worker/v4 Worker func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/changestreampruner/stream_mock_test.go b/internal/worker/changestreampruner/stream_mock_test.go index e56470e53dd..8700933d331 100644 --- a/internal/worker/changestreampruner/stream_mock_test.go +++ b/internal/worker/changestreampruner/stream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestreampruner -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestreampruner DBGetter,Logger +// mockgen -typed -package changestreampruner -destination stream_mock_test.go github.com/juju/juju/internal/worker/changestreampruner DBGetter,Logger // // Package changestreampruner is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockDBGetter) GetDB(arg0 string) (database.TxnRunner, error) { } // GetDB indicates an expected call of GetDB. -func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *gomock.Call { +func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *MockDBGetterGetDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + return &MockDBGetterGetDBCall{Call: call} +} + +// MockDBGetterGetDBCall wrap *gomock.Call +type MockDBGetterGetDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBGetterGetDBCall) Return(arg0 database.TxnRunner, arg1 error) *MockDBGetterGetDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBGetterGetDBCall) Do(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBGetterGetDBCall) DoAndReturn(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -88,10 +112,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -105,10 +153,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -122,10 +194,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -137,9 +233,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -153,10 +273,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -170,8 +314,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/changestreampruner/worker_mock_test.go b/internal/worker/changestreampruner/worker_mock_test.go index fef418ee08a..1d3bd784cf0 100644 --- a/internal/worker/changestreampruner/worker_mock_test.go +++ b/internal/worker/changestreampruner/worker_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package changestreampruner -destination worker_mock_test.go github.com/juju/worker/v4 Worker +// mockgen -typed -package changestreampruner -destination worker_mock_test.go github.com/juju/worker/v4 Worker // // Package changestreampruner is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/charmdownloader/mocks/mock_watcher.go b/internal/worker/charmdownloader/mocks/mock_watcher.go index 5104701225f..828bec6082b 100644 --- a/internal/worker/charmdownloader/mocks/mock_watcher.go +++ b/internal/worker/charmdownloader/mocks/mock_watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/core/watcher StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/charmdownloader/mocks/mocks.go b/internal/worker/charmdownloader/mocks/mocks.go index 11d40267a23..61f902fcda2 100644 --- a/internal/worker/charmdownloader/mocks/mocks.go +++ b/internal/worker/charmdownloader/mocks/mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/charmdownloader CharmDownloaderAPI,Logger +// mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/charmdownloader CharmDownloaderAPI,Logger // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockCharmDownloaderAPI) DownloadApplicationCharms(arg0 []names.Applicat } // DownloadApplicationCharms indicates an expected call of DownloadApplicationCharms. -func (mr *MockCharmDownloaderAPIMockRecorder) DownloadApplicationCharms(arg0 any) *gomock.Call { +func (mr *MockCharmDownloaderAPIMockRecorder) DownloadApplicationCharms(arg0 any) *MockCharmDownloaderAPIDownloadApplicationCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadApplicationCharms", reflect.TypeOf((*MockCharmDownloaderAPI)(nil).DownloadApplicationCharms), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadApplicationCharms", reflect.TypeOf((*MockCharmDownloaderAPI)(nil).DownloadApplicationCharms), arg0) + return &MockCharmDownloaderAPIDownloadApplicationCharmsCall{Call: call} +} + +// MockCharmDownloaderAPIDownloadApplicationCharmsCall wrap *gomock.Call +type MockCharmDownloaderAPIDownloadApplicationCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmDownloaderAPIDownloadApplicationCharmsCall) Return(arg0 error) *MockCharmDownloaderAPIDownloadApplicationCharmsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmDownloaderAPIDownloadApplicationCharmsCall) Do(f func([]names.ApplicationTag) error) *MockCharmDownloaderAPIDownloadApplicationCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmDownloaderAPIDownloadApplicationCharmsCall) DoAndReturn(f func([]names.ApplicationTag) error) *MockCharmDownloaderAPIDownloadApplicationCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchApplicationsWithPendingCharms mocks base method. @@ -64,9 +88,33 @@ func (m *MockCharmDownloaderAPI) WatchApplicationsWithPendingCharms() (watcher.W } // WatchApplicationsWithPendingCharms indicates an expected call of WatchApplicationsWithPendingCharms. -func (mr *MockCharmDownloaderAPIMockRecorder) WatchApplicationsWithPendingCharms() *gomock.Call { +func (mr *MockCharmDownloaderAPIMockRecorder) WatchApplicationsWithPendingCharms() *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationsWithPendingCharms", reflect.TypeOf((*MockCharmDownloaderAPI)(nil).WatchApplicationsWithPendingCharms)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchApplicationsWithPendingCharms", reflect.TypeOf((*MockCharmDownloaderAPI)(nil).WatchApplicationsWithPendingCharms)) + return &MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall{Call: call} +} + +// MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall wrap *gomock.Call +type MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockCharmDownloaderAPIWatchApplicationsWithPendingCharmsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLogger is a mock of Logger interface. @@ -103,10 +151,34 @@ func (m *MockLogger) Criticalf(arg0 string, arg1 ...any) { } // Criticalf indicates an expected call of Criticalf. -func (mr *MockLoggerMockRecorder) Criticalf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Criticalf(arg0 any, arg1 ...any) *MockLoggerCriticalfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Criticalf", reflect.TypeOf((*MockLogger)(nil).Criticalf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Criticalf", reflect.TypeOf((*MockLogger)(nil).Criticalf), varargs...) + return &MockLoggerCriticalfCall{Call: call} +} + +// MockLoggerCriticalfCall wrap *gomock.Call +type MockLoggerCriticalfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerCriticalfCall) Return() *MockLoggerCriticalfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerCriticalfCall) Do(f func(string, ...any)) *MockLoggerCriticalfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerCriticalfCall) DoAndReturn(f func(string, ...any)) *MockLoggerCriticalfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Debugf mocks base method. @@ -120,10 +192,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -137,10 +233,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -154,10 +274,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -171,10 +315,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -188,8 +356,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/charmdownloader/package_test.go b/internal/worker/charmdownloader/package_test.go index 4c9f5fe119f..262aba3bf31 100644 --- a/internal/worker/charmdownloader/package_test.go +++ b/internal/worker/charmdownloader/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/charmdownloader CharmDownloaderAPI,Logger -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/charmdownloader CharmDownloaderAPI,Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_watcher.go github.com/juju/juju/core/watcher StringsWatcher func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/containerbroker/broker.go b/internal/worker/containerbroker/broker.go index 78139f87143..0b2999ddb08 100644 --- a/internal/worker/containerbroker/broker.go +++ b/internal/worker/containerbroker/broker.go @@ -25,8 +25,8 @@ import ( "github.com/juju/juju/rpc/params" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/worker/containerbroker State -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/worker/containerbroker State +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner // Config describes the dependencies of a Tracker. // diff --git a/internal/worker/containerbroker/mocks/agent_mock.go b/internal/worker/containerbroker/mocks/agent_mock.go index c17db0c53bc..87bd7ba156a 100644 --- a/internal/worker/containerbroker/mocks/agent_mock.go +++ b/internal/worker/containerbroker/mocks/agent_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/base_mock.go b/internal/worker/containerbroker/mocks/base_mock.go index 248b02c6b87..6b44d34c7cb 100644 --- a/internal/worker/containerbroker/mocks/base_mock.go +++ b/internal/worker/containerbroker/mocks/base_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/dependency_mock.go b/internal/worker/containerbroker/mocks/dependency_mock.go index 23ed06ab12f..5c5a3b29ee8 100644 --- a/internal/worker/containerbroker/mocks/dependency_mock.go +++ b/internal/worker/containerbroker/mocks/dependency_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +// mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockGetter) Get(arg0 string, arg1 any) error { } // Get indicates an expected call of Get. -func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *MockGetterGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + return &MockGetterGetCall{Call: call} +} + +// MockGetterGetCall wrap *gomock.Call +type MockGetterGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGetterGetCall) Return(arg0 error) *MockGetterGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGetterGetCall) Do(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGetterGetCall) DoAndReturn(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/environs_mock.go b/internal/worker/containerbroker/mocks/environs_mock.go index 73c1f20d355..b9cbd2c0b8d 100644 --- a/internal/worker/containerbroker/mocks/environs_mock.go +++ b/internal/worker/containerbroker/mocks/environs_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs LXDProfiler,InstanceBroker +// mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs LXDProfiler,InstanceBroker // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockLXDProfiler) AssignLXDProfiles(arg0 string, arg1 []string, arg2 []l } // AssignLXDProfiles indicates an expected call of AssignLXDProfiles. -func (mr *MockLXDProfilerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *MockLXDProfilerAssignLXDProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockLXDProfiler)(nil).AssignLXDProfiles), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockLXDProfiler)(nil).AssignLXDProfiles), arg0, arg1, arg2) + return &MockLXDProfilerAssignLXDProfilesCall{Call: call} +} + +// MockLXDProfilerAssignLXDProfilesCall wrap *gomock.Call +type MockLXDProfilerAssignLXDProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerAssignLXDProfilesCall) Return(arg0 []string, arg1 error) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerAssignLXDProfilesCall) Do(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerAssignLXDProfilesCall) DoAndReturn(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfileNames mocks base method. @@ -68,9 +92,33 @@ func (m *MockLXDProfiler) LXDProfileNames(arg0 string) ([]string, error) { } // LXDProfileNames indicates an expected call of LXDProfileNames. -func (mr *MockLXDProfilerMockRecorder) LXDProfileNames(arg0 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) LXDProfileNames(arg0 any) *MockLXDProfilerLXDProfileNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfileNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfileNames), arg0) + return &MockLXDProfilerLXDProfileNamesCall{Call: call} +} + +// MockLXDProfilerLXDProfileNamesCall wrap *gomock.Call +type MockLXDProfilerLXDProfileNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerLXDProfileNamesCall) Return(arg0 []string, arg1 error) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerLXDProfileNamesCall) Do(f func(string) ([]string, error)) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerLXDProfileNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MaybeWriteLXDProfile mocks base method. @@ -82,9 +130,33 @@ func (m *MockLXDProfiler) MaybeWriteLXDProfile(arg0 string, arg1 lxdprofile.Prof } // MaybeWriteLXDProfile indicates an expected call of MaybeWriteLXDProfile. -func (mr *MockLXDProfilerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *MockLXDProfilerMaybeWriteLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).MaybeWriteLXDProfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).MaybeWriteLXDProfile), arg0, arg1) + return &MockLXDProfilerMaybeWriteLXDProfileCall{Call: call} +} + +// MockLXDProfilerMaybeWriteLXDProfileCall wrap *gomock.Call +type MockLXDProfilerMaybeWriteLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) Return(arg0 error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) Do(f func(string, lxdprofile.Profile) error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) DoAndReturn(f func(string, lxdprofile.Profile) error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceBroker is a mock of InstanceBroker interface. @@ -120,9 +192,33 @@ func (m *MockInstanceBroker) AllInstances(arg0 envcontext.ProviderCallContext) ( } // AllInstances indicates an expected call of AllInstances. -func (mr *MockInstanceBrokerMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) AllInstances(arg0 any) *MockInstanceBrokerAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllInstances), arg0) + return &MockInstanceBrokerAllInstancesCall{Call: call} +} + +// MockInstanceBrokerAllInstancesCall wrap *gomock.Call +type MockInstanceBrokerAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -135,9 +231,33 @@ func (m *MockInstanceBroker) AllRunningInstances(arg0 envcontext.ProviderCallCon } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockInstanceBrokerMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) AllRunningInstances(arg0 any) *MockInstanceBrokerAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllRunningInstances), arg0) + return &MockInstanceBrokerAllRunningInstancesCall{Call: call} +} + +// MockInstanceBrokerAllRunningInstancesCall wrap *gomock.Call +type MockInstanceBrokerAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -150,9 +270,33 @@ func (m *MockInstanceBroker) StartInstance(arg0 envcontext.ProviderCallContext, } // StartInstance indicates an expected call of StartInstance. -func (mr *MockInstanceBrokerMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) StartInstance(arg0, arg1 any) *MockInstanceBrokerStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockInstanceBroker)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockInstanceBroker)(nil).StartInstance), arg0, arg1) + return &MockInstanceBrokerStartInstanceCall{Call: call} +} + +// MockInstanceBrokerStartInstanceCall wrap *gomock.Call +type MockInstanceBrokerStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -168,8 +312,32 @@ func (m *MockInstanceBroker) StopInstances(arg0 envcontext.ProviderCallContext, } // StopInstances indicates an expected call of StopInstances. -func (mr *MockInstanceBrokerMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockInstanceBrokerStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockInstanceBroker)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockInstanceBroker)(nil).StopInstances), varargs...) + return &MockInstanceBrokerStopInstancesCall{Call: call} +} + +// MockInstanceBrokerStopInstancesCall wrap *gomock.Call +type MockInstanceBrokerStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerStopInstancesCall) Return(arg0 error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/machine_lock_mock.go b/internal/worker/containerbroker/mocks/machine_lock_mock.go index 547f136c422..6107cabbd63 100644 --- a/internal/worker/containerbroker/mocks/machine_lock_mock.go +++ b/internal/worker/containerbroker/mocks/machine_lock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machine_lock_mock.go github.com/juju/juju/core/machinelock Lock +// mockgen -typed -package mocks -destination mocks/machine_lock_mock.go github.com/juju/juju/core/machinelock Lock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockLock) Acquire(arg0 machinelock.Spec) (func(), error) { } // Acquire indicates an expected call of Acquire. -func (mr *MockLockMockRecorder) Acquire(arg0 any) *gomock.Call { +func (mr *MockLockMockRecorder) Acquire(arg0 any) *MockLockAcquireCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + return &MockLockAcquireCall{Call: call} +} + +// MockLockAcquireCall wrap *gomock.Call +type MockLockAcquireCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockAcquireCall) Return(arg0 func(), arg1 error) *MockLockAcquireCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockAcquireCall) Do(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockAcquireCall) DoAndReturn(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -68,7 +92,31 @@ func (m *MockLock) Report(arg0 ...machinelock.ReportOption) (string, error) { } // Report indicates an expected call of Report. -func (mr *MockLockMockRecorder) Report(arg0 ...any) *gomock.Call { +func (mr *MockLockMockRecorder) Report(arg0 ...any) *MockLockReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + return &MockLockReportCall{Call: call} +} + +// MockLockReportCall wrap *gomock.Call +type MockLockReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockReportCall) Return(arg0 string, arg1 error) *MockLockReportCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockReportCall) Do(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockReportCall) DoAndReturn(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/machine_mock.go b/internal/worker/containerbroker/mocks/machine_mock.go index f3dd9c57b6a..7eaaeacd77d 100644 --- a/internal/worker/containerbroker/mocks/machine_mock.go +++ b/internal/worker/containerbroker/mocks/machine_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner +// mockgen -typed -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockMachineProvisioner) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockMachineProvisionerMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) AvailabilityZone() *MockMachineProvisionerAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockMachineProvisioner)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockMachineProvisioner)(nil).AvailabilityZone)) + return &MockMachineProvisionerAvailabilityZoneCall{Call: call} +} + +// MockMachineProvisionerAvailabilityZoneCall wrap *gomock.Call +type MockMachineProvisionerAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerAvailabilityZoneCall) Do(f func() (string, error)) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockMachineProvisionerAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DistributionGroup mocks base method. @@ -71,9 +95,33 @@ func (m *MockMachineProvisioner) DistributionGroup() ([]instance.Id, error) { } // DistributionGroup indicates an expected call of DistributionGroup. -func (mr *MockMachineProvisionerMockRecorder) DistributionGroup() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) DistributionGroup() *MockMachineProvisionerDistributionGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DistributionGroup", reflect.TypeOf((*MockMachineProvisioner)(nil).DistributionGroup)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DistributionGroup", reflect.TypeOf((*MockMachineProvisioner)(nil).DistributionGroup)) + return &MockMachineProvisionerDistributionGroupCall{Call: call} +} + +// MockMachineProvisionerDistributionGroupCall wrap *gomock.Call +type MockMachineProvisionerDistributionGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerDistributionGroupCall) Return(arg0 []instance.Id, arg1 error) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerDistributionGroupCall) Do(f func() ([]instance.Id, error)) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerDistributionGroupCall) DoAndReturn(f func() ([]instance.Id, error)) *MockMachineProvisionerDistributionGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDead mocks base method. @@ -85,9 +133,33 @@ func (m *MockMachineProvisioner) EnsureDead() error { } // EnsureDead indicates an expected call of EnsureDead. -func (mr *MockMachineProvisionerMockRecorder) EnsureDead() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) EnsureDead() *MockMachineProvisionerEnsureDeadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockMachineProvisioner)(nil).EnsureDead)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockMachineProvisioner)(nil).EnsureDead)) + return &MockMachineProvisionerEnsureDeadCall{Call: call} +} + +// MockMachineProvisionerEnsureDeadCall wrap *gomock.Call +type MockMachineProvisionerEnsureDeadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerEnsureDeadCall) Return(arg0 error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerEnsureDeadCall) Do(f func() error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerEnsureDeadCall) DoAndReturn(f func() error) *MockMachineProvisionerEnsureDeadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -99,9 +171,33 @@ func (m *MockMachineProvisioner) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineProvisionerMockRecorder) Id() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Id() *MockMachineProvisionerIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachineProvisioner)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachineProvisioner)(nil).Id)) + return &MockMachineProvisionerIdCall{Call: call} +} + +// MockMachineProvisionerIdCall wrap *gomock.Call +type MockMachineProvisionerIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerIdCall) Return(arg0 string) *MockMachineProvisionerIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerIdCall) Do(f func() string) *MockMachineProvisionerIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerIdCall) DoAndReturn(f func() string) *MockMachineProvisionerIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -114,9 +210,33 @@ func (m *MockMachineProvisioner) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineProvisionerMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) InstanceId() *MockMachineProvisionerInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceId)) + return &MockMachineProvisionerInstanceIdCall{Call: call} +} + +// MockMachineProvisionerInstanceIdCall wrap *gomock.Call +type MockMachineProvisionerInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineProvisionerInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceStatus mocks base method. @@ -130,9 +250,33 @@ func (m *MockMachineProvisioner) InstanceStatus() (status.Status, string, error) } // InstanceStatus indicates an expected call of InstanceStatus. -func (mr *MockMachineProvisionerMockRecorder) InstanceStatus() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) InstanceStatus() *MockMachineProvisionerInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).InstanceStatus)) + return &MockMachineProvisionerInstanceStatusCall{Call: call} +} + +// MockMachineProvisionerInstanceStatusCall wrap *gomock.Call +type MockMachineProvisionerInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerInstanceStatusCall) Return(arg0 status.Status, arg1 string, arg2 error) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerInstanceStatusCall) Do(f func() (status.Status, string, error)) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerInstanceStatusCall) DoAndReturn(f func() (status.Status, string, error)) *MockMachineProvisionerInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // KeepInstance mocks base method. @@ -145,9 +289,33 @@ func (m *MockMachineProvisioner) KeepInstance() (bool, error) { } // KeepInstance indicates an expected call of KeepInstance. -func (mr *MockMachineProvisionerMockRecorder) KeepInstance() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) KeepInstance() *MockMachineProvisionerKeepInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepInstance", reflect.TypeOf((*MockMachineProvisioner)(nil).KeepInstance)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepInstance", reflect.TypeOf((*MockMachineProvisioner)(nil).KeepInstance)) + return &MockMachineProvisionerKeepInstanceCall{Call: call} +} + +// MockMachineProvisionerKeepInstanceCall wrap *gomock.Call +type MockMachineProvisionerKeepInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerKeepInstanceCall) Return(arg0 bool, arg1 error) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerKeepInstanceCall) Do(f func() (bool, error)) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerKeepInstanceCall) DoAndReturn(f func() (bool, error)) *MockMachineProvisionerKeepInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -159,9 +327,33 @@ func (m *MockMachineProvisioner) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMachineProvisionerMockRecorder) Life() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Life() *MockMachineProvisionerLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachineProvisioner)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachineProvisioner)(nil).Life)) + return &MockMachineProvisionerLifeCall{Call: call} +} + +// MockMachineProvisionerLifeCall wrap *gomock.Call +type MockMachineProvisionerLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerLifeCall) Return(arg0 life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerLifeCall) Do(f func() life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerLifeCall) DoAndReturn(f func() life.Value) *MockMachineProvisionerLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineTag mocks base method. @@ -173,9 +365,33 @@ func (m *MockMachineProvisioner) MachineTag() names.MachineTag { } // MachineTag indicates an expected call of MachineTag. -func (mr *MockMachineProvisionerMockRecorder) MachineTag() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) MachineTag() *MockMachineProvisionerMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachineProvisioner)(nil).MachineTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineTag", reflect.TypeOf((*MockMachineProvisioner)(nil).MachineTag)) + return &MockMachineProvisionerMachineTagCall{Call: call} +} + +// MockMachineProvisionerMachineTagCall wrap *gomock.Call +type MockMachineProvisionerMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerMachineTagCall) Return(arg0 names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerMachineTagCall) Do(f func() names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineProvisionerMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MarkForRemoval mocks base method. @@ -187,9 +403,33 @@ func (m *MockMachineProvisioner) MarkForRemoval() error { } // MarkForRemoval indicates an expected call of MarkForRemoval. -func (mr *MockMachineProvisionerMockRecorder) MarkForRemoval() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) MarkForRemoval() *MockMachineProvisionerMarkForRemovalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkForRemoval", reflect.TypeOf((*MockMachineProvisioner)(nil).MarkForRemoval)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkForRemoval", reflect.TypeOf((*MockMachineProvisioner)(nil).MarkForRemoval)) + return &MockMachineProvisionerMarkForRemovalCall{Call: call} +} + +// MockMachineProvisionerMarkForRemovalCall wrap *gomock.Call +type MockMachineProvisionerMarkForRemovalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerMarkForRemovalCall) Return(arg0 error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerMarkForRemovalCall) Do(f func() error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerMarkForRemovalCall) DoAndReturn(f func() error) *MockMachineProvisionerMarkForRemovalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelAgentVersion mocks base method. @@ -202,9 +442,33 @@ func (m *MockMachineProvisioner) ModelAgentVersion() (*version.Number, error) { } // ModelAgentVersion indicates an expected call of ModelAgentVersion. -func (mr *MockMachineProvisionerMockRecorder) ModelAgentVersion() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) ModelAgentVersion() *MockMachineProvisionerModelAgentVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelAgentVersion", reflect.TypeOf((*MockMachineProvisioner)(nil).ModelAgentVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelAgentVersion", reflect.TypeOf((*MockMachineProvisioner)(nil).ModelAgentVersion)) + return &MockMachineProvisionerModelAgentVersionCall{Call: call} +} + +// MockMachineProvisionerModelAgentVersionCall wrap *gomock.Call +type MockMachineProvisionerModelAgentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerModelAgentVersionCall) Return(arg0 *version.Number, arg1 error) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerModelAgentVersionCall) Do(f func() (*version.Number, error)) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerModelAgentVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockMachineProvisionerModelAgentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -216,9 +480,33 @@ func (m *MockMachineProvisioner) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockMachineProvisionerMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Refresh(arg0 any) *MockMachineProvisionerRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachineProvisioner)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachineProvisioner)(nil).Refresh), arg0) + return &MockMachineProvisionerRefreshCall{Call: call} +} + +// MockMachineProvisionerRefreshCall wrap *gomock.Call +type MockMachineProvisionerRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerRefreshCall) Return(arg0 error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerRefreshCall) Do(f func(context.Context) error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerRefreshCall) DoAndReturn(f func(context.Context) error) *MockMachineProvisionerRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -230,9 +518,33 @@ func (m *MockMachineProvisioner) Remove() error { } // Remove indicates an expected call of Remove. -func (mr *MockMachineProvisionerMockRecorder) Remove() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Remove() *MockMachineProvisionerRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMachineProvisioner)(nil).Remove)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMachineProvisioner)(nil).Remove)) + return &MockMachineProvisionerRemoveCall{Call: call} +} + +// MockMachineProvisionerRemoveCall wrap *gomock.Call +type MockMachineProvisionerRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerRemoveCall) Return(arg0 error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerRemoveCall) Do(f func() error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerRemoveCall) DoAndReturn(f func() error) *MockMachineProvisionerRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmProfiles mocks base method. @@ -244,9 +556,33 @@ func (m *MockMachineProvisioner) SetCharmProfiles(arg0 []string) error { } // SetCharmProfiles indicates an expected call of SetCharmProfiles. -func (mr *MockMachineProvisionerMockRecorder) SetCharmProfiles(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetCharmProfiles(arg0 any) *MockMachineProvisionerSetCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachineProvisioner)(nil).SetCharmProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMachineProvisioner)(nil).SetCharmProfiles), arg0) + return &MockMachineProvisionerSetCharmProfilesCall{Call: call} +} + +// MockMachineProvisionerSetCharmProfilesCall wrap *gomock.Call +type MockMachineProvisionerSetCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetCharmProfilesCall) Return(arg0 error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetCharmProfilesCall) Do(f func([]string) error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetCharmProfilesCall) DoAndReturn(f func([]string) error) *MockMachineProvisionerSetCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceInfo mocks base method. @@ -258,9 +594,33 @@ func (m *MockMachineProvisioner) SetInstanceInfo(arg0 instance.Id, arg1, arg2 st } // SetInstanceInfo indicates an expected call of SetInstanceInfo. -func (mr *MockMachineProvisionerMockRecorder) SetInstanceInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetInstanceInfo(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *MockMachineProvisionerSetInstanceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceInfo", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceInfo", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceInfo), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) + return &MockMachineProvisionerSetInstanceInfoCall{Call: call} +} + +// MockMachineProvisionerSetInstanceInfoCall wrap *gomock.Call +type MockMachineProvisionerSetInstanceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetInstanceInfoCall) Return(arg0 error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetInstanceInfoCall) Do(f func(instance.Id, string, string, *instance.HardwareCharacteristics, []params.NetworkConfig, []params.Volume, map[string]params.VolumeAttachmentInfo, []string) error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetInstanceInfoCall) DoAndReturn(f func(instance.Id, string, string, *instance.HardwareCharacteristics, []params.NetworkConfig, []params.Volume, map[string]params.VolumeAttachmentInfo, []string) error) *MockMachineProvisionerSetInstanceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -272,9 +632,33 @@ func (m *MockMachineProvisioner) SetInstanceStatus(arg0 status.Status, arg1 stri } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockMachineProvisionerMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetInstanceStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetInstanceStatusCall{Call: call} +} + +// MockMachineProvisionerSetInstanceStatusCall wrap *gomock.Call +type MockMachineProvisionerSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetInstanceStatusCall) Return(arg0 error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetInstanceStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetInstanceStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -286,9 +670,33 @@ func (m *MockMachineProvisioner) SetModificationStatus(arg0 status.Status, arg1 } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMachineProvisionerMockRecorder) SetModificationStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetModificationStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetModificationStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetModificationStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetModificationStatusCall{Call: call} +} + +// MockMachineProvisionerSetModificationStatusCall wrap *gomock.Call +type MockMachineProvisionerSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetModificationStatusCall) Return(arg0 error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetModificationStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetModificationStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -300,9 +708,33 @@ func (m *MockMachineProvisioner) SetPassword(arg0 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockMachineProvisionerMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetPassword(arg0 any) *MockMachineProvisionerSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachineProvisioner)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockMachineProvisioner)(nil).SetPassword), arg0) + return &MockMachineProvisionerSetPasswordCall{Call: call} +} + +// MockMachineProvisionerSetPasswordCall wrap *gomock.Call +type MockMachineProvisionerSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetPasswordCall) Return(arg0 error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetPasswordCall) Do(f func(string) error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetPasswordCall) DoAndReturn(f func(string) error) *MockMachineProvisionerSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -314,9 +746,33 @@ func (m *MockMachineProvisioner) SetStatus(arg0 status.Status, arg1 string, arg2 } // SetStatus indicates an expected call of SetStatus. -func (mr *MockMachineProvisionerMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockMachineProvisionerSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachineProvisioner)(nil).SetStatus), arg0, arg1, arg2) + return &MockMachineProvisionerSetStatusCall{Call: call} +} + +// MockMachineProvisionerSetStatusCall wrap *gomock.Call +type MockMachineProvisionerSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetStatusCall) Return(arg0 error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineProvisionerSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSupportedContainers mocks base method. @@ -332,9 +788,33 @@ func (m *MockMachineProvisioner) SetSupportedContainers(arg0 ...instance.Contain } // SetSupportedContainers indicates an expected call of SetSupportedContainers. -func (mr *MockMachineProvisionerMockRecorder) SetSupportedContainers(arg0 ...any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SetSupportedContainers(arg0 ...any) *MockMachineProvisionerSetSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SetSupportedContainers), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SetSupportedContainers), arg0...) + return &MockMachineProvisionerSetSupportedContainersCall{Call: call} +} + +// MockMachineProvisionerSetSupportedContainersCall wrap *gomock.Call +type MockMachineProvisionerSetSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSetSupportedContainersCall) Return(arg0 error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSetSupportedContainersCall) Do(f func(...instance.ContainerType) error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSetSupportedContainersCall) DoAndReturn(f func(...instance.ContainerType) error) *MockMachineProvisionerSetSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -348,9 +828,33 @@ func (m *MockMachineProvisioner) Status() (status.Status, string, error) { } // Status indicates an expected call of Status. -func (mr *MockMachineProvisionerMockRecorder) Status() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Status() *MockMachineProvisionerStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachineProvisioner)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachineProvisioner)(nil).Status)) + return &MockMachineProvisionerStatusCall{Call: call} +} + +// MockMachineProvisionerStatusCall wrap *gomock.Call +type MockMachineProvisionerStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerStatusCall) Return(arg0 status.Status, arg1 string, arg2 error) *MockMachineProvisionerStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerStatusCall) Do(f func() (status.Status, string, error)) *MockMachineProvisionerStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerStatusCall) DoAndReturn(f func() (status.Status, string, error)) *MockMachineProvisionerStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -362,9 +866,33 @@ func (m *MockMachineProvisioner) String() string { } // String indicates an expected call of String. -func (mr *MockMachineProvisionerMockRecorder) String() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) String() *MockMachineProvisionerStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachineProvisioner)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachineProvisioner)(nil).String)) + return &MockMachineProvisionerStringCall{Call: call} +} + +// MockMachineProvisionerStringCall wrap *gomock.Call +type MockMachineProvisionerStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerStringCall) Return(arg0 string) *MockMachineProvisionerStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerStringCall) Do(f func() string) *MockMachineProvisionerStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerStringCall) DoAndReturn(f func() string) *MockMachineProvisionerStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedContainers mocks base method. @@ -378,9 +906,33 @@ func (m *MockMachineProvisioner) SupportedContainers() ([]instance.ContainerType } // SupportedContainers indicates an expected call of SupportedContainers. -func (mr *MockMachineProvisionerMockRecorder) SupportedContainers() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SupportedContainers() *MockMachineProvisionerSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportedContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportedContainers)) + return &MockMachineProvisionerSupportedContainersCall{Call: call} +} + +// MockMachineProvisionerSupportedContainersCall wrap *gomock.Call +type MockMachineProvisionerSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSupportedContainersCall) Return(arg0 []instance.ContainerType, arg1 bool, arg2 error) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSupportedContainersCall) Do(f func() ([]instance.ContainerType, bool, error)) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSupportedContainersCall) DoAndReturn(f func() ([]instance.ContainerType, bool, error)) *MockMachineProvisionerSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportsNoContainers mocks base method. @@ -392,9 +944,33 @@ func (m *MockMachineProvisioner) SupportsNoContainers() error { } // SupportsNoContainers indicates an expected call of SupportsNoContainers. -func (mr *MockMachineProvisionerMockRecorder) SupportsNoContainers() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) SupportsNoContainers() *MockMachineProvisionerSupportsNoContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsNoContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportsNoContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsNoContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).SupportsNoContainers)) + return &MockMachineProvisionerSupportsNoContainersCall{Call: call} +} + +// MockMachineProvisionerSupportsNoContainersCall wrap *gomock.Call +type MockMachineProvisionerSupportsNoContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerSupportsNoContainersCall) Return(arg0 error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerSupportsNoContainersCall) Do(f func() error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerSupportsNoContainersCall) DoAndReturn(f func() error) *MockMachineProvisionerSupportsNoContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -406,9 +982,33 @@ func (m *MockMachineProvisioner) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockMachineProvisionerMockRecorder) Tag() *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) Tag() *MockMachineProvisionerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachineProvisioner)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachineProvisioner)(nil).Tag)) + return &MockMachineProvisionerTagCall{Call: call} +} + +// MockMachineProvisionerTagCall wrap *gomock.Call +type MockMachineProvisionerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerTagCall) Return(arg0 names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerTagCall) Do(f func() names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerTagCall) DoAndReturn(f func() names.Tag) *MockMachineProvisionerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -421,7 +1021,31 @@ func (m *MockMachineProvisioner) WatchContainers(arg0 instance.ContainerType) (w } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockMachineProvisionerMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockMachineProvisionerMockRecorder) WatchContainers(arg0 any) *MockMachineProvisionerWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMachineProvisioner)(nil).WatchContainers), arg0) + return &MockMachineProvisionerWatchContainersCall{Call: call} +} + +// MockMachineProvisionerWatchContainersCall wrap *gomock.Call +type MockMachineProvisionerWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProvisionerWatchContainersCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProvisionerWatchContainersCall) Do(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProvisionerWatchContainersCall) DoAndReturn(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockMachineProvisionerWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/state_mock.go b/internal/worker/containerbroker/mocks/state_mock.go index df198e07427..e99d60674df 100644 --- a/internal/worker/containerbroker/mocks/state_mock.go +++ b/internal/worker/containerbroker/mocks/state_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/worker/containerbroker State +// mockgen -typed -package mocks -destination mocks/state_mock.go github.com/juju/juju/internal/worker/containerbroker State // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockState) ContainerConfig() (params.ContainerConfig, error) { } // ContainerConfig indicates an expected call of ContainerConfig. -func (mr *MockStateMockRecorder) ContainerConfig() *gomock.Call { +func (mr *MockStateMockRecorder) ContainerConfig() *MockStateContainerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockState)(nil).ContainerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockState)(nil).ContainerConfig)) + return &MockStateContainerConfigCall{Call: call} +} + +// MockStateContainerConfigCall wrap *gomock.Call +type MockStateContainerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateContainerConfigCall) Return(arg0 params.ContainerConfig, arg1 error) *MockStateContainerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateContainerConfigCall) Do(f func() (params.ContainerConfig, error)) *MockStateContainerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateContainerConfigCall) DoAndReturn(f func() (params.ContainerConfig, error)) *MockStateContainerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerManagerConfig mocks base method. @@ -69,9 +93,33 @@ func (m *MockState) ContainerManagerConfig(arg0 params.ContainerManagerConfigPar } // ContainerManagerConfig indicates an expected call of ContainerManagerConfig. -func (mr *MockStateMockRecorder) ContainerManagerConfig(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ContainerManagerConfig(arg0 any) *MockStateContainerManagerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerManagerConfig", reflect.TypeOf((*MockState)(nil).ContainerManagerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerManagerConfig", reflect.TypeOf((*MockState)(nil).ContainerManagerConfig), arg0) + return &MockStateContainerManagerConfigCall{Call: call} +} + +// MockStateContainerManagerConfigCall wrap *gomock.Call +type MockStateContainerManagerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateContainerManagerConfigCall) Return(arg0 params.ContainerManagerConfig, arg1 error) *MockStateContainerManagerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateContainerManagerConfigCall) Do(f func(params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)) *MockStateContainerManagerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateContainerManagerConfigCall) DoAndReturn(f func(params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)) *MockStateContainerManagerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerProfileInfo mocks base method. @@ -84,9 +132,33 @@ func (m *MockState) GetContainerProfileInfo(arg0 names.MachineTag) ([]*provision } // GetContainerProfileInfo indicates an expected call of GetContainerProfileInfo. -func (mr *MockStateMockRecorder) GetContainerProfileInfo(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) GetContainerProfileInfo(arg0 any) *MockStateGetContainerProfileInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockState)(nil).GetContainerProfileInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockState)(nil).GetContainerProfileInfo), arg0) + return &MockStateGetContainerProfileInfoCall{Call: call} +} + +// MockStateGetContainerProfileInfoCall wrap *gomock.Call +type MockStateGetContainerProfileInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateGetContainerProfileInfoCall) Return(arg0 []*provisioner.LXDProfileResult, arg1 error) *MockStateGetContainerProfileInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateGetContainerProfileInfoCall) Do(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockStateGetContainerProfileInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateGetContainerProfileInfoCall) DoAndReturn(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockStateGetContainerProfileInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HostChangesForContainer mocks base method. @@ -100,9 +172,33 @@ func (m *MockState) HostChangesForContainer(arg0 names.MachineTag) ([]network0.D } // HostChangesForContainer indicates an expected call of HostChangesForContainer. -func (mr *MockStateMockRecorder) HostChangesForContainer(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) HostChangesForContainer(arg0 any) *MockStateHostChangesForContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockState)(nil).HostChangesForContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockState)(nil).HostChangesForContainer), arg0) + return &MockStateHostChangesForContainerCall{Call: call} +} + +// MockStateHostChangesForContainerCall wrap *gomock.Call +type MockStateHostChangesForContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateHostChangesForContainerCall) Return(arg0 []network0.DeviceToBridge, arg1 int, arg2 error) *MockStateHostChangesForContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateHostChangesForContainerCall) Do(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockStateHostChangesForContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateHostChangesForContainerCall) DoAndReturn(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockStateHostChangesForContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machines mocks base method. @@ -119,10 +215,34 @@ func (m *MockState) Machines(arg0 context.Context, arg1 ...names.MachineTag) ([] } // Machines indicates an expected call of Machines. -func (mr *MockStateMockRecorder) Machines(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockStateMockRecorder) Machines(arg0 any, arg1 ...any) *MockStateMachinesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockState)(nil).Machines), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockState)(nil).Machines), varargs...) + return &MockStateMachinesCall{Call: call} +} + +// MockStateMachinesCall wrap *gomock.Call +type MockStateMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateMachinesCall) Return(arg0 []provisioner.MachineResult, arg1 error) *MockStateMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateMachinesCall) Do(f func(context.Context, ...names.MachineTag) ([]provisioner.MachineResult, error)) *MockStateMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateMachinesCall) DoAndReturn(f func(context.Context, ...names.MachineTag) ([]provisioner.MachineResult, error)) *MockStateMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareContainerInterfaceInfo mocks base method. @@ -135,9 +255,33 @@ func (m *MockState) PrepareContainerInterfaceInfo(arg0 names.MachineTag) (networ } // PrepareContainerInterfaceInfo indicates an expected call of PrepareContainerInterfaceInfo. -func (mr *MockStateMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *MockStatePrepareContainerInterfaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockState)(nil).PrepareContainerInterfaceInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockState)(nil).PrepareContainerInterfaceInfo), arg0) + return &MockStatePrepareContainerInterfaceInfoCall{Call: call} +} + +// MockStatePrepareContainerInterfaceInfoCall wrap *gomock.Call +type MockStatePrepareContainerInterfaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatePrepareContainerInterfaceInfoCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockStatePrepareContainerInterfaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatePrepareContainerInterfaceInfoCall) Do(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockStatePrepareContainerInterfaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatePrepareContainerInterfaceInfoCall) DoAndReturn(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockStatePrepareContainerInterfaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -149,9 +293,33 @@ func (m *MockState) ReleaseContainerAddresses(arg0 names.MachineTag) error { } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockStateMockRecorder) ReleaseContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockStateMockRecorder) ReleaseContainerAddresses(arg0 any) *MockStateReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockState)(nil).ReleaseContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockState)(nil).ReleaseContainerAddresses), arg0) + return &MockStateReleaseContainerAddressesCall{Call: call} +} + +// MockStateReleaseContainerAddressesCall wrap *gomock.Call +type MockStateReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateReleaseContainerAddressesCall) Return(arg0 error) *MockStateReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateReleaseContainerAddressesCall) Do(f func(names.MachineTag) error) *MockStateReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateReleaseContainerAddressesCall) DoAndReturn(f func(names.MachineTag) error) *MockStateReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetHostMachineNetworkConfig mocks base method. @@ -163,7 +331,31 @@ func (m *MockState) SetHostMachineNetworkConfig(arg0 names.MachineTag, arg1 []pa } // SetHostMachineNetworkConfig indicates an expected call of SetHostMachineNetworkConfig. -func (mr *MockStateMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *MockStateSetHostMachineNetworkConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockState)(nil).SetHostMachineNetworkConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockState)(nil).SetHostMachineNetworkConfig), arg0, arg1) + return &MockStateSetHostMachineNetworkConfigCall{Call: call} +} + +// MockStateSetHostMachineNetworkConfigCall wrap *gomock.Call +type MockStateSetHostMachineNetworkConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateSetHostMachineNetworkConfigCall) Return(arg0 error) *MockStateSetHostMachineNetworkConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateSetHostMachineNetworkConfigCall) Do(f func(names.MachineTag, []params.NetworkConfig) error) *MockStateSetHostMachineNetworkConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateSetHostMachineNetworkConfigCall) DoAndReturn(f func(names.MachineTag, []params.NetworkConfig) error) *MockStateSetHostMachineNetworkConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/mocks/worker_mock.go b/internal/worker/containerbroker/mocks/worker_mock.go index 1a02fa88c36..487ebe35e5f 100644 --- a/internal/worker/containerbroker/mocks/worker_mock.go +++ b/internal/worker/containerbroker/mocks/worker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +// mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker // // Package mocks is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/containerbroker/package_test.go b/internal/worker/containerbroker/package_test.go index 86749e8bfd4..310702cbaf9 100644 --- a/internal/worker/containerbroker/package_test.go +++ b/internal/worker/containerbroker/package_test.go @@ -9,12 +9,12 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs LXDProfiler,InstanceBroker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_lock_mock.go github.com/juju/juju/core/machinelock Lock -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs LXDProfiler,InstanceBroker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machine_lock_mock.go github.com/juju/juju/core/machinelock Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/controlsocket/package_test.go b/internal/worker/controlsocket/package_test.go index e04a9e525ed..110999bf407 100644 --- a/internal/worker/controlsocket/package_test.go +++ b/internal/worker/controlsocket/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package controlsocket -destination services_mock_test.go github.com/juju/juju/internal/worker/controlsocket UserService,PermissionService +//go:generate go run go.uber.org/mock/mockgen -typed -package controlsocket -destination services_mock_test.go github.com/juju/juju/internal/worker/controlsocket UserService,PermissionService func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/controlsocket/services_mock_test.go b/internal/worker/controlsocket/services_mock_test.go index 26af5b07b28..04f2cd067af 100644 --- a/internal/worker/controlsocket/services_mock_test.go +++ b/internal/worker/controlsocket/services_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package controlsocket -destination services_mock_test.go github.com/juju/juju/internal/worker/controlsocket UserService,PermissionService +// mockgen -typed -package controlsocket -destination services_mock_test.go github.com/juju/juju/internal/worker/controlsocket UserService,PermissionService // // Package controlsocket is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockUserService) AddUser(arg0 context.Context, arg1 service.AddUserArg) } // AddUser indicates an expected call of AddUser. -func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) AddUser(arg0, arg1 any) *MockUserServiceAddUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockUserService)(nil).AddUser), arg0, arg1) + return &MockUserServiceAddUserCall{Call: call} +} + +// MockUserServiceAddUserCall wrap *gomock.Call +type MockUserServiceAddUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceAddUserCall) Return(arg0 user.UUID, arg1 []byte, arg2 error) *MockUserServiceAddUserCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceAddUserCall) Do(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceAddUserCall) DoAndReturn(f func(context.Context, service.AddUserArg) (user.UUID, []byte, error)) *MockUserServiceAddUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByAuth mocks base method. @@ -69,9 +93,33 @@ func (m *MockUserService) GetUserByAuth(arg0 context.Context, arg1 string, arg2 } // GetUserByAuth indicates an expected call of GetUserByAuth. -func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *MockUserServiceGetUserByAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + return &MockUserServiceGetUserByAuthCall{Call: call} +} + +// MockUserServiceGetUserByAuthCall wrap *gomock.Call +type MockUserServiceGetUserByAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByAuthCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByAuthCall) Do(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByAuthCall) DoAndReturn(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -84,9 +132,33 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveUser mocks base method. @@ -98,9 +170,33 @@ func (m *MockUserService) RemoveUser(arg0 context.Context, arg1 string) error { } // RemoveUser indicates an expected call of RemoveUser. -func (mr *MockUserServiceMockRecorder) RemoveUser(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) RemoveUser(arg0, arg1 any) *MockUserServiceRemoveUserCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserService)(nil).RemoveUser), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUser", reflect.TypeOf((*MockUserService)(nil).RemoveUser), arg0, arg1) + return &MockUserServiceRemoveUserCall{Call: call} +} + +// MockUserServiceRemoveUserCall wrap *gomock.Call +type MockUserServiceRemoveUserCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceRemoveUserCall) Return(arg0 error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceRemoveUserCall) Do(f func(context.Context, string) error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceRemoveUserCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceRemoveUserCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPermissionService is a mock of PermissionService interface. @@ -135,7 +231,31 @@ func (m *MockPermissionService) AddUserPermission(arg0 context.Context, arg1 str } // AddUserPermission indicates an expected call of AddUserPermission. -func (mr *MockPermissionServiceMockRecorder) AddUserPermission(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPermissionServiceMockRecorder) AddUserPermission(arg0, arg1, arg2 any) *MockPermissionServiceAddUserPermissionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserPermission", reflect.TypeOf((*MockPermissionService)(nil).AddUserPermission), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserPermission", reflect.TypeOf((*MockPermissionService)(nil).AddUserPermission), arg0, arg1, arg2) + return &MockPermissionServiceAddUserPermissionCall{Call: call} +} + +// MockPermissionServiceAddUserPermissionCall wrap *gomock.Call +type MockPermissionServiceAddUserPermissionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPermissionServiceAddUserPermissionCall) Return(arg0 error) *MockPermissionServiceAddUserPermissionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPermissionServiceAddUserPermissionCall) Do(f func(context.Context, string, permission.Access) error) *MockPermissionServiceAddUserPermissionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPermissionServiceAddUserPermissionCall) DoAndReturn(f func(context.Context, string, permission.Access) error) *MockPermissionServiceAddUserPermissionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/dbaccessor/clock_mock_test.go b/internal/worker/dbaccessor/clock_mock_test.go index ff381a8b095..074372c3bba 100644 --- a/internal/worker/dbaccessor/clock_mock_test.go +++ b/internal/worker/dbaccessor/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package dbaccessor -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package dbaccessor -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package dbaccessor is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/dbaccessor/controllerconfig_mock_test.go b/internal/worker/dbaccessor/controllerconfig_mock_test.go index d1beedd8ac5..51346b6275b 100644 --- a/internal/worker/dbaccessor/controllerconfig_mock_test.go +++ b/internal/worker/dbaccessor/controllerconfig_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package dbaccessor -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/controlleragentconfig ConfigWatcher +// mockgen -typed -package dbaccessor -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/controlleragentconfig ConfigWatcher // // Package dbaccessor is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockConfigWatcher) Changes() <-chan struct{} { } // Changes indicates an expected call of Changes. -func (mr *MockConfigWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockConfigWatcherMockRecorder) Changes() *MockConfigWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockConfigWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockConfigWatcher)(nil).Changes)) + return &MockConfigWatcherChangesCall{Call: call} +} + +// MockConfigWatcherChangesCall wrap *gomock.Call +type MockConfigWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWatcherChangesCall) Return(arg0 <-chan struct{}) *MockConfigWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWatcherChangesCall) Do(f func() <-chan struct{}) *MockConfigWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWatcherChangesCall) DoAndReturn(f func() <-chan struct{}) *MockConfigWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -61,9 +85,33 @@ func (m *MockConfigWatcher) Done() <-chan struct{} { } // Done indicates an expected call of Done. -func (mr *MockConfigWatcherMockRecorder) Done() *gomock.Call { +func (mr *MockConfigWatcherMockRecorder) Done() *MockConfigWatcherDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockConfigWatcher)(nil).Done)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockConfigWatcher)(nil).Done)) + return &MockConfigWatcherDoneCall{Call: call} +} + +// MockConfigWatcherDoneCall wrap *gomock.Call +type MockConfigWatcherDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWatcherDoneCall) Return(arg0 <-chan struct{}) *MockConfigWatcherDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWatcherDoneCall) Do(f func() <-chan struct{}) *MockConfigWatcherDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWatcherDoneCall) DoAndReturn(f func() <-chan struct{}) *MockConfigWatcherDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unsubscribe mocks base method. @@ -73,7 +121,31 @@ func (m *MockConfigWatcher) Unsubscribe() { } // Unsubscribe indicates an expected call of Unsubscribe. -func (mr *MockConfigWatcherMockRecorder) Unsubscribe() *gomock.Call { +func (mr *MockConfigWatcherMockRecorder) Unsubscribe() *MockConfigWatcherUnsubscribeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockConfigWatcher)(nil).Unsubscribe)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockConfigWatcher)(nil).Unsubscribe)) + return &MockConfigWatcherUnsubscribeCall{Call: call} +} + +// MockConfigWatcherUnsubscribeCall wrap *gomock.Call +type MockConfigWatcherUnsubscribeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWatcherUnsubscribeCall) Return() *MockConfigWatcherUnsubscribeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWatcherUnsubscribeCall) Do(f func()) *MockConfigWatcherUnsubscribeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWatcherUnsubscribeCall) DoAndReturn(f func()) *MockConfigWatcherUnsubscribeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/dbaccessor/metrics_mock_test.go b/internal/worker/dbaccessor/metrics_mock_test.go index 018d259950b..0813320470a 100644 --- a/internal/worker/dbaccessor/metrics_mock_test.go +++ b/internal/worker/dbaccessor/metrics_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package dbaccessor -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +// mockgen -typed -package dbaccessor -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer // // Package dbaccessor is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRegisterer) MustRegister(arg0 ...prometheus.Collector) { } // MustRegister indicates an expected call of MustRegister. -func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *gomock.Call { +func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *MockRegistererMustRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + return &MockRegistererMustRegisterCall{Call: call} +} + +// MockRegistererMustRegisterCall wrap *gomock.Call +type MockRegistererMustRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererMustRegisterCall) Return() *MockRegistererMustRegisterCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererMustRegisterCall) Do(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererMustRegisterCall) DoAndReturn(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockRegisterer) Register(arg0 prometheus.Collector) error { } // Register indicates an expected call of Register. -func (mr *MockRegistererMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Register(arg0 any) *MockRegistererRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + return &MockRegistererRegisterCall{Call: call} +} + +// MockRegistererRegisterCall wrap *gomock.Call +type MockRegistererRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererRegisterCall) Return(arg0 error) *MockRegistererRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererRegisterCall) Do(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererRegisterCall) DoAndReturn(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unregister mocks base method. @@ -78,7 +126,31 @@ func (m *MockRegisterer) Unregister(arg0 prometheus.Collector) bool { } // Unregister indicates an expected call of Unregister. -func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *MockRegistererUnregisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + return &MockRegistererUnregisterCall{Call: call} +} + +// MockRegistererUnregisterCall wrap *gomock.Call +type MockRegistererUnregisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererUnregisterCall) Return(arg0 bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererUnregisterCall) Do(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererUnregisterCall) DoAndReturn(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/dbaccessor/package_mock_test.go b/internal/worker/dbaccessor/package_mock_test.go index 5cce74c4f14..3562ad0b412 100644 --- a/internal/worker/dbaccessor/package_mock_test.go +++ b/internal/worker/dbaccessor/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package dbaccessor -destination package_mock_test.go github.com/juju/juju/internal/worker/dbaccessor Logger,DBApp,NodeManager,TrackedDB,Client,ClusterConfig +// mockgen -typed -package dbaccessor -destination package_mock_test.go github.com/juju/juju/internal/worker/dbaccessor Logger,DBApp,NodeManager,TrackedDB,Client,ClusterConfig // // Package dbaccessor is a generated GoMock package. @@ -55,10 +55,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -72,10 +96,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -89,10 +137,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -104,9 +176,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Logf mocks base method. @@ -120,10 +216,34 @@ func (m *MockLogger) Logf(arg0 loggo.Level, arg1 string, arg2 ...any) { } // Logf indicates an expected call of Logf. -func (mr *MockLoggerMockRecorder) Logf(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Logf(arg0, arg1 any, arg2 ...any) *MockLoggerLogfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logf", reflect.TypeOf((*MockLogger)(nil).Logf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logf", reflect.TypeOf((*MockLogger)(nil).Logf), varargs...) + return &MockLoggerLogfCall{Call: call} +} + +// MockLoggerLogfCall wrap *gomock.Call +type MockLoggerLogfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerLogfCall) Return() *MockLoggerLogfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerLogfCall) Do(f func(loggo.Level, string, ...any)) *MockLoggerLogfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerLogfCall) DoAndReturn(f func(loggo.Level, string, ...any)) *MockLoggerLogfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -137,10 +257,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -154,10 +298,34 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDBApp is a mock of DBApp interface. @@ -192,9 +360,33 @@ func (m *MockDBApp) Address() string { } // Address indicates an expected call of Address. -func (mr *MockDBAppMockRecorder) Address() *gomock.Call { +func (mr *MockDBAppMockRecorder) Address() *MockDBAppAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockDBApp)(nil).Address)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockDBApp)(nil).Address)) + return &MockDBAppAddressCall{Call: call} +} + +// MockDBAppAddressCall wrap *gomock.Call +type MockDBAppAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppAddressCall) Return(arg0 string) *MockDBAppAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppAddressCall) Do(f func() string) *MockDBAppAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppAddressCall) DoAndReturn(f func() string) *MockDBAppAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Client mocks base method. @@ -207,9 +399,33 @@ func (m *MockDBApp) Client(arg0 context.Context) (Client, error) { } // Client indicates an expected call of Client. -func (mr *MockDBAppMockRecorder) Client(arg0 any) *gomock.Call { +func (mr *MockDBAppMockRecorder) Client(arg0 any) *MockDBAppClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockDBApp)(nil).Client), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockDBApp)(nil).Client), arg0) + return &MockDBAppClientCall{Call: call} +} + +// MockDBAppClientCall wrap *gomock.Call +type MockDBAppClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppClientCall) Return(arg0 Client, arg1 error) *MockDBAppClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppClientCall) Do(f func(context.Context) (Client, error)) *MockDBAppClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppClientCall) DoAndReturn(f func(context.Context) (Client, error)) *MockDBAppClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -221,9 +437,33 @@ func (m *MockDBApp) Close() error { } // Close indicates an expected call of Close. -func (mr *MockDBAppMockRecorder) Close() *gomock.Call { +func (mr *MockDBAppMockRecorder) Close() *MockDBAppCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBApp)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBApp)(nil).Close)) + return &MockDBAppCloseCall{Call: call} +} + +// MockDBAppCloseCall wrap *gomock.Call +type MockDBAppCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppCloseCall) Return(arg0 error) *MockDBAppCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppCloseCall) Do(f func() error) *MockDBAppCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppCloseCall) DoAndReturn(f func() error) *MockDBAppCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Handover mocks base method. @@ -235,9 +475,33 @@ func (m *MockDBApp) Handover(arg0 context.Context) error { } // Handover indicates an expected call of Handover. -func (mr *MockDBAppMockRecorder) Handover(arg0 any) *gomock.Call { +func (mr *MockDBAppMockRecorder) Handover(arg0 any) *MockDBAppHandoverCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handover", reflect.TypeOf((*MockDBApp)(nil).Handover), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handover", reflect.TypeOf((*MockDBApp)(nil).Handover), arg0) + return &MockDBAppHandoverCall{Call: call} +} + +// MockDBAppHandoverCall wrap *gomock.Call +type MockDBAppHandoverCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppHandoverCall) Return(arg0 error) *MockDBAppHandoverCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppHandoverCall) Do(f func(context.Context) error) *MockDBAppHandoverCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppHandoverCall) DoAndReturn(f func(context.Context) error) *MockDBAppHandoverCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ID mocks base method. @@ -249,9 +513,33 @@ func (m *MockDBApp) ID() uint64 { } // ID indicates an expected call of ID. -func (mr *MockDBAppMockRecorder) ID() *gomock.Call { +func (mr *MockDBAppMockRecorder) ID() *MockDBAppIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockDBApp)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockDBApp)(nil).ID)) + return &MockDBAppIDCall{Call: call} +} + +// MockDBAppIDCall wrap *gomock.Call +type MockDBAppIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppIDCall) Return(arg0 uint64) *MockDBAppIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppIDCall) Do(f func() uint64) *MockDBAppIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppIDCall) DoAndReturn(f func() uint64) *MockDBAppIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Open mocks base method. @@ -264,9 +552,33 @@ func (m *MockDBApp) Open(arg0 context.Context, arg1 string) (*sql.DB, error) { } // Open indicates an expected call of Open. -func (mr *MockDBAppMockRecorder) Open(arg0, arg1 any) *gomock.Call { +func (mr *MockDBAppMockRecorder) Open(arg0, arg1 any) *MockDBAppOpenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockDBApp)(nil).Open), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockDBApp)(nil).Open), arg0, arg1) + return &MockDBAppOpenCall{Call: call} +} + +// MockDBAppOpenCall wrap *gomock.Call +type MockDBAppOpenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppOpenCall) Return(arg0 *sql.DB, arg1 error) *MockDBAppOpenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppOpenCall) Do(f func(context.Context, string) (*sql.DB, error)) *MockDBAppOpenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppOpenCall) DoAndReturn(f func(context.Context, string) (*sql.DB, error)) *MockDBAppOpenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ready mocks base method. @@ -278,9 +590,33 @@ func (m *MockDBApp) Ready(arg0 context.Context) error { } // Ready indicates an expected call of Ready. -func (mr *MockDBAppMockRecorder) Ready(arg0 any) *gomock.Call { +func (mr *MockDBAppMockRecorder) Ready(arg0 any) *MockDBAppReadyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ready", reflect.TypeOf((*MockDBApp)(nil).Ready), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ready", reflect.TypeOf((*MockDBApp)(nil).Ready), arg0) + return &MockDBAppReadyCall{Call: call} +} + +// MockDBAppReadyCall wrap *gomock.Call +type MockDBAppReadyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBAppReadyCall) Return(arg0 error) *MockDBAppReadyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBAppReadyCall) Do(f func(context.Context) error) *MockDBAppReadyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBAppReadyCall) DoAndReturn(f func(context.Context) error) *MockDBAppReadyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockNodeManager is a mock of NodeManager interface. @@ -316,9 +652,33 @@ func (m *MockNodeManager) ClusterServers(arg0 context.Context) ([]dqlite.NodeInf } // ClusterServers indicates an expected call of ClusterServers. -func (mr *MockNodeManagerMockRecorder) ClusterServers(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) ClusterServers(arg0 any) *MockNodeManagerClusterServersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterServers", reflect.TypeOf((*MockNodeManager)(nil).ClusterServers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterServers", reflect.TypeOf((*MockNodeManager)(nil).ClusterServers), arg0) + return &MockNodeManagerClusterServersCall{Call: call} +} + +// MockNodeManagerClusterServersCall wrap *gomock.Call +type MockNodeManagerClusterServersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerClusterServersCall) Return(arg0 []dqlite.NodeInfo, arg1 error) *MockNodeManagerClusterServersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerClusterServersCall) Do(f func(context.Context) ([]dqlite.NodeInfo, error)) *MockNodeManagerClusterServersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerClusterServersCall) DoAndReturn(f func(context.Context) ([]dqlite.NodeInfo, error)) *MockNodeManagerClusterServersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDataDir mocks base method. @@ -331,9 +691,33 @@ func (m *MockNodeManager) EnsureDataDir() (string, error) { } // EnsureDataDir indicates an expected call of EnsureDataDir. -func (mr *MockNodeManagerMockRecorder) EnsureDataDir() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) EnsureDataDir() *MockNodeManagerEnsureDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDataDir", reflect.TypeOf((*MockNodeManager)(nil).EnsureDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDataDir", reflect.TypeOf((*MockNodeManager)(nil).EnsureDataDir)) + return &MockNodeManagerEnsureDataDirCall{Call: call} +} + +// MockNodeManagerEnsureDataDirCall wrap *gomock.Call +type MockNodeManagerEnsureDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerEnsureDataDirCall) Return(arg0 string, arg1 error) *MockNodeManagerEnsureDataDirCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerEnsureDataDirCall) Do(f func() (string, error)) *MockNodeManagerEnsureDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerEnsureDataDirCall) DoAndReturn(f func() (string, error)) *MockNodeManagerEnsureDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsExistingNode mocks base method. @@ -346,9 +730,33 @@ func (m *MockNodeManager) IsExistingNode() (bool, error) { } // IsExistingNode indicates an expected call of IsExistingNode. -func (mr *MockNodeManagerMockRecorder) IsExistingNode() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) IsExistingNode() *MockNodeManagerIsExistingNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExistingNode", reflect.TypeOf((*MockNodeManager)(nil).IsExistingNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsExistingNode", reflect.TypeOf((*MockNodeManager)(nil).IsExistingNode)) + return &MockNodeManagerIsExistingNodeCall{Call: call} +} + +// MockNodeManagerIsExistingNodeCall wrap *gomock.Call +type MockNodeManagerIsExistingNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerIsExistingNodeCall) Return(arg0 bool, arg1 error) *MockNodeManagerIsExistingNodeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerIsExistingNodeCall) Do(f func() (bool, error)) *MockNodeManagerIsExistingNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerIsExistingNodeCall) DoAndReturn(f func() (bool, error)) *MockNodeManagerIsExistingNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLoopbackBound mocks base method. @@ -361,9 +769,33 @@ func (m *MockNodeManager) IsLoopbackBound(arg0 context.Context) (bool, error) { } // IsLoopbackBound indicates an expected call of IsLoopbackBound. -func (mr *MockNodeManagerMockRecorder) IsLoopbackBound(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) IsLoopbackBound(arg0 any) *MockNodeManagerIsLoopbackBoundCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLoopbackBound", reflect.TypeOf((*MockNodeManager)(nil).IsLoopbackBound), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLoopbackBound", reflect.TypeOf((*MockNodeManager)(nil).IsLoopbackBound), arg0) + return &MockNodeManagerIsLoopbackBoundCall{Call: call} +} + +// MockNodeManagerIsLoopbackBoundCall wrap *gomock.Call +type MockNodeManagerIsLoopbackBoundCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerIsLoopbackBoundCall) Return(arg0 bool, arg1 error) *MockNodeManagerIsLoopbackBoundCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerIsLoopbackBoundCall) Do(f func(context.Context) (bool, error)) *MockNodeManagerIsLoopbackBoundCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerIsLoopbackBoundCall) DoAndReturn(f func(context.Context) (bool, error)) *MockNodeManagerIsLoopbackBoundCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLoopbackPreferred mocks base method. @@ -375,9 +807,33 @@ func (m *MockNodeManager) IsLoopbackPreferred() bool { } // IsLoopbackPreferred indicates an expected call of IsLoopbackPreferred. -func (mr *MockNodeManagerMockRecorder) IsLoopbackPreferred() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) IsLoopbackPreferred() *MockNodeManagerIsLoopbackPreferredCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLoopbackPreferred", reflect.TypeOf((*MockNodeManager)(nil).IsLoopbackPreferred)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLoopbackPreferred", reflect.TypeOf((*MockNodeManager)(nil).IsLoopbackPreferred)) + return &MockNodeManagerIsLoopbackPreferredCall{Call: call} +} + +// MockNodeManagerIsLoopbackPreferredCall wrap *gomock.Call +type MockNodeManagerIsLoopbackPreferredCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerIsLoopbackPreferredCall) Return(arg0 bool) *MockNodeManagerIsLoopbackPreferredCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerIsLoopbackPreferredCall) Do(f func() bool) *MockNodeManagerIsLoopbackPreferredCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerIsLoopbackPreferredCall) DoAndReturn(f func() bool) *MockNodeManagerIsLoopbackPreferredCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetClusterServers mocks base method. @@ -389,9 +845,33 @@ func (m *MockNodeManager) SetClusterServers(arg0 context.Context, arg1 []dqlite. } // SetClusterServers indicates an expected call of SetClusterServers. -func (mr *MockNodeManagerMockRecorder) SetClusterServers(arg0, arg1 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) SetClusterServers(arg0, arg1 any) *MockNodeManagerSetClusterServersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClusterServers", reflect.TypeOf((*MockNodeManager)(nil).SetClusterServers), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClusterServers", reflect.TypeOf((*MockNodeManager)(nil).SetClusterServers), arg0, arg1) + return &MockNodeManagerSetClusterServersCall{Call: call} +} + +// MockNodeManagerSetClusterServersCall wrap *gomock.Call +type MockNodeManagerSetClusterServersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerSetClusterServersCall) Return(arg0 error) *MockNodeManagerSetClusterServersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerSetClusterServersCall) Do(f func(context.Context, []dqlite.NodeInfo) error) *MockNodeManagerSetClusterServersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerSetClusterServersCall) DoAndReturn(f func(context.Context, []dqlite.NodeInfo) error) *MockNodeManagerSetClusterServersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetClusterToLocalNode mocks base method. @@ -403,9 +883,33 @@ func (m *MockNodeManager) SetClusterToLocalNode(arg0 context.Context) error { } // SetClusterToLocalNode indicates an expected call of SetClusterToLocalNode. -func (mr *MockNodeManagerMockRecorder) SetClusterToLocalNode(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) SetClusterToLocalNode(arg0 any) *MockNodeManagerSetClusterToLocalNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClusterToLocalNode", reflect.TypeOf((*MockNodeManager)(nil).SetClusterToLocalNode), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClusterToLocalNode", reflect.TypeOf((*MockNodeManager)(nil).SetClusterToLocalNode), arg0) + return &MockNodeManagerSetClusterToLocalNodeCall{Call: call} +} + +// MockNodeManagerSetClusterToLocalNodeCall wrap *gomock.Call +type MockNodeManagerSetClusterToLocalNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerSetClusterToLocalNodeCall) Return(arg0 error) *MockNodeManagerSetClusterToLocalNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerSetClusterToLocalNodeCall) Do(f func(context.Context) error) *MockNodeManagerSetClusterToLocalNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerSetClusterToLocalNodeCall) DoAndReturn(f func(context.Context) error) *MockNodeManagerSetClusterToLocalNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetNodeInfo mocks base method. @@ -417,9 +921,33 @@ func (m *MockNodeManager) SetNodeInfo(arg0 dqlite.NodeInfo) error { } // SetNodeInfo indicates an expected call of SetNodeInfo. -func (mr *MockNodeManagerMockRecorder) SetNodeInfo(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) SetNodeInfo(arg0 any) *MockNodeManagerSetNodeInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNodeInfo", reflect.TypeOf((*MockNodeManager)(nil).SetNodeInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNodeInfo", reflect.TypeOf((*MockNodeManager)(nil).SetNodeInfo), arg0) + return &MockNodeManagerSetNodeInfoCall{Call: call} +} + +// MockNodeManagerSetNodeInfoCall wrap *gomock.Call +type MockNodeManagerSetNodeInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerSetNodeInfoCall) Return(arg0 error) *MockNodeManagerSetNodeInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerSetNodeInfoCall) Do(f func(dqlite.NodeInfo) error) *MockNodeManagerSetNodeInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerSetNodeInfoCall) DoAndReturn(f func(dqlite.NodeInfo) error) *MockNodeManagerSetNodeInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithAddressOption mocks base method. @@ -431,9 +959,33 @@ func (m *MockNodeManager) WithAddressOption(arg0 string) app.Option { } // WithAddressOption indicates an expected call of WithAddressOption. -func (mr *MockNodeManagerMockRecorder) WithAddressOption(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) WithAddressOption(arg0 any) *MockNodeManagerWithAddressOptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithAddressOption", reflect.TypeOf((*MockNodeManager)(nil).WithAddressOption), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithAddressOption", reflect.TypeOf((*MockNodeManager)(nil).WithAddressOption), arg0) + return &MockNodeManagerWithAddressOptionCall{Call: call} +} + +// MockNodeManagerWithAddressOptionCall wrap *gomock.Call +type MockNodeManagerWithAddressOptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerWithAddressOptionCall) Return(arg0 app.Option) *MockNodeManagerWithAddressOptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerWithAddressOptionCall) Do(f func(string) app.Option) *MockNodeManagerWithAddressOptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerWithAddressOptionCall) DoAndReturn(f func(string) app.Option) *MockNodeManagerWithAddressOptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithClusterOption mocks base method. @@ -445,9 +997,33 @@ func (m *MockNodeManager) WithClusterOption(arg0 []string) app.Option { } // WithClusterOption indicates an expected call of WithClusterOption. -func (mr *MockNodeManagerMockRecorder) WithClusterOption(arg0 any) *gomock.Call { +func (mr *MockNodeManagerMockRecorder) WithClusterOption(arg0 any) *MockNodeManagerWithClusterOptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithClusterOption", reflect.TypeOf((*MockNodeManager)(nil).WithClusterOption), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithClusterOption", reflect.TypeOf((*MockNodeManager)(nil).WithClusterOption), arg0) + return &MockNodeManagerWithClusterOptionCall{Call: call} +} + +// MockNodeManagerWithClusterOptionCall wrap *gomock.Call +type MockNodeManagerWithClusterOptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerWithClusterOptionCall) Return(arg0 app.Option) *MockNodeManagerWithClusterOptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerWithClusterOptionCall) Do(f func([]string) app.Option) *MockNodeManagerWithClusterOptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerWithClusterOptionCall) DoAndReturn(f func([]string) app.Option) *MockNodeManagerWithClusterOptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithLogFuncOption mocks base method. @@ -459,9 +1035,33 @@ func (m *MockNodeManager) WithLogFuncOption() app.Option { } // WithLogFuncOption indicates an expected call of WithLogFuncOption. -func (mr *MockNodeManagerMockRecorder) WithLogFuncOption() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) WithLogFuncOption() *MockNodeManagerWithLogFuncOptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithLogFuncOption", reflect.TypeOf((*MockNodeManager)(nil).WithLogFuncOption)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithLogFuncOption", reflect.TypeOf((*MockNodeManager)(nil).WithLogFuncOption)) + return &MockNodeManagerWithLogFuncOptionCall{Call: call} +} + +// MockNodeManagerWithLogFuncOptionCall wrap *gomock.Call +type MockNodeManagerWithLogFuncOptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerWithLogFuncOptionCall) Return(arg0 app.Option) *MockNodeManagerWithLogFuncOptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerWithLogFuncOptionCall) Do(f func() app.Option) *MockNodeManagerWithLogFuncOptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerWithLogFuncOptionCall) DoAndReturn(f func() app.Option) *MockNodeManagerWithLogFuncOptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithTLSOption mocks base method. @@ -474,9 +1074,33 @@ func (m *MockNodeManager) WithTLSOption() (app.Option, error) { } // WithTLSOption indicates an expected call of WithTLSOption. -func (mr *MockNodeManagerMockRecorder) WithTLSOption() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) WithTLSOption() *MockNodeManagerWithTLSOptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTLSOption", reflect.TypeOf((*MockNodeManager)(nil).WithTLSOption)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTLSOption", reflect.TypeOf((*MockNodeManager)(nil).WithTLSOption)) + return &MockNodeManagerWithTLSOptionCall{Call: call} +} + +// MockNodeManagerWithTLSOptionCall wrap *gomock.Call +type MockNodeManagerWithTLSOptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerWithTLSOptionCall) Return(arg0 app.Option, arg1 error) *MockNodeManagerWithTLSOptionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerWithTLSOptionCall) Do(f func() (app.Option, error)) *MockNodeManagerWithTLSOptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerWithTLSOptionCall) DoAndReturn(f func() (app.Option, error)) *MockNodeManagerWithTLSOptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WithTracingOption mocks base method. @@ -488,9 +1112,33 @@ func (m *MockNodeManager) WithTracingOption() app.Option { } // WithTracingOption indicates an expected call of WithTracingOption. -func (mr *MockNodeManagerMockRecorder) WithTracingOption() *gomock.Call { +func (mr *MockNodeManagerMockRecorder) WithTracingOption() *MockNodeManagerWithTracingOptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTracingOption", reflect.TypeOf((*MockNodeManager)(nil).WithTracingOption)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTracingOption", reflect.TypeOf((*MockNodeManager)(nil).WithTracingOption)) + return &MockNodeManagerWithTracingOptionCall{Call: call} +} + +// MockNodeManagerWithTracingOptionCall wrap *gomock.Call +type MockNodeManagerWithTracingOptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeManagerWithTracingOptionCall) Return(arg0 app.Option) *MockNodeManagerWithTracingOptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeManagerWithTracingOptionCall) Do(f func() app.Option) *MockNodeManagerWithTracingOptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeManagerWithTracingOptionCall) DoAndReturn(f func() app.Option) *MockNodeManagerWithTracingOptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTrackedDB is a mock of TrackedDB interface. @@ -523,9 +1171,33 @@ func (m *MockTrackedDB) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockTrackedDBMockRecorder) Kill() *gomock.Call { +func (mr *MockTrackedDBMockRecorder) Kill() *MockTrackedDBKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedDB)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedDB)(nil).Kill)) + return &MockTrackedDBKillCall{Call: call} +} + +// MockTrackedDBKillCall wrap *gomock.Call +type MockTrackedDBKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedDBKillCall) Return() *MockTrackedDBKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedDBKillCall) Do(f func()) *MockTrackedDBKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedDBKillCall) DoAndReturn(f func()) *MockTrackedDBKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StdTxn mocks base method. @@ -537,9 +1209,33 @@ func (m *MockTrackedDB) StdTxn(arg0 context.Context, arg1 func(context.Context, } // StdTxn indicates an expected call of StdTxn. -func (mr *MockTrackedDBMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockTrackedDBMockRecorder) StdTxn(arg0, arg1 any) *MockTrackedDBStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTrackedDB)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTrackedDB)(nil).StdTxn), arg0, arg1) + return &MockTrackedDBStdTxnCall{Call: call} +} + +// MockTrackedDBStdTxnCall wrap *gomock.Call +type MockTrackedDBStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedDBStdTxnCall) Return(arg0 error) *MockTrackedDBStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedDBStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTrackedDBStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedDBStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTrackedDBStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -551,9 +1247,33 @@ func (m *MockTrackedDB) Txn(arg0 context.Context, arg1 func(context.Context, *sq } // Txn indicates an expected call of Txn. -func (mr *MockTrackedDBMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockTrackedDBMockRecorder) Txn(arg0, arg1 any) *MockTrackedDBTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTrackedDB)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTrackedDB)(nil).Txn), arg0, arg1) + return &MockTrackedDBTxnCall{Call: call} +} + +// MockTrackedDBTxnCall wrap *gomock.Call +type MockTrackedDBTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedDBTxnCall) Return(arg0 error) *MockTrackedDBTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedDBTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTrackedDBTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedDBTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTrackedDBTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -565,9 +1285,33 @@ func (m *MockTrackedDB) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockTrackedDBMockRecorder) Wait() *gomock.Call { +func (mr *MockTrackedDBMockRecorder) Wait() *MockTrackedDBWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedDB)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedDB)(nil).Wait)) + return &MockTrackedDBWaitCall{Call: call} +} + +// MockTrackedDBWaitCall wrap *gomock.Call +type MockTrackedDBWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedDBWaitCall) Return(arg0 error) *MockTrackedDBWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedDBWaitCall) Do(f func() error) *MockTrackedDBWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedDBWaitCall) DoAndReturn(f func() error) *MockTrackedDBWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClient is a mock of Client interface. @@ -603,9 +1347,33 @@ func (m *MockClient) Cluster(arg0 context.Context) ([]dqlite.NodeInfo, error) { } // Cluster indicates an expected call of Cluster. -func (mr *MockClientMockRecorder) Cluster(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Cluster(arg0 any) *MockClientClusterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cluster", reflect.TypeOf((*MockClient)(nil).Cluster), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cluster", reflect.TypeOf((*MockClient)(nil).Cluster), arg0) + return &MockClientClusterCall{Call: call} +} + +// MockClientClusterCall wrap *gomock.Call +type MockClientClusterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientClusterCall) Return(arg0 []dqlite.NodeInfo, arg1 error) *MockClientClusterCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientClusterCall) Do(f func(context.Context) ([]dqlite.NodeInfo, error)) *MockClientClusterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientClusterCall) DoAndReturn(f func(context.Context) ([]dqlite.NodeInfo, error)) *MockClientClusterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Leader mocks base method. @@ -618,9 +1386,33 @@ func (m *MockClient) Leader(arg0 context.Context) (*dqlite.NodeInfo, error) { } // Leader indicates an expected call of Leader. -func (mr *MockClientMockRecorder) Leader(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Leader(arg0 any) *MockClientLeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockClient)(nil).Leader), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockClient)(nil).Leader), arg0) + return &MockClientLeaderCall{Call: call} +} + +// MockClientLeaderCall wrap *gomock.Call +type MockClientLeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientLeaderCall) Return(arg0 *dqlite.NodeInfo, arg1 error) *MockClientLeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientLeaderCall) Do(f func(context.Context) (*dqlite.NodeInfo, error)) *MockClientLeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientLeaderCall) DoAndReturn(f func(context.Context) (*dqlite.NodeInfo, error)) *MockClientLeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClusterConfig is a mock of ClusterConfig interface. @@ -656,7 +1448,31 @@ func (m *MockClusterConfig) DBBindAddresses() (map[string]string, error) { } // DBBindAddresses indicates an expected call of DBBindAddresses. -func (mr *MockClusterConfigMockRecorder) DBBindAddresses() *gomock.Call { +func (mr *MockClusterConfigMockRecorder) DBBindAddresses() *MockClusterConfigDBBindAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DBBindAddresses", reflect.TypeOf((*MockClusterConfig)(nil).DBBindAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DBBindAddresses", reflect.TypeOf((*MockClusterConfig)(nil).DBBindAddresses)) + return &MockClusterConfigDBBindAddressesCall{Call: call} +} + +// MockClusterConfigDBBindAddressesCall wrap *gomock.Call +type MockClusterConfigDBBindAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterConfigDBBindAddressesCall) Return(arg0 map[string]string, arg1 error) *MockClusterConfigDBBindAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterConfigDBBindAddressesCall) Do(f func() (map[string]string, error)) *MockClusterConfigDBBindAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterConfigDBBindAddressesCall) DoAndReturn(f func() (map[string]string, error)) *MockClusterConfigDBBindAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/dbaccessor/package_test.go b/internal/worker/dbaccessor/package_test.go index 7edb237034c..06ef3bcf8ef 100644 --- a/internal/worker/dbaccessor/package_test.go +++ b/internal/worker/dbaccessor/package_test.go @@ -21,10 +21,10 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package dbaccessor -destination package_mock_test.go github.com/juju/juju/internal/worker/dbaccessor Logger,DBApp,NodeManager,TrackedDB,Client,ClusterConfig -//go:generate go run go.uber.org/mock/mockgen -package dbaccessor -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package dbaccessor -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer -//go:generate go run go.uber.org/mock/mockgen -package dbaccessor -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/controlleragentconfig ConfigWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package dbaccessor -destination package_mock_test.go github.com/juju/juju/internal/worker/dbaccessor Logger,DBApp,NodeManager,TrackedDB,Client,ClusterConfig +//go:generate go run go.uber.org/mock/mockgen -typed -package dbaccessor -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package dbaccessor -destination metrics_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +//go:generate go run go.uber.org/mock/mockgen -typed -package dbaccessor -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/controlleragentconfig ConfigWatcher func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/deployer/mocks/deployer_mocks.go b/internal/worker/deployer/mocks/deployer_mocks.go index 6cc69782120..0b6188f3379 100644 --- a/internal/worker/deployer/mocks/deployer_mocks.go +++ b/internal/worker/deployer/mocks/deployer_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/deployer_mocks.go github.com/juju/juju/internal/worker/deployer Client,Machine,Unit +// mockgen -typed -package mocks -destination mocks/deployer_mocks.go github.com/juju/juju/internal/worker/deployer Client,Machine,Unit // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockClient) Machine(arg0 names.MachineTag) (deployer.Machine, error) { } // Machine indicates an expected call of Machine. -func (mr *MockClientMockRecorder) Machine(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Machine(arg0 any) *MockClientMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockClient)(nil).Machine), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockClient)(nil).Machine), arg0) + return &MockClientMachineCall{Call: call} +} + +// MockClientMachineCall wrap *gomock.Call +type MockClientMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientMachineCall) Return(arg0 deployer.Machine, arg1 error) *MockClientMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientMachineCall) Do(f func(names.MachineTag) (deployer.Machine, error)) *MockClientMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientMachineCall) DoAndReturn(f func(names.MachineTag) (deployer.Machine, error)) *MockClientMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -69,9 +93,33 @@ func (m *MockClient) Unit(arg0 context.Context, arg1 names.UnitTag) (deployer.Un } // Unit indicates an expected call of Unit. -func (mr *MockClientMockRecorder) Unit(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) Unit(arg0, arg1 any) *MockClientUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockClient)(nil).Unit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockClient)(nil).Unit), arg0, arg1) + return &MockClientUnitCall{Call: call} +} + +// MockClientUnitCall wrap *gomock.Call +type MockClientUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientUnitCall) Return(arg0 deployer.Unit, arg1 error) *MockClientUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientUnitCall) Do(f func(context.Context, names.UnitTag) (deployer.Unit, error)) *MockClientUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (deployer.Unit, error)) *MockClientUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -107,9 +155,33 @@ func (m *MockMachine) WatchUnits(arg0 context.Context) (watcher.Watcher[[]string } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockMachineMockRecorder) WatchUnits(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) WatchUnits(arg0 any) *MockMachineWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMachine)(nil).WatchUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMachine)(nil).WatchUnits), arg0) + return &MockMachineWatchUnitsCall{Call: call} +} + +// MockMachineWatchUnitsCall wrap *gomock.Call +type MockMachineWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchUnitsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMachineWatchUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchUnitsCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMachineWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchUnitsCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMachineWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -144,9 +216,33 @@ func (m *MockUnit) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockUnitMockRecorder) Life() *gomock.Call { +func (mr *MockUnitMockRecorder) Life() *MockUnitLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + return &MockUnitLifeCall{Call: call} +} + +// MockUnitLifeCall wrap *gomock.Call +type MockUnitLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLifeCall) Return(arg0 life.Value) *MockUnitLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLifeCall) Do(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLifeCall) DoAndReturn(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -158,9 +254,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -172,9 +292,33 @@ func (m *MockUnit) Remove(arg0 context.Context) error { } // Remove indicates an expected call of Remove. -func (mr *MockUnitMockRecorder) Remove(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Remove(arg0 any) *MockUnitRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockUnit)(nil).Remove), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockUnit)(nil).Remove), arg0) + return &MockUnitRemoveCall{Call: call} +} + +// MockUnitRemoveCall wrap *gomock.Call +type MockUnitRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRemoveCall) Return(arg0 error) *MockUnitRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRemoveCall) Do(f func(context.Context) error) *MockUnitRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRemoveCall) DoAndReturn(f func(context.Context) error) *MockUnitRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -186,9 +330,33 @@ func (m *MockUnit) SetPassword(arg0 context.Context, arg1 string) error { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockUnitMockRecorder) SetPassword(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetPassword(arg0, arg1 any) *MockUnitSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUnit)(nil).SetPassword), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockUnit)(nil).SetPassword), arg0, arg1) + return &MockUnitSetPasswordCall{Call: call} +} + +// MockUnitSetPasswordCall wrap *gomock.Call +type MockUnitSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetPasswordCall) Return(arg0 error) *MockUnitSetPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetPasswordCall) Do(f func(context.Context, string) error) *MockUnitSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetPasswordCall) DoAndReturn(f func(context.Context, string) error) *MockUnitSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -200,7 +368,31 @@ func (m *MockUnit) SetStatus(arg0 context.Context, arg1 status.Status, arg2 stri } // SetStatus indicates an expected call of SetStatus. -func (mr *MockUnitMockRecorder) SetStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetStatus(arg0, arg1, arg2, arg3 any) *MockUnitSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockUnit)(nil).SetStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockUnit)(nil).SetStatus), arg0, arg1, arg2, arg3) + return &MockUnitSetStatusCall{Call: call} +} + +// MockUnitSetStatusCall wrap *gomock.Call +type MockUnitSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetStatusCall) Return(arg0 error) *MockUnitSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetStatusCall) Do(f func(context.Context, status.Status, string, map[string]any) error) *MockUnitSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetStatusCall) DoAndReturn(f func(context.Context, status.Status, string, map[string]any) error) *MockUnitSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/deployer/package_test.go b/internal/worker/deployer/package_test.go index 0b063b5a337..65c972d7ccc 100644 --- a/internal/worker/deployer/package_test.go +++ b/internal/worker/deployer/package_test.go @@ -18,7 +18,7 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/deployer_mocks.go github.com/juju/juju/internal/worker/deployer Client,Machine,Unit +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/deployer_mocks.go github.com/juju/juju/internal/worker/deployer Client,Machine,Unit func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/filenotifywatcher/clock_mock_test.go b/internal/worker/filenotifywatcher/clock_mock_test.go index 95f5f134bf6..a9185dbe3d6 100644 --- a/internal/worker/filenotifywatcher/clock_mock_test.go +++ b/internal/worker/filenotifywatcher/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package filenotifywatcher -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package filenotifywatcher -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package filenotifywatcher is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/filenotifywatcher/logger_mock_test.go b/internal/worker/filenotifywatcher/logger_mock_test.go index 98e8a253c43..6a6143d8724 100644 --- a/internal/worker/filenotifywatcher/logger_mock_test.go +++ b/internal/worker/filenotifywatcher/logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package filenotifywatcher -destination logger_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher Logger +// mockgen -typed -package filenotifywatcher -destination logger_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher Logger // // Package filenotifywatcher is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -83,10 +131,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsTraceEnabled mocks base method. @@ -98,9 +170,33 @@ func (m *MockLogger) IsTraceEnabled() bool { } // IsTraceEnabled indicates an expected call of IsTraceEnabled. -func (mr *MockLoggerMockRecorder) IsTraceEnabled() *gomock.Call { +func (mr *MockLoggerMockRecorder) IsTraceEnabled() *MockLoggerIsTraceEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTraceEnabled", reflect.TypeOf((*MockLogger)(nil).IsTraceEnabled)) + return &MockLoggerIsTraceEnabledCall{Call: call} +} + +// MockLoggerIsTraceEnabledCall wrap *gomock.Call +type MockLoggerIsTraceEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerIsTraceEnabledCall) Return(arg0 bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerIsTraceEnabledCall) Do(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerIsTraceEnabledCall) DoAndReturn(f func() bool) *MockLoggerIsTraceEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -114,10 +210,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -131,8 +251,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/filenotifywatcher/package_test.go b/internal/worker/filenotifywatcher/package_test.go index 7318f7ffe5c..3faf1b2239d 100644 --- a/internal/worker/filenotifywatcher/package_test.go +++ b/internal/worker/filenotifywatcher/package_test.go @@ -12,9 +12,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package filenotifywatcher -destination watcher_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher FileNotifyWatcher,FileWatcher -//go:generate go run go.uber.org/mock/mockgen -package filenotifywatcher -destination logger_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher Logger -//go:generate go run go.uber.org/mock/mockgen -package filenotifywatcher -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package filenotifywatcher -destination watcher_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher FileNotifyWatcher,FileWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package filenotifywatcher -destination logger_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package filenotifywatcher -destination clock_mock_test.go github.com/juju/clock Clock,Timer func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/filenotifywatcher/watcher_mock_test.go b/internal/worker/filenotifywatcher/watcher_mock_test.go index 285531ce302..2fa4a045137 100644 --- a/internal/worker/filenotifywatcher/watcher_mock_test.go +++ b/internal/worker/filenotifywatcher/watcher_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package filenotifywatcher -destination watcher_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher FileNotifyWatcher,FileWatcher +// mockgen -typed -package filenotifywatcher -destination watcher_mock_test.go github.com/juju/juju/internal/worker/filenotifywatcher FileNotifyWatcher,FileWatcher // // Package filenotifywatcher is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockFileNotifyWatcher) Changes(arg0 string) (<-chan bool, error) { } // Changes indicates an expected call of Changes. -func (mr *MockFileNotifyWatcherMockRecorder) Changes(arg0 any) *gomock.Call { +func (mr *MockFileNotifyWatcherMockRecorder) Changes(arg0 any) *MockFileNotifyWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifyWatcher)(nil).Changes), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileNotifyWatcher)(nil).Changes), arg0) + return &MockFileNotifyWatcherChangesCall{Call: call} +} + +// MockFileNotifyWatcherChangesCall wrap *gomock.Call +type MockFileNotifyWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileNotifyWatcherChangesCall) Return(arg0 <-chan bool, arg1 error) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileNotifyWatcherChangesCall) Do(f func(string) (<-chan bool, error)) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileNotifyWatcherChangesCall) DoAndReturn(f func(string) (<-chan bool, error)) *MockFileNotifyWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFileWatcher is a mock of FileWatcher interface. @@ -85,9 +109,33 @@ func (m *MockFileWatcher) Changes() <-chan bool { } // Changes indicates an expected call of Changes. -func (mr *MockFileWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockFileWatcherMockRecorder) Changes() *MockFileWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockFileWatcher)(nil).Changes)) + return &MockFileWatcherChangesCall{Call: call} +} + +// MockFileWatcherChangesCall wrap *gomock.Call +type MockFileWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileWatcherChangesCall) Return(arg0 <-chan bool) *MockFileWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileWatcherChangesCall) Do(f func() <-chan bool) *MockFileWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileWatcherChangesCall) DoAndReturn(f func() <-chan bool) *MockFileWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -97,9 +145,33 @@ func (m *MockFileWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockFileWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockFileWatcherMockRecorder) Kill() *MockFileWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockFileWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockFileWatcher)(nil).Kill)) + return &MockFileWatcherKillCall{Call: call} +} + +// MockFileWatcherKillCall wrap *gomock.Call +type MockFileWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileWatcherKillCall) Return() *MockFileWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileWatcherKillCall) Do(f func()) *MockFileWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileWatcherKillCall) DoAndReturn(f func()) *MockFileWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -111,7 +183,31 @@ func (m *MockFileWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockFileWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockFileWatcherMockRecorder) Wait() *MockFileWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockFileWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockFileWatcher)(nil).Wait)) + return &MockFileWatcherWaitCall{Call: call} +} + +// MockFileWatcherWaitCall wrap *gomock.Call +type MockFileWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFileWatcherWaitCall) Return(arg0 error) *MockFileWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFileWatcherWaitCall) Do(f func() error) *MockFileWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFileWatcherWaitCall) DoAndReturn(f func() error) *MockFileWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/firewaller/firewaller_test.go b/internal/worker/firewaller/firewaller_test.go index aab4e292556..1ec4255ccdc 100644 --- a/internal/worker/firewaller/firewaller_test.go +++ b/internal/worker/firewaller/firewaller_test.go @@ -389,9 +389,9 @@ func (s *firewallerBaseSuite) newFirewaller(c *gc.C, ctrl *gomock.Controller) wo } initialised := make(chan bool) - s.firewaller.EXPECT().AllSpaceInfos().DoAndReturn(func() (network.SpaceInfo, error) { + s.firewaller.EXPECT().AllSpaceInfos().DoAndReturn(func() (network.SpaceInfos, error) { defer close(initialised) - return network.SpaceInfo{}, nil + return nil, nil }) s.envFirewaller.EXPECT().OpenPorts(gomock.Any(), gomock.Any()).DoAndReturn(func(_ envcontext.ProviderCallContext, rules firewall.IngressRules) error { diff --git a/internal/worker/firewaller/mocks/credential_mocks.go b/internal/worker/firewaller/mocks/credential_mocks.go index 5e8a3021172..83ea3544b2b 100644 --- a/internal/worker/firewaller/mocks/credential_mocks.go +++ b/internal/worker/firewaller/mocks/credential_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/credential_mocks.go github.com/juju/juju/internal/worker/common CredentialAPI +// mockgen -typed -package mocks -destination mocks/credential_mocks.go github.com/juju/juju/internal/worker/common CredentialAPI // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockCredentialAPI) InvalidateModelCredential(arg0 context.Context, arg1 } // InvalidateModelCredential indicates an expected call of InvalidateModelCredential. -func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *MockCredentialAPIInvalidateModelCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + return &MockCredentialAPIInvalidateModelCredentialCall{Call: call} +} + +// MockCredentialAPIInvalidateModelCredentialCall wrap *gomock.Call +type MockCredentialAPIInvalidateModelCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialAPIInvalidateModelCredentialCall) Return(arg0 error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialAPIInvalidateModelCredentialCall) Do(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialAPIInvalidateModelCredentialCall) DoAndReturn(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/firewaller/mocks/entity_mocks.go b/internal/worker/firewaller/mocks/entity_mocks.go index f57239262b8..88058218b29 100644 --- a/internal/worker/firewaller/mocks/entity_mocks.go +++ b/internal/worker/firewaller/mocks/entity_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/entity_mocks.go github.com/juju/juju/internal/worker/firewaller Machine,Unit,Application +// mockgen -typed -package mocks -destination mocks/entity_mocks.go github.com/juju/juju/internal/worker/firewaller Machine,Unit,Application // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockMachine) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceId() *MockMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + return &MockMachineInstanceIdCall{Call: call} +} + +// MockMachineInstanceIdCall wrap *gomock.Call +type MockMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManual mocks base method. @@ -71,9 +95,33 @@ func (m *MockMachine) IsManual() (bool, error) { } // IsManual indicates an expected call of IsManual. -func (mr *MockMachineMockRecorder) IsManual() *gomock.Call { +func (mr *MockMachineMockRecorder) IsManual() *MockMachineIsManualCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + return &MockMachineIsManualCall{Call: call} +} + +// MockMachineIsManualCall wrap *gomock.Call +type MockMachineIsManualCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsManualCall) Return(arg0 bool, arg1 error) *MockMachineIsManualCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsManualCall) Do(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsManualCall) DoAndReturn(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -85,9 +133,33 @@ func (m *MockMachine) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMachineMockRecorder) Life() *gomock.Call { +func (mr *MockMachineMockRecorder) Life() *MockMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + return &MockMachineLifeCall{Call: call} +} + +// MockMachineLifeCall wrap *gomock.Call +type MockMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineLifeCall) Return(arg0 life.Value) *MockMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineLifeCall) Do(f func() life.Value) *MockMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineLifeCall) DoAndReturn(f func() life.Value) *MockMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedMachinePortRanges mocks base method. @@ -101,9 +173,33 @@ func (m *MockMachine) OpenedMachinePortRanges() (map[names.UnitTag]network.Group } // OpenedMachinePortRanges indicates an expected call of OpenedMachinePortRanges. -func (mr *MockMachineMockRecorder) OpenedMachinePortRanges() *gomock.Call { +func (mr *MockMachineMockRecorder) OpenedMachinePortRanges() *MockMachineOpenedMachinePortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedMachinePortRanges", reflect.TypeOf((*MockMachine)(nil).OpenedMachinePortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedMachinePortRanges", reflect.TypeOf((*MockMachine)(nil).OpenedMachinePortRanges)) + return &MockMachineOpenedMachinePortRangesCall{Call: call} +} + +// MockMachineOpenedMachinePortRangesCall wrap *gomock.Call +type MockMachineOpenedMachinePortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineOpenedMachinePortRangesCall) Return(arg0, arg1 map[names.UnitTag]network.GroupedPortRanges, arg2 error) *MockMachineOpenedMachinePortRangesCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineOpenedMachinePortRangesCall) Do(f func() (map[names.UnitTag]network.GroupedPortRanges, map[names.UnitTag]network.GroupedPortRanges, error)) *MockMachineOpenedMachinePortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineOpenedMachinePortRangesCall) DoAndReturn(f func() (map[names.UnitTag]network.GroupedPortRanges, map[names.UnitTag]network.GroupedPortRanges, error)) *MockMachineOpenedMachinePortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -115,9 +211,33 @@ func (m *MockMachine) Tag() names.MachineTag { } // Tag indicates an expected call of Tag. -func (mr *MockMachineMockRecorder) Tag() *gomock.Call { +func (mr *MockMachineMockRecorder) Tag() *MockMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + return &MockMachineTagCall{Call: call} +} + +// MockMachineTagCall wrap *gomock.Call +type MockMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineTagCall) Return(arg0 names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineTagCall) Do(f func() names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUnits mocks base method. @@ -130,9 +250,33 @@ func (m *MockMachine) WatchUnits() (watcher.Watcher[[]string], error) { } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockMachineMockRecorder) WatchUnits() *gomock.Call { +func (mr *MockMachineMockRecorder) WatchUnits() *MockMachineWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMachine)(nil).WatchUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMachine)(nil).WatchUnits)) + return &MockMachineWatchUnitsCall{Call: call} +} + +// MockMachineWatchUnitsCall wrap *gomock.Call +type MockMachineWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchUnitsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMachineWatchUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchUnitsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockMachineWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchUnitsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockMachineWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnit is a mock of Unit interface. @@ -168,9 +312,33 @@ func (m *MockUnit) Application() (firewaller.Application, error) { } // Application indicates an expected call of Application. -func (mr *MockUnitMockRecorder) Application() *gomock.Call { +func (mr *MockUnitMockRecorder) Application() *MockUnitApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application)) + return &MockUnitApplicationCall{Call: call} +} + +// MockUnitApplicationCall wrap *gomock.Call +type MockUnitApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationCall) Return(arg0 firewaller.Application, arg1 error) *MockUnitApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationCall) Do(f func() (firewaller.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationCall) DoAndReturn(f func() (firewaller.Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedMachine mocks base method. @@ -183,9 +351,33 @@ func (m *MockUnit) AssignedMachine() (names.MachineTag, error) { } // AssignedMachine indicates an expected call of AssignedMachine. -func (mr *MockUnitMockRecorder) AssignedMachine() *gomock.Call { +func (mr *MockUnitMockRecorder) AssignedMachine() *MockUnitAssignedMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachine", reflect.TypeOf((*MockUnit)(nil).AssignedMachine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachine", reflect.TypeOf((*MockUnit)(nil).AssignedMachine)) + return &MockUnitAssignedMachineCall{Call: call} +} + +// MockUnitAssignedMachineCall wrap *gomock.Call +type MockUnitAssignedMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignedMachineCall) Return(arg0 names.MachineTag, arg1 error) *MockUnitAssignedMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignedMachineCall) Do(f func() (names.MachineTag, error)) *MockUnitAssignedMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignedMachineCall) DoAndReturn(f func() (names.MachineTag, error)) *MockUnitAssignedMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -197,9 +389,33 @@ func (m *MockUnit) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockUnitMockRecorder) Life() *gomock.Call { +func (mr *MockUnitMockRecorder) Life() *MockUnitLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + return &MockUnitLifeCall{Call: call} +} + +// MockUnitLifeCall wrap *gomock.Call +type MockUnitLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLifeCall) Return(arg0 life.Value) *MockUnitLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLifeCall) Do(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLifeCall) DoAndReturn(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -211,9 +427,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -225,9 +465,33 @@ func (m *MockUnit) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockUnitMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Refresh(arg0 any) *MockUnitRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockUnit)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockUnit)(nil).Refresh), arg0) + return &MockUnitRefreshCall{Call: call} +} + +// MockUnitRefreshCall wrap *gomock.Call +type MockUnitRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRefreshCall) Return(arg0 error) *MockUnitRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRefreshCall) Do(f func(context.Context) error) *MockUnitRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRefreshCall) DoAndReturn(f func(context.Context) error) *MockUnitRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -239,9 +503,33 @@ func (m *MockUnit) Tag() names.UnitTag { } // Tag indicates an expected call of Tag. -func (mr *MockUnitMockRecorder) Tag() *gomock.Call { +func (mr *MockUnitMockRecorder) Tag() *MockUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + return &MockUnitTagCall{Call: call} +} + +// MockUnitTagCall wrap *gomock.Call +type MockUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitTagCall) Return(arg0 names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitTagCall) Do(f func() names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitTagCall) DoAndReturn(f func() names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -278,9 +566,33 @@ func (m *MockApplication) ExposeInfo() (bool, map[string]params.ExposedEndpoint, } // ExposeInfo indicates an expected call of ExposeInfo. -func (mr *MockApplicationMockRecorder) ExposeInfo() *gomock.Call { +func (mr *MockApplicationMockRecorder) ExposeInfo() *MockApplicationExposeInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposeInfo", reflect.TypeOf((*MockApplication)(nil).ExposeInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposeInfo", reflect.TypeOf((*MockApplication)(nil).ExposeInfo)) + return &MockApplicationExposeInfoCall{Call: call} +} + +// MockApplicationExposeInfoCall wrap *gomock.Call +type MockApplicationExposeInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposeInfoCall) Return(arg0 bool, arg1 map[string]params.ExposedEndpoint, arg2 error) *MockApplicationExposeInfoCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposeInfoCall) Do(f func() (bool, map[string]params.ExposedEndpoint, error)) *MockApplicationExposeInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposeInfoCall) DoAndReturn(f func() (bool, map[string]params.ExposedEndpoint, error)) *MockApplicationExposeInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -292,9 +604,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -306,9 +642,33 @@ func (m *MockApplication) Tag() names.ApplicationTag { } // Tag indicates an expected call of Tag. -func (mr *MockApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockApplicationMockRecorder) Tag() *MockApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + return &MockApplicationTagCall{Call: call} +} + +// MockApplicationTagCall wrap *gomock.Call +type MockApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -321,7 +681,31 @@ func (m *MockApplication) Watch() (watcher.Watcher[struct{}], error) { } // Watch indicates an expected call of Watch. -func (mr *MockApplicationMockRecorder) Watch() *gomock.Call { +func (mr *MockApplicationMockRecorder) Watch() *MockApplicationWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch)) + return &MockApplicationWatchCall{Call: call} +} + +// MockApplicationWatchCall wrap *gomock.Call +type MockApplicationWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationWatchCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockApplicationWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationWatchCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationWatchCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/firewaller/mocks/facade_mocks.go b/internal/worker/firewaller/mocks/facade_mocks.go index 612dd296917..c03713d2317 100644 --- a/internal/worker/firewaller/mocks/facade_mocks.go +++ b/internal/worker/firewaller/mocks/facade_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mocks.go github.com/juju/juju/internal/worker/firewaller FirewallerAPI,RemoteRelationsAPI,CrossModelFirewallerFacadeCloser,EnvironFirewaller,EnvironModelFirewaller,EnvironInstances,EnvironInstance +// mockgen -typed -package mocks -destination mocks/facade_mocks.go github.com/juju/juju/internal/worker/firewaller FirewallerAPI,RemoteRelationsAPI,CrossModelFirewallerFacadeCloser,EnvironFirewaller,EnvironModelFirewaller,EnvironInstances,EnvironInstance // // Package mocks is a generated GoMock package. @@ -63,9 +63,33 @@ func (m *MockFirewallerAPI) AllSpaceInfos() (network.SpaceInfos, error) { } // AllSpaceInfos indicates an expected call of AllSpaceInfos. -func (mr *MockFirewallerAPIMockRecorder) AllSpaceInfos() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) AllSpaceInfos() *MockFirewallerAPIAllSpaceInfosCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaceInfos", reflect.TypeOf((*MockFirewallerAPI)(nil).AllSpaceInfos)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllSpaceInfos", reflect.TypeOf((*MockFirewallerAPI)(nil).AllSpaceInfos)) + return &MockFirewallerAPIAllSpaceInfosCall{Call: call} +} + +// MockFirewallerAPIAllSpaceInfosCall wrap *gomock.Call +type MockFirewallerAPIAllSpaceInfosCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIAllSpaceInfosCall) Return(arg0 network.SpaceInfos, arg1 error) *MockFirewallerAPIAllSpaceInfosCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIAllSpaceInfosCall) Do(f func() (network.SpaceInfos, error)) *MockFirewallerAPIAllSpaceInfosCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIAllSpaceInfosCall) DoAndReturn(f func() (network.SpaceInfos, error)) *MockFirewallerAPIAllSpaceInfosCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerAPIInfoForModel mocks base method. @@ -78,9 +102,33 @@ func (m *MockFirewallerAPI) ControllerAPIInfoForModel(arg0 string) (*api.Info, e } // ControllerAPIInfoForModel indicates an expected call of ControllerAPIInfoForModel. -func (mr *MockFirewallerAPIMockRecorder) ControllerAPIInfoForModel(arg0 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) ControllerAPIInfoForModel(arg0 any) *MockFirewallerAPIControllerAPIInfoForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModel", reflect.TypeOf((*MockFirewallerAPI)(nil).ControllerAPIInfoForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAPIInfoForModel", reflect.TypeOf((*MockFirewallerAPI)(nil).ControllerAPIInfoForModel), arg0) + return &MockFirewallerAPIControllerAPIInfoForModelCall{Call: call} +} + +// MockFirewallerAPIControllerAPIInfoForModelCall wrap *gomock.Call +type MockFirewallerAPIControllerAPIInfoForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIControllerAPIInfoForModelCall) Return(arg0 *api.Info, arg1 error) *MockFirewallerAPIControllerAPIInfoForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIControllerAPIInfoForModelCall) Do(f func(string) (*api.Info, error)) *MockFirewallerAPIControllerAPIInfoForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIControllerAPIInfoForModelCall) DoAndReturn(f func(string) (*api.Info, error)) *MockFirewallerAPIControllerAPIInfoForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MacaroonForRelation mocks base method. @@ -93,9 +141,33 @@ func (m *MockFirewallerAPI) MacaroonForRelation(arg0 string) (*macaroon.Macaroon } // MacaroonForRelation indicates an expected call of MacaroonForRelation. -func (mr *MockFirewallerAPIMockRecorder) MacaroonForRelation(arg0 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) MacaroonForRelation(arg0 any) *MockFirewallerAPIMacaroonForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MacaroonForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).MacaroonForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MacaroonForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).MacaroonForRelation), arg0) + return &MockFirewallerAPIMacaroonForRelationCall{Call: call} +} + +// MockFirewallerAPIMacaroonForRelationCall wrap *gomock.Call +type MockFirewallerAPIMacaroonForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIMacaroonForRelationCall) Return(arg0 *macaroon.Macaroon, arg1 error) *MockFirewallerAPIMacaroonForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIMacaroonForRelationCall) Do(f func(string) (*macaroon.Macaroon, error)) *MockFirewallerAPIMacaroonForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIMacaroonForRelationCall) DoAndReturn(f func(string) (*macaroon.Macaroon, error)) *MockFirewallerAPIMacaroonForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -108,9 +180,33 @@ func (m *MockFirewallerAPI) Machine(arg0 context.Context, arg1 names.MachineTag) } // Machine indicates an expected call of Machine. -func (mr *MockFirewallerAPIMockRecorder) Machine(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) Machine(arg0, arg1 any) *MockFirewallerAPIMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockFirewallerAPI)(nil).Machine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockFirewallerAPI)(nil).Machine), arg0, arg1) + return &MockFirewallerAPIMachineCall{Call: call} +} + +// MockFirewallerAPIMachineCall wrap *gomock.Call +type MockFirewallerAPIMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIMachineCall) Return(arg0 firewaller0.Machine, arg1 error) *MockFirewallerAPIMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIMachineCall) Do(f func(context.Context, names.MachineTag) (firewaller0.Machine, error)) *MockFirewallerAPIMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIMachineCall) DoAndReturn(f func(context.Context, names.MachineTag) (firewaller0.Machine, error)) *MockFirewallerAPIMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -123,9 +219,33 @@ func (m *MockFirewallerAPI) ModelConfig(arg0 context.Context) (*config.Config, e } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockFirewallerAPIMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) ModelConfig(arg0 any) *MockFirewallerAPIModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockFirewallerAPI)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockFirewallerAPI)(nil).ModelConfig), arg0) + return &MockFirewallerAPIModelConfigCall{Call: call} +} + +// MockFirewallerAPIModelConfigCall wrap *gomock.Call +type MockFirewallerAPIModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockFirewallerAPIModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockFirewallerAPIModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockFirewallerAPIModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelFirewallRules mocks base method. @@ -138,9 +258,33 @@ func (m *MockFirewallerAPI) ModelFirewallRules() (firewall.IngressRules, error) } // ModelFirewallRules indicates an expected call of ModelFirewallRules. -func (mr *MockFirewallerAPIMockRecorder) ModelFirewallRules() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) ModelFirewallRules() *MockFirewallerAPIModelFirewallRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelFirewallRules", reflect.TypeOf((*MockFirewallerAPI)(nil).ModelFirewallRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelFirewallRules", reflect.TypeOf((*MockFirewallerAPI)(nil).ModelFirewallRules)) + return &MockFirewallerAPIModelFirewallRulesCall{Call: call} +} + +// MockFirewallerAPIModelFirewallRulesCall wrap *gomock.Call +type MockFirewallerAPIModelFirewallRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIModelFirewallRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockFirewallerAPIModelFirewallRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIModelFirewallRulesCall) Do(f func() (firewall.IngressRules, error)) *MockFirewallerAPIModelFirewallRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIModelFirewallRulesCall) DoAndReturn(f func() (firewall.IngressRules, error)) *MockFirewallerAPIModelFirewallRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -153,9 +297,33 @@ func (m *MockFirewallerAPI) Relation(arg0 context.Context, arg1 names.RelationTa } // Relation indicates an expected call of Relation. -func (mr *MockFirewallerAPIMockRecorder) Relation(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) Relation(arg0, arg1 any) *MockFirewallerAPIRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockFirewallerAPI)(nil).Relation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockFirewallerAPI)(nil).Relation), arg0, arg1) + return &MockFirewallerAPIRelationCall{Call: call} +} + +// MockFirewallerAPIRelationCall wrap *gomock.Call +type MockFirewallerAPIRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIRelationCall) Return(arg0 *firewaller.Relation, arg1 error) *MockFirewallerAPIRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIRelationCall) Do(f func(context.Context, names.RelationTag) (*firewaller.Relation, error)) *MockFirewallerAPIRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIRelationCall) DoAndReturn(f func(context.Context, names.RelationTag) (*firewaller.Relation, error)) *MockFirewallerAPIRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetRelationStatus mocks base method. @@ -167,9 +335,33 @@ func (m *MockFirewallerAPI) SetRelationStatus(arg0 string, arg1 relation.Status, } // SetRelationStatus indicates an expected call of SetRelationStatus. -func (mr *MockFirewallerAPIMockRecorder) SetRelationStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) SetRelationStatus(arg0, arg1, arg2 any) *MockFirewallerAPISetRelationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRelationStatus", reflect.TypeOf((*MockFirewallerAPI)(nil).SetRelationStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRelationStatus", reflect.TypeOf((*MockFirewallerAPI)(nil).SetRelationStatus), arg0, arg1, arg2) + return &MockFirewallerAPISetRelationStatusCall{Call: call} +} + +// MockFirewallerAPISetRelationStatusCall wrap *gomock.Call +type MockFirewallerAPISetRelationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPISetRelationStatusCall) Return(arg0 error) *MockFirewallerAPISetRelationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPISetRelationStatusCall) Do(f func(string, relation.Status, string) error) *MockFirewallerAPISetRelationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPISetRelationStatusCall) DoAndReturn(f func(string, relation.Status, string) error) *MockFirewallerAPISetRelationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -182,9 +374,33 @@ func (m *MockFirewallerAPI) Unit(arg0 context.Context, arg1 names.UnitTag) (fire } // Unit indicates an expected call of Unit. -func (mr *MockFirewallerAPIMockRecorder) Unit(arg0, arg1 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) Unit(arg0, arg1 any) *MockFirewallerAPIUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockFirewallerAPI)(nil).Unit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockFirewallerAPI)(nil).Unit), arg0, arg1) + return &MockFirewallerAPIUnitCall{Call: call} +} + +// MockFirewallerAPIUnitCall wrap *gomock.Call +type MockFirewallerAPIUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIUnitCall) Return(arg0 firewaller0.Unit, arg1 error) *MockFirewallerAPIUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIUnitCall) Do(f func(context.Context, names.UnitTag) (firewaller0.Unit, error)) *MockFirewallerAPIUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (firewaller0.Unit, error)) *MockFirewallerAPIUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchEgressAddressesForRelation mocks base method. @@ -197,9 +413,33 @@ func (m *MockFirewallerAPI) WatchEgressAddressesForRelation(arg0 names.RelationT } // WatchEgressAddressesForRelation indicates an expected call of WatchEgressAddressesForRelation. -func (mr *MockFirewallerAPIMockRecorder) WatchEgressAddressesForRelation(arg0 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchEgressAddressesForRelation(arg0 any) *MockFirewallerAPIWatchEgressAddressesForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEgressAddressesForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchEgressAddressesForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEgressAddressesForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchEgressAddressesForRelation), arg0) + return &MockFirewallerAPIWatchEgressAddressesForRelationCall{Call: call} +} + +// MockFirewallerAPIWatchEgressAddressesForRelationCall wrap *gomock.Call +type MockFirewallerAPIWatchEgressAddressesForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchEgressAddressesForRelationCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFirewallerAPIWatchEgressAddressesForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchEgressAddressesForRelationCall) Do(f func(names.RelationTag) (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchEgressAddressesForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchEgressAddressesForRelationCall) DoAndReturn(f func(names.RelationTag) (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchEgressAddressesForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchIngressAddressesForRelation mocks base method. @@ -212,9 +452,33 @@ func (m *MockFirewallerAPI) WatchIngressAddressesForRelation(arg0 names.Relation } // WatchIngressAddressesForRelation indicates an expected call of WatchIngressAddressesForRelation. -func (mr *MockFirewallerAPIMockRecorder) WatchIngressAddressesForRelation(arg0 any) *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchIngressAddressesForRelation(arg0 any) *MockFirewallerAPIWatchIngressAddressesForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchIngressAddressesForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchIngressAddressesForRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchIngressAddressesForRelation", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchIngressAddressesForRelation), arg0) + return &MockFirewallerAPIWatchIngressAddressesForRelationCall{Call: call} +} + +// MockFirewallerAPIWatchIngressAddressesForRelationCall wrap *gomock.Call +type MockFirewallerAPIWatchIngressAddressesForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchIngressAddressesForRelationCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFirewallerAPIWatchIngressAddressesForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchIngressAddressesForRelationCall) Do(f func(names.RelationTag) (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchIngressAddressesForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchIngressAddressesForRelationCall) DoAndReturn(f func(names.RelationTag) (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchIngressAddressesForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelFirewallRules mocks base method. @@ -227,9 +491,33 @@ func (m *MockFirewallerAPI) WatchModelFirewallRules() (watcher.Watcher[struct{}] } // WatchModelFirewallRules indicates an expected call of WatchModelFirewallRules. -func (mr *MockFirewallerAPIMockRecorder) WatchModelFirewallRules() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchModelFirewallRules() *MockFirewallerAPIWatchModelFirewallRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelFirewallRules", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchModelFirewallRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelFirewallRules", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchModelFirewallRules)) + return &MockFirewallerAPIWatchModelFirewallRulesCall{Call: call} +} + +// MockFirewallerAPIWatchModelFirewallRulesCall wrap *gomock.Call +type MockFirewallerAPIWatchModelFirewallRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchModelFirewallRulesCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockFirewallerAPIWatchModelFirewallRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchModelFirewallRulesCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockFirewallerAPIWatchModelFirewallRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchModelFirewallRulesCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockFirewallerAPIWatchModelFirewallRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachines mocks base method. @@ -242,9 +530,33 @@ func (m *MockFirewallerAPI) WatchModelMachines() (watcher.Watcher[[]string], err } // WatchModelMachines indicates an expected call of WatchModelMachines. -func (mr *MockFirewallerAPIMockRecorder) WatchModelMachines() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchModelMachines() *MockFirewallerAPIWatchModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchModelMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchModelMachines)) + return &MockFirewallerAPIWatchModelMachinesCall{Call: call} +} + +// MockFirewallerAPIWatchModelMachinesCall wrap *gomock.Call +type MockFirewallerAPIWatchModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchModelMachinesCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFirewallerAPIWatchModelMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchModelMachinesCall) Do(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchModelMachinesCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchOpenedPorts mocks base method. @@ -257,9 +569,33 @@ func (m *MockFirewallerAPI) WatchOpenedPorts() (watcher.Watcher[[]string], error } // WatchOpenedPorts indicates an expected call of WatchOpenedPorts. -func (mr *MockFirewallerAPIMockRecorder) WatchOpenedPorts() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchOpenedPorts() *MockFirewallerAPIWatchOpenedPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchOpenedPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOpenedPorts", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchOpenedPorts)) + return &MockFirewallerAPIWatchOpenedPortsCall{Call: call} +} + +// MockFirewallerAPIWatchOpenedPortsCall wrap *gomock.Call +type MockFirewallerAPIWatchOpenedPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchOpenedPortsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchOpenedPortsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchOpenedPortsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchOpenedPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSubnets mocks base method. @@ -272,9 +608,33 @@ func (m *MockFirewallerAPI) WatchSubnets() (watcher.Watcher[[]string], error) { } // WatchSubnets indicates an expected call of WatchSubnets. -func (mr *MockFirewallerAPIMockRecorder) WatchSubnets() *gomock.Call { +func (mr *MockFirewallerAPIMockRecorder) WatchSubnets() *MockFirewallerAPIWatchSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSubnets", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchSubnets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSubnets", reflect.TypeOf((*MockFirewallerAPI)(nil).WatchSubnets)) + return &MockFirewallerAPIWatchSubnetsCall{Call: call} +} + +// MockFirewallerAPIWatchSubnetsCall wrap *gomock.Call +type MockFirewallerAPIWatchSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallerAPIWatchSubnetsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFirewallerAPIWatchSubnetsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallerAPIWatchSubnetsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallerAPIWatchSubnetsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockFirewallerAPIWatchSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteRelationsAPI is a mock of RemoteRelationsAPI interface. @@ -310,9 +670,33 @@ func (m *MockRemoteRelationsAPI) GetToken(arg0 names.Tag) (string, error) { } // GetToken indicates an expected call of GetToken. -func (mr *MockRemoteRelationsAPIMockRecorder) GetToken(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsAPIMockRecorder) GetToken(arg0 any) *MockRemoteRelationsAPIGetTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).GetToken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetToken", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).GetToken), arg0) + return &MockRemoteRelationsAPIGetTokenCall{Call: call} +} + +// MockRemoteRelationsAPIGetTokenCall wrap *gomock.Call +type MockRemoteRelationsAPIGetTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsAPIGetTokenCall) Return(arg0 string, arg1 error) *MockRemoteRelationsAPIGetTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsAPIGetTokenCall) Do(f func(names.Tag) (string, error)) *MockRemoteRelationsAPIGetTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsAPIGetTokenCall) DoAndReturn(f func(names.Tag) (string, error)) *MockRemoteRelationsAPIGetTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relations mocks base method. @@ -325,9 +709,33 @@ func (m *MockRemoteRelationsAPI) Relations(arg0 []string) ([]params.RemoteRelati } // Relations indicates an expected call of Relations. -func (mr *MockRemoteRelationsAPIMockRecorder) Relations(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsAPIMockRecorder) Relations(arg0 any) *MockRemoteRelationsAPIRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).Relations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relations", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).Relations), arg0) + return &MockRemoteRelationsAPIRelationsCall{Call: call} +} + +// MockRemoteRelationsAPIRelationsCall wrap *gomock.Call +type MockRemoteRelationsAPIRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsAPIRelationsCall) Return(arg0 []params.RemoteRelationResult, arg1 error) *MockRemoteRelationsAPIRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsAPIRelationsCall) Do(f func([]string) ([]params.RemoteRelationResult, error)) *MockRemoteRelationsAPIRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsAPIRelationsCall) DoAndReturn(f func([]string) ([]params.RemoteRelationResult, error)) *MockRemoteRelationsAPIRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplications mocks base method. @@ -340,9 +748,33 @@ func (m *MockRemoteRelationsAPI) RemoteApplications(arg0 []string) ([]params.Rem } // RemoteApplications indicates an expected call of RemoteApplications. -func (mr *MockRemoteRelationsAPIMockRecorder) RemoteApplications(arg0 any) *gomock.Call { +func (mr *MockRemoteRelationsAPIMockRecorder) RemoteApplications(arg0 any) *MockRemoteRelationsAPIRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).RemoteApplications), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).RemoteApplications), arg0) + return &MockRemoteRelationsAPIRemoteApplicationsCall{Call: call} +} + +// MockRemoteRelationsAPIRemoteApplicationsCall wrap *gomock.Call +type MockRemoteRelationsAPIRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsAPIRemoteApplicationsCall) Return(arg0 []params.RemoteApplicationResult, arg1 error) *MockRemoteRelationsAPIRemoteApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsAPIRemoteApplicationsCall) Do(f func([]string) ([]params.RemoteApplicationResult, error)) *MockRemoteRelationsAPIRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsAPIRemoteApplicationsCall) DoAndReturn(f func([]string) ([]params.RemoteApplicationResult, error)) *MockRemoteRelationsAPIRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRemoteRelations mocks base method. @@ -355,9 +787,33 @@ func (m *MockRemoteRelationsAPI) WatchRemoteRelations() (watcher.Watcher[[]strin } // WatchRemoteRelations indicates an expected call of WatchRemoteRelations. -func (mr *MockRemoteRelationsAPIMockRecorder) WatchRemoteRelations() *gomock.Call { +func (mr *MockRemoteRelationsAPIMockRecorder) WatchRemoteRelations() *MockRemoteRelationsAPIWatchRemoteRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteRelations", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).WatchRemoteRelations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRemoteRelations", reflect.TypeOf((*MockRemoteRelationsAPI)(nil).WatchRemoteRelations)) + return &MockRemoteRelationsAPIWatchRemoteRelationsCall{Call: call} +} + +// MockRemoteRelationsAPIWatchRemoteRelationsCall wrap *gomock.Call +type MockRemoteRelationsAPIWatchRemoteRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteRelationsAPIWatchRemoteRelationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockRemoteRelationsAPIWatchRemoteRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteRelationsAPIWatchRemoteRelationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockRemoteRelationsAPIWatchRemoteRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteRelationsAPIWatchRemoteRelationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockRemoteRelationsAPIWatchRemoteRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCrossModelFirewallerFacadeCloser is a mock of CrossModelFirewallerFacadeCloser interface. @@ -392,9 +848,33 @@ func (m *MockCrossModelFirewallerFacadeCloser) Close() error { } // Close indicates an expected call of Close. -func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) Close() *gomock.Call { +func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) Close() *MockCrossModelFirewallerFacadeCloserCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).Close)) + return &MockCrossModelFirewallerFacadeCloserCloseCall{Call: call} +} + +// MockCrossModelFirewallerFacadeCloserCloseCall wrap *gomock.Call +type MockCrossModelFirewallerFacadeCloserCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelFirewallerFacadeCloserCloseCall) Return(arg0 error) *MockCrossModelFirewallerFacadeCloserCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelFirewallerFacadeCloserCloseCall) Do(f func() error) *MockCrossModelFirewallerFacadeCloserCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelFirewallerFacadeCloserCloseCall) DoAndReturn(f func() error) *MockCrossModelFirewallerFacadeCloserCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublishIngressNetworkChange mocks base method. @@ -406,9 +886,33 @@ func (m *MockCrossModelFirewallerFacadeCloser) PublishIngressNetworkChange(arg0 } // PublishIngressNetworkChange indicates an expected call of PublishIngressNetworkChange. -func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) PublishIngressNetworkChange(arg0, arg1 any) *gomock.Call { +func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) PublishIngressNetworkChange(arg0, arg1 any) *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishIngressNetworkChange", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).PublishIngressNetworkChange), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishIngressNetworkChange", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).PublishIngressNetworkChange), arg0, arg1) + return &MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall{Call: call} +} + +// MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall wrap *gomock.Call +type MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall) Return(arg0 error) *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall) Do(f func(context.Context, params.IngressNetworksChangeEvent) error) *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall) DoAndReturn(f func(context.Context, params.IngressNetworksChangeEvent) error) *MockCrossModelFirewallerFacadeCloserPublishIngressNetworkChangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchEgressAddressesForRelation mocks base method. @@ -421,9 +925,33 @@ func (m *MockCrossModelFirewallerFacadeCloser) WatchEgressAddressesForRelation(a } // WatchEgressAddressesForRelation indicates an expected call of WatchEgressAddressesForRelation. -func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) WatchEgressAddressesForRelation(arg0, arg1 any) *gomock.Call { +func (mr *MockCrossModelFirewallerFacadeCloserMockRecorder) WatchEgressAddressesForRelation(arg0, arg1 any) *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEgressAddressesForRelation", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).WatchEgressAddressesForRelation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEgressAddressesForRelation", reflect.TypeOf((*MockCrossModelFirewallerFacadeCloser)(nil).WatchEgressAddressesForRelation), arg0, arg1) + return &MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall{Call: call} +} + +// MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall wrap *gomock.Call +type MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall) Do(f func(context.Context, params.RemoteEntityArg) (watcher.Watcher[[]string], error)) *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall) DoAndReturn(f func(context.Context, params.RemoteEntityArg) (watcher.Watcher[[]string], error)) *MockCrossModelFirewallerFacadeCloserWatchEgressAddressesForRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEnvironFirewaller is a mock of EnvironFirewaller interface. @@ -458,9 +986,33 @@ func (m *MockEnvironFirewaller) ClosePorts(arg0 envcontext.ProviderCallContext, } // ClosePorts indicates an expected call of ClosePorts. -func (mr *MockEnvironFirewallerMockRecorder) ClosePorts(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironFirewallerMockRecorder) ClosePorts(arg0, arg1 any) *MockEnvironFirewallerClosePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockEnvironFirewaller)(nil).ClosePorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockEnvironFirewaller)(nil).ClosePorts), arg0, arg1) + return &MockEnvironFirewallerClosePortsCall{Call: call} +} + +// MockEnvironFirewallerClosePortsCall wrap *gomock.Call +type MockEnvironFirewallerClosePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironFirewallerClosePortsCall) Return(arg0 error) *MockEnvironFirewallerClosePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironFirewallerClosePortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironFirewallerClosePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironFirewallerClosePortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironFirewallerClosePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IngressRules mocks base method. @@ -473,9 +1025,33 @@ func (m *MockEnvironFirewaller) IngressRules(arg0 envcontext.ProviderCallContext } // IngressRules indicates an expected call of IngressRules. -func (mr *MockEnvironFirewallerMockRecorder) IngressRules(arg0 any) *gomock.Call { +func (mr *MockEnvironFirewallerMockRecorder) IngressRules(arg0 any) *MockEnvironFirewallerIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockEnvironFirewaller)(nil).IngressRules), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockEnvironFirewaller)(nil).IngressRules), arg0) + return &MockEnvironFirewallerIngressRulesCall{Call: call} +} + +// MockEnvironFirewallerIngressRulesCall wrap *gomock.Call +type MockEnvironFirewallerIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironFirewallerIngressRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockEnvironFirewallerIngressRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironFirewallerIngressRulesCall) Do(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockEnvironFirewallerIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironFirewallerIngressRulesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockEnvironFirewallerIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenPorts mocks base method. @@ -487,9 +1063,33 @@ func (m *MockEnvironFirewaller) OpenPorts(arg0 envcontext.ProviderCallContext, a } // OpenPorts indicates an expected call of OpenPorts. -func (mr *MockEnvironFirewallerMockRecorder) OpenPorts(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironFirewallerMockRecorder) OpenPorts(arg0, arg1 any) *MockEnvironFirewallerOpenPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockEnvironFirewaller)(nil).OpenPorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockEnvironFirewaller)(nil).OpenPorts), arg0, arg1) + return &MockEnvironFirewallerOpenPortsCall{Call: call} +} + +// MockEnvironFirewallerOpenPortsCall wrap *gomock.Call +type MockEnvironFirewallerOpenPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironFirewallerOpenPortsCall) Return(arg0 error) *MockEnvironFirewallerOpenPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironFirewallerOpenPortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironFirewallerOpenPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironFirewallerOpenPortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironFirewallerOpenPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEnvironModelFirewaller is a mock of EnvironModelFirewaller interface. @@ -524,9 +1124,33 @@ func (m *MockEnvironModelFirewaller) CloseModelPorts(arg0 envcontext.ProviderCal } // CloseModelPorts indicates an expected call of CloseModelPorts. -func (mr *MockEnvironModelFirewallerMockRecorder) CloseModelPorts(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironModelFirewallerMockRecorder) CloseModelPorts(arg0, arg1 any) *MockEnvironModelFirewallerCloseModelPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseModelPorts", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).CloseModelPorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseModelPorts", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).CloseModelPorts), arg0, arg1) + return &MockEnvironModelFirewallerCloseModelPortsCall{Call: call} +} + +// MockEnvironModelFirewallerCloseModelPortsCall wrap *gomock.Call +type MockEnvironModelFirewallerCloseModelPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironModelFirewallerCloseModelPortsCall) Return(arg0 error) *MockEnvironModelFirewallerCloseModelPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironModelFirewallerCloseModelPortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironModelFirewallerCloseModelPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironModelFirewallerCloseModelPortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironModelFirewallerCloseModelPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelIngressRules mocks base method. @@ -539,9 +1163,33 @@ func (m *MockEnvironModelFirewaller) ModelIngressRules(arg0 envcontext.ProviderC } // ModelIngressRules indicates an expected call of ModelIngressRules. -func (mr *MockEnvironModelFirewallerMockRecorder) ModelIngressRules(arg0 any) *gomock.Call { +func (mr *MockEnvironModelFirewallerMockRecorder) ModelIngressRules(arg0 any) *MockEnvironModelFirewallerModelIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelIngressRules", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).ModelIngressRules), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelIngressRules", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).ModelIngressRules), arg0) + return &MockEnvironModelFirewallerModelIngressRulesCall{Call: call} +} + +// MockEnvironModelFirewallerModelIngressRulesCall wrap *gomock.Call +type MockEnvironModelFirewallerModelIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironModelFirewallerModelIngressRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockEnvironModelFirewallerModelIngressRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironModelFirewallerModelIngressRulesCall) Do(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockEnvironModelFirewallerModelIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironModelFirewallerModelIngressRulesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (firewall.IngressRules, error)) *MockEnvironModelFirewallerModelIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenModelPorts mocks base method. @@ -553,9 +1201,33 @@ func (m *MockEnvironModelFirewaller) OpenModelPorts(arg0 envcontext.ProviderCall } // OpenModelPorts indicates an expected call of OpenModelPorts. -func (mr *MockEnvironModelFirewallerMockRecorder) OpenModelPorts(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironModelFirewallerMockRecorder) OpenModelPorts(arg0, arg1 any) *MockEnvironModelFirewallerOpenModelPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenModelPorts", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).OpenModelPorts), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenModelPorts", reflect.TypeOf((*MockEnvironModelFirewaller)(nil).OpenModelPorts), arg0, arg1) + return &MockEnvironModelFirewallerOpenModelPortsCall{Call: call} +} + +// MockEnvironModelFirewallerOpenModelPortsCall wrap *gomock.Call +type MockEnvironModelFirewallerOpenModelPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironModelFirewallerOpenModelPortsCall) Return(arg0 error) *MockEnvironModelFirewallerOpenModelPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironModelFirewallerOpenModelPortsCall) Do(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironModelFirewallerOpenModelPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironModelFirewallerOpenModelPortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, firewall.IngressRules) error) *MockEnvironModelFirewallerOpenModelPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEnvironInstances is a mock of EnvironInstances interface. @@ -591,9 +1263,33 @@ func (m *MockEnvironInstances) Instances(arg0 envcontext.ProviderCallContext, ar } // Instances indicates an expected call of Instances. -func (mr *MockEnvironInstancesMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironInstancesMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnvironInstances)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnvironInstances)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesInstancesCall{Call: call} +} + +// MockEnvironInstancesInstancesCall wrap *gomock.Call +type MockEnvironInstancesInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockEnvironInstance is a mock of EnvironInstance interface. @@ -629,9 +1325,33 @@ func (m *MockEnvironInstance) Addresses(arg0 envcontext.ProviderCallContext) (ne } // Addresses indicates an expected call of Addresses. -func (mr *MockEnvironInstanceMockRecorder) Addresses(arg0 any) *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) Addresses(arg0 any) *MockEnvironInstanceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockEnvironInstance)(nil).Addresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockEnvironInstance)(nil).Addresses), arg0) + return &MockEnvironInstanceAddressesCall{Call: call} +} + +// MockEnvironInstanceAddressesCall wrap *gomock.Call +type MockEnvironInstanceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceAddressesCall) Return(arg0 network.ProviderAddresses, arg1 error) *MockEnvironInstanceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceAddressesCall) Do(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockEnvironInstanceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockEnvironInstanceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClosePorts mocks base method. @@ -643,9 +1363,33 @@ func (m *MockEnvironInstance) ClosePorts(arg0 envcontext.ProviderCallContext, ar } // ClosePorts indicates an expected call of ClosePorts. -func (mr *MockEnvironInstanceMockRecorder) ClosePorts(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) ClosePorts(arg0, arg1, arg2 any) *MockEnvironInstanceClosePortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockEnvironInstance)(nil).ClosePorts), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePorts", reflect.TypeOf((*MockEnvironInstance)(nil).ClosePorts), arg0, arg1, arg2) + return &MockEnvironInstanceClosePortsCall{Call: call} +} + +// MockEnvironInstanceClosePortsCall wrap *gomock.Call +type MockEnvironInstanceClosePortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceClosePortsCall) Return(arg0 error) *MockEnvironInstanceClosePortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceClosePortsCall) Do(f func(envcontext.ProviderCallContext, string, firewall.IngressRules) error) *MockEnvironInstanceClosePortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceClosePortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, firewall.IngressRules) error) *MockEnvironInstanceClosePortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -657,9 +1401,33 @@ func (m *MockEnvironInstance) Id() instance.Id { } // Id indicates an expected call of Id. -func (mr *MockEnvironInstanceMockRecorder) Id() *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) Id() *MockEnvironInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockEnvironInstance)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockEnvironInstance)(nil).Id)) + return &MockEnvironInstanceIdCall{Call: call} +} + +// MockEnvironInstanceIdCall wrap *gomock.Call +type MockEnvironInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceIdCall) Return(arg0 instance.Id) *MockEnvironInstanceIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceIdCall) Do(f func() instance.Id) *MockEnvironInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceIdCall) DoAndReturn(f func() instance.Id) *MockEnvironInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IngressRules mocks base method. @@ -672,9 +1440,33 @@ func (m *MockEnvironInstance) IngressRules(arg0 envcontext.ProviderCallContext, } // IngressRules indicates an expected call of IngressRules. -func (mr *MockEnvironInstanceMockRecorder) IngressRules(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) IngressRules(arg0, arg1 any) *MockEnvironInstanceIngressRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockEnvironInstance)(nil).IngressRules), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IngressRules", reflect.TypeOf((*MockEnvironInstance)(nil).IngressRules), arg0, arg1) + return &MockEnvironInstanceIngressRulesCall{Call: call} +} + +// MockEnvironInstanceIngressRulesCall wrap *gomock.Call +type MockEnvironInstanceIngressRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceIngressRulesCall) Return(arg0 firewall.IngressRules, arg1 error) *MockEnvironInstanceIngressRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceIngressRulesCall) Do(f func(envcontext.ProviderCallContext, string) (firewall.IngressRules, error)) *MockEnvironInstanceIngressRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceIngressRulesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) (firewall.IngressRules, error)) *MockEnvironInstanceIngressRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenPorts mocks base method. @@ -686,9 +1478,33 @@ func (m *MockEnvironInstance) OpenPorts(arg0 envcontext.ProviderCallContext, arg } // OpenPorts indicates an expected call of OpenPorts. -func (mr *MockEnvironInstanceMockRecorder) OpenPorts(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) OpenPorts(arg0, arg1, arg2 any) *MockEnvironInstanceOpenPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockEnvironInstance)(nil).OpenPorts), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPorts", reflect.TypeOf((*MockEnvironInstance)(nil).OpenPorts), arg0, arg1, arg2) + return &MockEnvironInstanceOpenPortsCall{Call: call} +} + +// MockEnvironInstanceOpenPortsCall wrap *gomock.Call +type MockEnvironInstanceOpenPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceOpenPortsCall) Return(arg0 error) *MockEnvironInstanceOpenPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceOpenPortsCall) Do(f func(envcontext.ProviderCallContext, string, firewall.IngressRules) error) *MockEnvironInstanceOpenPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceOpenPortsCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, firewall.IngressRules) error) *MockEnvironInstanceOpenPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -700,7 +1516,31 @@ func (m *MockEnvironInstance) Status(arg0 envcontext.ProviderCallContext) instan } // Status indicates an expected call of Status. -func (mr *MockEnvironInstanceMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockEnvironInstanceMockRecorder) Status(arg0 any) *MockEnvironInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockEnvironInstance)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockEnvironInstance)(nil).Status), arg0) + return &MockEnvironInstanceStatusCall{Call: call} +} + +// MockEnvironInstanceStatusCall wrap *gomock.Call +type MockEnvironInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceStatusCall) Return(arg0 instance.Status) *MockEnvironInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceStatusCall) Do(f func(envcontext.ProviderCallContext) instance.Status) *MockEnvironInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceStatusCall) DoAndReturn(f func(envcontext.ProviderCallContext) instance.Status) *MockEnvironInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/firewaller/package_test.go b/internal/worker/firewaller/package_test.go index e89689575db..9743ae8e7f7 100644 --- a/internal/worker/firewaller/package_test.go +++ b/internal/worker/firewaller/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mocks.go github.com/juju/juju/internal/worker/firewaller FirewallerAPI,RemoteRelationsAPI,CrossModelFirewallerFacadeCloser,EnvironFirewaller,EnvironModelFirewaller,EnvironInstances,EnvironInstance -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/entity_mocks.go github.com/juju/juju/internal/worker/firewaller Machine,Unit,Application -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/credential_mocks.go github.com/juju/juju/internal/worker/common CredentialAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mocks.go github.com/juju/juju/internal/worker/firewaller FirewallerAPI,RemoteRelationsAPI,CrossModelFirewallerFacadeCloser,EnvironFirewaller,EnvironModelFirewaller,EnvironInstances,EnvironInstance +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/entity_mocks.go github.com/juju/juju/internal/worker/firewaller Machine,Unit,Application +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/credential_mocks.go github.com/juju/juju/internal/worker/common CredentialAPI func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/httpserverargs/package_test.go b/internal/worker/httpserverargs/package_test.go index 1cdfdcde7a5..15c45628316 100644 --- a/internal/worker/httpserverargs/package_test.go +++ b/internal/worker/httpserverargs/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package httpserverargs -destination services_mock_test.go github.com/juju/juju/internal/worker/httpserverargs ControllerConfigService,UserService +//go:generate go run go.uber.org/mock/mockgen -typed -package httpserverargs -destination services_mock_test.go github.com/juju/juju/internal/worker/httpserverargs ControllerConfigService,UserService func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/httpserverargs/services_mock_test.go b/internal/worker/httpserverargs/services_mock_test.go index 5891a21174e..7a8849bb1ae 100644 --- a/internal/worker/httpserverargs/services_mock_test.go +++ b/internal/worker/httpserverargs/services_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package httpserverargs -destination services_mock_test.go github.com/juju/juju/internal/worker/httpserverargs ControllerConfigService,UserService +// mockgen -typed -package httpserverargs -destination services_mock_test.go github.com/juju/juju/internal/worker/httpserverargs ControllerConfigService,UserService // // Package httpserverargs is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUserService is a mock of UserService interface. @@ -90,9 +114,33 @@ func (m *MockUserService) GetUserByAuth(arg0 context.Context, arg1 string, arg2 } // GetUserByAuth indicates an expected call of GetUserByAuth. -func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByAuth(arg0, arg1, arg2 any) *MockUserServiceGetUserByAuthCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByAuth", reflect.TypeOf((*MockUserService)(nil).GetUserByAuth), arg0, arg1, arg2) + return &MockUserServiceGetUserByAuthCall{Call: call} +} + +// MockUserServiceGetUserByAuthCall wrap *gomock.Call +type MockUserServiceGetUserByAuthCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByAuthCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByAuthCall) Do(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByAuthCall) DoAndReturn(f func(context.Context, string, auth.Password) (user.User, error)) *MockUserServiceGetUserByAuthCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetUserByName mocks base method. @@ -105,9 +153,33 @@ func (m *MockUserService) GetUserByName(arg0 context.Context, arg1 string) (user } // GetUserByName indicates an expected call of GetUserByName. -func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) GetUserByName(arg0, arg1 any) *MockUserServiceGetUserByNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByName", reflect.TypeOf((*MockUserService)(nil).GetUserByName), arg0, arg1) + return &MockUserServiceGetUserByNameCall{Call: call} +} + +// MockUserServiceGetUserByNameCall wrap *gomock.Call +type MockUserServiceGetUserByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceGetUserByNameCall) Return(arg0 user.User, arg1 error) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceGetUserByNameCall) Do(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceGetUserByNameCall) DoAndReturn(f func(context.Context, string) (user.User, error)) *MockUserServiceGetUserByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateLastLogin mocks base method. @@ -119,7 +191,31 @@ func (m *MockUserService) UpdateLastLogin(arg0 context.Context, arg1 string) err } // UpdateLastLogin indicates an expected call of UpdateLastLogin. -func (mr *MockUserServiceMockRecorder) UpdateLastLogin(arg0, arg1 any) *gomock.Call { +func (mr *MockUserServiceMockRecorder) UpdateLastLogin(arg0, arg1 any) *MockUserServiceUpdateLastLoginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserService)(nil).UpdateLastLogin), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastLogin", reflect.TypeOf((*MockUserService)(nil).UpdateLastLogin), arg0, arg1) + return &MockUserServiceUpdateLastLoginCall{Call: call} +} + +// MockUserServiceUpdateLastLoginCall wrap *gomock.Call +type MockUserServiceUpdateLastLoginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUserServiceUpdateLastLoginCall) Return(arg0 error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUserServiceUpdateLastLoginCall) Do(f func(context.Context, string) error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUserServiceUpdateLastLoginCall) DoAndReturn(f func(context.Context, string) error) *MockUserServiceUpdateLastLoginCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/agent_mock.go b/internal/worker/instancemutater/mocks/agent_mock.go index c17db0c53bc..87bd7ba156a 100644 --- a/internal/worker/instancemutater/mocks/agent_mock.go +++ b/internal/worker/instancemutater/mocks/agent_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/base_mock.go b/internal/worker/instancemutater/mocks/base_mock.go index 248b02c6b87..6b44d34c7cb 100644 --- a/internal/worker/instancemutater/mocks/base_mock.go +++ b/internal/worker/instancemutater/mocks/base_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/dependency_mock.go b/internal/worker/instancemutater/mocks/dependency_mock.go index 23ed06ab12f..5c5a3b29ee8 100644 --- a/internal/worker/instancemutater/mocks/dependency_mock.go +++ b/internal/worker/instancemutater/mocks/dependency_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +// mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockGetter) Get(arg0 string, arg1 any) error { } // Get indicates an expected call of Get. -func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *MockGetterGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + return &MockGetterGetCall{Call: call} +} + +// MockGetterGetCall wrap *gomock.Call +type MockGetterGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGetterGetCall) Return(arg0 error) *MockGetterGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGetterGetCall) Do(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGetterGetCall) DoAndReturn(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/environs_mock.go b/internal/worker/instancemutater/mocks/environs_mock.go index e6c31c7cd69..a199a54af39 100644 --- a/internal/worker/instancemutater/mocks/environs_mock.go +++ b/internal/worker/instancemutater/mocks/environs_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs Environ,LXDProfiler,InstanceBroker +// mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs Environ,LXDProfiler,InstanceBroker // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -72,9 +96,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -87,9 +135,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -102,9 +174,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -116,9 +212,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -131,9 +251,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -146,9 +290,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -160,9 +328,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -174,9 +366,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -188,9 +404,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -203,9 +443,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -218,9 +482,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -232,9 +520,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -246,9 +558,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -260,9 +596,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -274,9 +634,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -289,9 +673,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -307,10 +715,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -323,9 +755,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -338,9 +794,33 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockLXDProfiler is a mock of LXDProfiler interface. @@ -376,9 +856,33 @@ func (m *MockLXDProfiler) AssignLXDProfiles(arg0 string, arg1 []string, arg2 []l } // AssignLXDProfiles indicates an expected call of AssignLXDProfiles. -func (mr *MockLXDProfilerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *MockLXDProfilerAssignLXDProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockLXDProfiler)(nil).AssignLXDProfiles), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockLXDProfiler)(nil).AssignLXDProfiles), arg0, arg1, arg2) + return &MockLXDProfilerAssignLXDProfilesCall{Call: call} +} + +// MockLXDProfilerAssignLXDProfilesCall wrap *gomock.Call +type MockLXDProfilerAssignLXDProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerAssignLXDProfilesCall) Return(arg0 []string, arg1 error) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerAssignLXDProfilesCall) Do(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerAssignLXDProfilesCall) DoAndReturn(f func(string, []string, []lxdprofile.ProfilePost) ([]string, error)) *MockLXDProfilerAssignLXDProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfileNames mocks base method. @@ -391,9 +895,33 @@ func (m *MockLXDProfiler) LXDProfileNames(arg0 string) ([]string, error) { } // LXDProfileNames indicates an expected call of LXDProfileNames. -func (mr *MockLXDProfilerMockRecorder) LXDProfileNames(arg0 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) LXDProfileNames(arg0 any) *MockLXDProfilerLXDProfileNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfileNames), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockLXDProfiler)(nil).LXDProfileNames), arg0) + return &MockLXDProfilerLXDProfileNamesCall{Call: call} +} + +// MockLXDProfilerLXDProfileNamesCall wrap *gomock.Call +type MockLXDProfilerLXDProfileNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerLXDProfileNamesCall) Return(arg0 []string, arg1 error) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerLXDProfileNamesCall) Do(f func(string) ([]string, error)) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerLXDProfileNamesCall) DoAndReturn(f func(string) ([]string, error)) *MockLXDProfilerLXDProfileNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MaybeWriteLXDProfile mocks base method. @@ -405,9 +933,33 @@ func (m *MockLXDProfiler) MaybeWriteLXDProfile(arg0 string, arg1 lxdprofile.Prof } // MaybeWriteLXDProfile indicates an expected call of MaybeWriteLXDProfile. -func (mr *MockLXDProfilerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *gomock.Call { +func (mr *MockLXDProfilerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *MockLXDProfilerMaybeWriteLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).MaybeWriteLXDProfile), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockLXDProfiler)(nil).MaybeWriteLXDProfile), arg0, arg1) + return &MockLXDProfilerMaybeWriteLXDProfileCall{Call: call} +} + +// MockLXDProfilerMaybeWriteLXDProfileCall wrap *gomock.Call +type MockLXDProfilerMaybeWriteLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) Return(arg0 error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) Do(f func(string, lxdprofile.Profile) error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLXDProfilerMaybeWriteLXDProfileCall) DoAndReturn(f func(string, lxdprofile.Profile) error) *MockLXDProfilerMaybeWriteLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockInstanceBroker is a mock of InstanceBroker interface. @@ -443,9 +995,33 @@ func (m *MockInstanceBroker) AllInstances(arg0 envcontext.ProviderCallContext) ( } // AllInstances indicates an expected call of AllInstances. -func (mr *MockInstanceBrokerMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) AllInstances(arg0 any) *MockInstanceBrokerAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllInstances), arg0) + return &MockInstanceBrokerAllInstancesCall{Call: call} +} + +// MockInstanceBrokerAllInstancesCall wrap *gomock.Call +type MockInstanceBrokerAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -458,9 +1034,33 @@ func (m *MockInstanceBroker) AllRunningInstances(arg0 envcontext.ProviderCallCon } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockInstanceBrokerMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) AllRunningInstances(arg0 any) *MockInstanceBrokerAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockInstanceBroker)(nil).AllRunningInstances), arg0) + return &MockInstanceBrokerAllRunningInstancesCall{Call: call} +} + +// MockInstanceBrokerAllRunningInstancesCall wrap *gomock.Call +type MockInstanceBrokerAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockInstanceBrokerAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -473,9 +1073,33 @@ func (m *MockInstanceBroker) StartInstance(arg0 envcontext.ProviderCallContext, } // StartInstance indicates an expected call of StartInstance. -func (mr *MockInstanceBrokerMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) StartInstance(arg0, arg1 any) *MockInstanceBrokerStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockInstanceBroker)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockInstanceBroker)(nil).StartInstance), arg0, arg1) + return &MockInstanceBrokerStartInstanceCall{Call: call} +} + +// MockInstanceBrokerStartInstanceCall wrap *gomock.Call +type MockInstanceBrokerStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockInstanceBrokerStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -491,8 +1115,32 @@ func (m *MockInstanceBroker) StopInstances(arg0 envcontext.ProviderCallContext, } // StopInstances indicates an expected call of StopInstances. -func (mr *MockInstanceBrokerMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockInstanceBrokerMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockInstanceBrokerStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockInstanceBroker)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockInstanceBroker)(nil).StopInstances), varargs...) + return &MockInstanceBrokerStopInstancesCall{Call: call} +} + +// MockInstanceBrokerStopInstancesCall wrap *gomock.Call +type MockInstanceBrokerStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceBrokerStopInstancesCall) Return(arg0 error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceBrokerStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceBrokerStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockInstanceBrokerStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/instancebroker_mock.go b/internal/worker/instancemutater/mocks/instancebroker_mock.go index 089d922f209..ddc839a6994 100644 --- a/internal/worker/instancemutater/mocks/instancebroker_mock.go +++ b/internal/worker/instancemutater/mocks/instancebroker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/instancebroker_mock.go github.com/juju/juju/internal/worker/instancemutater InstanceMutaterAPI +// mockgen -typed -package mocks -destination mocks/instancebroker_mock.go github.com/juju/juju/internal/worker/instancemutater InstanceMutaterAPI // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockInstanceMutaterAPI) Machine(arg0 context.Context, arg1 names.Machin } // Machine indicates an expected call of Machine. -func (mr *MockInstanceMutaterAPIMockRecorder) Machine(arg0, arg1 any) *gomock.Call { +func (mr *MockInstanceMutaterAPIMockRecorder) Machine(arg0, arg1 any) *MockInstanceMutaterAPIMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceMutaterAPI)(nil).Machine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockInstanceMutaterAPI)(nil).Machine), arg0, arg1) + return &MockInstanceMutaterAPIMachineCall{Call: call} +} + +// MockInstanceMutaterAPIMachineCall wrap *gomock.Call +type MockInstanceMutaterAPIMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterAPIMachineCall) Return(arg0 instancemutater.MutaterMachine, arg1 error) *MockInstanceMutaterAPIMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterAPIMachineCall) Do(f func(context.Context, names.MachineTag) (instancemutater.MutaterMachine, error)) *MockInstanceMutaterAPIMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterAPIMachineCall) DoAndReturn(f func(context.Context, names.MachineTag) (instancemutater.MutaterMachine, error)) *MockInstanceMutaterAPIMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachines mocks base method. @@ -67,7 +91,31 @@ func (m *MockInstanceMutaterAPI) WatchModelMachines(arg0 context.Context) (watch } // WatchModelMachines indicates an expected call of WatchModelMachines. -func (mr *MockInstanceMutaterAPIMockRecorder) WatchModelMachines(arg0 any) *gomock.Call { +func (mr *MockInstanceMutaterAPIMockRecorder) WatchModelMachines(arg0 any) *MockInstanceMutaterAPIWatchModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockInstanceMutaterAPI)(nil).WatchModelMachines), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockInstanceMutaterAPI)(nil).WatchModelMachines), arg0) + return &MockInstanceMutaterAPIWatchModelMachinesCall{Call: call} +} + +// MockInstanceMutaterAPIWatchModelMachinesCall wrap *gomock.Call +type MockInstanceMutaterAPIWatchModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceMutaterAPIWatchModelMachinesCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockInstanceMutaterAPIWatchModelMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceMutaterAPIWatchModelMachinesCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockInstanceMutaterAPIWatchModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceMutaterAPIWatchModelMachinesCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockInstanceMutaterAPIWatchModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/logger_mock.go b/internal/worker/instancemutater/mocks/logger_mock.go index 4b36fa99e35..93d9656ef63 100644 --- a/internal/worker/instancemutater/mocks/logger_mock.go +++ b/internal/worker/instancemutater/mocks/logger_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/worker/instancemutater Logger +// mockgen -typed -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/worker/instancemutater Logger // // Package mocks is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -83,10 +131,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -100,10 +172,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -117,8 +213,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/machinemutater_mock.go b/internal/worker/instancemutater/mocks/machinemutater_mock.go index dc34e4ab668..0ebb0cbd4d2 100644 --- a/internal/worker/instancemutater/mocks/machinemutater_mock.go +++ b/internal/worker/instancemutater/mocks/machinemutater_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine +// mockgen -typed -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockMutaterMachine) CharmProfilingInfo(arg0 context.Context) (*instance } // CharmProfilingInfo indicates an expected call of CharmProfilingInfo. -func (mr *MockMutaterMachineMockRecorder) CharmProfilingInfo(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) CharmProfilingInfo(arg0 any) *MockMutaterMachineCharmProfilingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfilingInfo", reflect.TypeOf((*MockMutaterMachine)(nil).CharmProfilingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfilingInfo", reflect.TypeOf((*MockMutaterMachine)(nil).CharmProfilingInfo), arg0) + return &MockMutaterMachineCharmProfilingInfoCall{Call: call} +} + +// MockMutaterMachineCharmProfilingInfoCall wrap *gomock.Call +type MockMutaterMachineCharmProfilingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineCharmProfilingInfoCall) Return(arg0 *instancemutater.UnitProfileInfo, arg1 error) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineCharmProfilingInfoCall) Do(f func(context.Context) (*instancemutater.UnitProfileInfo, error)) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineCharmProfilingInfoCall) DoAndReturn(f func(context.Context) (*instancemutater.UnitProfileInfo, error)) *MockMutaterMachineCharmProfilingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -70,9 +94,33 @@ func (m *MockMutaterMachine) ContainerType(arg0 context.Context) (instance.Conta } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMutaterMachineMockRecorder) ContainerType(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) ContainerType(arg0 any) *MockMutaterMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMutaterMachine)(nil).ContainerType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMutaterMachine)(nil).ContainerType), arg0) + return &MockMutaterMachineContainerTypeCall{Call: call} +} + +// MockMutaterMachineContainerTypeCall wrap *gomock.Call +type MockMutaterMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineContainerTypeCall) Return(arg0 instance.ContainerType, arg1 error) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineContainerTypeCall) Do(f func(context.Context) (instance.ContainerType, error)) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineContainerTypeCall) DoAndReturn(f func(context.Context) (instance.ContainerType, error)) *MockMutaterMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -85,9 +133,33 @@ func (m *MockMutaterMachine) InstanceId(arg0 context.Context) (string, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMutaterMachineMockRecorder) InstanceId(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) InstanceId(arg0 any) *MockMutaterMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMutaterMachine)(nil).InstanceId), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMutaterMachine)(nil).InstanceId), arg0) + return &MockMutaterMachineInstanceIdCall{Call: call} +} + +// MockMutaterMachineInstanceIdCall wrap *gomock.Call +type MockMutaterMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineInstanceIdCall) Return(arg0 string, arg1 error) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineInstanceIdCall) Do(f func(context.Context) (string, error)) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineInstanceIdCall) DoAndReturn(f func(context.Context) (string, error)) *MockMutaterMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -99,9 +171,33 @@ func (m *MockMutaterMachine) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMutaterMachineMockRecorder) Life() *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Life() *MockMutaterMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMutaterMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMutaterMachine)(nil).Life)) + return &MockMutaterMachineLifeCall{Call: call} +} + +// MockMutaterMachineLifeCall wrap *gomock.Call +type MockMutaterMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineLifeCall) Return(arg0 life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineLifeCall) Do(f func() life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineLifeCall) DoAndReturn(f func() life.Value) *MockMutaterMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -113,9 +209,33 @@ func (m *MockMutaterMachine) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockMutaterMachineMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Refresh(arg0 any) *MockMutaterMachineRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMutaterMachine)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMutaterMachine)(nil).Refresh), arg0) + return &MockMutaterMachineRefreshCall{Call: call} +} + +// MockMutaterMachineRefreshCall wrap *gomock.Call +type MockMutaterMachineRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineRefreshCall) Return(arg0 error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineRefreshCall) Do(f func(context.Context) error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineRefreshCall) DoAndReturn(f func(context.Context) error) *MockMutaterMachineRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmProfiles mocks base method. @@ -127,9 +247,33 @@ func (m *MockMutaterMachine) SetCharmProfiles(arg0 context.Context, arg1 []strin } // SetCharmProfiles indicates an expected call of SetCharmProfiles. -func (mr *MockMutaterMachineMockRecorder) SetCharmProfiles(arg0, arg1 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) SetCharmProfiles(arg0, arg1 any) *MockMutaterMachineSetCharmProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMutaterMachine)(nil).SetCharmProfiles), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmProfiles", reflect.TypeOf((*MockMutaterMachine)(nil).SetCharmProfiles), arg0, arg1) + return &MockMutaterMachineSetCharmProfilesCall{Call: call} +} + +// MockMutaterMachineSetCharmProfilesCall wrap *gomock.Call +type MockMutaterMachineSetCharmProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineSetCharmProfilesCall) Return(arg0 error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineSetCharmProfilesCall) Do(f func(context.Context, []string) error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineSetCharmProfilesCall) DoAndReturn(f func(context.Context, []string) error) *MockMutaterMachineSetCharmProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetModificationStatus mocks base method. @@ -141,9 +285,33 @@ func (m *MockMutaterMachine) SetModificationStatus(arg0 context.Context, arg1 st } // SetModificationStatus indicates an expected call of SetModificationStatus. -func (mr *MockMutaterMachineMockRecorder) SetModificationStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) SetModificationStatus(arg0, arg1, arg2, arg3 any) *MockMutaterMachineSetModificationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMutaterMachine)(nil).SetModificationStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModificationStatus", reflect.TypeOf((*MockMutaterMachine)(nil).SetModificationStatus), arg0, arg1, arg2, arg3) + return &MockMutaterMachineSetModificationStatusCall{Call: call} +} + +// MockMutaterMachineSetModificationStatusCall wrap *gomock.Call +type MockMutaterMachineSetModificationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineSetModificationStatusCall) Return(arg0 error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineSetModificationStatusCall) Do(f func(context.Context, status.Status, string, map[string]any) error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineSetModificationStatusCall) DoAndReturn(f func(context.Context, status.Status, string, map[string]any) error) *MockMutaterMachineSetModificationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -155,9 +323,33 @@ func (m *MockMutaterMachine) Tag() names.MachineTag { } // Tag indicates an expected call of Tag. -func (mr *MockMutaterMachineMockRecorder) Tag() *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) Tag() *MockMutaterMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMutaterMachine)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMutaterMachine)(nil).Tag)) + return &MockMutaterMachineTagCall{Call: call} +} + +// MockMutaterMachineTagCall wrap *gomock.Call +type MockMutaterMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineTagCall) Return(arg0 names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineTagCall) Do(f func() names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMutaterMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -170,9 +362,33 @@ func (m *MockMutaterMachine) WatchContainers(arg0 context.Context) (watcher.Watc } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockMutaterMachineMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchContainers(arg0 any) *MockMutaterMachineWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMutaterMachine)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockMutaterMachine)(nil).WatchContainers), arg0) + return &MockMutaterMachineWatchContainersCall{Call: call} +} + +// MockMutaterMachineWatchContainersCall wrap *gomock.Call +type MockMutaterMachineWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchContainersCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchContainersCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchContainersCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchLXDProfileVerificationNeeded mocks base method. @@ -185,9 +401,33 @@ func (m *MockMutaterMachine) WatchLXDProfileVerificationNeeded(arg0 context.Cont } // WatchLXDProfileVerificationNeeded indicates an expected call of WatchLXDProfileVerificationNeeded. -func (mr *MockMutaterMachineMockRecorder) WatchLXDProfileVerificationNeeded(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchLXDProfileVerificationNeeded(arg0 any) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationNeeded", reflect.TypeOf((*MockMutaterMachine)(nil).WatchLXDProfileVerificationNeeded), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLXDProfileVerificationNeeded", reflect.TypeOf((*MockMutaterMachine)(nil).WatchLXDProfileVerificationNeeded), arg0) + return &MockMutaterMachineWatchLXDProfileVerificationNeededCall{Call: call} +} + +// MockMutaterMachineWatchLXDProfileVerificationNeededCall wrap *gomock.Call +type MockMutaterMachineWatchLXDProfileVerificationNeededCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) Do(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchLXDProfileVerificationNeededCall) DoAndReturn(f func(context.Context) (watcher.Watcher[struct{}], error)) *MockMutaterMachineWatchLXDProfileVerificationNeededCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUnits mocks base method. @@ -200,7 +440,31 @@ func (m *MockMutaterMachine) WatchUnits(arg0 context.Context) (watcher.Watcher[[ } // WatchUnits indicates an expected call of WatchUnits. -func (mr *MockMutaterMachineMockRecorder) WatchUnits(arg0 any) *gomock.Call { +func (mr *MockMutaterMachineMockRecorder) WatchUnits(arg0 any) *MockMutaterMachineWatchUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMutaterMachine)(nil).WatchUnits), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUnits", reflect.TypeOf((*MockMutaterMachine)(nil).WatchUnits), arg0) + return &MockMutaterMachineWatchUnitsCall{Call: call} +} + +// MockMutaterMachineWatchUnitsCall wrap *gomock.Call +type MockMutaterMachineWatchUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterMachineWatchUnitsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterMachineWatchUnitsCall) Do(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterMachineWatchUnitsCall) DoAndReturn(f func(context.Context) (watcher.Watcher[[]string], error)) *MockMutaterMachineWatchUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/mutatercontext_mock.go b/internal/worker/instancemutater/mocks/mutatercontext_mock.go index 1a2ff0d8d46..c9fc978a1a7 100644 --- a/internal/worker/instancemutater/mocks/mutatercontext_mock.go +++ b/internal/worker/instancemutater/mocks/mutatercontext_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext +// mockgen -typed -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockMutaterContext) KillWithError(arg0 error) { } // KillWithError indicates an expected call of KillWithError. -func (mr *MockMutaterContextMockRecorder) KillWithError(arg0 any) *gomock.Call { +func (mr *MockMutaterContextMockRecorder) KillWithError(arg0 any) *MockMutaterContextKillWithErrorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillWithError", reflect.TypeOf((*MockMutaterContext)(nil).KillWithError), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillWithError", reflect.TypeOf((*MockMutaterContext)(nil).KillWithError), arg0) + return &MockMutaterContextKillWithErrorCall{Call: call} +} + +// MockMutaterContextKillWithErrorCall wrap *gomock.Call +type MockMutaterContextKillWithErrorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextKillWithErrorCall) Return() *MockMutaterContextKillWithErrorCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextKillWithErrorCall) Do(f func(error)) *MockMutaterContextKillWithErrorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextKillWithErrorCall) DoAndReturn(f func(error)) *MockMutaterContextKillWithErrorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // add mocks base method. @@ -65,9 +89,33 @@ func (m *MockMutaterContext) add(arg0 worker.Worker) error { } // add indicates an expected call of add. -func (mr *MockMutaterContextMockRecorder) add(arg0 any) *gomock.Call { +func (mr *MockMutaterContextMockRecorder) add(arg0 any) *MockMutaterContextaddCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "add", reflect.TypeOf((*MockMutaterContext)(nil).add), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "add", reflect.TypeOf((*MockMutaterContext)(nil).add), arg0) + return &MockMutaterContextaddCall{Call: call} +} + +// MockMutaterContextaddCall wrap *gomock.Call +type MockMutaterContextaddCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextaddCall) Return(arg0 error) *MockMutaterContextaddCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextaddCall) Do(f func(worker.Worker) error) *MockMutaterContextaddCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextaddCall) DoAndReturn(f func(worker.Worker) error) *MockMutaterContextaddCall { + c.Call = c.Call.DoAndReturn(f) + return c } // dying mocks base method. @@ -79,9 +127,33 @@ func (m *MockMutaterContext) dying() <-chan struct{} { } // dying indicates an expected call of dying. -func (mr *MockMutaterContextMockRecorder) dying() *gomock.Call { +func (mr *MockMutaterContextMockRecorder) dying() *MockMutaterContextdyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "dying", reflect.TypeOf((*MockMutaterContext)(nil).dying)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "dying", reflect.TypeOf((*MockMutaterContext)(nil).dying)) + return &MockMutaterContextdyingCall{Call: call} +} + +// MockMutaterContextdyingCall wrap *gomock.Call +type MockMutaterContextdyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextdyingCall) Return(arg0 <-chan struct{}) *MockMutaterContextdyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextdyingCall) Do(f func() <-chan struct{}) *MockMutaterContextdyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextdyingCall) DoAndReturn(f func() <-chan struct{}) *MockMutaterContextdyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // errDying mocks base method. @@ -93,9 +165,33 @@ func (m *MockMutaterContext) errDying() error { } // errDying indicates an expected call of errDying. -func (mr *MockMutaterContextMockRecorder) errDying() *gomock.Call { +func (mr *MockMutaterContextMockRecorder) errDying() *MockMutaterContexterrDyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "errDying", reflect.TypeOf((*MockMutaterContext)(nil).errDying)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "errDying", reflect.TypeOf((*MockMutaterContext)(nil).errDying)) + return &MockMutaterContexterrDyingCall{Call: call} +} + +// MockMutaterContexterrDyingCall wrap *gomock.Call +type MockMutaterContexterrDyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContexterrDyingCall) Return(arg0 error) *MockMutaterContexterrDyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContexterrDyingCall) Do(f func() error) *MockMutaterContexterrDyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContexterrDyingCall) DoAndReturn(f func() error) *MockMutaterContexterrDyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // getBroker mocks base method. @@ -107,9 +203,33 @@ func (m *MockMutaterContext) getBroker() environs.LXDProfiler { } // getBroker indicates an expected call of getBroker. -func (mr *MockMutaterContextMockRecorder) getBroker() *gomock.Call { +func (mr *MockMutaterContextMockRecorder) getBroker() *MockMutaterContextgetBrokerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getBroker", reflect.TypeOf((*MockMutaterContext)(nil).getBroker)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getBroker", reflect.TypeOf((*MockMutaterContext)(nil).getBroker)) + return &MockMutaterContextgetBrokerCall{Call: call} +} + +// MockMutaterContextgetBrokerCall wrap *gomock.Call +type MockMutaterContextgetBrokerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextgetBrokerCall) Return(arg0 environs.LXDProfiler) *MockMutaterContextgetBrokerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextgetBrokerCall) Do(f func() environs.LXDProfiler) *MockMutaterContextgetBrokerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextgetBrokerCall) DoAndReturn(f func() environs.LXDProfiler) *MockMutaterContextgetBrokerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // getMachine mocks base method. @@ -122,9 +242,33 @@ func (m *MockMutaterContext) getMachine(arg0 context.Context, arg1 names.Machine } // getMachine indicates an expected call of getMachine. -func (mr *MockMutaterContextMockRecorder) getMachine(arg0, arg1 any) *gomock.Call { +func (mr *MockMutaterContextMockRecorder) getMachine(arg0, arg1 any) *MockMutaterContextgetMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getMachine", reflect.TypeOf((*MockMutaterContext)(nil).getMachine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getMachine", reflect.TypeOf((*MockMutaterContext)(nil).getMachine), arg0, arg1) + return &MockMutaterContextgetMachineCall{Call: call} +} + +// MockMutaterContextgetMachineCall wrap *gomock.Call +type MockMutaterContextgetMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextgetMachineCall) Return(arg0 instancemutater.MutaterMachine, arg1 error) *MockMutaterContextgetMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextgetMachineCall) Do(f func(context.Context, names.MachineTag) (instancemutater.MutaterMachine, error)) *MockMutaterContextgetMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextgetMachineCall) DoAndReturn(f func(context.Context, names.MachineTag) (instancemutater.MutaterMachine, error)) *MockMutaterContextgetMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // getRequiredLXDProfiles mocks base method. @@ -136,9 +280,33 @@ func (m *MockMutaterContext) getRequiredLXDProfiles(arg0 string) []string { } // getRequiredLXDProfiles indicates an expected call of getRequiredLXDProfiles. -func (mr *MockMutaterContextMockRecorder) getRequiredLXDProfiles(arg0 any) *gomock.Call { +func (mr *MockMutaterContextMockRecorder) getRequiredLXDProfiles(arg0 any) *MockMutaterContextgetRequiredLXDProfilesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getRequiredLXDProfiles", reflect.TypeOf((*MockMutaterContext)(nil).getRequiredLXDProfiles), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getRequiredLXDProfiles", reflect.TypeOf((*MockMutaterContext)(nil).getRequiredLXDProfiles), arg0) + return &MockMutaterContextgetRequiredLXDProfilesCall{Call: call} +} + +// MockMutaterContextgetRequiredLXDProfilesCall wrap *gomock.Call +type MockMutaterContextgetRequiredLXDProfilesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextgetRequiredLXDProfilesCall) Return(arg0 []string) *MockMutaterContextgetRequiredLXDProfilesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextgetRequiredLXDProfilesCall) Do(f func(string) []string) *MockMutaterContextgetRequiredLXDProfilesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextgetRequiredLXDProfilesCall) DoAndReturn(f func(string) []string) *MockMutaterContextgetRequiredLXDProfilesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // newMachineContext mocks base method. @@ -150,7 +318,31 @@ func (m *MockMutaterContext) newMachineContext() instancemutater0.MachineContext } // newMachineContext indicates an expected call of newMachineContext. -func (mr *MockMutaterContextMockRecorder) newMachineContext() *gomock.Call { +func (mr *MockMutaterContextMockRecorder) newMachineContext() *MockMutaterContextnewMachineContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "newMachineContext", reflect.TypeOf((*MockMutaterContext)(nil).newMachineContext)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "newMachineContext", reflect.TypeOf((*MockMutaterContext)(nil).newMachineContext)) + return &MockMutaterContextnewMachineContextCall{Call: call} +} + +// MockMutaterContextnewMachineContextCall wrap *gomock.Call +type MockMutaterContextnewMachineContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMutaterContextnewMachineContextCall) Return(arg0 instancemutater0.MachineContext) *MockMutaterContextnewMachineContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMutaterContextnewMachineContextCall) Do(f func() instancemutater0.MachineContext) *MockMutaterContextnewMachineContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMutaterContextnewMachineContextCall) DoAndReturn(f func() instancemutater0.MachineContext) *MockMutaterContextnewMachineContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mocks/worker_mock.go b/internal/worker/instancemutater/mocks/worker_mock.go index 1a02fa88c36..487ebe35e5f 100644 --- a/internal/worker/instancemutater/mocks/worker_mock.go +++ b/internal/worker/instancemutater/mocks/worker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +// mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker // // Package mocks is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancemutater/mutater.go b/internal/worker/instancemutater/mutater.go index 2afa9aaa444..4ad1cb99a99 100644 --- a/internal/worker/instancemutater/mutater.go +++ b/internal/worker/instancemutater/mutater.go @@ -27,7 +27,7 @@ import ( "github.com/juju/juju/rpc/params" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext // lifetimeContext was extracted to allow the various Context clients to get // the benefits of the catacomb encapsulating everything that should happen diff --git a/internal/worker/instancemutater/package_test.go b/internal/worker/instancemutater/package_test.go index 85fa8e3e026..54817781a8a 100644 --- a/internal/worker/instancemutater/package_test.go +++ b/internal/worker/instancemutater/package_test.go @@ -9,15 +9,15 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/instancebroker_mock.go github.com/juju/juju/internal/worker/instancemutater InstanceMutaterAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/worker/instancemutater Logger -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs Environ,LXDProfiler,InstanceBroker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/instancebroker_mock.go github.com/juju/juju/internal/worker/instancemutater InstanceMutaterAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/logger_mock.go github.com/juju/juju/internal/worker/instancemutater Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mutatercontext_mock.go github.com/juju/juju/internal/worker/instancemutater MutaterContext +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/environs_mock.go github.com/juju/juju/environs Environ,LXDProfiler,InstanceBroker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/instancemutater/worker_test.go b/internal/worker/instancemutater/worker_test.go index 31917913b5b..8a387e906e0 100644 --- a/internal/worker/instancemutater/worker_test.go +++ b/internal/worker/instancemutater/worker_test.go @@ -432,9 +432,12 @@ func (s *workerSuite) expectCharmProfilingInfoSimpleNoChange(machine int) { s.machine[machine].EXPECT().CharmProfilingInfo(gomock.Any()).Return(&apiinstancemutater.UnitProfileInfo{}, nil).Do(do) } -func (s *workerSuite) workGroupAddGetDoneFunc() func(ctx context.Context) { +func (s *workerSuite) workGroupAddGetDoneFunc() func(ctx context.Context) (*apiinstancemutater.UnitProfileInfo, error) { s.doneWG.Add(1) - return func(context.Context) { s.doneWG.Done() } + return func(context.Context) (*apiinstancemutater.UnitProfileInfo, error) { + s.doneWG.Done() + return nil, nil + } } func (s *workerSuite) workGroupAddGetDoneFuncNoContext() func() { @@ -447,14 +450,20 @@ func (s *workerSuite) workGroupAddGetDoneWithErrorFunc() func(error) { return func(error) { s.doneWG.Done() } } -func (s *workerSuite) workGroupAddGetDoneWithMachineFunc() func(ctx context.Context, tag names.MachineTag) { +func (s *workerSuite) workGroupAddGetDoneWithMachineFunc() func(ctx context.Context, tag names.MachineTag) (apiinstancemutater.MutaterMachine, error) { s.doneWG.Add(1) - return func(ctx context.Context, tag names.MachineTag) { s.doneWG.Done() } + return func(ctx context.Context, tag names.MachineTag) (apiinstancemutater.MutaterMachine, error) { + s.doneWG.Done() + return nil, nil + } } -func (s *workerSuite) workGroupAddGetDoneWithStatusFunc() func(context.Context, status.Status, string, map[string]interface{}) { +func (s *workerSuite) workGroupAddGetDoneWithStatusFunc() func(context.Context, status.Status, string, map[string]interface{}) error { s.doneWG.Add(1) - return func(context.Context, status.Status, string, map[string]interface{}) { s.doneWG.Done() } + return func(context.Context, status.Status, string, map[string]interface{}) error { + s.doneWG.Done() + return nil + } } func (s *workerSuite) expectLXDProfileNamesTrue() { @@ -520,7 +529,7 @@ func (s *workerSuite) expectMachineAliveStatusIdleMachineDead(machine int, group mExp := s.machine[machine].EXPECT() group.Add(1) - notificationSync := func() { group.Done() } + notificationSync := func() life.Value { group.Done(); return "" } mExp.Refresh(gomock.Any()).Return(nil).Times(2) o1 := mExp.Life().Return(life.Alive).Do(notificationSync) @@ -532,7 +541,7 @@ func (s *workerSuite) expectMachineAliveStatusIdleMachineDead(machine int, group s.machine[1].EXPECT().SetModificationStatus(gomock.Any(), status.Applied, "", nil).Return(nil).Do(doWithStatus) do := s.workGroupAddGetDoneFuncNoContext() - mExp.Life().Return(life.Dead).After(o1).Do(do) + mExp.Life().Return(life.Dead).After(o1.Call).Do(do) } func (s *workerSuite) expectModificationStatusApplied(machine int) { @@ -730,7 +739,7 @@ func (s *workerContainerSuite) setup(c *gc.C) *gomock.Controller { func (s *workerContainerSuite) expectFacadeContainerTags() { s.facade.EXPECT().Machine(gomock.Any(), s.lxdContainerTag).Return(s.lxdContainer, nil).AnyTimes() - s.lxdContainer.EXPECT().Tag().Return(s.lxdContainerTag).AnyTimes() + s.lxdContainer.EXPECT().Tag().Return(s.lxdContainerTag.(names.MachineTag)).AnyTimes() } func (s *workerContainerSuite) expectContainerTypes() { diff --git a/internal/worker/instancepoller/mocks/mocks_cred_api.go b/internal/worker/instancepoller/mocks/mocks_cred_api.go index 8bc3ae0af02..5e5dc593f52 100644 --- a/internal/worker/instancepoller/mocks/mocks_cred_api.go +++ b/internal/worker/instancepoller/mocks/mocks_cred_api.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks_cred_api.go github.com/juju/juju/internal/worker/common CredentialAPI +// mockgen -typed -package mocks -destination mocks/mocks_cred_api.go github.com/juju/juju/internal/worker/common CredentialAPI // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockCredentialAPI) InvalidateModelCredential(arg0 context.Context, arg1 } // InvalidateModelCredential indicates an expected call of InvalidateModelCredential. -func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *MockCredentialAPIInvalidateModelCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + return &MockCredentialAPIInvalidateModelCredentialCall{Call: call} +} + +// MockCredentialAPIInvalidateModelCredentialCall wrap *gomock.Call +type MockCredentialAPIInvalidateModelCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialAPIInvalidateModelCredentialCall) Return(arg0 error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialAPIInvalidateModelCredentialCall) Do(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialAPIInvalidateModelCredentialCall) DoAndReturn(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancepoller/mocks/mocks_instancepoller.go b/internal/worker/instancepoller/mocks/mocks_instancepoller.go index d342f6f3e2f..c111e1d2270 100644 --- a/internal/worker/instancepoller/mocks/mocks_instancepoller.go +++ b/internal/worker/instancepoller/mocks/mocks_instancepoller.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks_instancepoller.go github.com/juju/juju/internal/worker/instancepoller Environ,Machine +// mockgen -typed -package mocks -destination mocks/mocks_instancepoller.go github.com/juju/juju/internal/worker/instancepoller Environ,Machine // // Package mocks is a generated GoMock package. @@ -56,9 +56,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInterfaces mocks base method. @@ -71,9 +95,33 @@ func (m *MockEnviron) NetworkInterfaces(arg0 envcontext.ProviderCallContext, arg } // NetworkInterfaces indicates an expected call of NetworkInterfaces. -func (mr *MockEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) NetworkInterfaces(arg0, arg1 any) *MockEnvironNetworkInterfacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockEnviron)(nil).NetworkInterfaces), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInterfaces", reflect.TypeOf((*MockEnviron)(nil).NetworkInterfaces), arg0, arg1) + return &MockEnvironNetworkInterfacesCall{Call: call} +} + +// MockEnvironNetworkInterfacesCall wrap *gomock.Call +type MockEnvironNetworkInterfacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironNetworkInterfacesCall) Return(arg0 []network.InterfaceInfos, arg1 error) *MockEnvironNetworkInterfacesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironNetworkInterfacesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockEnvironNetworkInterfacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironNetworkInterfacesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]network.InterfaceInfos, error)) *MockEnvironNetworkInterfacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -108,9 +156,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceId mocks base method. @@ -123,9 +195,33 @@ func (m *MockMachine) InstanceId() (instance.Id, error) { } // InstanceId indicates an expected call of InstanceId. -func (mr *MockMachineMockRecorder) InstanceId() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceId() *MockMachineInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceId", reflect.TypeOf((*MockMachine)(nil).InstanceId)) + return &MockMachineInstanceIdCall{Call: call} +} + +// MockMachineInstanceIdCall wrap *gomock.Call +type MockMachineInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceIdCall) Return(arg0 instance.Id, arg1 error) *MockMachineInstanceIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceIdCall) Do(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceIdCall) DoAndReturn(f func() (instance.Id, error)) *MockMachineInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceStatus mocks base method. @@ -138,9 +234,33 @@ func (m *MockMachine) InstanceStatus() (params.StatusResult, error) { } // InstanceStatus indicates an expected call of InstanceStatus. -func (mr *MockMachineMockRecorder) InstanceStatus() *gomock.Call { +func (mr *MockMachineMockRecorder) InstanceStatus() *MockMachineInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachine)(nil).InstanceStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceStatus", reflect.TypeOf((*MockMachine)(nil).InstanceStatus)) + return &MockMachineInstanceStatusCall{Call: call} +} + +// MockMachineInstanceStatusCall wrap *gomock.Call +type MockMachineInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceStatusCall) Return(arg0 params.StatusResult, arg1 error) *MockMachineInstanceStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceStatusCall) Do(f func() (params.StatusResult, error)) *MockMachineInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceStatusCall) DoAndReturn(f func() (params.StatusResult, error)) *MockMachineInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsManual mocks base method. @@ -153,9 +273,33 @@ func (m *MockMachine) IsManual() (bool, error) { } // IsManual indicates an expected call of IsManual. -func (mr *MockMachineMockRecorder) IsManual() *gomock.Call { +func (mr *MockMachineMockRecorder) IsManual() *MockMachineIsManualCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockMachine)(nil).IsManual)) + return &MockMachineIsManualCall{Call: call} +} + +// MockMachineIsManualCall wrap *gomock.Call +type MockMachineIsManualCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIsManualCall) Return(arg0 bool, arg1 error) *MockMachineIsManualCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIsManualCall) Do(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIsManualCall) DoAndReturn(f func() (bool, error)) *MockMachineIsManualCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -167,9 +311,33 @@ func (m *MockMachine) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockMachineMockRecorder) Life() *gomock.Call { +func (mr *MockMachineMockRecorder) Life() *MockMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockMachine)(nil).Life)) + return &MockMachineLifeCall{Call: call} +} + +// MockMachineLifeCall wrap *gomock.Call +type MockMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineLifeCall) Return(arg0 life.Value) *MockMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineLifeCall) Do(f func() life.Value) *MockMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineLifeCall) DoAndReturn(f func() life.Value) *MockMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -181,9 +349,33 @@ func (m *MockMachine) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockMachineMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) Refresh(arg0 any) *MockMachineRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachine)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockMachine)(nil).Refresh), arg0) + return &MockMachineRefreshCall{Call: call} +} + +// MockMachineRefreshCall wrap *gomock.Call +type MockMachineRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineRefreshCall) Return(arg0 error) *MockMachineRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineRefreshCall) Do(f func(context.Context) error) *MockMachineRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineRefreshCall) DoAndReturn(f func(context.Context) error) *MockMachineRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -195,9 +387,33 @@ func (m *MockMachine) SetInstanceStatus(arg0 status.Status, arg1 string, arg2 ma } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockMachineMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetInstanceStatus(arg0, arg1, arg2 any) *MockMachineSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachine)(nil).SetInstanceStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockMachine)(nil).SetInstanceStatus), arg0, arg1, arg2) + return &MockMachineSetInstanceStatusCall{Call: call} +} + +// MockMachineSetInstanceStatusCall wrap *gomock.Call +type MockMachineSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetInstanceStatusCall) Return(arg0 error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetInstanceStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetInstanceStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockMachineSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProviderNetworkConfig mocks base method. @@ -211,9 +427,33 @@ func (m *MockMachine) SetProviderNetworkConfig(arg0 network.InterfaceInfos) (net } // SetProviderNetworkConfig indicates an expected call of SetProviderNetworkConfig. -func (mr *MockMachineMockRecorder) SetProviderNetworkConfig(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetProviderNetworkConfig(arg0 any) *MockMachineSetProviderNetworkConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderNetworkConfig", reflect.TypeOf((*MockMachine)(nil).SetProviderNetworkConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProviderNetworkConfig", reflect.TypeOf((*MockMachine)(nil).SetProviderNetworkConfig), arg0) + return &MockMachineSetProviderNetworkConfigCall{Call: call} +} + +// MockMachineSetProviderNetworkConfigCall wrap *gomock.Call +type MockMachineSetProviderNetworkConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetProviderNetworkConfigCall) Return(arg0 network.ProviderAddresses, arg1 bool, arg2 error) *MockMachineSetProviderNetworkConfigCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetProviderNetworkConfigCall) Do(f func(network.InterfaceInfos) (network.ProviderAddresses, bool, error)) *MockMachineSetProviderNetworkConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetProviderNetworkConfigCall) DoAndReturn(f func(network.InterfaceInfos) (network.ProviderAddresses, bool, error)) *MockMachineSetProviderNetworkConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -226,9 +466,33 @@ func (m *MockMachine) Status() (params.StatusResult, error) { } // Status indicates an expected call of Status. -func (mr *MockMachineMockRecorder) Status() *gomock.Call { +func (mr *MockMachineMockRecorder) Status() *MockMachineStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachine)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachine)(nil).Status)) + return &MockMachineStatusCall{Call: call} +} + +// MockMachineStatusCall wrap *gomock.Call +type MockMachineStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineStatusCall) Return(arg0 params.StatusResult, arg1 error) *MockMachineStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineStatusCall) Do(f func() (params.StatusResult, error)) *MockMachineStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineStatusCall) DoAndReturn(f func() (params.StatusResult, error)) *MockMachineStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -240,7 +504,31 @@ func (m *MockMachine) String() string { } // String indicates an expected call of String. -func (mr *MockMachineMockRecorder) String() *gomock.Call { +func (mr *MockMachineMockRecorder) String() *MockMachineStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachine)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockMachine)(nil).String)) + return &MockMachineStringCall{Call: call} +} + +// MockMachineStringCall wrap *gomock.Call +type MockMachineStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineStringCall) Return(arg0 string) *MockMachineStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineStringCall) Do(f func() string) *MockMachineStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineStringCall) DoAndReturn(f func() string) *MockMachineStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancepoller/mocks/mocks_instances.go b/internal/worker/instancepoller/mocks/mocks_instances.go index c1600db072f..e7dd289323a 100644 --- a/internal/worker/instancepoller/mocks/mocks_instances.go +++ b/internal/worker/instancepoller/mocks/mocks_instances.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks_instances.go github.com/juju/juju/environs/instances Instance +// mockgen -typed -package mocks -destination mocks/mocks_instances.go github.com/juju/juju/environs/instances Instance // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockInstance) Addresses(arg0 envcontext.ProviderCallContext) (network.P } // Addresses indicates an expected call of Addresses. -func (mr *MockInstanceMockRecorder) Addresses(arg0 any) *gomock.Call { +func (mr *MockInstanceMockRecorder) Addresses(arg0 any) *MockInstanceAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockInstance)(nil).Addresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockInstance)(nil).Addresses), arg0) + return &MockInstanceAddressesCall{Call: call} +} + +// MockInstanceAddressesCall wrap *gomock.Call +type MockInstanceAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceAddressesCall) Return(arg0 network.ProviderAddresses, arg1 error) *MockInstanceAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceAddressesCall) Do(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockInstanceAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceAddressesCall) DoAndReturn(f func(envcontext.ProviderCallContext) (network.ProviderAddresses, error)) *MockInstanceAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -65,9 +89,33 @@ func (m *MockInstance) Id() instance.Id { } // Id indicates an expected call of Id. -func (mr *MockInstanceMockRecorder) Id() *gomock.Call { +func (mr *MockInstanceMockRecorder) Id() *MockInstanceIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockInstance)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockInstance)(nil).Id)) + return &MockInstanceIdCall{Call: call} +} + +// MockInstanceIdCall wrap *gomock.Call +type MockInstanceIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceIdCall) Return(arg0 instance.Id) *MockInstanceIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceIdCall) Do(f func() instance.Id) *MockInstanceIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceIdCall) DoAndReturn(f func() instance.Id) *MockInstanceIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -79,7 +127,31 @@ func (m *MockInstance) Status(arg0 envcontext.ProviderCallContext) instance.Stat } // Status indicates an expected call of Status. -func (mr *MockInstanceMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockInstanceMockRecorder) Status(arg0 any) *MockInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockInstance)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockInstance)(nil).Status), arg0) + return &MockInstanceStatusCall{Call: call} +} + +// MockInstanceStatusCall wrap *gomock.Call +type MockInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceStatusCall) Return(arg0 instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceStatusCall) Do(f func(envcontext.ProviderCallContext) instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceStatusCall) DoAndReturn(f func(envcontext.ProviderCallContext) instance.Status) *MockInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancepoller/mocks/mocks_watcher.go b/internal/worker/instancepoller/mocks/mocks_watcher.go index bfbad84195b..7432f733cb0 100644 --- a/internal/worker/instancepoller/mocks/mocks_watcher.go +++ b/internal/worker/instancepoller/mocks/mocks_watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks_watcher.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package mocks -destination mocks/mocks_watcher.go github.com/juju/juju/core/watcher StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/instancepoller/package_test.go b/internal/worker/instancepoller/package_test.go index 8d863935f78..5c7c559d5ce 100644 --- a/internal/worker/instancepoller/package_test.go +++ b/internal/worker/instancepoller/package_test.go @@ -9,10 +9,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks_watcher.go github.com/juju/juju/core/watcher StringsWatcher -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks_instances.go github.com/juju/juju/environs/instances Instance -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks_cred_api.go github.com/juju/juju/internal/worker/common CredentialAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks_instancepoller.go github.com/juju/juju/internal/worker/instancepoller Environ,Machine +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks_watcher.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks_instances.go github.com/juju/juju/environs/instances Instance +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks_cred_api.go github.com/juju/juju/internal/worker/common CredentialAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks_instancepoller.go github.com/juju/juju/internal/worker/instancepoller Environ,Machine func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/lease/clock_mock_test.go b/internal/worker/lease/clock_mock_test.go index 2b2c5a1d0e0..6e81a81fca3 100644 --- a/internal/worker/lease/clock_mock_test.go +++ b/internal/worker/lease/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lease -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package lease -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package lease is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/lease/database_mock_test.go b/internal/worker/lease/database_mock_test.go index a6b4472eb68..83faa02c397 100644 --- a/internal/worker/lease/database_mock_test.go +++ b/internal/worker/lease/database_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lease -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +// mockgen -typed -package lease -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner // // Package lease is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockTxnRunner) StdTxn(arg0 context.Context, arg1 func(context.Context, } // StdTxn indicates an expected call of StdTxn. -func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) StdTxn(arg0, arg1 any) *MockTxnRunnerStdTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StdTxn", reflect.TypeOf((*MockTxnRunner)(nil).StdTxn), arg0, arg1) + return &MockTxnRunnerStdTxnCall{Call: call} +} + +// MockTxnRunnerStdTxnCall wrap *gomock.Call +type MockTxnRunnerStdTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerStdTxnCall) Return(arg0 error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerStdTxnCall) Do(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerStdTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sql.Tx) error) error) *MockTxnRunnerStdTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Txn mocks base method. @@ -64,7 +88,31 @@ func (m *MockTxnRunner) Txn(arg0 context.Context, arg1 func(context.Context, *sq } // Txn indicates an expected call of Txn. -func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *gomock.Call { +func (mr *MockTxnRunnerMockRecorder) Txn(arg0, arg1 any) *MockTxnRunnerTxnCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockTxnRunner)(nil).Txn), arg0, arg1) + return &MockTxnRunnerTxnCall{Call: call} +} + +// MockTxnRunnerTxnCall wrap *gomock.Call +type MockTxnRunnerTxnCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTxnRunnerTxnCall) Return(arg0 error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTxnRunnerTxnCall) Do(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTxnRunnerTxnCall) DoAndReturn(f func(context.Context, func(context.Context, *sqlair.TX) error) error) *MockTxnRunnerTxnCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/lease/package_test.go b/internal/worker/lease/package_test.go index 06d355c67b6..ff1cf022a2f 100644 --- a/internal/worker/lease/package_test.go +++ b/internal/worker/lease/package_test.go @@ -14,9 +14,9 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package lease -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner -//go:generate go run go.uber.org/mock/mockgen -package lease -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package lease -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +//go:generate go run go.uber.org/mock/mockgen -typed -package lease -destination database_mock_test.go github.com/juju/juju/core/database TxnRunner +//go:generate go run go.uber.org/mock/mockgen -typed -package lease -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package lease -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/lease/prometheus_mock_test.go b/internal/worker/lease/prometheus_mock_test.go index df06fc9dc7b..f7f47e80179 100644 --- a/internal/worker/lease/prometheus_mock_test.go +++ b/internal/worker/lease/prometheus_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package lease -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer +// mockgen -typed -package lease -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer // // Package lease is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRegisterer) MustRegister(arg0 ...prometheus.Collector) { } // MustRegister indicates an expected call of MustRegister. -func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *gomock.Call { +func (mr *MockRegistererMockRecorder) MustRegister(arg0 ...any) *MockRegistererMustRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustRegister", reflect.TypeOf((*MockRegisterer)(nil).MustRegister), arg0...) + return &MockRegistererMustRegisterCall{Call: call} +} + +// MockRegistererMustRegisterCall wrap *gomock.Call +type MockRegistererMustRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererMustRegisterCall) Return() *MockRegistererMustRegisterCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererMustRegisterCall) Do(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererMustRegisterCall) DoAndReturn(f func(...prometheus.Collector)) *MockRegistererMustRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Register mocks base method. @@ -64,9 +88,33 @@ func (m *MockRegisterer) Register(arg0 prometheus.Collector) error { } // Register indicates an expected call of Register. -func (mr *MockRegistererMockRecorder) Register(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Register(arg0 any) *MockRegistererRegisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegisterer)(nil).Register), arg0) + return &MockRegistererRegisterCall{Call: call} +} + +// MockRegistererRegisterCall wrap *gomock.Call +type MockRegistererRegisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererRegisterCall) Return(arg0 error) *MockRegistererRegisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererRegisterCall) Do(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererRegisterCall) DoAndReturn(f func(prometheus.Collector) error) *MockRegistererRegisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unregister mocks base method. @@ -78,7 +126,31 @@ func (m *MockRegisterer) Unregister(arg0 prometheus.Collector) bool { } // Unregister indicates an expected call of Unregister. -func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *gomock.Call { +func (mr *MockRegistererMockRecorder) Unregister(arg0 any) *MockRegistererUnregisterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegisterer)(nil).Unregister), arg0) + return &MockRegistererUnregisterCall{Call: call} +} + +// MockRegistererUnregisterCall wrap *gomock.Call +type MockRegistererUnregisterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistererUnregisterCall) Return(arg0 bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistererUnregisterCall) Do(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistererUnregisterCall) DoAndReturn(f func(prometheus.Collector) bool) *MockRegistererUnregisterCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/leaseexpiry/clock_mock_test.go b/internal/worker/leaseexpiry/clock_mock_test.go index aefba1d79d0..2f1a01469e4 100644 --- a/internal/worker/leaseexpiry/clock_mock_test.go +++ b/internal/worker/leaseexpiry/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package leaseexpiry_test -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package leaseexpiry_test -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package leaseexpiry_test is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/leaseexpiry/package_test.go b/internal/worker/leaseexpiry/package_test.go index f3e44c87f88..960f39b0828 100644 --- a/internal/worker/leaseexpiry/package_test.go +++ b/internal/worker/leaseexpiry/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package leaseexpiry_test -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package leaseexpiry_test -destination store_mock_test.go github.com/juju/juju/core/lease ExpiryStore +//go:generate go run go.uber.org/mock/mockgen -typed -package leaseexpiry_test -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package leaseexpiry_test -destination store_mock_test.go github.com/juju/juju/core/lease ExpiryStore func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/leaseexpiry/store_mock_test.go b/internal/worker/leaseexpiry/store_mock_test.go index e510a26196b..cafb857486b 100644 --- a/internal/worker/leaseexpiry/store_mock_test.go +++ b/internal/worker/leaseexpiry/store_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package leaseexpiry_test -destination store_mock_test.go github.com/juju/juju/core/lease ExpiryStore +// mockgen -typed -package leaseexpiry_test -destination store_mock_test.go github.com/juju/juju/core/lease ExpiryStore // // Package leaseexpiry_test is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockExpiryStore) ExpireLeases(arg0 context.Context) error { } // ExpireLeases indicates an expected call of ExpireLeases. -func (mr *MockExpiryStoreMockRecorder) ExpireLeases(arg0 any) *gomock.Call { +func (mr *MockExpiryStoreMockRecorder) ExpireLeases(arg0 any) *MockExpiryStoreExpireLeasesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireLeases", reflect.TypeOf((*MockExpiryStore)(nil).ExpireLeases), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireLeases", reflect.TypeOf((*MockExpiryStore)(nil).ExpireLeases), arg0) + return &MockExpiryStoreExpireLeasesCall{Call: call} +} + +// MockExpiryStoreExpireLeasesCall wrap *gomock.Call +type MockExpiryStoreExpireLeasesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockExpiryStoreExpireLeasesCall) Return(arg0 error) *MockExpiryStoreExpireLeasesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockExpiryStoreExpireLeasesCall) Do(f func(context.Context) error) *MockExpiryStoreExpireLeasesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockExpiryStoreExpireLeasesCall) DoAndReturn(f func(context.Context) error) *MockExpiryStoreExpireLeasesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/logsender/mocks/logwriter_mock.go b/internal/worker/logsender/mocks/logwriter_mock.go index 55c2edbe275..cfca0f41442 100644 --- a/internal/worker/logsender/mocks/logwriter_mock.go +++ b/internal/worker/logsender/mocks/logwriter_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/logwriter_mock.go github.com/juju/juju/api/logsender LogWriter +// mockgen -typed -package mocks -destination mocks/logwriter_mock.go github.com/juju/juju/api/logsender LogWriter // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockLogWriter) Close() error { } // Close indicates an expected call of Close. -func (mr *MockLogWriterMockRecorder) Close() *gomock.Call { +func (mr *MockLogWriterMockRecorder) Close() *MockLogWriterCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLogWriter)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLogWriter)(nil).Close)) + return &MockLogWriterCloseCall{Call: call} +} + +// MockLogWriterCloseCall wrap *gomock.Call +type MockLogWriterCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLogWriterCloseCall) Return(arg0 error) *MockLogWriterCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLogWriterCloseCall) Do(f func() error) *MockLogWriterCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLogWriterCloseCall) DoAndReturn(f func() error) *MockLogWriterCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteLog mocks base method. @@ -62,7 +86,31 @@ func (m *MockLogWriter) WriteLog(arg0 *params.LogRecord) error { } // WriteLog indicates an expected call of WriteLog. -func (mr *MockLogWriterMockRecorder) WriteLog(arg0 any) *gomock.Call { +func (mr *MockLogWriterMockRecorder) WriteLog(arg0 any) *MockLogWriterWriteLogCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLog", reflect.TypeOf((*MockLogWriter)(nil).WriteLog), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLog", reflect.TypeOf((*MockLogWriter)(nil).WriteLog), arg0) + return &MockLogWriterWriteLogCall{Call: call} +} + +// MockLogWriterWriteLogCall wrap *gomock.Call +type MockLogWriterWriteLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLogWriterWriteLogCall) Return(arg0 error) *MockLogWriterWriteLogCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLogWriterWriteLogCall) Do(f func(*params.LogRecord) error) *MockLogWriterWriteLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLogWriterWriteLogCall) DoAndReturn(f func(*params.LogRecord) error) *MockLogWriterWriteLogCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/logsender/package_test.go b/internal/worker/logsender/package_test.go index 9c793b43f71..f7a40b31a1b 100644 --- a/internal/worker/logsender/package_test.go +++ b/internal/worker/logsender/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/logwriter_mock.go github.com/juju/juju/api/logsender LogWriter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/logwriter_mock.go github.com/juju/juju/api/logsender LogWriter func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/machineactions/mocks/mock_facade.go b/internal/worker/machineactions/mocks/mock_facade.go index 3fe2848a7c4..b0af7f8ddae 100644 --- a/internal/worker/machineactions/mocks/mock_facade.go +++ b/internal/worker/machineactions/mocks/mock_facade.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_facade.go github.com/juju/juju/internal/worker/machineactions Facade +// mockgen -typed -package mocks -destination mocks/mock_facade.go github.com/juju/juju/internal/worker/machineactions Facade // // Package mocks is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockFacade) Action(arg0 names.ActionTag) (*machineactions.Action, error } // Action indicates an expected call of Action. -func (mr *MockFacadeMockRecorder) Action(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) Action(arg0 any) *MockFacadeActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Action", reflect.TypeOf((*MockFacade)(nil).Action), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Action", reflect.TypeOf((*MockFacade)(nil).Action), arg0) + return &MockFacadeActionCall{Call: call} +} + +// MockFacadeActionCall wrap *gomock.Call +type MockFacadeActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeActionCall) Return(arg0 *machineactions.Action, arg1 error) *MockFacadeActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeActionCall) Do(f func(names.ActionTag) (*machineactions.Action, error)) *MockFacadeActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeActionCall) DoAndReturn(f func(names.ActionTag) (*machineactions.Action, error)) *MockFacadeActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionBegin mocks base method. @@ -66,9 +90,33 @@ func (m *MockFacade) ActionBegin(arg0 names.ActionTag) error { } // ActionBegin indicates an expected call of ActionBegin. -func (mr *MockFacadeMockRecorder) ActionBegin(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) ActionBegin(arg0 any) *MockFacadeActionBeginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionBegin", reflect.TypeOf((*MockFacade)(nil).ActionBegin), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionBegin", reflect.TypeOf((*MockFacade)(nil).ActionBegin), arg0) + return &MockFacadeActionBeginCall{Call: call} +} + +// MockFacadeActionBeginCall wrap *gomock.Call +type MockFacadeActionBeginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeActionBeginCall) Return(arg0 error) *MockFacadeActionBeginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeActionBeginCall) Do(f func(names.ActionTag) error) *MockFacadeActionBeginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeActionBeginCall) DoAndReturn(f func(names.ActionTag) error) *MockFacadeActionBeginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionFinish mocks base method. @@ -80,9 +128,33 @@ func (m *MockFacade) ActionFinish(arg0 names.ActionTag, arg1 string, arg2 map[st } // ActionFinish indicates an expected call of ActionFinish. -func (mr *MockFacadeMockRecorder) ActionFinish(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) ActionFinish(arg0, arg1, arg2, arg3 any) *MockFacadeActionFinishCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionFinish", reflect.TypeOf((*MockFacade)(nil).ActionFinish), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionFinish", reflect.TypeOf((*MockFacade)(nil).ActionFinish), arg0, arg1, arg2, arg3) + return &MockFacadeActionFinishCall{Call: call} +} + +// MockFacadeActionFinishCall wrap *gomock.Call +type MockFacadeActionFinishCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeActionFinishCall) Return(arg0 error) *MockFacadeActionFinishCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeActionFinishCall) Do(f func(names.ActionTag, string, map[string]any, string) error) *MockFacadeActionFinishCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeActionFinishCall) DoAndReturn(f func(names.ActionTag, string, map[string]any, string) error) *MockFacadeActionFinishCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunningActions mocks base method. @@ -95,9 +167,33 @@ func (m *MockFacade) RunningActions(arg0 names.MachineTag) ([]params.ActionResul } // RunningActions indicates an expected call of RunningActions. -func (mr *MockFacadeMockRecorder) RunningActions(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) RunningActions(arg0 any) *MockFacadeRunningActionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunningActions", reflect.TypeOf((*MockFacade)(nil).RunningActions), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunningActions", reflect.TypeOf((*MockFacade)(nil).RunningActions), arg0) + return &MockFacadeRunningActionsCall{Call: call} +} + +// MockFacadeRunningActionsCall wrap *gomock.Call +type MockFacadeRunningActionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeRunningActionsCall) Return(arg0 []params.ActionResult, arg1 error) *MockFacadeRunningActionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeRunningActionsCall) Do(f func(names.MachineTag) ([]params.ActionResult, error)) *MockFacadeRunningActionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeRunningActionsCall) DoAndReturn(f func(names.MachineTag) ([]params.ActionResult, error)) *MockFacadeRunningActionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchActionNotifications mocks base method. @@ -110,7 +206,31 @@ func (m *MockFacade) WatchActionNotifications(arg0 names.MachineTag) (watcher.Wa } // WatchActionNotifications indicates an expected call of WatchActionNotifications. -func (mr *MockFacadeMockRecorder) WatchActionNotifications(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) WatchActionNotifications(arg0 any) *MockFacadeWatchActionNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockFacade)(nil).WatchActionNotifications), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockFacade)(nil).WatchActionNotifications), arg0) + return &MockFacadeWatchActionNotificationsCall{Call: call} +} + +// MockFacadeWatchActionNotificationsCall wrap *gomock.Call +type MockFacadeWatchActionNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeWatchActionNotificationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockFacadeWatchActionNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeWatchActionNotificationsCall) Do(f func(names.MachineTag) (watcher.Watcher[[]string], error)) *MockFacadeWatchActionNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeWatchActionNotificationsCall) DoAndReturn(f func(names.MachineTag) (watcher.Watcher[[]string], error)) *MockFacadeWatchActionNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/machineactions/mocks/mock_lock.go b/internal/worker/machineactions/mocks/mock_lock.go index d5b11888be7..02cf2794681 100644 --- a/internal/worker/machineactions/mocks/mock_lock.go +++ b/internal/worker/machineactions/mocks/mock_lock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_lock.go github.com/juju/juju/core/machinelock Lock +// mockgen -typed -package mocks -destination mocks/mock_lock.go github.com/juju/juju/core/machinelock Lock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockLock) Acquire(arg0 machinelock.Spec) (func(), error) { } // Acquire indicates an expected call of Acquire. -func (mr *MockLockMockRecorder) Acquire(arg0 any) *gomock.Call { +func (mr *MockLockMockRecorder) Acquire(arg0 any) *MockLockAcquireCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + return &MockLockAcquireCall{Call: call} +} + +// MockLockAcquireCall wrap *gomock.Call +type MockLockAcquireCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockAcquireCall) Return(arg0 func(), arg1 error) *MockLockAcquireCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockAcquireCall) Do(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockAcquireCall) DoAndReturn(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -68,7 +92,31 @@ func (m *MockLock) Report(arg0 ...machinelock.ReportOption) (string, error) { } // Report indicates an expected call of Report. -func (mr *MockLockMockRecorder) Report(arg0 ...any) *gomock.Call { +func (mr *MockLockMockRecorder) Report(arg0 ...any) *MockLockReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + return &MockLockReportCall{Call: call} +} + +// MockLockReportCall wrap *gomock.Call +type MockLockReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockReportCall) Return(arg0 string, arg1 error) *MockLockReportCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockReportCall) Do(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockReportCall) DoAndReturn(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/machineactions/package_test.go b/internal/worker/machineactions/package_test.go index 067551ca156..6549ad128ff 100644 --- a/internal/worker/machineactions/package_test.go +++ b/internal/worker/machineactions/package_test.go @@ -14,5 +14,5 @@ func TestPackage(t *stdtesting.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_facade.go github.com/juju/juju/internal/worker/machineactions Facade -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_lock.go github.com/juju/juju/core/machinelock Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_facade.go github.com/juju/juju/internal/worker/machineactions Facade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_lock.go github.com/juju/juju/core/machinelock Lock diff --git a/internal/worker/mocks/doc.go b/internal/worker/mocks/doc.go index 011278e387c..484ea6310b8 100644 --- a/internal/worker/mocks/doc.go +++ b/internal/worker/mocks/doc.go @@ -6,4 +6,4 @@ package mocks -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination worker_mock.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination worker_mock.go github.com/juju/worker/v4 Worker diff --git a/internal/worker/mocks/worker_mock.go b/internal/worker/mocks/worker_mock.go index ee9577e9ee4..e3af8c01071 100644 --- a/internal/worker/mocks/worker_mock.go +++ b/internal/worker/mocks/worker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination worker_mock.go github.com/juju/worker/v4 Worker +// mockgen -typed -package mocks -destination worker_mock.go github.com/juju/worker/v4 Worker // // Package mocks is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/agent_mock_test.go b/internal/worker/objectstore/agent_mock_test.go index b7619cb98e3..5befd6c61bc 100644 --- a/internal/worker/objectstore/agent_mock_test.go +++ b/internal/worker/objectstore/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package objectstore -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config // // Package objectstore is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/claimer_mock_test.go b/internal/worker/objectstore/claimer_mock_test.go index a00b50d1fec..9be6b9e36d3 100644 --- a/internal/worker/objectstore/claimer_mock_test.go +++ b/internal/worker/objectstore/claimer_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination claimer_mock_test.go github.com/juju/juju/internal/objectstore Claimer +// mockgen -typed -package objectstore -destination claimer_mock_test.go github.com/juju/juju/internal/objectstore Claimer // // Package objectstore is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockClaimer) Claim(arg0 context.Context, arg1 string) (objectstore.Clai } // Claim indicates an expected call of Claim. -func (mr *MockClaimerMockRecorder) Claim(arg0, arg1 any) *gomock.Call { +func (mr *MockClaimerMockRecorder) Claim(arg0, arg1 any) *MockClaimerClaimCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claim", reflect.TypeOf((*MockClaimer)(nil).Claim), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claim", reflect.TypeOf((*MockClaimer)(nil).Claim), arg0, arg1) + return &MockClaimerClaimCall{Call: call} +} + +// MockClaimerClaimCall wrap *gomock.Call +type MockClaimerClaimCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimerClaimCall) Return(arg0 objectstore.ClaimExtender, arg1 error) *MockClaimerClaimCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimerClaimCall) Do(f func(context.Context, string) (objectstore.ClaimExtender, error)) *MockClaimerClaimCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimerClaimCall) DoAndReturn(f func(context.Context, string) (objectstore.ClaimExtender, error)) *MockClaimerClaimCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Release mocks base method. @@ -64,7 +88,31 @@ func (m *MockClaimer) Release(arg0 context.Context, arg1 string) error { } // Release indicates an expected call of Release. -func (mr *MockClaimerMockRecorder) Release(arg0, arg1 any) *gomock.Call { +func (mr *MockClaimerMockRecorder) Release(arg0, arg1 any) *MockClaimerReleaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockClaimer)(nil).Release), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockClaimer)(nil).Release), arg0, arg1) + return &MockClaimerReleaseCall{Call: call} +} + +// MockClaimerReleaseCall wrap *gomock.Call +type MockClaimerReleaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClaimerReleaseCall) Return(arg0 error) *MockClaimerReleaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClaimerReleaseCall) Do(f func(context.Context, string) error) *MockClaimerReleaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClaimerReleaseCall) DoAndReturn(f func(context.Context, string) error) *MockClaimerReleaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/client_mock_test.go b/internal/worker/objectstore/client_mock_test.go index d426239885b..613ffcf8a7f 100644 --- a/internal/worker/objectstore/client_mock_test.go +++ b/internal/worker/objectstore/client_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination client_mock_test.go github.com/juju/juju/core/objectstore Client,Session +// mockgen -typed -package objectstore -destination client_mock_test.go github.com/juju/juju/core/objectstore Client,Session // // Package objectstore is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockClient) Session(arg0 context.Context, arg1 func(context.Context, ob } // Session indicates an expected call of Session. -func (mr *MockClientMockRecorder) Session(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) Session(arg0, arg1 any) *MockClientSessionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Session", reflect.TypeOf((*MockClient)(nil).Session), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Session", reflect.TypeOf((*MockClient)(nil).Session), arg0, arg1) + return &MockClientSessionCall{Call: call} +} + +// MockClientSessionCall wrap *gomock.Call +type MockClientSessionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientSessionCall) Return(arg0 error) *MockClientSessionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientSessionCall) Do(f func(context.Context, func(context.Context, objectstore.Session) error) error) *MockClientSessionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientSessionCall) DoAndReturn(f func(context.Context, func(context.Context, objectstore.Session) error) error) *MockClientSessionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSession is a mock of Session interface. @@ -87,9 +111,33 @@ func (m *MockSession) CreateBucket(arg0 context.Context, arg1 string) error { } // CreateBucket indicates an expected call of CreateBucket. -func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *MockSessionCreateBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + return &MockSessionCreateBucketCall{Call: call} +} + +// MockSessionCreateBucketCall wrap *gomock.Call +type MockSessionCreateBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionCreateBucketCall) Return(arg0 error) *MockSessionCreateBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionCreateBucketCall) Do(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionCreateBucketCall) DoAndReturn(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteObject mocks base method. @@ -101,9 +149,33 @@ func (m *MockSession) DeleteObject(arg0 context.Context, arg1, arg2 string) erro } // DeleteObject indicates an expected call of DeleteObject. -func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *MockSessionDeleteObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + return &MockSessionDeleteObjectCall{Call: call} +} + +// MockSessionDeleteObjectCall wrap *gomock.Call +type MockSessionDeleteObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionDeleteObjectCall) Return(arg0 error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionDeleteObjectCall) Do(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionDeleteObjectCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObject mocks base method. @@ -118,9 +190,33 @@ func (m *MockSession) GetObject(arg0 context.Context, arg1, arg2 string) (io.Rea } // GetObject indicates an expected call of GetObject. -func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *MockSessionGetObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + return &MockSessionGetObjectCall{Call: call} +} + +// MockSessionGetObjectCall wrap *gomock.Call +type MockSessionGetObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionGetObjectCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 string, arg3 error) *MockSessionGetObjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionGetObjectCall) Do(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionGetObjectCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListObjects mocks base method. @@ -133,9 +229,33 @@ func (m *MockSession) ListObjects(arg0 context.Context, arg1 string) ([]string, } // ListObjects indicates an expected call of ListObjects. -func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *MockSessionListObjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + return &MockSessionListObjectsCall{Call: call} +} + +// MockSessionListObjectsCall wrap *gomock.Call +type MockSessionListObjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionListObjectsCall) Return(arg0 []string, arg1 error) *MockSessionListObjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionListObjectsCall) Do(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionListObjectsCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectExists mocks base method. @@ -147,9 +267,33 @@ func (m *MockSession) ObjectExists(arg0 context.Context, arg1, arg2 string) erro } // ObjectExists indicates an expected call of ObjectExists. -func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *MockSessionObjectExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + return &MockSessionObjectExistsCall{Call: call} +} + +// MockSessionObjectExistsCall wrap *gomock.Call +type MockSessionObjectExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionObjectExistsCall) Return(arg0 error) *MockSessionObjectExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionObjectExistsCall) Do(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionObjectExistsCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutObject mocks base method. @@ -161,7 +305,31 @@ func (m *MockSession) PutObject(arg0 context.Context, arg1, arg2 string, arg3 io } // PutObject indicates an expected call of PutObject. -func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *MockSessionPutObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + return &MockSessionPutObjectCall{Call: call} +} + +// MockSessionPutObjectCall wrap *gomock.Call +type MockSessionPutObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionPutObjectCall) Return(arg0 error) *MockSessionPutObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionPutObjectCall) Do(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionPutObjectCall) DoAndReturn(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/clock_mock_test.go b/internal/worker/objectstore/clock_mock_test.go index d7775edb01f..49d0b3e88ed 100644 --- a/internal/worker/objectstore/clock_mock_test.go +++ b/internal/worker/objectstore/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package objectstore is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/lease_mock_test.go b/internal/worker/objectstore/lease_mock_test.go index 4419172ef12..5f2de56f515 100644 --- a/internal/worker/objectstore/lease_mock_test.go +++ b/internal/worker/objectstore/lease_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination lease_mock_test.go github.com/juju/juju/core/lease Manager +// mockgen -typed -package objectstore -destination lease_mock_test.go github.com/juju/juju/core/lease Manager // // Package objectstore is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockManager) Checker(arg0, arg1 string) (lease.Checker, error) { } // Checker indicates an expected call of Checker. -func (mr *MockManagerMockRecorder) Checker(arg0, arg1 any) *gomock.Call { +func (mr *MockManagerMockRecorder) Checker(arg0, arg1 any) *MockManagerCheckerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Checker", reflect.TypeOf((*MockManager)(nil).Checker), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Checker", reflect.TypeOf((*MockManager)(nil).Checker), arg0, arg1) + return &MockManagerCheckerCall{Call: call} +} + +// MockManagerCheckerCall wrap *gomock.Call +type MockManagerCheckerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerCheckerCall) Return(arg0 lease.Checker, arg1 error) *MockManagerCheckerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerCheckerCall) Do(f func(string, string) (lease.Checker, error)) *MockManagerCheckerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerCheckerCall) DoAndReturn(f func(string, string) (lease.Checker, error)) *MockManagerCheckerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Claimer mocks base method. @@ -64,9 +88,33 @@ func (m *MockManager) Claimer(arg0, arg1 string) (lease.Claimer, error) { } // Claimer indicates an expected call of Claimer. -func (mr *MockManagerMockRecorder) Claimer(arg0, arg1 any) *gomock.Call { +func (mr *MockManagerMockRecorder) Claimer(arg0, arg1 any) *MockManagerClaimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claimer", reflect.TypeOf((*MockManager)(nil).Claimer), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Claimer", reflect.TypeOf((*MockManager)(nil).Claimer), arg0, arg1) + return &MockManagerClaimerCall{Call: call} +} + +// MockManagerClaimerCall wrap *gomock.Call +type MockManagerClaimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerClaimerCall) Return(arg0 lease.Claimer, arg1 error) *MockManagerClaimerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerClaimerCall) Do(f func(string, string) (lease.Claimer, error)) *MockManagerClaimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerClaimerCall) DoAndReturn(f func(string, string) (lease.Claimer, error)) *MockManagerClaimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pinner mocks base method. @@ -79,9 +127,33 @@ func (m *MockManager) Pinner(arg0, arg1 string) (lease.Pinner, error) { } // Pinner indicates an expected call of Pinner. -func (mr *MockManagerMockRecorder) Pinner(arg0, arg1 any) *gomock.Call { +func (mr *MockManagerMockRecorder) Pinner(arg0, arg1 any) *MockManagerPinnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pinner", reflect.TypeOf((*MockManager)(nil).Pinner), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pinner", reflect.TypeOf((*MockManager)(nil).Pinner), arg0, arg1) + return &MockManagerPinnerCall{Call: call} +} + +// MockManagerPinnerCall wrap *gomock.Call +type MockManagerPinnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerPinnerCall) Return(arg0 lease.Pinner, arg1 error) *MockManagerPinnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerPinnerCall) Do(f func(string, string) (lease.Pinner, error)) *MockManagerPinnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerPinnerCall) DoAndReturn(f func(string, string) (lease.Pinner, error)) *MockManagerPinnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reader mocks base method. @@ -94,9 +166,33 @@ func (m *MockManager) Reader(arg0, arg1 string) (lease.Reader, error) { } // Reader indicates an expected call of Reader. -func (mr *MockManagerMockRecorder) Reader(arg0, arg1 any) *gomock.Call { +func (mr *MockManagerMockRecorder) Reader(arg0, arg1 any) *MockManagerReaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockManager)(nil).Reader), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockManager)(nil).Reader), arg0, arg1) + return &MockManagerReaderCall{Call: call} +} + +// MockManagerReaderCall wrap *gomock.Call +type MockManagerReaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerReaderCall) Return(arg0 lease.Reader, arg1 error) *MockManagerReaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerReaderCall) Do(f func(string, string) (lease.Reader, error)) *MockManagerReaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerReaderCall) DoAndReturn(f func(string, string) (lease.Reader, error)) *MockManagerReaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Revoker mocks base method. @@ -109,7 +205,31 @@ func (m *MockManager) Revoker(arg0, arg1 string) (lease.Revoker, error) { } // Revoker indicates an expected call of Revoker. -func (mr *MockManagerMockRecorder) Revoker(arg0, arg1 any) *gomock.Call { +func (mr *MockManagerMockRecorder) Revoker(arg0, arg1 any) *MockManagerRevokerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revoker", reflect.TypeOf((*MockManager)(nil).Revoker), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revoker", reflect.TypeOf((*MockManager)(nil).Revoker), arg0, arg1) + return &MockManagerRevokerCall{Call: call} +} + +// MockManagerRevokerCall wrap *gomock.Call +type MockManagerRevokerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockManagerRevokerCall) Return(arg0 lease.Revoker, arg1 error) *MockManagerRevokerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockManagerRevokerCall) Do(f func(string, string) (lease.Revoker, error)) *MockManagerRevokerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockManagerRevokerCall) DoAndReturn(f func(string, string) (lease.Revoker, error)) *MockManagerRevokerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/objectstore_mock_test.go b/internal/worker/objectstore/objectstore_mock_test.go index 2ed11cb5dd4..b432e59143b 100644 --- a/internal/worker/objectstore/objectstore_mock_test.go +++ b/internal/worker/objectstore/objectstore_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/internal/worker/objectstore TrackedObjectStore,MetadataServiceGetter,MetadataService,ModelClaimGetter,ControllerConfigService +// mockgen -typed -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/internal/worker/objectstore TrackedObjectStore,MetadataServiceGetter,MetadataService,ModelClaimGetter,ControllerConfigService // // Package objectstore is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockTrackedObjectStore) Get(arg0 context.Context, arg1 string) (io.Read } // Get indicates an expected call of Get. -func (mr *MockTrackedObjectStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) Get(arg0, arg1 any) *MockTrackedObjectStoreGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTrackedObjectStore)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTrackedObjectStore)(nil).Get), arg0, arg1) + return &MockTrackedObjectStoreGetCall{Call: call} +} + +// MockTrackedObjectStoreGetCall wrap *gomock.Call +type MockTrackedObjectStoreGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockTrackedObjectStoreGetCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockTrackedObjectStoreGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockTrackedObjectStoreGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -66,9 +90,33 @@ func (m *MockTrackedObjectStore) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockTrackedObjectStoreMockRecorder) Kill() *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) Kill() *MockTrackedObjectStoreKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedObjectStore)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedObjectStore)(nil).Kill)) + return &MockTrackedObjectStoreKillCall{Call: call} +} + +// MockTrackedObjectStoreKillCall wrap *gomock.Call +type MockTrackedObjectStoreKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStoreKillCall) Return() *MockTrackedObjectStoreKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStoreKillCall) Do(f func()) *MockTrackedObjectStoreKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStoreKillCall) DoAndReturn(f func()) *MockTrackedObjectStoreKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Put mocks base method. @@ -80,9 +128,33 @@ func (m *MockTrackedObjectStore) Put(arg0 context.Context, arg1 string, arg2 io. } // Put indicates an expected call of Put. -func (mr *MockTrackedObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockTrackedObjectStorePutCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockTrackedObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockTrackedObjectStore)(nil).Put), arg0, arg1, arg2, arg3) + return &MockTrackedObjectStorePutCall{Call: call} +} + +// MockTrackedObjectStorePutCall wrap *gomock.Call +type MockTrackedObjectStorePutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStorePutCall) Return(arg0 error) *MockTrackedObjectStorePutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) error) *MockTrackedObjectStorePutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) error) *MockTrackedObjectStorePutCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutAndCheckHash mocks base method. @@ -94,9 +166,33 @@ func (m *MockTrackedObjectStore) PutAndCheckHash(arg0 context.Context, arg1 stri } // PutAndCheckHash indicates an expected call of PutAndCheckHash. -func (mr *MockTrackedObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockTrackedObjectStorePutAndCheckHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockTrackedObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockTrackedObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4) + return &MockTrackedObjectStorePutAndCheckHashCall{Call: call} +} + +// MockTrackedObjectStorePutAndCheckHashCall wrap *gomock.Call +type MockTrackedObjectStorePutAndCheckHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStorePutAndCheckHashCall) Return(arg0 error) *MockTrackedObjectStorePutAndCheckHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) error) *MockTrackedObjectStorePutAndCheckHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) error) *MockTrackedObjectStorePutAndCheckHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Remove mocks base method. @@ -108,9 +204,33 @@ func (m *MockTrackedObjectStore) Remove(arg0 context.Context, arg1 string) error } // Remove indicates an expected call of Remove. -func (mr *MockTrackedObjectStoreMockRecorder) Remove(arg0, arg1 any) *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockTrackedObjectStoreRemoveCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockTrackedObjectStore)(nil).Remove), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockTrackedObjectStore)(nil).Remove), arg0, arg1) + return &MockTrackedObjectStoreRemoveCall{Call: call} +} + +// MockTrackedObjectStoreRemoveCall wrap *gomock.Call +type MockTrackedObjectStoreRemoveCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStoreRemoveCall) Return(arg0 error) *MockTrackedObjectStoreRemoveCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockTrackedObjectStoreRemoveCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockTrackedObjectStoreRemoveCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -122,9 +242,33 @@ func (m *MockTrackedObjectStore) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockTrackedObjectStoreMockRecorder) Wait() *gomock.Call { +func (mr *MockTrackedObjectStoreMockRecorder) Wait() *MockTrackedObjectStoreWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedObjectStore)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedObjectStore)(nil).Wait)) + return &MockTrackedObjectStoreWaitCall{Call: call} +} + +// MockTrackedObjectStoreWaitCall wrap *gomock.Call +type MockTrackedObjectStoreWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedObjectStoreWaitCall) Return(arg0 error) *MockTrackedObjectStoreWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedObjectStoreWaitCall) Do(f func() error) *MockTrackedObjectStoreWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedObjectStoreWaitCall) DoAndReturn(f func() error) *MockTrackedObjectStoreWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMetadataServiceGetter is a mock of MetadataServiceGetter interface. @@ -159,9 +303,33 @@ func (m *MockMetadataServiceGetter) ForModelUUID(arg0 string) MetadataService { } // ForModelUUID indicates an expected call of ForModelUUID. -func (mr *MockMetadataServiceGetterMockRecorder) ForModelUUID(arg0 any) *gomock.Call { +func (mr *MockMetadataServiceGetterMockRecorder) ForModelUUID(arg0 any) *MockMetadataServiceGetterForModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForModelUUID", reflect.TypeOf((*MockMetadataServiceGetter)(nil).ForModelUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForModelUUID", reflect.TypeOf((*MockMetadataServiceGetter)(nil).ForModelUUID), arg0) + return &MockMetadataServiceGetterForModelUUIDCall{Call: call} +} + +// MockMetadataServiceGetterForModelUUIDCall wrap *gomock.Call +type MockMetadataServiceGetterForModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetadataServiceGetterForModelUUIDCall) Return(arg0 MetadataService) *MockMetadataServiceGetterForModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetadataServiceGetterForModelUUIDCall) Do(f func(string) MetadataService) *MockMetadataServiceGetterForModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetadataServiceGetterForModelUUIDCall) DoAndReturn(f func(string) MetadataService) *MockMetadataServiceGetterForModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMetadataService is a mock of MetadataService interface. @@ -196,9 +364,33 @@ func (m *MockMetadataService) ObjectStore() objectstore.ObjectStoreMetadata { } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockMetadataServiceMockRecorder) ObjectStore() *gomock.Call { +func (mr *MockMetadataServiceMockRecorder) ObjectStore() *MockMetadataServiceObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockMetadataService)(nil).ObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockMetadataService)(nil).ObjectStore)) + return &MockMetadataServiceObjectStoreCall{Call: call} +} + +// MockMetadataServiceObjectStoreCall wrap *gomock.Call +type MockMetadataServiceObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMetadataServiceObjectStoreCall) Return(arg0 objectstore.ObjectStoreMetadata) *MockMetadataServiceObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMetadataServiceObjectStoreCall) Do(f func() objectstore.ObjectStoreMetadata) *MockMetadataServiceObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMetadataServiceObjectStoreCall) DoAndReturn(f func() objectstore.ObjectStoreMetadata) *MockMetadataServiceObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelClaimGetter is a mock of ModelClaimGetter interface. @@ -234,9 +426,33 @@ func (m *MockModelClaimGetter) ForModelUUID(arg0 string) (objectstore0.Claimer, } // ForModelUUID indicates an expected call of ForModelUUID. -func (mr *MockModelClaimGetterMockRecorder) ForModelUUID(arg0 any) *gomock.Call { +func (mr *MockModelClaimGetterMockRecorder) ForModelUUID(arg0 any) *MockModelClaimGetterForModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForModelUUID", reflect.TypeOf((*MockModelClaimGetter)(nil).ForModelUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForModelUUID", reflect.TypeOf((*MockModelClaimGetter)(nil).ForModelUUID), arg0) + return &MockModelClaimGetterForModelUUIDCall{Call: call} +} + +// MockModelClaimGetterForModelUUIDCall wrap *gomock.Call +type MockModelClaimGetterForModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelClaimGetterForModelUUIDCall) Return(arg0 objectstore0.Claimer, arg1 error) *MockModelClaimGetterForModelUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelClaimGetterForModelUUIDCall) Do(f func(string) (objectstore0.Claimer, error)) *MockModelClaimGetterForModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelClaimGetterForModelUUIDCall) DoAndReturn(f func(string) (objectstore0.Claimer, error)) *MockModelClaimGetterForModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerConfigService is a mock of ControllerConfigService interface. @@ -272,7 +488,31 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstore/package_test.go b/internal/worker/objectstore/package_test.go index 3b905dbb0e4..342092a0464 100644 --- a/internal/worker/objectstore/package_test.go +++ b/internal/worker/objectstore/package_test.go @@ -15,12 +15,12 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/internal/worker/objectstore TrackedObjectStore,MetadataServiceGetter,MetadataService,ModelClaimGetter,ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination claimer_mock_test.go github.com/juju/juju/internal/objectstore Claimer -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination lease_mock_test.go github.com/juju/juju/core/lease Manager -//go:generate go run go.uber.org/mock/mockgen -package objectstore -destination client_mock_test.go github.com/juju/juju/core/objectstore Client,Session +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination objectstore_mock_test.go github.com/juju/juju/internal/worker/objectstore TrackedObjectStore,MetadataServiceGetter,MetadataService,ModelClaimGetter,ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination claimer_mock_test.go github.com/juju/juju/internal/objectstore Claimer +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination lease_mock_test.go github.com/juju/juju/core/lease Manager +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstore -destination client_mock_test.go github.com/juju/juju/core/objectstore Client,Session func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/objectstores3caller/clock_mocks_test.go b/internal/worker/objectstores3caller/clock_mocks_test.go index 63b0591ba94..a063d6a068c 100644 --- a/internal/worker/objectstores3caller/clock_mocks_test.go +++ b/internal/worker/objectstores3caller/clock_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstores3caller -destination clock_mocks_test.go github.com/juju/clock Clock +// mockgen -typed -package objectstores3caller -destination clock_mocks_test.go github.com/juju/clock Clock // // Package objectstores3caller is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstores3caller/http_mocks_test.go b/internal/worker/objectstores3caller/http_mocks_test.go index 69a4fd7a5fc..13f3489e6a6 100644 --- a/internal/worker/objectstores3caller/http_mocks_test.go +++ b/internal/worker/objectstores3caller/http_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstores3caller -destination http_mocks_test.go github.com/juju/juju/internal/s3client HTTPClient +// mockgen -typed -package objectstores3caller -destination http_mocks_test.go github.com/juju/juju/internal/s3client HTTPClient // // Package objectstores3caller is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockHTTPClient) Do(arg0 *http.Request) (*http.Response, error) { } // Do indicates an expected call of Do. -func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Do(arg0 any) *MockHTTPClientDoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHTTPClient)(nil).Do), arg0) + return &MockHTTPClientDoCall{Call: call} +} + +// MockHTTPClientDoCall wrap *gomock.Call +type MockHTTPClientDoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockHTTPClientDoCall) Return(arg0 *http.Response, arg1 error) *MockHTTPClientDoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockHTTPClientDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockHTTPClientDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockHTTPClientDoCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstores3caller/package_mock_test.go b/internal/worker/objectstores3caller/package_mock_test.go index b20a54a3042..4a48c8a0414 100644 --- a/internal/worker/objectstores3caller/package_mock_test.go +++ b/internal/worker/objectstores3caller/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstores3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Client,Session +// mockgen -typed -package objectstores3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Client,Session // // Package objectstores3caller is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockClient) Session(arg0 context.Context, arg1 func(context.Context, ob } // Session indicates an expected call of Session. -func (mr *MockClientMockRecorder) Session(arg0, arg1 any) *gomock.Call { +func (mr *MockClientMockRecorder) Session(arg0, arg1 any) *MockClientSessionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Session", reflect.TypeOf((*MockClient)(nil).Session), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Session", reflect.TypeOf((*MockClient)(nil).Session), arg0, arg1) + return &MockClientSessionCall{Call: call} +} + +// MockClientSessionCall wrap *gomock.Call +type MockClientSessionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientSessionCall) Return(arg0 error) *MockClientSessionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientSessionCall) Do(f func(context.Context, func(context.Context, objectstore.Session) error) error) *MockClientSessionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientSessionCall) DoAndReturn(f func(context.Context, func(context.Context, objectstore.Session) error) error) *MockClientSessionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSession is a mock of Session interface. @@ -87,9 +111,33 @@ func (m *MockSession) CreateBucket(arg0 context.Context, arg1 string) error { } // CreateBucket indicates an expected call of CreateBucket. -func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *MockSessionCreateBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + return &MockSessionCreateBucketCall{Call: call} +} + +// MockSessionCreateBucketCall wrap *gomock.Call +type MockSessionCreateBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionCreateBucketCall) Return(arg0 error) *MockSessionCreateBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionCreateBucketCall) Do(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionCreateBucketCall) DoAndReturn(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteObject mocks base method. @@ -101,9 +149,33 @@ func (m *MockSession) DeleteObject(arg0 context.Context, arg1, arg2 string) erro } // DeleteObject indicates an expected call of DeleteObject. -func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *MockSessionDeleteObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + return &MockSessionDeleteObjectCall{Call: call} +} + +// MockSessionDeleteObjectCall wrap *gomock.Call +type MockSessionDeleteObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionDeleteObjectCall) Return(arg0 error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionDeleteObjectCall) Do(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionDeleteObjectCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObject mocks base method. @@ -118,9 +190,33 @@ func (m *MockSession) GetObject(arg0 context.Context, arg1, arg2 string) (io.Rea } // GetObject indicates an expected call of GetObject. -func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *MockSessionGetObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + return &MockSessionGetObjectCall{Call: call} +} + +// MockSessionGetObjectCall wrap *gomock.Call +type MockSessionGetObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionGetObjectCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 string, arg3 error) *MockSessionGetObjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionGetObjectCall) Do(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionGetObjectCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListObjects mocks base method. @@ -133,9 +229,33 @@ func (m *MockSession) ListObjects(arg0 context.Context, arg1 string) ([]string, } // ListObjects indicates an expected call of ListObjects. -func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *MockSessionListObjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + return &MockSessionListObjectsCall{Call: call} +} + +// MockSessionListObjectsCall wrap *gomock.Call +type MockSessionListObjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionListObjectsCall) Return(arg0 []string, arg1 error) *MockSessionListObjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionListObjectsCall) Do(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionListObjectsCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectExists mocks base method. @@ -147,9 +267,33 @@ func (m *MockSession) ObjectExists(arg0 context.Context, arg1, arg2 string) erro } // ObjectExists indicates an expected call of ObjectExists. -func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *MockSessionObjectExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + return &MockSessionObjectExistsCall{Call: call} +} + +// MockSessionObjectExistsCall wrap *gomock.Call +type MockSessionObjectExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionObjectExistsCall) Return(arg0 error) *MockSessionObjectExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionObjectExistsCall) Do(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionObjectExistsCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutObject mocks base method. @@ -161,7 +305,31 @@ func (m *MockSession) PutObject(arg0 context.Context, arg1, arg2 string, arg3 io } // PutObject indicates an expected call of PutObject. -func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *MockSessionPutObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + return &MockSessionPutObjectCall{Call: call} +} + +// MockSessionPutObjectCall wrap *gomock.Call +type MockSessionPutObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionPutObjectCall) Return(arg0 error) *MockSessionPutObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionPutObjectCall) Do(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionPutObjectCall) DoAndReturn(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/objectstores3caller/package_test.go b/internal/worker/objectstores3caller/package_test.go index 030ceeb38fc..8682dba32f7 100644 --- a/internal/worker/objectstores3caller/package_test.go +++ b/internal/worker/objectstores3caller/package_test.go @@ -17,10 +17,10 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package objectstores3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Client,Session -//go:generate go run go.uber.org/mock/mockgen -package objectstores3caller -destination services_mocks_test.go github.com/juju/juju/internal/worker/objectstores3caller ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package objectstores3caller -destination http_mocks_test.go github.com/juju/juju/internal/s3client HTTPClient -//go:generate go run go.uber.org/mock/mockgen -package objectstores3caller -destination clock_mocks_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstores3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Client,Session +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstores3caller -destination services_mocks_test.go github.com/juju/juju/internal/worker/objectstores3caller ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstores3caller -destination http_mocks_test.go github.com/juju/juju/internal/s3client HTTPClient +//go:generate go run go.uber.org/mock/mockgen -typed -package objectstores3caller -destination clock_mocks_test.go github.com/juju/clock Clock func TestPackage(t *testing.T) { defer goleak.VerifyNone(t) @@ -61,7 +61,7 @@ func (s *baseSuite) expectClock() { } func (s *baseSuite) expectTimeAfter() { - s.clock.EXPECT().After(gomock.Any()).DoAndReturn(func(_ interface{}) <-chan time.Time { + s.clock.EXPECT().After(gomock.Any()).DoAndReturn(func(_ time.Duration) <-chan time.Time { ch := make(chan time.Time) close(ch) return ch diff --git a/internal/worker/objectstores3caller/services_mocks_test.go b/internal/worker/objectstores3caller/services_mocks_test.go index e257f2c4272..28cec5e2c4f 100644 --- a/internal/worker/objectstores3caller/services_mocks_test.go +++ b/internal/worker/objectstores3caller/services_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package objectstores3caller -destination services_mocks_test.go github.com/juju/juju/internal/worker/objectstores3caller ControllerConfigService +// mockgen -typed -package objectstores3caller -destination services_mocks_test.go github.com/juju/juju/internal/worker/objectstores3caller ControllerConfigService // // Package objectstores3caller is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockControllerConfigService) Watch() (watcher.Watcher[[]string], error) } // Watch indicates an expected call of Watch. -func (mr *MockControllerConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) Watch() *MockControllerConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + return &MockControllerConfigServiceWatchCall{Call: call} +} + +// MockControllerConfigServiceWatchCall wrap *gomock.Call +type MockControllerConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/peergrouper/controllerconfig_mock_test.go b/internal/worker/peergrouper/controllerconfig_mock_test.go index c202c5acb25..3d0e9f50fa6 100644 --- a/internal/worker/peergrouper/controllerconfig_mock_test.go +++ b/internal/worker/peergrouper/controllerconfig_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package peergrouper -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/peergrouper ControllerConfigService +// mockgen -typed -package peergrouper -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/peergrouper ControllerConfigService // // Package peergrouper is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockControllerConfigService) ControllerConfig(arg0 context.Context) (co } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) ControllerConfig(arg0 any) *MockControllerConfigServiceControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerConfigService)(nil).ControllerConfig), arg0) + return &MockControllerConfigServiceControllerConfigCall{Call: call} +} + +// MockControllerConfigServiceControllerConfigCall wrap *gomock.Call +type MockControllerConfigServiceControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceControllerConfigCall) Do(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceControllerConfigCall) DoAndReturn(f func(context.Context) (controller.Config, error)) *MockControllerConfigServiceControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -66,7 +90,31 @@ func (m *MockControllerConfigService) Watch() (watcher.Watcher[[]string], error) } // Watch indicates an expected call of Watch. -func (mr *MockControllerConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockControllerConfigServiceMockRecorder) Watch() *MockControllerConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockControllerConfigService)(nil).Watch)) + return &MockControllerConfigServiceWatchCall{Call: call} +} + +// MockControllerConfigServiceWatchCall wrap *gomock.Call +type MockControllerConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockControllerConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/peergrouper/manifold_test.go b/internal/worker/peergrouper/manifold_test.go index 516edf96e03..7dc965755a7 100644 --- a/internal/worker/peergrouper/manifold_test.go +++ b/internal/worker/peergrouper/manifold_test.go @@ -116,8 +116,6 @@ func (s *ManifoldSuite) TestMissingInputs(c *gc.C) { func (s *ManifoldSuite) TestStart(c *gc.C) { w := s.startWorkerClean(c) workertest.CleanKill(c, w) - s.controllerServiceFactory.EXPECT().ControllerConfig().Return(s.controllerConfigService).AnyTimes() - s.controllerConfigService.EXPECT().ControllerConfig(gomock.Any()).Return(mockControllerConfig{}) s.stub.CheckCallNames(c, "NewWorker") args := s.stub.Calls()[0].Args c.Assert(args, gc.HasLen, 1) @@ -205,20 +203,6 @@ func (c *mockAgentConfig) StateServingInfo() (controller.StateServingInfo, bool) return controller.StateServingInfo{}, false } -type mockControllerConfig map[string]any - -func (c mockControllerConfig) StatePort() int { - return 0 -} - -func (c mockControllerConfig) APIPort() int { - return 0 -} - -func (c mockControllerConfig) ControllerAPIPort() int { - return 0 -} - type mockHub struct { peergrouper.Hub } diff --git a/internal/worker/peergrouper/package_test.go b/internal/worker/peergrouper/package_test.go index 6524015b39a..98c11542b1a 100644 --- a/internal/worker/peergrouper/package_test.go +++ b/internal/worker/peergrouper/package_test.go @@ -9,8 +9,8 @@ import ( "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package peergrouper -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/peergrouper ControllerConfigService -//go:generate go run go.uber.org/mock/mockgen -package peergrouper -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package peergrouper -destination controllerconfig_mock_test.go github.com/juju/juju/internal/worker/peergrouper ControllerConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package peergrouper -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory func TestPackage(t *stdtesting.T) { testing.MgoTestPackage(t) diff --git a/internal/worker/peergrouper/service_mock_test.go b/internal/worker/peergrouper/service_mock_test.go index ec89a1b990f..56167482f6d 100644 --- a/internal/worker/peergrouper/service_mock_test.go +++ b/internal/worker/peergrouper/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package peergrouper -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory +// mockgen -typed -package peergrouper -destination service_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory // // Package peergrouper is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockControllerServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockControllerServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Access() *MockControllerServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + return &MockControllerServiceFactoryAccessCall{Call: call} +} + +// MockControllerServiceFactoryAccessCall wrap *gomock.Call +type MockControllerServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAccessCall) Return(arg0 *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAccessCall) Do(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -74,9 +98,33 @@ func (m *MockControllerServiceFactory) AgentObjectStore() *service9.WatchableSer } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *MockControllerServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + return &MockControllerServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockControllerServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockControllerServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Return(arg0 *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Do(f func() *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -88,9 +136,33 @@ func (m *MockControllerServiceFactory) AutocertCache() *service0.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *MockControllerServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + return &MockControllerServiceFactoryAutocertCacheCall{Call: call} +} + +// MockControllerServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockControllerServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAutocertCacheCall) Return(arg0 *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAutocertCacheCall) Do(f func() *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -102,9 +174,33 @@ func (m *MockControllerServiceFactory) Cloud() *service1.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *MockControllerServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + return &MockControllerServiceFactoryCloudCall{Call: call} +} + +// MockControllerServiceFactoryCloudCall wrap *gomock.Call +type MockControllerServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCloudCall) Return(arg0 *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCloudCall) Do(f func() *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCloudCall) DoAndReturn(f func() *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -116,9 +212,33 @@ func (m *MockControllerServiceFactory) ControllerConfig() *service2.WatchableSer } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *MockControllerServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + return &MockControllerServiceFactoryControllerConfigCall{Call: call} +} + +// MockControllerServiceFactoryControllerConfigCall wrap *gomock.Call +type MockControllerServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerConfigCall) Return(arg0 *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerConfigCall) Do(f func() *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerConfigCall) DoAndReturn(f func() *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -130,9 +250,33 @@ func (m *MockControllerServiceFactory) ControllerNode() *service3.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *MockControllerServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + return &MockControllerServiceFactoryControllerNodeCall{Call: call} +} + +// MockControllerServiceFactoryControllerNodeCall wrap *gomock.Call +type MockControllerServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerNodeCall) Return(arg0 *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerNodeCall) Do(f func() *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerNodeCall) DoAndReturn(f func() *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -144,9 +288,33 @@ func (m *MockControllerServiceFactory) Credential() *service4.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockControllerServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Credential() *MockControllerServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + return &MockControllerServiceFactoryCredentialCall{Call: call} +} + +// MockControllerServiceFactoryCredentialCall wrap *gomock.Call +type MockControllerServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCredentialCall) Return(arg0 *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCredentialCall) Do(f func() *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCredentialCall) DoAndReturn(f func() *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -158,9 +326,33 @@ func (m *MockControllerServiceFactory) ExternalController() *service5.WatchableS } // ExternalController indicates an expected call of ExternalController. -func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *MockControllerServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + return &MockControllerServiceFactoryExternalControllerCall{Call: call} +} + +// MockControllerServiceFactoryExternalControllerCall wrap *gomock.Call +type MockControllerServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryExternalControllerCall) Return(arg0 *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryExternalControllerCall) Do(f func() *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryExternalControllerCall) DoAndReturn(f func() *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -172,9 +364,33 @@ func (m *MockControllerServiceFactory) Flag() *service6.Service { } // Flag indicates an expected call of Flag. -func (mr *MockControllerServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Flag() *MockControllerServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + return &MockControllerServiceFactoryFlagCall{Call: call} +} + +// MockControllerServiceFactoryFlagCall wrap *gomock.Call +type MockControllerServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryFlagCall) Return(arg0 *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryFlagCall) Do(f func() *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryFlagCall) DoAndReturn(f func() *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -186,9 +402,33 @@ func (m *MockControllerServiceFactory) Model() *service7.Service { } // Model indicates an expected call of Model. -func (mr *MockControllerServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Model() *MockControllerServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + return &MockControllerServiceFactoryModelCall{Call: call} +} + +// MockControllerServiceFactoryModelCall wrap *gomock.Call +type MockControllerServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelCall) Return(arg0 *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelCall) Do(f func() *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelCall) DoAndReturn(f func() *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -200,9 +440,33 @@ func (m *MockControllerServiceFactory) ModelDefaults() *service8.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *MockControllerServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + return &MockControllerServiceFactoryModelDefaultsCall{Call: call} +} + +// MockControllerServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockControllerServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelDefaultsCall) Return(arg0 *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelDefaultsCall) Do(f func() *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -214,9 +478,33 @@ func (m *MockControllerServiceFactory) SecretBackend() *service10.WatchableServi } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *MockControllerServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + return &MockControllerServiceFactorySecretBackendCall{Call: call} +} + +// MockControllerServiceFactorySecretBackendCall wrap *gomock.Call +type MockControllerServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactorySecretBackendCall) Return(arg0 *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactorySecretBackendCall) Do(f func() *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactorySecretBackendCall) DoAndReturn(f func() *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -228,7 +516,31 @@ func (m *MockControllerServiceFactory) Upgrade() *service11.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *MockControllerServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + return &MockControllerServiceFactoryUpgradeCall{Call: call} +} + +// MockControllerServiceFactoryUpgradeCall wrap *gomock.Call +type MockControllerServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryUpgradeCall) Return(arg0 *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryUpgradeCall) Do(f func() *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryUpgradeCall) DoAndReturn(f func() *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providerservicefactory/changestream_mock_test.go b/internal/worker/providerservicefactory/changestream_mock_test.go index 0401a98f4de..3632c40c41e 100644 --- a/internal/worker/providerservicefactory/changestream_mock_test.go +++ b/internal/worker/providerservicefactory/changestream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providerservicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter +// mockgen -typed -package providerservicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter // // Package providerservicefactory is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockWatchableDBGetter) GetWatchableDB(arg0 string) (changestream.Watcha } // GetWatchableDB indicates an expected call of GetWatchableDB. -func (mr *MockWatchableDBGetterMockRecorder) GetWatchableDB(arg0 any) *gomock.Call { +func (mr *MockWatchableDBGetterMockRecorder) GetWatchableDB(arg0 any) *MockWatchableDBGetterGetWatchableDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWatchableDB", reflect.TypeOf((*MockWatchableDBGetter)(nil).GetWatchableDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWatchableDB", reflect.TypeOf((*MockWatchableDBGetter)(nil).GetWatchableDB), arg0) + return &MockWatchableDBGetterGetWatchableDBCall{Call: call} +} + +// MockWatchableDBGetterGetWatchableDBCall wrap *gomock.Call +type MockWatchableDBGetterGetWatchableDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBGetterGetWatchableDBCall) Return(arg0 changestream.WatchableDB, arg1 error) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBGetterGetWatchableDBCall) Do(f func(string) (changestream.WatchableDB, error)) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBGetterGetWatchableDBCall) DoAndReturn(f func(string) (changestream.WatchableDB, error)) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providerservicefactory/logger_mock_test.go b/internal/worker/providerservicefactory/logger_mock_test.go index f7e4b29f03d..452747f62a6 100644 --- a/internal/worker/providerservicefactory/logger_mock_test.go +++ b/internal/worker/providerservicefactory/logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providerservicefactory -destination logger_mock_test.go github.com/juju/juju/internal/worker/providerservicefactory Logger +// mockgen -typed -package providerservicefactory -destination logger_mock_test.go github.com/juju/juju/internal/worker/providerservicefactory Logger // // Package providerservicefactory is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -66,10 +90,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -83,10 +131,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -100,10 +172,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -117,8 +213,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providerservicefactory/package_test.go b/internal/worker/providerservicefactory/package_test.go index 976ce939be9..a66817ff3cb 100644 --- a/internal/worker/providerservicefactory/package_test.go +++ b/internal/worker/providerservicefactory/package_test.go @@ -12,9 +12,9 @@ import ( domaintesting "github.com/juju/juju/domain/schema/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package providerservicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ProviderServiceFactory,ProviderServiceFactoryGetter -//go:generate go run go.uber.org/mock/mockgen -package providerservicefactory -destination logger_mock_test.go github.com/juju/juju/internal/worker/providerservicefactory Logger -//go:generate go run go.uber.org/mock/mockgen -package providerservicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package providerservicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ProviderServiceFactory,ProviderServiceFactoryGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package providerservicefactory -destination logger_mock_test.go github.com/juju/juju/internal/worker/providerservicefactory Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package providerservicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/providerservicefactory/servicefactory_mock_test.go b/internal/worker/providerservicefactory/servicefactory_mock_test.go index 06ea80c5a3f..87f63f9c47a 100644 --- a/internal/worker/providerservicefactory/servicefactory_mock_test.go +++ b/internal/worker/providerservicefactory/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providerservicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ProviderServiceFactory,ProviderServiceFactoryGetter +// mockgen -typed -package providerservicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ProviderServiceFactory,ProviderServiceFactoryGetter // // Package providerservicefactory is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockProviderServiceFactory) Cloud() *service.WatchableProviderService { } // Cloud indicates an expected call of Cloud. -func (mr *MockProviderServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockProviderServiceFactoryMockRecorder) Cloud() *MockProviderServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockProviderServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockProviderServiceFactory)(nil).Cloud)) + return &MockProviderServiceFactoryCloudCall{Call: call} +} + +// MockProviderServiceFactoryCloudCall wrap *gomock.Call +type MockProviderServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderServiceFactoryCloudCall) Return(arg0 *service.WatchableProviderService) *MockProviderServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderServiceFactoryCloudCall) Do(f func() *service.WatchableProviderService) *MockProviderServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderServiceFactoryCloudCall) DoAndReturn(f func() *service.WatchableProviderService) *MockProviderServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -66,9 +90,33 @@ func (m *MockProviderServiceFactory) Config() *service2.WatchableProviderService } // Config indicates an expected call of Config. -func (mr *MockProviderServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockProviderServiceFactoryMockRecorder) Config() *MockProviderServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProviderServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProviderServiceFactory)(nil).Config)) + return &MockProviderServiceFactoryConfigCall{Call: call} +} + +// MockProviderServiceFactoryConfigCall wrap *gomock.Call +type MockProviderServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderServiceFactoryConfigCall) Return(arg0 *service2.WatchableProviderService) *MockProviderServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderServiceFactoryConfigCall) Do(f func() *service2.WatchableProviderService) *MockProviderServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderServiceFactoryConfigCall) DoAndReturn(f func() *service2.WatchableProviderService) *MockProviderServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -80,9 +128,33 @@ func (m *MockProviderServiceFactory) Credential() *service0.WatchableProviderSer } // Credential indicates an expected call of Credential. -func (mr *MockProviderServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockProviderServiceFactoryMockRecorder) Credential() *MockProviderServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockProviderServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockProviderServiceFactory)(nil).Credential)) + return &MockProviderServiceFactoryCredentialCall{Call: call} +} + +// MockProviderServiceFactoryCredentialCall wrap *gomock.Call +type MockProviderServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderServiceFactoryCredentialCall) Return(arg0 *service0.WatchableProviderService) *MockProviderServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderServiceFactoryCredentialCall) Do(f func() *service0.WatchableProviderService) *MockProviderServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderServiceFactoryCredentialCall) DoAndReturn(f func() *service0.WatchableProviderService) *MockProviderServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -94,9 +166,33 @@ func (m *MockProviderServiceFactory) Model() *service1.ProviderService { } // Model indicates an expected call of Model. -func (mr *MockProviderServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockProviderServiceFactoryMockRecorder) Model() *MockProviderServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockProviderServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockProviderServiceFactory)(nil).Model)) + return &MockProviderServiceFactoryModelCall{Call: call} +} + +// MockProviderServiceFactoryModelCall wrap *gomock.Call +type MockProviderServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderServiceFactoryModelCall) Return(arg0 *service1.ProviderService) *MockProviderServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderServiceFactoryModelCall) Do(f func() *service1.ProviderService) *MockProviderServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderServiceFactoryModelCall) DoAndReturn(f func() *service1.ProviderService) *MockProviderServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProviderServiceFactoryGetter is a mock of ProviderServiceFactoryGetter interface. @@ -131,7 +227,31 @@ func (m *MockProviderServiceFactoryGetter) FactoryForModel(arg0 string) servicef } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockProviderServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockProviderServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockProviderServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockProviderServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockProviderServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockProviderServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockProviderServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockProviderServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderServiceFactoryGetterFactoryForModelCall) Return(arg0 servicefactory.ProviderServiceFactory) *MockProviderServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderServiceFactoryGetterFactoryForModelCall) Do(f func(string) servicefactory.ProviderServiceFactory) *MockProviderServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) servicefactory.ProviderServiceFactory) *MockProviderServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providertracker/caas_mock_test.go b/internal/worker/providertracker/caas_mock_test.go index c771ef85428..32181331885 100644 --- a/internal/worker/providertracker/caas_mock_test.go +++ b/internal/worker/providertracker/caas_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providertracker -destination caas_mock_test.go github.com/juju/juju/caas Broker +// mockgen -typed -package providertracker -destination caas_mock_test.go github.com/juju/juju/caas Broker // // Package providertracker is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockBroker) APIVersion() (string, error) { } // APIVersion indicates an expected call of APIVersion. -func (mr *MockBrokerMockRecorder) APIVersion() *gomock.Call { +func (mr *MockBrokerMockRecorder) APIVersion() *MockBrokerAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockBroker)(nil).APIVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockBroker)(nil).APIVersion)) + return &MockBrokerAPIVersionCall{Call: call} +} + +// MockBrokerAPIVersionCall wrap *gomock.Call +type MockBrokerAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAPIVersionCall) Return(arg0 string, arg1 error) *MockBrokerAPIVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAPIVersionCall) Do(f func() (string, error)) *MockBrokerAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAPIVersionCall) DoAndReturn(f func() (string, error)) *MockBrokerAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AdoptResources mocks base method. @@ -74,9 +98,33 @@ func (m *MockBroker) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 st } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockBrokerMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockBrokerAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockBroker)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockBroker)(nil).AdoptResources), arg0, arg1, arg2) + return &MockBrokerAdoptResourcesCall{Call: call} +} + +// MockBrokerAdoptResourcesCall wrap *gomock.Call +type MockBrokerAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAdoptResourcesCall) Return(arg0 error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockBrokerAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AnnotateUnit mocks base method. @@ -88,9 +136,33 @@ func (m *MockBroker) AnnotateUnit(arg0 context.Context, arg1, arg2 string, arg3 } // AnnotateUnit indicates an expected call of AnnotateUnit. -func (mr *MockBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) AnnotateUnit(arg0, arg1, arg2, arg3 any) *MockBrokerAnnotateUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateUnit", reflect.TypeOf((*MockBroker)(nil).AnnotateUnit), arg0, arg1, arg2, arg3) + return &MockBrokerAnnotateUnitCall{Call: call} +} + +// MockBrokerAnnotateUnitCall wrap *gomock.Call +type MockBrokerAnnotateUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerAnnotateUnitCall) Return(arg0 error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerAnnotateUnitCall) Do(f func(context.Context, string, string, names.UnitTag) error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerAnnotateUnitCall) DoAndReturn(f func(context.Context, string, string, names.UnitTag) error) *MockBrokerAnnotateUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -102,9 +174,33 @@ func (m *MockBroker) Application(arg0 string, arg1 caas.DeploymentType) caas.App } // Application indicates an expected call of Application. -func (mr *MockBrokerMockRecorder) Application(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Application(arg0, arg1 any) *MockBrokerApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBroker)(nil).Application), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockBroker)(nil).Application), arg0, arg1) + return &MockBrokerApplicationCall{Call: call} +} + +// MockBrokerApplicationCall wrap *gomock.Call +type MockBrokerApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerApplicationCall) Return(arg0 caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerApplicationCall) Do(f func(string, caas.DeploymentType) caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerApplicationCall) DoAndReturn(f func(string, caas.DeploymentType) caas.Application) *MockBrokerApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -117,9 +213,33 @@ func (m *MockBroker) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext.P } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockBrokerMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockBrokerBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBroker)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockBroker)(nil).Bootstrap), arg0, arg1, arg2) + return &MockBrokerBootstrapCall{Call: call} +} + +// MockBrokerBootstrapCall wrap *gomock.Call +type MockBrokerBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockBrokerBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBrokerBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockBrokerBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CheckCloudCredentials mocks base method. @@ -131,9 +251,33 @@ func (m *MockBroker) CheckCloudCredentials(arg0 context.Context) error { } // CheckCloudCredentials indicates an expected call of CheckCloudCredentials. -func (mr *MockBrokerMockRecorder) CheckCloudCredentials(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) CheckCloudCredentials(arg0 any) *MockBrokerCheckCloudCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCloudCredentials", reflect.TypeOf((*MockBroker)(nil).CheckCloudCredentials), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCloudCredentials", reflect.TypeOf((*MockBroker)(nil).CheckCloudCredentials), arg0) + return &MockBrokerCheckCloudCredentialsCall{Call: call} +} + +// MockBrokerCheckCloudCredentialsCall wrap *gomock.Call +type MockBrokerCheckCloudCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerCheckCloudCredentialsCall) Return(arg0 error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerCheckCloudCredentialsCall) Do(f func(context.Context) error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerCheckCloudCredentialsCall) DoAndReturn(f func(context.Context) error) *MockBrokerCheckCloudCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -145,9 +289,33 @@ func (m *MockBroker) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockBrokerMockRecorder) Config() *gomock.Call { +func (mr *MockBrokerMockRecorder) Config() *MockBrokerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBroker)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockBroker)(nil).Config)) + return &MockBrokerConfigCall{Call: call} +} + +// MockBrokerConfigCall wrap *gomock.Call +type MockBrokerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerConfigCall) Return(arg0 *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerConfigCall) Do(f func() *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerConfigCall) DoAndReturn(f func() *config.Config) *MockBrokerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -160,9 +328,33 @@ func (m *MockBroker) ConstraintsValidator(arg0 envcontext.ProviderCallContext) ( } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockBrokerMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ConstraintsValidator(arg0 any) *MockBrokerConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBroker)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockBroker)(nil).ConstraintsValidator), arg0) + return &MockBrokerConstraintsValidatorCall{Call: call} +} + +// MockBrokerConstraintsValidatorCall wrap *gomock.Call +type MockBrokerConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockBrokerConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -174,9 +366,33 @@ func (m *MockBroker) Create(arg0 envcontext.ProviderCallContext, arg1 environs.C } // Create indicates an expected call of Create. -func (mr *MockBrokerMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Create(arg0, arg1 any) *MockBrokerCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBroker)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBroker)(nil).Create), arg0, arg1) + return &MockBrokerCreateCall{Call: call} +} + +// MockBrokerCreateCall wrap *gomock.Call +type MockBrokerCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerCreateCall) Return(arg0 error) *MockBrokerCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBrokerCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockBrokerCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteJujuSecret mocks base method. @@ -188,9 +404,33 @@ func (m *MockBroker) DeleteJujuSecret(arg0 context.Context, arg1 string) error { } // DeleteJujuSecret indicates an expected call of DeleteJujuSecret. -func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) DeleteJujuSecret(arg0, arg1 any) *MockBrokerDeleteJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteJujuSecret", reflect.TypeOf((*MockBroker)(nil).DeleteJujuSecret), arg0, arg1) + return &MockBrokerDeleteJujuSecretCall{Call: call} +} + +// MockBrokerDeleteJujuSecretCall wrap *gomock.Call +type MockBrokerDeleteJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDeleteJujuSecretCall) Return(arg0 error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDeleteJujuSecretCall) Do(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDeleteJujuSecretCall) DoAndReturn(f func(context.Context, string) error) *MockBrokerDeleteJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -202,9 +442,33 @@ func (m *MockBroker) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockBrokerMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Destroy(arg0 any) *MockBrokerDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBroker)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockBroker)(nil).Destroy), arg0) + return &MockBrokerDestroyCall{Call: call} +} + +// MockBrokerDestroyCall wrap *gomock.Call +type MockBrokerDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDestroyCall) Return(arg0 error) *MockBrokerDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockBrokerDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockBrokerDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -216,9 +480,33 @@ func (m *MockBroker) DestroyController(arg0 envcontext.ProviderCallContext, arg1 } // DestroyController indicates an expected call of DestroyController. -func (mr *MockBrokerMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) DestroyController(arg0, arg1 any) *MockBrokerDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBroker)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockBroker)(nil).DestroyController), arg0, arg1) + return &MockBrokerDestroyControllerCall{Call: call} +} + +// MockBrokerDestroyControllerCall wrap *gomock.Call +type MockBrokerDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerDestroyControllerCall) Return(arg0 error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockBrokerDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureImageRepoSecret mocks base method. @@ -230,9 +518,33 @@ func (m *MockBroker) EnsureImageRepoSecret(arg0 context.Context, arg1 docker.Ima } // EnsureImageRepoSecret indicates an expected call of EnsureImageRepoSecret. -func (mr *MockBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureImageRepoSecret(arg0, arg1 any) *MockBrokerEnsureImageRepoSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureImageRepoSecret", reflect.TypeOf((*MockBroker)(nil).EnsureImageRepoSecret), arg0, arg1) + return &MockBrokerEnsureImageRepoSecretCall{Call: call} +} + +// MockBrokerEnsureImageRepoSecretCall wrap *gomock.Call +type MockBrokerEnsureImageRepoSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureImageRepoSecretCall) Return(arg0 error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureImageRepoSecretCall) Do(f func(context.Context, docker.ImageRepoDetails) error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureImageRepoSecretCall) DoAndReturn(f func(context.Context, docker.ImageRepoDetails) error) *MockBrokerEnsureImageRepoSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureModelOperator mocks base method. @@ -244,9 +556,33 @@ func (m *MockBroker) EnsureModelOperator(arg0 context.Context, arg1, arg2 string } // EnsureModelOperator indicates an expected call of EnsureModelOperator. -func (mr *MockBrokerMockRecorder) EnsureModelOperator(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureModelOperator(arg0, arg1, arg2, arg3 any) *MockBrokerEnsureModelOperatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureModelOperator", reflect.TypeOf((*MockBroker)(nil).EnsureModelOperator), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureModelOperator", reflect.TypeOf((*MockBroker)(nil).EnsureModelOperator), arg0, arg1, arg2, arg3) + return &MockBrokerEnsureModelOperatorCall{Call: call} +} + +// MockBrokerEnsureModelOperatorCall wrap *gomock.Call +type MockBrokerEnsureModelOperatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureModelOperatorCall) Return(arg0 error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureModelOperatorCall) Do(f func(context.Context, string, string, *caas.ModelOperatorConfig) error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureModelOperatorCall) DoAndReturn(f func(context.Context, string, string, *caas.ModelOperatorConfig) error) *MockBrokerEnsureModelOperatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureSecretAccessToken mocks base method. @@ -259,9 +595,33 @@ func (m *MockBroker) EnsureSecretAccessToken(arg0 context.Context, arg1 string, } // EnsureSecretAccessToken indicates an expected call of EnsureSecretAccessToken. -func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) EnsureSecretAccessToken(arg0, arg1, arg2, arg3, arg4 any) *MockBrokerEnsureSecretAccessTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureSecretAccessToken", reflect.TypeOf((*MockBroker)(nil).EnsureSecretAccessToken), arg0, arg1, arg2, arg3, arg4) + return &MockBrokerEnsureSecretAccessTokenCall{Call: call} +} + +// MockBrokerEnsureSecretAccessTokenCall wrap *gomock.Call +type MockBrokerEnsureSecretAccessTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerEnsureSecretAccessTokenCall) Return(arg0 string, arg1 error) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerEnsureSecretAccessTokenCall) Do(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerEnsureSecretAccessTokenCall) DoAndReturn(f func(context.Context, string, []string, []string, []string) (string, error)) *MockBrokerEnsureSecretAccessTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetJujuSecret mocks base method. @@ -274,9 +634,33 @@ func (m *MockBroker) GetJujuSecret(arg0 context.Context, arg1 string) (secrets.S } // GetJujuSecret indicates an expected call of GetJujuSecret. -func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetJujuSecret(arg0, arg1 any) *MockBrokerGetJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJujuSecret", reflect.TypeOf((*MockBroker)(nil).GetJujuSecret), arg0, arg1) + return &MockBrokerGetJujuSecretCall{Call: call} +} + +// MockBrokerGetJujuSecretCall wrap *gomock.Call +type MockBrokerGetJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetJujuSecretCall) Return(arg0 secrets.SecretValue, arg1 error) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetJujuSecretCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetJujuSecretCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockBrokerGetJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretToken mocks base method. @@ -289,9 +673,33 @@ func (m *MockBroker) GetSecretToken(arg0 context.Context, arg1 string) (string, } // GetSecretToken indicates an expected call of GetSecretToken. -func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetSecretToken(arg0, arg1 any) *MockBrokerGetSecretTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretToken", reflect.TypeOf((*MockBroker)(nil).GetSecretToken), arg0, arg1) + return &MockBrokerGetSecretTokenCall{Call: call} +} + +// MockBrokerGetSecretTokenCall wrap *gomock.Call +type MockBrokerGetSecretTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetSecretTokenCall) Return(arg0 string, arg1 error) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetSecretTokenCall) Do(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetSecretTokenCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockBrokerGetSecretTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetService mocks base method. @@ -304,9 +712,33 @@ func (m *MockBroker) GetService(arg0 context.Context, arg1 string, arg2 bool) (* } // GetService indicates an expected call of GetService. -func (mr *MockBrokerMockRecorder) GetService(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) GetService(arg0, arg1, arg2 any) *MockBrokerGetServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockBroker)(nil).GetService), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockBroker)(nil).GetService), arg0, arg1, arg2) + return &MockBrokerGetServiceCall{Call: call} +} + +// MockBrokerGetServiceCall wrap *gomock.Call +type MockBrokerGetServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerGetServiceCall) Return(arg0 *caas.Service, arg1 error) *MockBrokerGetServiceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerGetServiceCall) Do(f func(context.Context, string, bool) (*caas.Service, error)) *MockBrokerGetServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerGetServiceCall) DoAndReturn(f func(context.Context, string, bool) (*caas.Service, error)) *MockBrokerGetServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelOperator mocks base method. @@ -319,9 +751,33 @@ func (m *MockBroker) ModelOperator(arg0 context.Context) (*caas.ModelOperatorCon } // ModelOperator indicates an expected call of ModelOperator. -func (mr *MockBrokerMockRecorder) ModelOperator(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ModelOperator(arg0 any) *MockBrokerModelOperatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperator", reflect.TypeOf((*MockBroker)(nil).ModelOperator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperator", reflect.TypeOf((*MockBroker)(nil).ModelOperator), arg0) + return &MockBrokerModelOperatorCall{Call: call} +} + +// MockBrokerModelOperatorCall wrap *gomock.Call +type MockBrokerModelOperatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerModelOperatorCall) Return(arg0 *caas.ModelOperatorConfig, arg1 error) *MockBrokerModelOperatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerModelOperatorCall) Do(f func(context.Context) (*caas.ModelOperatorConfig, error)) *MockBrokerModelOperatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerModelOperatorCall) DoAndReturn(f func(context.Context) (*caas.ModelOperatorConfig, error)) *MockBrokerModelOperatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelOperatorExists mocks base method. @@ -334,9 +790,33 @@ func (m *MockBroker) ModelOperatorExists(arg0 context.Context) (bool, error) { } // ModelOperatorExists indicates an expected call of ModelOperatorExists. -func (mr *MockBrokerMockRecorder) ModelOperatorExists(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ModelOperatorExists(arg0 any) *MockBrokerModelOperatorExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperatorExists", reflect.TypeOf((*MockBroker)(nil).ModelOperatorExists), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelOperatorExists", reflect.TypeOf((*MockBroker)(nil).ModelOperatorExists), arg0) + return &MockBrokerModelOperatorExistsCall{Call: call} +} + +// MockBrokerModelOperatorExistsCall wrap *gomock.Call +type MockBrokerModelOperatorExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerModelOperatorExistsCall) Return(arg0 bool, arg1 error) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerModelOperatorExistsCall) Do(f func(context.Context) (bool, error)) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerModelOperatorExistsCall) DoAndReturn(f func(context.Context) (bool, error)) *MockBrokerModelOperatorExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -348,9 +828,33 @@ func (m *MockBroker) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockBrokerMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) PrecheckInstance(arg0, arg1 any) *MockBrokerPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockBroker)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockBroker)(nil).PrecheckInstance), arg0, arg1) + return &MockBrokerPrecheckInstanceCall{Call: call} +} + +// MockBrokerPrecheckInstanceCall wrap *gomock.Call +type MockBrokerPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerPrecheckInstanceCall) Return(arg0 error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockBrokerPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -362,9 +866,33 @@ func (m *MockBroker) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 st } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockBrokerMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockBrokerPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBroker)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockBroker)(nil).PrepareForBootstrap), arg0, arg1) + return &MockBrokerPrepareForBootstrapCall{Call: call} +} + +// MockBrokerPrepareForBootstrapCall wrap *gomock.Call +type MockBrokerPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerPrepareForBootstrapCall) Return(arg0 error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockBrokerPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -376,9 +904,33 @@ func (m *MockBroker) Provider() caas.ContainerEnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockBrokerMockRecorder) Provider() *gomock.Call { +func (mr *MockBrokerMockRecorder) Provider() *MockBrokerProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockBroker)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockBroker)(nil).Provider)) + return &MockBrokerProviderCall{Call: call} +} + +// MockBrokerProviderCall wrap *gomock.Call +type MockBrokerProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerProviderCall) Return(arg0 caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerProviderCall) Do(f func() caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerProviderCall) DoAndReturn(f func() caas.ContainerEnvironProvider) *MockBrokerProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProxyToApplication mocks base method. @@ -391,9 +943,33 @@ func (m *MockBroker) ProxyToApplication(arg0 context.Context, arg1, arg2 string) } // ProxyToApplication indicates an expected call of ProxyToApplication. -func (mr *MockBrokerMockRecorder) ProxyToApplication(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ProxyToApplication(arg0, arg1, arg2 any) *MockBrokerProxyToApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyToApplication", reflect.TypeOf((*MockBroker)(nil).ProxyToApplication), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxyToApplication", reflect.TypeOf((*MockBroker)(nil).ProxyToApplication), arg0, arg1, arg2) + return &MockBrokerProxyToApplicationCall{Call: call} +} + +// MockBrokerProxyToApplicationCall wrap *gomock.Call +type MockBrokerProxyToApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerProxyToApplicationCall) Return(arg0 proxy.Proxier, arg1 error) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerProxyToApplicationCall) Do(f func(context.Context, string, string) (proxy.Proxier, error)) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerProxyToApplicationCall) DoAndReturn(f func(context.Context, string, string) (proxy.Proxier, error)) *MockBrokerProxyToApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveJujuSecret mocks base method. @@ -406,9 +982,33 @@ func (m *MockBroker) SaveJujuSecret(arg0 context.Context, arg1 string, arg2 secr } // SaveJujuSecret indicates an expected call of SaveJujuSecret. -func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) SaveJujuSecret(arg0, arg1, arg2 any) *MockBrokerSaveJujuSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveJujuSecret", reflect.TypeOf((*MockBroker)(nil).SaveJujuSecret), arg0, arg1, arg2) + return &MockBrokerSaveJujuSecretCall{Call: call} +} + +// MockBrokerSaveJujuSecretCall wrap *gomock.Call +type MockBrokerSaveJujuSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerSaveJujuSecretCall) Return(arg0 string, arg1 error) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerSaveJujuSecretCall) Do(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerSaveJujuSecretCall) DoAndReturn(f func(context.Context, string, secrets.SecretValue) (string, error)) *MockBrokerSaveJujuSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -420,9 +1020,33 @@ func (m *MockBroker) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockBrokerMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) SetConfig(arg0, arg1 any) *MockBrokerSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBroker)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockBroker)(nil).SetConfig), arg0, arg1) + return &MockBrokerSetConfigCall{Call: call} +} + +// MockBrokerSetConfigCall wrap *gomock.Call +type MockBrokerSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerSetConfigCall) Return(arg0 error) *MockBrokerSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockBrokerSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockBrokerSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -435,9 +1059,33 @@ func (m *MockBroker) StorageProvider(arg0 storage.ProviderType) (storage.Provide } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockBrokerMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) StorageProvider(arg0 any) *MockBrokerStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBroker)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockBroker)(nil).StorageProvider), arg0) + return &MockBrokerStorageProviderCall{Call: call} +} + +// MockBrokerStorageProviderCall wrap *gomock.Call +type MockBrokerStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockBrokerStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockBrokerStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockBrokerStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -450,9 +1098,33 @@ func (m *MockBroker) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockBrokerMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockBrokerMockRecorder) StorageProviderTypes() *MockBrokerStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBroker)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockBroker)(nil).StorageProviderTypes)) + return &MockBrokerStorageProviderTypesCall{Call: call} +} + +// MockBrokerStorageProviderTypesCall wrap *gomock.Call +type MockBrokerStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockBrokerStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -465,9 +1137,33 @@ func (m *MockBroker) Units(arg0 context.Context, arg1 string) ([]caas.Unit, erro } // Units indicates an expected call of Units. -func (mr *MockBrokerMockRecorder) Units(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Units(arg0, arg1 any) *MockBrokerUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockBroker)(nil).Units), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockBroker)(nil).Units), arg0, arg1) + return &MockBrokerUnitsCall{Call: call} +} + +// MockBrokerUnitsCall wrap *gomock.Call +type MockBrokerUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerUnitsCall) Return(arg0 []caas.Unit, arg1 error) *MockBrokerUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerUnitsCall) Do(f func(context.Context, string) ([]caas.Unit, error)) *MockBrokerUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerUnitsCall) DoAndReturn(f func(context.Context, string) ([]caas.Unit, error)) *MockBrokerUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -479,9 +1175,33 @@ func (m *MockBroker) Upgrade(arg0 context.Context, arg1 string, arg2 version.Num } // Upgrade indicates an expected call of Upgrade. -func (mr *MockBrokerMockRecorder) Upgrade(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) Upgrade(arg0, arg1, arg2 any) *MockBrokerUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockBroker)(nil).Upgrade), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockBroker)(nil).Upgrade), arg0, arg1, arg2) + return &MockBrokerUpgradeCall{Call: call} +} + +// MockBrokerUpgradeCall wrap *gomock.Call +type MockBrokerUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerUpgradeCall) Return(arg0 error) *MockBrokerUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerUpgradeCall) Do(f func(context.Context, string, version.Number) error) *MockBrokerUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerUpgradeCall) DoAndReturn(f func(context.Context, string, version.Number) error) *MockBrokerUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ValidateStorageClass mocks base method. @@ -493,9 +1213,33 @@ func (m *MockBroker) ValidateStorageClass(arg0 context.Context, arg1 map[string] } // ValidateStorageClass indicates an expected call of ValidateStorageClass. -func (mr *MockBrokerMockRecorder) ValidateStorageClass(arg0, arg1 any) *gomock.Call { +func (mr *MockBrokerMockRecorder) ValidateStorageClass(arg0, arg1 any) *MockBrokerValidateStorageClassCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockBroker)(nil).ValidateStorageClass), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStorageClass", reflect.TypeOf((*MockBroker)(nil).ValidateStorageClass), arg0, arg1) + return &MockBrokerValidateStorageClassCall{Call: call} +} + +// MockBrokerValidateStorageClassCall wrap *gomock.Call +type MockBrokerValidateStorageClassCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerValidateStorageClassCall) Return(arg0 error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerValidateStorageClassCall) Do(f func(context.Context, map[string]any) error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerValidateStorageClassCall) DoAndReturn(f func(context.Context, map[string]any) error) *MockBrokerValidateStorageClassCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Version mocks base method. @@ -508,7 +1252,31 @@ func (m *MockBroker) Version() (*version.Number, error) { } // Version indicates an expected call of Version. -func (mr *MockBrokerMockRecorder) Version() *gomock.Call { +func (mr *MockBrokerMockRecorder) Version() *MockBrokerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockBroker)(nil).Version)) + return &MockBrokerVersionCall{Call: call} +} + +// MockBrokerVersionCall wrap *gomock.Call +type MockBrokerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBrokerVersionCall) Return(arg0 *version.Number, arg1 error) *MockBrokerVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBrokerVersionCall) Do(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBrokerVersionCall) DoAndReturn(f func() (*version.Number, error)) *MockBrokerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providertracker/environs_mock_test.go b/internal/worker/providertracker/environs_mock_test.go index fe01d93c0d9..f4590f19a9d 100644 --- a/internal/worker/providertracker/environs_mock_test.go +++ b/internal/worker/providertracker/environs_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providertracker -destination environs_mock_test.go github.com/juju/juju/environs Environ,CloudDestroyer,CloudSpecSetter +// mockgen -typed -package providertracker -destination environs_mock_test.go github.com/juju/juju/environs Environ,CloudDestroyer,CloudSpecSetter // // Package providertracker is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockEnviron) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 s } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockEnvironAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockEnviron)(nil).AdoptResources), arg0, arg1, arg2) + return &MockEnvironAdoptResourcesCall{Call: call} +} + +// MockEnvironAdoptResourcesCall wrap *gomock.Call +type MockEnvironAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAdoptResourcesCall) Return(arg0 error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockEnvironAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllInstances mocks base method. @@ -72,9 +96,33 @@ func (m *MockEnviron) AllInstances(arg0 envcontext.ProviderCallContext) ([]insta } // AllInstances indicates an expected call of AllInstances. -func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllInstances(arg0 any) *MockEnvironAllInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockEnviron)(nil).AllInstances), arg0) + return &MockEnvironAllInstancesCall{Call: call} +} + +// MockEnvironAllInstancesCall wrap *gomock.Call +type MockEnvironAllInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AllRunningInstances mocks base method. @@ -87,9 +135,33 @@ func (m *MockEnviron) AllRunningInstances(arg0 envcontext.ProviderCallContext) ( } // AllRunningInstances indicates an expected call of AllRunningInstances. -func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) AllRunningInstances(arg0 any) *MockEnvironAllRunningInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockEnviron)(nil).AllRunningInstances), arg0) + return &MockEnvironAllRunningInstancesCall{Call: call} +} + +// MockEnvironAllRunningInstancesCall wrap *gomock.Call +type MockEnvironAllRunningInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironAllRunningInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironAllRunningInstancesCall) Do(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironAllRunningInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext) ([]instances.Instance, error)) *MockEnvironAllRunningInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -102,9 +174,33 @@ func (m *MockEnviron) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext. } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockEnvironBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockEnviron)(nil).Bootstrap), arg0, arg1, arg2) + return &MockEnvironBootstrapCall{Call: call} +} + +// MockEnvironBootstrapCall wrap *gomock.Call +type MockEnvironBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockEnvironBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockEnvironBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -116,9 +212,33 @@ func (m *MockEnviron) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockEnvironMockRecorder) Config() *gomock.Call { +func (mr *MockEnvironMockRecorder) Config() *MockEnvironConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockEnviron)(nil).Config)) + return &MockEnvironConfigCall{Call: call} +} + +// MockEnvironConfigCall wrap *gomock.Call +type MockEnvironConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConfigCall) Return(arg0 *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConfigCall) Do(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConfigCall) DoAndReturn(f func() *config.Config) *MockEnvironConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -131,9 +251,33 @@ func (m *MockEnviron) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ConstraintsValidator(arg0 any) *MockEnvironConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockEnviron)(nil).ConstraintsValidator), arg0) + return &MockEnvironConstraintsValidatorCall{Call: call} +} + +// MockEnvironConstraintsValidatorCall wrap *gomock.Call +type MockEnvironConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockEnvironConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerInstances mocks base method. @@ -146,9 +290,33 @@ func (m *MockEnviron) ControllerInstances(arg0 envcontext.ProviderCallContext, a } // ControllerInstances indicates an expected call of ControllerInstances. -func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) ControllerInstances(arg0, arg1 any) *MockEnvironControllerInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerInstances", reflect.TypeOf((*MockEnviron)(nil).ControllerInstances), arg0, arg1) + return &MockEnvironControllerInstancesCall{Call: call} +} + +// MockEnvironControllerInstancesCall wrap *gomock.Call +type MockEnvironControllerInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironControllerInstancesCall) Return(arg0 []instance.Id, arg1 error) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironControllerInstancesCall) Do(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironControllerInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) ([]instance.Id, error)) *MockEnvironControllerInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -160,9 +328,33 @@ func (m *MockEnviron) Create(arg0 envcontext.ProviderCallContext, arg1 environs. } // Create indicates an expected call of Create. -func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Create(arg0, arg1 any) *MockEnvironCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockEnviron)(nil).Create), arg0, arg1) + return &MockEnvironCreateCall{Call: call} +} + +// MockEnvironCreateCall wrap *gomock.Call +type MockEnvironCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironCreateCall) Return(arg0 error) *MockEnvironCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockEnvironCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -174,9 +366,33 @@ func (m *MockEnviron) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Destroy(arg0 any) *MockEnvironDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockEnviron)(nil).Destroy), arg0) + return &MockEnvironDestroyCall{Call: call} +} + +// MockEnvironDestroyCall wrap *gomock.Call +type MockEnvironDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyCall) Return(arg0 error) *MockEnvironDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockEnvironDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -188,9 +404,33 @@ func (m *MockEnviron) DestroyController(arg0 envcontext.ProviderCallContext, arg } // DestroyController indicates an expected call of DestroyController. -func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) DestroyController(arg0, arg1 any) *MockEnvironDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockEnviron)(nil).DestroyController), arg0, arg1) + return &MockEnvironDestroyControllerCall{Call: call} +} + +// MockEnvironDestroyControllerCall wrap *gomock.Call +type MockEnvironDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironDestroyControllerCall) Return(arg0 error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockEnvironDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // InstanceTypes mocks base method. @@ -203,9 +443,33 @@ func (m *MockEnviron) InstanceTypes(arg0 envcontext.ProviderCallContext, arg1 co } // InstanceTypes indicates an expected call of InstanceTypes. -func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) InstanceTypes(arg0, arg1 any) *MockEnvironInstanceTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceTypes", reflect.TypeOf((*MockEnviron)(nil).InstanceTypes), arg0, arg1) + return &MockEnvironInstanceTypesCall{Call: call} +} + +// MockEnvironInstanceTypesCall wrap *gomock.Call +type MockEnvironInstanceTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstanceTypesCall) Return(arg0 instances.InstanceTypesWithCostMetadata, arg1 error) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstanceTypesCall) Do(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstanceTypesCall) DoAndReturn(f func(envcontext.ProviderCallContext, constraints.Value) (instances.InstanceTypesWithCostMetadata, error)) *MockEnvironInstanceTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instances mocks base method. @@ -218,9 +482,33 @@ func (m *MockEnviron) Instances(arg0 envcontext.ProviderCallContext, arg1 []inst } // Instances indicates an expected call of Instances. -func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) Instances(arg0, arg1 any) *MockEnvironInstancesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockEnviron)(nil).Instances), arg0, arg1) + return &MockEnvironInstancesCall{Call: call} +} + +// MockEnvironInstancesCall wrap *gomock.Call +type MockEnvironInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironInstancesCall) Return(arg0 []instances.Instance, arg1 error) *MockEnvironInstancesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironInstancesCall) Do(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, []instance.Id) ([]instances.Instance, error)) *MockEnvironInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -232,9 +520,33 @@ func (m *MockEnviron) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg1 } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrecheckInstance(arg0, arg1 any) *MockEnvironPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockEnviron)(nil).PrecheckInstance), arg0, arg1) + return &MockEnvironPrecheckInstanceCall{Call: call} +} + +// MockEnvironPrecheckInstanceCall wrap *gomock.Call +type MockEnvironPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrecheckInstanceCall) Return(arg0 error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockEnvironPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -246,9 +558,33 @@ func (m *MockEnviron) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 s } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockEnvironPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockEnviron)(nil).PrepareForBootstrap), arg0, arg1) + return &MockEnvironPrepareForBootstrapCall{Call: call} +} + +// MockEnvironPrepareForBootstrapCall wrap *gomock.Call +type MockEnvironPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironPrepareForBootstrapCall) Return(arg0 error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockEnvironPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Provider mocks base method. @@ -260,9 +596,33 @@ func (m *MockEnviron) Provider() environs.EnvironProvider { } // Provider indicates an expected call of Provider. -func (mr *MockEnvironMockRecorder) Provider() *gomock.Call { +func (mr *MockEnvironMockRecorder) Provider() *MockEnvironProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider)) + return &MockEnvironProviderCall{Call: call} +} + +// MockEnvironProviderCall wrap *gomock.Call +type MockEnvironProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironProviderCall) Return(arg0 environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironProviderCall) Do(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironProviderCall) DoAndReturn(f func() environs.EnvironProvider) *MockEnvironProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -274,9 +634,33 @@ func (m *MockEnviron) SetConfig(arg0 context.Context, arg1 *config.Config) error } // SetConfig indicates an expected call of SetConfig. -func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) SetConfig(arg0, arg1 any) *MockEnvironSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockEnviron)(nil).SetConfig), arg0, arg1) + return &MockEnvironSetConfigCall{Call: call} +} + +// MockEnvironSetConfigCall wrap *gomock.Call +type MockEnvironSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironSetConfigCall) Return(arg0 error) *MockEnvironSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockEnvironSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartInstance mocks base method. @@ -289,9 +673,33 @@ func (m *MockEnviron) StartInstance(arg0 envcontext.ProviderCallContext, arg1 en } // StartInstance indicates an expected call of StartInstance. -func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StartInstance(arg0, arg1 any) *MockEnvironStartInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockEnviron)(nil).StartInstance), arg0, arg1) + return &MockEnvironStartInstanceCall{Call: call} +} + +// MockEnvironStartInstanceCall wrap *gomock.Call +type MockEnvironStartInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStartInstanceCall) Return(arg0 *environs.StartInstanceResult, arg1 error) *MockEnvironStartInstanceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStartInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStartInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.StartInstanceParams) (*environs.StartInstanceResult, error)) *MockEnvironStartInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StopInstances mocks base method. @@ -307,10 +715,34 @@ func (m *MockEnviron) StopInstances(arg0 envcontext.ProviderCallContext, arg1 .. } // StopInstances indicates an expected call of StopInstances. -func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StopInstances(arg0 any, arg1 ...any) *MockEnvironStopInstancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockEnviron)(nil).StopInstances), varargs...) + return &MockEnvironStopInstancesCall{Call: call} +} + +// MockEnvironStopInstancesCall wrap *gomock.Call +type MockEnvironStopInstancesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStopInstancesCall) Return(arg0 error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStopInstancesCall) Do(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStopInstancesCall) DoAndReturn(f func(envcontext.ProviderCallContext, ...instance.Id) error) *MockEnvironStopInstancesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -323,9 +755,33 @@ func (m *MockEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provid } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProvider(arg0 any) *MockEnvironStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockEnviron)(nil).StorageProvider), arg0) + return &MockEnvironStorageProviderCall{Call: call} +} + +// MockEnvironStorageProviderCall wrap *gomock.Call +type MockEnvironStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockEnvironStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockEnvironStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -338,9 +794,33 @@ func (m *MockEnviron) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockEnvironMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockEnvironMockRecorder) StorageProviderTypes() *MockEnvironStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockEnviron)(nil).StorageProviderTypes)) + return &MockEnvironStorageProviderTypesCall{Call: call} +} + +// MockEnvironStorageProviderTypesCall wrap *gomock.Call +type MockEnvironStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEnvironStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEnvironStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEnvironStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockEnvironStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudDestroyer is a mock of CloudDestroyer interface. @@ -375,9 +855,33 @@ func (m *MockCloudDestroyer) Destroy(arg0 envcontext.ProviderCallContext) error } // Destroy indicates an expected call of Destroy. -func (mr *MockCloudDestroyerMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockCloudDestroyerMockRecorder) Destroy(arg0 any) *MockCloudDestroyerDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockCloudDestroyer)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockCloudDestroyer)(nil).Destroy), arg0) + return &MockCloudDestroyerDestroyCall{Call: call} +} + +// MockCloudDestroyerDestroyCall wrap *gomock.Call +type MockCloudDestroyerDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudDestroyerDestroyCall) Return(arg0 error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudDestroyerDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudDestroyerDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockCloudDestroyerDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudSpecSetter is a mock of CloudSpecSetter interface. @@ -412,7 +916,31 @@ func (m *MockCloudSpecSetter) SetCloudSpec(arg0 context.Context, arg1 cloudspec. } // SetCloudSpec indicates an expected call of SetCloudSpec. -func (mr *MockCloudSpecSetterMockRecorder) SetCloudSpec(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudSpecSetterMockRecorder) SetCloudSpec(arg0, arg1 any) *MockCloudSpecSetterSetCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudSpec", reflect.TypeOf((*MockCloudSpecSetter)(nil).SetCloudSpec), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudSpec", reflect.TypeOf((*MockCloudSpecSetter)(nil).SetCloudSpec), arg0, arg1) + return &MockCloudSpecSetterSetCloudSpecCall{Call: call} +} + +// MockCloudSpecSetterSetCloudSpecCall wrap *gomock.Call +type MockCloudSpecSetterSetCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudSpecSetterSetCloudSpecCall) Return(arg0 error) *MockCloudSpecSetterSetCloudSpecCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudSpecSetterSetCloudSpecCall) Do(f func(context.Context, cloudspec.CloudSpec) error) *MockCloudSpecSetterSetCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudSpecSetterSetCloudSpecCall) DoAndReturn(f func(context.Context, cloudspec.CloudSpec) error) *MockCloudSpecSetterSetCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providertracker/package_test.go b/internal/worker/providertracker/package_test.go index d1dafbdb55e..66498895220 100644 --- a/internal/worker/providertracker/package_test.go +++ b/internal/worker/providertracker/package_test.go @@ -15,10 +15,10 @@ import ( jujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package providertracker -destination providertracker_mock_test.go github.com/juju/juju/internal/worker/providertracker ServiceFactoryGetter,ServiceFactory,ModelService,CloudService,ConfigService,CredentialService -//go:generate go run go.uber.org/mock/mockgen -package providertracker -destination environs_mock_test.go github.com/juju/juju/environs Environ,CloudDestroyer,CloudSpecSetter -//go:generate go run go.uber.org/mock/mockgen -package providertracker -destination storage_mock_test.go github.com/juju/juju/internal/storage ProviderRegistry -//go:generate go run go.uber.org/mock/mockgen -package providertracker -destination caas_mock_test.go github.com/juju/juju/caas Broker +//go:generate go run go.uber.org/mock/mockgen -typed -package providertracker -destination providertracker_mock_test.go github.com/juju/juju/internal/worker/providertracker ServiceFactoryGetter,ServiceFactory,ModelService,CloudService,ConfigService,CredentialService +//go:generate go run go.uber.org/mock/mockgen -typed -package providertracker -destination environs_mock_test.go github.com/juju/juju/environs Environ,CloudDestroyer,CloudSpecSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package providertracker -destination storage_mock_test.go github.com/juju/juju/internal/storage ProviderRegistry +//go:generate go run go.uber.org/mock/mockgen -typed -package providertracker -destination caas_mock_test.go github.com/juju/juju/caas Broker func TestPackage(t *stdtesting.T) { defer goleak.VerifyNone(t) diff --git a/internal/worker/providertracker/providertracker_mock_test.go b/internal/worker/providertracker/providertracker_mock_test.go index a105414b345..9777521f8fb 100644 --- a/internal/worker/providertracker/providertracker_mock_test.go +++ b/internal/worker/providertracker/providertracker_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providertracker -destination providertracker_mock_test.go github.com/juju/juju/internal/worker/providertracker ServiceFactoryGetter,ServiceFactory,ModelService,CloudService,ConfigService,CredentialService +// mockgen -typed -package providertracker -destination providertracker_mock_test.go github.com/juju/juju/internal/worker/providertracker ServiceFactoryGetter,ServiceFactory,ModelService,CloudService,ConfigService,CredentialService // // Package providertracker is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockServiceFactoryGetter) FactoryForModel(arg0 string) ServiceFactory { } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryGetterFactoryForModelCall) Return(arg0 ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryGetterFactoryForModelCall) Do(f func(string) ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceFactory is a mock of ServiceFactory interface. @@ -90,9 +114,33 @@ func (m *MockServiceFactory) Cloud() CloudService { } // Cloud indicates an expected call of Cloud. -func (mr *MockServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Cloud() *MockServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + return &MockServiceFactoryCloudCall{Call: call} +} + +// MockServiceFactoryCloudCall wrap *gomock.Call +type MockServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCloudCall) Return(arg0 CloudService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCloudCall) Do(f func() CloudService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCloudCall) DoAndReturn(f func() CloudService) *MockServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -104,9 +152,33 @@ func (m *MockServiceFactory) Config() ConfigService { } // Config indicates an expected call of Config. -func (mr *MockServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Config() *MockServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + return &MockServiceFactoryConfigCall{Call: call} +} + +// MockServiceFactoryConfigCall wrap *gomock.Call +type MockServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryConfigCall) Return(arg0 ConfigService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryConfigCall) Do(f func() ConfigService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryConfigCall) DoAndReturn(f func() ConfigService) *MockServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -118,9 +190,33 @@ func (m *MockServiceFactory) Credential() CredentialService { } // Credential indicates an expected call of Credential. -func (mr *MockServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Credential() *MockServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + return &MockServiceFactoryCredentialCall{Call: call} +} + +// MockServiceFactoryCredentialCall wrap *gomock.Call +type MockServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCredentialCall) Return(arg0 CredentialService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCredentialCall) Do(f func() CredentialService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCredentialCall) DoAndReturn(f func() CredentialService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -132,9 +228,33 @@ func (m *MockServiceFactory) Model() ModelService { } // Model indicates an expected call of Model. -func (mr *MockServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Model() *MockServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + return &MockServiceFactoryModelCall{Call: call} +} + +// MockServiceFactoryModelCall wrap *gomock.Call +type MockServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelCall) Return(arg0 ModelService) *MockServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelCall) Do(f func() ModelService) *MockServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelCall) DoAndReturn(f func() ModelService) *MockServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelService is a mock of ModelService interface. @@ -170,9 +290,33 @@ func (m *MockModelService) Model(arg0 context.Context) (model.ReadOnlyModel, err } // Model indicates an expected call of Model. -func (mr *MockModelServiceMockRecorder) Model(arg0 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) Model(arg0 any) *MockModelServiceModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockModelService)(nil).Model), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockModelService)(nil).Model), arg0) + return &MockModelServiceModelCall{Call: call} +} + +// MockModelServiceModelCall wrap *gomock.Call +type MockModelServiceModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceModelCall) Return(arg0 model.ReadOnlyModel, arg1 error) *MockModelServiceModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceModelCall) Do(f func(context.Context) (model.ReadOnlyModel, error)) *MockModelServiceModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceModelCall) DoAndReturn(f func(context.Context) (model.ReadOnlyModel, error)) *MockModelServiceModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCloudService is a mock of CloudService interface. @@ -208,9 +352,33 @@ func (m *MockCloudService) Cloud(arg0 context.Context, arg1 string) (*cloud.Clou } // Cloud indicates an expected call of Cloud. -func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) Cloud(arg0, arg1 any) *MockCloudServiceCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockCloudService)(nil).Cloud), arg0, arg1) + return &MockCloudServiceCloudCall{Call: call} +} + +// MockCloudServiceCloudCall wrap *gomock.Call +type MockCloudServiceCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceCloudCall) Return(arg0 *cloud.Cloud, arg1 error) *MockCloudServiceCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceCloudCall) Do(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceCloudCall) DoAndReturn(f func(context.Context, string) (*cloud.Cloud, error)) *MockCloudServiceCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCloud mocks base method. @@ -223,9 +391,33 @@ func (m *MockCloudService) WatchCloud(arg0 context.Context, arg1 string) (watche } // WatchCloud indicates an expected call of WatchCloud. -func (mr *MockCloudServiceMockRecorder) WatchCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockCloudServiceMockRecorder) WatchCloud(arg0, arg1 any) *MockCloudServiceWatchCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockCloudService)(nil).WatchCloud), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCloud", reflect.TypeOf((*MockCloudService)(nil).WatchCloud), arg0, arg1) + return &MockCloudServiceWatchCloudCall{Call: call} +} + +// MockCloudServiceWatchCloudCall wrap *gomock.Call +type MockCloudServiceWatchCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCloudServiceWatchCloudCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCloudServiceWatchCloudCall) Do(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCloudServiceWatchCloudCall) DoAndReturn(f func(context.Context, string) (watcher.Watcher[struct{}], error)) *MockCloudServiceWatchCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigService is a mock of ConfigService interface. @@ -261,9 +453,33 @@ func (m *MockConfigService) ModelConfig(arg0 context.Context) (*config.Config, e } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockConfigServiceMockRecorder) ModelConfig(arg0 any) *MockConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockConfigService)(nil).ModelConfig), arg0) + return &MockConfigServiceModelConfigCall{Call: call} +} + +// MockConfigServiceModelConfigCall wrap *gomock.Call +type MockConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -276,9 +492,33 @@ func (m *MockConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockConfigServiceMockRecorder) Watch() *MockConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockConfigService)(nil).Watch)) + return &MockConfigServiceWatchCall{Call: call} +} + +// MockConfigServiceWatchCall wrap *gomock.Call +type MockConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCredentialService is a mock of CredentialService interface. @@ -314,9 +554,33 @@ func (m *MockCredentialService) CloudCredential(arg0 context.Context, arg1 crede } // CloudCredential indicates an expected call of CloudCredential. -func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) CloudCredential(arg0, arg1 any) *MockCredentialServiceCloudCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredential", reflect.TypeOf((*MockCredentialService)(nil).CloudCredential), arg0, arg1) + return &MockCredentialServiceCloudCredentialCall{Call: call} +} + +// MockCredentialServiceCloudCredentialCall wrap *gomock.Call +type MockCredentialServiceCloudCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceCloudCredentialCall) Return(arg0 cloud.Credential, arg1 error) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceCloudCredentialCall) Do(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceCloudCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (cloud.Credential, error)) *MockCredentialServiceCloudCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCredential mocks base method. @@ -329,7 +593,31 @@ func (m *MockCredentialService) WatchCredential(arg0 context.Context, arg1 crede } // WatchCredential indicates an expected call of WatchCredential. -func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialServiceMockRecorder) WatchCredential(arg0, arg1 any) *MockCredentialServiceWatchCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCredential", reflect.TypeOf((*MockCredentialService)(nil).WatchCredential), arg0, arg1) + return &MockCredentialServiceWatchCredentialCall{Call: call} +} + +// MockCredentialServiceWatchCredentialCall wrap *gomock.Call +type MockCredentialServiceWatchCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialServiceWatchCredentialCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialServiceWatchCredentialCall) Do(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialServiceWatchCredentialCall) DoAndReturn(f func(context.Context, credential.Key) (watcher.Watcher[struct{}], error)) *MockCredentialServiceWatchCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/providertracker/storage_mock_test.go b/internal/worker/providertracker/storage_mock_test.go index 3ec6eaaa7df..957ed3d3e79 100644 --- a/internal/worker/providertracker/storage_mock_test.go +++ b/internal/worker/providertracker/storage_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package providertracker -destination storage_mock_test.go github.com/juju/juju/internal/storage ProviderRegistry +// mockgen -typed -package providertracker -destination storage_mock_test.go github.com/juju/juju/internal/storage ProviderRegistry // // Package providertracker is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockProviderRegistry) StorageProvider(arg0 storage.ProviderType) (stora } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockProviderRegistryMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockProviderRegistryMockRecorder) StorageProvider(arg0 any) *MockProviderRegistryStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProvider), arg0) + return &MockProviderRegistryStorageProviderCall{Call: call} +} + +// MockProviderRegistryStorageProviderCall wrap *gomock.Call +type MockProviderRegistryStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderRegistryStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderRegistryStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderRegistryStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderRegistryStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -64,7 +88,31 @@ func (m *MockProviderRegistry) StorageProviderTypes() ([]storage.ProviderType, e } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockProviderRegistryMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockProviderRegistryMockRecorder) StorageProviderTypes() *MockProviderRegistryStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProviderRegistry)(nil).StorageProviderTypes)) + return &MockProviderRegistryStorageProviderTypesCall{Call: call} +} + +// MockProviderRegistryStorageProviderTypesCall wrap *gomock.Call +type MockProviderRegistryStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderRegistryStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderRegistryStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderRegistryStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockProviderRegistryStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/provisioner/containerprovisioner_test.go b/internal/worker/provisioner/containerprovisioner_test.go index 22c3b831e01..c962c470312 100644 --- a/internal/worker/provisioner/containerprovisioner_test.go +++ b/internal/worker/provisioner/containerprovisioner_test.go @@ -22,6 +22,7 @@ import ( "github.com/juju/juju/core/life" "github.com/juju/juju/core/model" "github.com/juju/juju/environs" + "github.com/juju/juju/environs/envcontext" "github.com/juju/juju/environs/instances" "github.com/juju/juju/internal/worker/provisioner" "github.com/juju/juju/rpc/params" @@ -133,9 +134,10 @@ func (s *lxdProvisionerSuite) TestContainerStartedAndStopped(c *gc.C) { s.sendMachineContainersChange(c, c666.Id()) s.checkStartInstance(c, c666) - s.broker.EXPECT().StopInstances(gomock.Any(), gomock.Any()).Do(func(ctx interface{}, ids ...interface{}) { + s.broker.EXPECT().StopInstances(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx envcontext.ProviderCallContext, ids ...instance.Id) error { c.Assert(len(ids), gc.Equals, 1) c.Assert(ids[0], gc.DeepEquals, instance.Id("inst-666")) + return nil }) c666.SetLife(life.Dead) diff --git a/internal/worker/provisioner/mocks/base_mock.go b/internal/worker/provisioner/mocks/base_mock.go index 248b02c6b87..6b44d34c7cb 100644 --- a/internal/worker/provisioner/mocks/base_mock.go +++ b/internal/worker/provisioner/mocks/base_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/provisioner/mocks/dependency.go b/internal/worker/provisioner/mocks/dependency.go index 335374e3f8b..31c62a573fc 100644 --- a/internal/worker/provisioner/mocks/dependency.go +++ b/internal/worker/provisioner/mocks/dependency.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/dependency.go github.com/juju/worker/v4/dependency Getter +// mockgen -typed -package mocks -destination mocks/dependency.go github.com/juju/worker/v4/dependency Getter // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockGetter) Get(arg0 string, arg1 any) error { } // Get indicates an expected call of Get. -func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *MockGetterGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + return &MockGetterGetCall{Call: call} +} + +// MockGetterGetCall wrap *gomock.Call +type MockGetterGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGetterGetCall) Return(arg0 error) *MockGetterGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGetterGetCall) Do(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGetterGetCall) DoAndReturn(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/provisioner/mocks/provisioner.go b/internal/worker/provisioner/mocks/provisioner.go index da09af5a9f1..e5480ba8da5 100644 --- a/internal/worker/provisioner/mocks/provisioner.go +++ b/internal/worker/provisioner/mocks/provisioner.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/provisioner.go github.com/juju/juju/internal/worker/provisioner ContainerMachine,ContainerMachineGetter,ContainerProvisionerAPI,ControllerAPI,MachinesAPI +// mockgen -typed -package mocks -destination mocks/provisioner.go github.com/juju/juju/internal/worker/provisioner ContainerMachine,ContainerMachineGetter,ContainerProvisionerAPI,ControllerAPI,MachinesAPI // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockContainerMachine) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockContainerMachineMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockContainerMachineMockRecorder) AvailabilityZone() *MockContainerMachineAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContainerMachine)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContainerMachine)(nil).AvailabilityZone)) + return &MockContainerMachineAvailabilityZoneCall{Call: call} +} + +// MockContainerMachineAvailabilityZoneCall wrap *gomock.Call +type MockContainerMachineAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerMachineAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockContainerMachineAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerMachineAvailabilityZoneCall) Do(f func() (string, error)) *MockContainerMachineAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerMachineAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockContainerMachineAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -74,9 +98,33 @@ func (m *MockContainerMachine) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockContainerMachineMockRecorder) Life() *gomock.Call { +func (mr *MockContainerMachineMockRecorder) Life() *MockContainerMachineLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockContainerMachine)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockContainerMachine)(nil).Life)) + return &MockContainerMachineLifeCall{Call: call} +} + +// MockContainerMachineLifeCall wrap *gomock.Call +type MockContainerMachineLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerMachineLifeCall) Return(arg0 life.Value) *MockContainerMachineLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerMachineLifeCall) Do(f func() life.Value) *MockContainerMachineLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerMachineLifeCall) DoAndReturn(f func() life.Value) *MockContainerMachineLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedContainers mocks base method. @@ -90,9 +138,33 @@ func (m *MockContainerMachine) SupportedContainers() ([]instance.ContainerType, } // SupportedContainers indicates an expected call of SupportedContainers. -func (mr *MockContainerMachineMockRecorder) SupportedContainers() *gomock.Call { +func (mr *MockContainerMachineMockRecorder) SupportedContainers() *MockContainerMachineSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockContainerMachine)(nil).SupportedContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockContainerMachine)(nil).SupportedContainers)) + return &MockContainerMachineSupportedContainersCall{Call: call} +} + +// MockContainerMachineSupportedContainersCall wrap *gomock.Call +type MockContainerMachineSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerMachineSupportedContainersCall) Return(arg0 []instance.ContainerType, arg1 bool, arg2 error) *MockContainerMachineSupportedContainersCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerMachineSupportedContainersCall) Do(f func() ([]instance.ContainerType, bool, error)) *MockContainerMachineSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerMachineSupportedContainersCall) DoAndReturn(f func() ([]instance.ContainerType, bool, error)) *MockContainerMachineSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchContainers mocks base method. @@ -105,9 +177,33 @@ func (m *MockContainerMachine) WatchContainers(arg0 instance.ContainerType) (wat } // WatchContainers indicates an expected call of WatchContainers. -func (mr *MockContainerMachineMockRecorder) WatchContainers(arg0 any) *gomock.Call { +func (mr *MockContainerMachineMockRecorder) WatchContainers(arg0 any) *MockContainerMachineWatchContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockContainerMachine)(nil).WatchContainers), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchContainers", reflect.TypeOf((*MockContainerMachine)(nil).WatchContainers), arg0) + return &MockContainerMachineWatchContainersCall{Call: call} +} + +// MockContainerMachineWatchContainersCall wrap *gomock.Call +type MockContainerMachineWatchContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerMachineWatchContainersCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockContainerMachineWatchContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerMachineWatchContainersCall) Do(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockContainerMachineWatchContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerMachineWatchContainersCall) DoAndReturn(f func(instance.ContainerType) (watcher.Watcher[[]string], error)) *MockContainerMachineWatchContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockContainerMachineGetter is a mock of ContainerMachineGetter interface. @@ -147,10 +243,34 @@ func (m *MockContainerMachineGetter) Machines(arg0 context.Context, arg1 ...name } // Machines indicates an expected call of Machines. -func (mr *MockContainerMachineGetterMockRecorder) Machines(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockContainerMachineGetterMockRecorder) Machines(arg0 any, arg1 ...any) *MockContainerMachineGetterMachinesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockContainerMachineGetter)(nil).Machines), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockContainerMachineGetter)(nil).Machines), varargs...) + return &MockContainerMachineGetterMachinesCall{Call: call} +} + +// MockContainerMachineGetterMachinesCall wrap *gomock.Call +type MockContainerMachineGetterMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerMachineGetterMachinesCall) Return(arg0 []provisioner0.ContainerMachineResult, arg1 error) *MockContainerMachineGetterMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerMachineGetterMachinesCall) Do(f func(context.Context, ...names.MachineTag) ([]provisioner0.ContainerMachineResult, error)) *MockContainerMachineGetterMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerMachineGetterMachinesCall) DoAndReturn(f func(context.Context, ...names.MachineTag) ([]provisioner0.ContainerMachineResult, error)) *MockContainerMachineGetterMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockContainerProvisionerAPI is a mock of ContainerProvisionerAPI interface. @@ -186,9 +306,33 @@ func (m *MockContainerProvisionerAPI) ContainerConfig() (params.ContainerConfig, } // ContainerConfig indicates an expected call of ContainerConfig. -func (mr *MockContainerProvisionerAPIMockRecorder) ContainerConfig() *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) ContainerConfig() *MockContainerProvisionerAPIContainerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ContainerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ContainerConfig)) + return &MockContainerProvisionerAPIContainerConfigCall{Call: call} +} + +// MockContainerProvisionerAPIContainerConfigCall wrap *gomock.Call +type MockContainerProvisionerAPIContainerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIContainerConfigCall) Return(arg0 params.ContainerConfig, arg1 error) *MockContainerProvisionerAPIContainerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIContainerConfigCall) Do(f func() (params.ContainerConfig, error)) *MockContainerProvisionerAPIContainerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIContainerConfigCall) DoAndReturn(f func() (params.ContainerConfig, error)) *MockContainerProvisionerAPIContainerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerManagerConfig mocks base method. @@ -201,9 +345,33 @@ func (m *MockContainerProvisionerAPI) ContainerManagerConfig(arg0 params.Contain } // ContainerManagerConfig indicates an expected call of ContainerManagerConfig. -func (mr *MockContainerProvisionerAPIMockRecorder) ContainerManagerConfig(arg0 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) ContainerManagerConfig(arg0 any) *MockContainerProvisionerAPIContainerManagerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerManagerConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ContainerManagerConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerManagerConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ContainerManagerConfig), arg0) + return &MockContainerProvisionerAPIContainerManagerConfigCall{Call: call} +} + +// MockContainerProvisionerAPIContainerManagerConfigCall wrap *gomock.Call +type MockContainerProvisionerAPIContainerManagerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIContainerManagerConfigCall) Return(arg0 params.ContainerManagerConfig, arg1 error) *MockContainerProvisionerAPIContainerManagerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIContainerManagerConfigCall) Do(f func(params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)) *MockContainerProvisionerAPIContainerManagerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIContainerManagerConfigCall) DoAndReturn(f func(params.ContainerManagerConfigParams) (params.ContainerManagerConfig, error)) *MockContainerProvisionerAPIContainerManagerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContainerProfileInfo mocks base method. @@ -216,9 +384,33 @@ func (m *MockContainerProvisionerAPI) GetContainerProfileInfo(arg0 names.Machine } // GetContainerProfileInfo indicates an expected call of GetContainerProfileInfo. -func (mr *MockContainerProvisionerAPIMockRecorder) GetContainerProfileInfo(arg0 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) GetContainerProfileInfo(arg0 any) *MockContainerProvisionerAPIGetContainerProfileInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).GetContainerProfileInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerProfileInfo", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).GetContainerProfileInfo), arg0) + return &MockContainerProvisionerAPIGetContainerProfileInfoCall{Call: call} +} + +// MockContainerProvisionerAPIGetContainerProfileInfoCall wrap *gomock.Call +type MockContainerProvisionerAPIGetContainerProfileInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIGetContainerProfileInfoCall) Return(arg0 []*provisioner.LXDProfileResult, arg1 error) *MockContainerProvisionerAPIGetContainerProfileInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIGetContainerProfileInfoCall) Do(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockContainerProvisionerAPIGetContainerProfileInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIGetContainerProfileInfoCall) DoAndReturn(f func(names.MachineTag) ([]*provisioner.LXDProfileResult, error)) *MockContainerProvisionerAPIGetContainerProfileInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HostChangesForContainer mocks base method. @@ -232,9 +424,33 @@ func (m *MockContainerProvisionerAPI) HostChangesForContainer(arg0 names.Machine } // HostChangesForContainer indicates an expected call of HostChangesForContainer. -func (mr *MockContainerProvisionerAPIMockRecorder) HostChangesForContainer(arg0 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) HostChangesForContainer(arg0 any) *MockContainerProvisionerAPIHostChangesForContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).HostChangesForContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostChangesForContainer", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).HostChangesForContainer), arg0) + return &MockContainerProvisionerAPIHostChangesForContainerCall{Call: call} +} + +// MockContainerProvisionerAPIHostChangesForContainerCall wrap *gomock.Call +type MockContainerProvisionerAPIHostChangesForContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIHostChangesForContainerCall) Return(arg0 []network0.DeviceToBridge, arg1 int, arg2 error) *MockContainerProvisionerAPIHostChangesForContainerCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIHostChangesForContainerCall) Do(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockContainerProvisionerAPIHostChangesForContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIHostChangesForContainerCall) DoAndReturn(f func(names.MachineTag) ([]network0.DeviceToBridge, int, error)) *MockContainerProvisionerAPIHostChangesForContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareContainerInterfaceInfo mocks base method. @@ -247,9 +463,33 @@ func (m *MockContainerProvisionerAPI) PrepareContainerInterfaceInfo(arg0 names.M } // PrepareContainerInterfaceInfo indicates an expected call of PrepareContainerInterfaceInfo. -func (mr *MockContainerProvisionerAPIMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) PrepareContainerInterfaceInfo(arg0 any) *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).PrepareContainerInterfaceInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareContainerInterfaceInfo", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).PrepareContainerInterfaceInfo), arg0) + return &MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall{Call: call} +} + +// MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall wrap *gomock.Call +type MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall) Return(arg0 network.InterfaceInfos, arg1 error) *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall) Do(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall) DoAndReturn(f func(names.MachineTag) (network.InterfaceInfos, error)) *MockContainerProvisionerAPIPrepareContainerInterfaceInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReleaseContainerAddresses mocks base method. @@ -261,9 +501,33 @@ func (m *MockContainerProvisionerAPI) ReleaseContainerAddresses(arg0 names.Machi } // ReleaseContainerAddresses indicates an expected call of ReleaseContainerAddresses. -func (mr *MockContainerProvisionerAPIMockRecorder) ReleaseContainerAddresses(arg0 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) ReleaseContainerAddresses(arg0 any) *MockContainerProvisionerAPIReleaseContainerAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ReleaseContainerAddresses), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseContainerAddresses", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).ReleaseContainerAddresses), arg0) + return &MockContainerProvisionerAPIReleaseContainerAddressesCall{Call: call} +} + +// MockContainerProvisionerAPIReleaseContainerAddressesCall wrap *gomock.Call +type MockContainerProvisionerAPIReleaseContainerAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPIReleaseContainerAddressesCall) Return(arg0 error) *MockContainerProvisionerAPIReleaseContainerAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPIReleaseContainerAddressesCall) Do(f func(names.MachineTag) error) *MockContainerProvisionerAPIReleaseContainerAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPIReleaseContainerAddressesCall) DoAndReturn(f func(names.MachineTag) error) *MockContainerProvisionerAPIReleaseContainerAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetHostMachineNetworkConfig mocks base method. @@ -275,9 +539,33 @@ func (m *MockContainerProvisionerAPI) SetHostMachineNetworkConfig(arg0 names.Mac } // SetHostMachineNetworkConfig indicates an expected call of SetHostMachineNetworkConfig. -func (mr *MockContainerProvisionerAPIMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockContainerProvisionerAPIMockRecorder) SetHostMachineNetworkConfig(arg0, arg1 any) *MockContainerProvisionerAPISetHostMachineNetworkConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).SetHostMachineNetworkConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostMachineNetworkConfig", reflect.TypeOf((*MockContainerProvisionerAPI)(nil).SetHostMachineNetworkConfig), arg0, arg1) + return &MockContainerProvisionerAPISetHostMachineNetworkConfigCall{Call: call} +} + +// MockContainerProvisionerAPISetHostMachineNetworkConfigCall wrap *gomock.Call +type MockContainerProvisionerAPISetHostMachineNetworkConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContainerProvisionerAPISetHostMachineNetworkConfigCall) Return(arg0 error) *MockContainerProvisionerAPISetHostMachineNetworkConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContainerProvisionerAPISetHostMachineNetworkConfigCall) Do(f func(names.MachineTag, []params.NetworkConfig) error) *MockContainerProvisionerAPISetHostMachineNetworkConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContainerProvisionerAPISetHostMachineNetworkConfigCall) DoAndReturn(f func(names.MachineTag, []params.NetworkConfig) error) *MockContainerProvisionerAPISetHostMachineNetworkConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockControllerAPI is a mock of ControllerAPI interface. @@ -313,9 +601,33 @@ func (m *MockControllerAPI) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockControllerAPIMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) APIAddresses() *MockControllerAPIAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockControllerAPI)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockControllerAPI)(nil).APIAddresses)) + return &MockControllerAPIAPIAddressesCall{Call: call} +} + +// MockControllerAPIAPIAddressesCall wrap *gomock.Call +type MockControllerAPIAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIAPIAddressesCall) Return(arg0 []string, arg1 error) *MockControllerAPIAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIAPIAddressesCall) Do(f func() ([]string, error)) *MockControllerAPIAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockControllerAPIAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -328,9 +640,33 @@ func (m *MockControllerAPI) CACert() (string, error) { } // CACert indicates an expected call of CACert. -func (mr *MockControllerAPIMockRecorder) CACert() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) CACert() *MockControllerAPICACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockControllerAPI)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockControllerAPI)(nil).CACert)) + return &MockControllerAPICACertCall{Call: call} +} + +// MockControllerAPICACertCall wrap *gomock.Call +type MockControllerAPICACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPICACertCall) Return(arg0 string, arg1 error) *MockControllerAPICACertCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPICACertCall) Do(f func() (string, error)) *MockControllerAPICACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPICACertCall) DoAndReturn(f func() (string, error)) *MockControllerAPICACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -343,9 +679,33 @@ func (m *MockControllerAPI) ControllerConfig() (controller.Config, error) { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerAPIMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) ControllerConfig() *MockControllerAPIControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerAPI)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerAPI)(nil).ControllerConfig)) + return &MockControllerAPIControllerConfigCall{Call: call} +} + +// MockControllerAPIControllerConfigCall wrap *gomock.Call +type MockControllerAPIControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIControllerConfigCall) Return(arg0 controller.Config, arg1 error) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIControllerConfigCall) Do(f func() (controller.Config, error)) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIControllerConfigCall) DoAndReturn(f func() (controller.Config, error)) *MockControllerAPIControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -358,9 +718,33 @@ func (m *MockControllerAPI) ModelConfig(arg0 context.Context) (*config.Config, e } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockControllerAPIMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockControllerAPIMockRecorder) ModelConfig(arg0 any) *MockControllerAPIModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockControllerAPI)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockControllerAPI)(nil).ModelConfig), arg0) + return &MockControllerAPIModelConfigCall{Call: call} +} + +// MockControllerAPIModelConfigCall wrap *gomock.Call +type MockControllerAPIModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockControllerAPIModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockControllerAPIModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockControllerAPIModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelUUID mocks base method. @@ -373,9 +757,33 @@ func (m *MockControllerAPI) ModelUUID() (string, error) { } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockControllerAPIMockRecorder) ModelUUID() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) ModelUUID() *MockControllerAPIModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockControllerAPI)(nil).ModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockControllerAPI)(nil).ModelUUID)) + return &MockControllerAPIModelUUIDCall{Call: call} +} + +// MockControllerAPIModelUUIDCall wrap *gomock.Call +type MockControllerAPIModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIModelUUIDCall) Return(arg0 string, arg1 error) *MockControllerAPIModelUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIModelUUIDCall) Do(f func() (string, error)) *MockControllerAPIModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIModelUUIDCall) DoAndReturn(f func() (string, error)) *MockControllerAPIModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForModelConfigChanges mocks base method. @@ -388,9 +796,33 @@ func (m *MockControllerAPI) WatchForModelConfigChanges() (watcher.Watcher[struct } // WatchForModelConfigChanges indicates an expected call of WatchForModelConfigChanges. -func (mr *MockControllerAPIMockRecorder) WatchForModelConfigChanges() *gomock.Call { +func (mr *MockControllerAPIMockRecorder) WatchForModelConfigChanges() *MockControllerAPIWatchForModelConfigChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForModelConfigChanges", reflect.TypeOf((*MockControllerAPI)(nil).WatchForModelConfigChanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForModelConfigChanges", reflect.TypeOf((*MockControllerAPI)(nil).WatchForModelConfigChanges)) + return &MockControllerAPIWatchForModelConfigChangesCall{Call: call} +} + +// MockControllerAPIWatchForModelConfigChangesCall wrap *gomock.Call +type MockControllerAPIWatchForModelConfigChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerAPIWatchForModelConfigChangesCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockControllerAPIWatchForModelConfigChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerAPIWatchForModelConfigChangesCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockControllerAPIWatchForModelConfigChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerAPIWatchForModelConfigChangesCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockControllerAPIWatchForModelConfigChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachinesAPI is a mock of MachinesAPI interface. @@ -430,10 +862,34 @@ func (m *MockMachinesAPI) Machines(arg0 context.Context, arg1 ...names.MachineTa } // Machines indicates an expected call of Machines. -func (mr *MockMachinesAPIMockRecorder) Machines(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockMachinesAPIMockRecorder) Machines(arg0 any, arg1 ...any) *MockMachinesAPIMachinesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockMachinesAPI)(nil).Machines), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machines", reflect.TypeOf((*MockMachinesAPI)(nil).Machines), varargs...) + return &MockMachinesAPIMachinesCall{Call: call} +} + +// MockMachinesAPIMachinesCall wrap *gomock.Call +type MockMachinesAPIMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinesAPIMachinesCall) Return(arg0 []provisioner.MachineResult, arg1 error) *MockMachinesAPIMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinesAPIMachinesCall) Do(f func(context.Context, ...names.MachineTag) ([]provisioner.MachineResult, error)) *MockMachinesAPIMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinesAPIMachinesCall) DoAndReturn(f func(context.Context, ...names.MachineTag) ([]provisioner.MachineResult, error)) *MockMachinesAPIMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachinesWithTransientErrors mocks base method. @@ -446,9 +902,33 @@ func (m *MockMachinesAPI) MachinesWithTransientErrors() ([]provisioner.MachineSt } // MachinesWithTransientErrors indicates an expected call of MachinesWithTransientErrors. -func (mr *MockMachinesAPIMockRecorder) MachinesWithTransientErrors() *gomock.Call { +func (mr *MockMachinesAPIMockRecorder) MachinesWithTransientErrors() *MockMachinesAPIMachinesWithTransientErrorsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachinesWithTransientErrors", reflect.TypeOf((*MockMachinesAPI)(nil).MachinesWithTransientErrors)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachinesWithTransientErrors", reflect.TypeOf((*MockMachinesAPI)(nil).MachinesWithTransientErrors)) + return &MockMachinesAPIMachinesWithTransientErrorsCall{Call: call} +} + +// MockMachinesAPIMachinesWithTransientErrorsCall wrap *gomock.Call +type MockMachinesAPIMachinesWithTransientErrorsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinesAPIMachinesWithTransientErrorsCall) Return(arg0 []provisioner.MachineStatusResult, arg1 error) *MockMachinesAPIMachinesWithTransientErrorsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinesAPIMachinesWithTransientErrorsCall) Do(f func() ([]provisioner.MachineStatusResult, error)) *MockMachinesAPIMachinesWithTransientErrorsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinesAPIMachinesWithTransientErrorsCall) DoAndReturn(f func() ([]provisioner.MachineStatusResult, error)) *MockMachinesAPIMachinesWithTransientErrorsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProvisioningInfo mocks base method. @@ -461,9 +941,33 @@ func (m *MockMachinesAPI) ProvisioningInfo(arg0 []names.MachineTag) (params.Prov } // ProvisioningInfo indicates an expected call of ProvisioningInfo. -func (mr *MockMachinesAPIMockRecorder) ProvisioningInfo(arg0 any) *gomock.Call { +func (mr *MockMachinesAPIMockRecorder) ProvisioningInfo(arg0 any) *MockMachinesAPIProvisioningInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningInfo", reflect.TypeOf((*MockMachinesAPI)(nil).ProvisioningInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningInfo", reflect.TypeOf((*MockMachinesAPI)(nil).ProvisioningInfo), arg0) + return &MockMachinesAPIProvisioningInfoCall{Call: call} +} + +// MockMachinesAPIProvisioningInfoCall wrap *gomock.Call +type MockMachinesAPIProvisioningInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinesAPIProvisioningInfoCall) Return(arg0 params.ProvisioningInfoResults, arg1 error) *MockMachinesAPIProvisioningInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinesAPIProvisioningInfoCall) Do(f func([]names.MachineTag) (params.ProvisioningInfoResults, error)) *MockMachinesAPIProvisioningInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinesAPIProvisioningInfoCall) DoAndReturn(f func([]names.MachineTag) (params.ProvisioningInfoResults, error)) *MockMachinesAPIProvisioningInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchMachineErrorRetry mocks base method. @@ -476,9 +980,33 @@ func (m *MockMachinesAPI) WatchMachineErrorRetry() (watcher.Watcher[struct{}], e } // WatchMachineErrorRetry indicates an expected call of WatchMachineErrorRetry. -func (mr *MockMachinesAPIMockRecorder) WatchMachineErrorRetry() *gomock.Call { +func (mr *MockMachinesAPIMockRecorder) WatchMachineErrorRetry() *MockMachinesAPIWatchMachineErrorRetryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMachineErrorRetry", reflect.TypeOf((*MockMachinesAPI)(nil).WatchMachineErrorRetry)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMachineErrorRetry", reflect.TypeOf((*MockMachinesAPI)(nil).WatchMachineErrorRetry)) + return &MockMachinesAPIWatchMachineErrorRetryCall{Call: call} +} + +// MockMachinesAPIWatchMachineErrorRetryCall wrap *gomock.Call +type MockMachinesAPIWatchMachineErrorRetryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinesAPIWatchMachineErrorRetryCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockMachinesAPIWatchMachineErrorRetryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinesAPIWatchMachineErrorRetryCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockMachinesAPIWatchMachineErrorRetryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinesAPIWatchMachineErrorRetryCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockMachinesAPIWatchMachineErrorRetryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelMachines mocks base method. @@ -491,7 +1019,31 @@ func (m *MockMachinesAPI) WatchModelMachines() (watcher.Watcher[[]string], error } // WatchModelMachines indicates an expected call of WatchModelMachines. -func (mr *MockMachinesAPIMockRecorder) WatchModelMachines() *gomock.Call { +func (mr *MockMachinesAPIMockRecorder) WatchModelMachines() *MockMachinesAPIWatchModelMachinesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockMachinesAPI)(nil).WatchModelMachines)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelMachines", reflect.TypeOf((*MockMachinesAPI)(nil).WatchModelMachines)) + return &MockMachinesAPIWatchModelMachinesCall{Call: call} +} + +// MockMachinesAPIWatchModelMachinesCall wrap *gomock.Call +type MockMachinesAPIWatchModelMachinesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinesAPIWatchModelMachinesCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockMachinesAPIWatchModelMachinesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinesAPIWatchModelMachinesCall) Do(f func() (watcher.Watcher[[]string], error)) *MockMachinesAPIWatchModelMachinesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinesAPIWatchModelMachinesCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockMachinesAPIWatchModelMachinesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/provisioner/mocks/watcher.go b/internal/worker/provisioner/mocks/watcher.go index d39bb3c2627..efe1cc5e720 100644 --- a/internal/worker/provisioner/mocks/watcher.go +++ b/internal/worker/provisioner/mocks/watcher.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher StringsWatcher +// mockgen -typed -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher StringsWatcher // // Package mocks is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockStringsWatcher) Changes() <-chan []string { } // Changes indicates an expected call of Changes. -func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Changes() *MockStringsWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockStringsWatcher)(nil).Changes)) + return &MockStringsWatcherChangesCall{Call: call} +} + +// MockStringsWatcherChangesCall wrap *gomock.Call +type MockStringsWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherChangesCall) Return(arg0 <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherChangesCall) Do(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherChangesCall) DoAndReturn(f func() <-chan []string) *MockStringsWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -59,9 +83,33 @@ func (m *MockStringsWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Kill() *MockStringsWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockStringsWatcher)(nil).Kill)) + return &MockStringsWatcherKillCall{Call: call} +} + +// MockStringsWatcherKillCall wrap *gomock.Call +type MockStringsWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherKillCall) Return() *MockStringsWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherKillCall) Do(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherKillCall) DoAndReturn(f func()) *MockStringsWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -73,7 +121,31 @@ func (m *MockStringsWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockStringsWatcherMockRecorder) Wait() *MockStringsWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockStringsWatcher)(nil).Wait)) + return &MockStringsWatcherWaitCall{Call: call} +} + +// MockStringsWatcherWaitCall wrap *gomock.Call +type MockStringsWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStringsWatcherWaitCall) Return(arg0 error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStringsWatcherWaitCall) Do(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStringsWatcherWaitCall) DoAndReturn(f func() error) *MockStringsWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/provisioner/package_test.go b/internal/worker/provisioner/package_test.go index cf494735017..618f0ba793a 100644 --- a/internal/worker/provisioner/package_test.go +++ b/internal/worker/provisioner/package_test.go @@ -9,10 +9,10 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher StringsWatcher -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/provisioner.go github.com/juju/juju/internal/worker/provisioner ContainerMachine,ContainerMachineGetter,ContainerProvisionerAPI,ControllerAPI,MachinesAPI -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/dependency.go github.com/juju/worker/v4/dependency Getter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher.go github.com/juju/juju/core/watcher StringsWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/provisioner.go github.com/juju/juju/internal/worker/provisioner ContainerMachine,ContainerMachineGetter,ContainerProvisionerAPI,ControllerAPI,MachinesAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/dependency.go github.com/juju/worker/v4/dependency Getter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/base_mock.go github.com/juju/juju/api/base APICaller func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/provisioner/provisioner_task_test.go b/internal/worker/provisioner/provisioner_task_test.go index b4d16bb4637..b06d9898156 100644 --- a/internal/worker/provisioner/provisioner_task_test.go +++ b/internal/worker/provisioner/provisioner_task_test.go @@ -363,13 +363,15 @@ func (s *ProvisionerTaskSuite) TestEvenZonePlacement(c *gc.C) { var usedZones []string for _, m := range machines { - broker.EXPECT().StartInstance(s.callCtx, azConstraints).Return(&environs.StartInstanceResult{ - Instance: &testInstance{id: "instance-" + m.id}, - }, nil).Do(func(ctx, params interface{}) { - zoneLock.Lock() - usedZones = append(usedZones, params.(environs.StartInstanceParams).AvailabilityZone) - zoneLock.Unlock() - }) + broker.EXPECT().StartInstance(s.callCtx, azConstraints). + DoAndReturn(func(ctx envcontext.ProviderCallContext, params environs.StartInstanceParams) (*environs.StartInstanceResult, error) { + zoneLock.Lock() + usedZones = append(usedZones, params.AvailabilityZone) + zoneLock.Unlock() + return &environs.StartInstanceResult{ + Instance: &testInstance{id: "instance-" + m.id}, + }, nil + }) } task := s.newProvisionerTaskWithBroker(c, broker, nil, numProvisionWorkersForTesting, defaultHarvestMode) @@ -683,8 +685,9 @@ func (s *ProvisionerTaskSuite) TestPopulateAZMachinesErrorWorkerStopped(c *gc.C) defer ctrl.Finish() broker := providermocks.NewMockZonedEnviron(ctrl) - broker.EXPECT().AllRunningInstances(s.callCtx).Return(nil, errors.New("boom")).Do(func(envcontext.ProviderCallContext) { + broker.EXPECT().AllRunningInstances(s.callCtx).DoAndReturn(func(envcontext.ProviderCallContext) ([]instances.Instance, error) { go func() { close(s.setupDone) }() + return nil, errors.New("boom") }) task := s.newProvisionerTaskWithBroker(c, broker, map[names.MachineTag][]string{ @@ -737,7 +740,7 @@ func (s *ProvisionerTaskSuite) TestDedupStopRequests(c *gc.C) { } // StopInstances should only be called once for m0. - broker.EXPECT().StopInstances(s.callCtx, gomock.Any()).Do(func(ctx interface{}, ids ...interface{}) { + broker.EXPECT().StopInstances(s.callCtx, gomock.Any()).DoAndReturn(func(ctx envcontext.ProviderCallContext, ids ...instance.Id) error { c.Assert(len(ids), gc.Equals, 1) c.Assert(ids[0], gc.DeepEquals, instance.Id("0")) @@ -760,6 +763,8 @@ func (s *ProvisionerTaskSuite) TestDedupStopRequests(c *gc.C) { c.Errorf("timed out waiting for second processed-machines event") } close(doneCh) + + return nil }) task := s.newProvisionerTaskWithBrokerAndEventCb(c, broker, nil, numProvisionWorkersForTesting, defaultHarvestMode, barrierCb) @@ -825,9 +830,7 @@ func (s *ProvisionerTaskSuite) TestDeferStopRequestsForMachinesStillProvisioning azConstraints := newAZConstraintStartInstanceParamsMatcher("az1") broker.EXPECT().DeriveAvailabilityZones(s.callCtx, azConstraints).Return([]string{}, nil).AnyTimes() gomock.InOrder( - broker.EXPECT().StartInstance(s.callCtx, azConstraints).Return(&environs.StartInstanceResult{ - Instance: &testInstance{id: "instance-0"}, - }, nil).Do(func(ctx, params interface{}) { + broker.EXPECT().StartInstance(s.callCtx, azConstraints).DoAndReturn(func(ctx envcontext.ProviderCallContext, params environs.StartInstanceParams) (*environs.StartInstanceResult, error) { // While one of the pool workers is executing this code, we // will wait until the machine change event gets processed // and the main loop is ready to process the next event. @@ -849,13 +852,17 @@ func (s *ProvisionerTaskSuite) TestDeferStopRequestsForMachinesStillProvisioning case <-time.After(coretesting.LongWait): c.Errorf("timed out waiting for second processed-machines event") } + return &environs.StartInstanceResult{ + Instance: &testInstance{id: "instance-0"}, + }, nil }), - broker.EXPECT().StopInstances(s.callCtx, gomock.Any()).Do(func(ctx interface{}, ids ...interface{}) { + broker.EXPECT().StopInstances(s.callCtx, gomock.Any()).DoAndReturn(func(ctx envcontext.ProviderCallContext, ids ...instance.Id) error { c.Assert(len(ids), gc.Equals, 1) c.Assert(ids[0], gc.DeepEquals, instance.Id("0")) // Signal the test to shut down the worker. close(doneCh) + return nil }), ) @@ -909,8 +916,11 @@ func (s *ProvisionerTaskSuite) TestUpdatedZonesReflectedInAZMachineSlice(c *gc.C exp := broker.EXPECT() exp.AllRunningInstances(s.callCtx).Return(s.instances, nil).MinTimes(1) - exp.InstanceAvailabilityZoneNames(s.callCtx, []instance.Id{s.instances[0].Id()}).Return( - map[instance.Id]string{}, nil).Do(func(envcontext.ProviderCallContext, []instance.Id) { close(s.setupDone) }) + exp.InstanceAvailabilityZoneNames(s.callCtx, []instance.Id{s.instances[0].Id()}). + DoAndReturn(func(envcontext.ProviderCallContext, []instance.Id) (map[instance.Id]string, error) { + close(s.setupDone) + return map[instance.Id]string{}, nil + }) az1 := providermocks.NewMockAvailabilityZone(ctrl) az1.EXPECT().Name().Return("az1").MinTimes(1) @@ -1275,11 +1285,13 @@ func (s *ProvisionerTaskSuite) TestProvisioningDoesNotProvisionTheSameMachineAft exp.AllRunningInstances(s.callCtx).Return(s.instances, nil).MinTimes(1) done := make(chan bool) - s.machinesAPI.EXPECT().Machines(gomock.Any(), names.NewMachineTag("0")).Return([]apiprovisioner.MachineResult{{ - Machine: m0, - }}, nil).Do(func(_ context.Context, _ ...names.MachineTag) { - go func() { done <- true }() - }) + s.machinesAPI.EXPECT().Machines(gomock.Any(), names.NewMachineTag("0")). + DoAndReturn(func(context.Context, ...names.MachineTag) ([]apiprovisioner.MachineResult, error) { + go func() { done <- true }() + return []apiprovisioner.MachineResult{{ + Machine: m0, + }}, nil + }) // Ensure event is ready as provisioner starts up. go func() { @@ -1353,9 +1365,11 @@ func (s *ProvisionerTaskSuite) setUpZonedEnviron(ctrl *gomock.Controller, machin exp := broker.EXPECT() exp.AllRunningInstances(s.callCtx).Return(s.instances, nil).MinTimes(1) - exp.InstanceAvailabilityZoneNames(s.callCtx, instanceIds).Return(map[instance.Id]string{}, nil).Do( - func(envcontext.ProviderCallContext, []instance.Id) { close(s.setupDone) }, - ) + exp.InstanceAvailabilityZoneNames(s.callCtx, instanceIds). + DoAndReturn(func(envcontext.ProviderCallContext, []instance.Id) (map[instance.Id]string, error) { + close(s.setupDone) + return map[instance.Id]string{}, nil + }) exp.AvailabilityZones(s.callCtx).Return(zones, nil).MinTimes(1) return broker } diff --git a/internal/worker/provisioner/provisioner_test.go b/internal/worker/provisioner/provisioner_test.go index 6fda7275f0d..bdce16990e9 100644 --- a/internal/worker/provisioner/provisioner_test.go +++ b/internal/worker/provisioner/provisioner_test.go @@ -28,6 +28,7 @@ import ( "github.com/juju/juju/core/watcher/watchertest" "github.com/juju/juju/environs" "github.com/juju/juju/environs/config" + "github.com/juju/juju/environs/envcontext" "github.com/juju/juju/environs/instances" environmocks "github.com/juju/juju/environs/testing" coretools "github.com/juju/juju/internal/tools" @@ -311,9 +312,10 @@ func (s *ProvisionerSuite) TestMachineStartedAndStopped(c *gc.C) { s.checkStartInstance(c, m666) // ...and removed, along with the machine, when the machine is Dead. - s.broker.EXPECT().StopInstances(gomock.Any(), gomock.Any()).Do(func(ctx interface{}, ids ...interface{}) { + s.broker.EXPECT().StopInstances(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx envcontext.ProviderCallContext, ids ...instance.Id) error { c.Assert(len(ids), gc.Equals, 1) c.Assert(ids[0], gc.DeepEquals, instance.Id("inst-666")) + return nil }) m666.SetLife(life.Dead) diff --git a/internal/worker/pruner/mocks/mocks_facade.go b/internal/worker/pruner/mocks/mocks_facade.go index 3e253304a43..d83e8a2d700 100644 --- a/internal/worker/pruner/mocks/mocks_facade.go +++ b/internal/worker/pruner/mocks/mocks_facade.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks_facade.go github.com/juju/juju/internal/worker/pruner Facade,ModelConfigService +// mockgen -typed -package mocks -destination mocks/mocks_facade.go github.com/juju/juju/internal/worker/pruner Facade,ModelConfigService // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockFacade) Prune(arg0 time.Duration, arg1 int) error { } // Prune indicates an expected call of Prune. -func (mr *MockFacadeMockRecorder) Prune(arg0, arg1 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) Prune(arg0, arg1 any) *MockFacadePruneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prune", reflect.TypeOf((*MockFacade)(nil).Prune), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prune", reflect.TypeOf((*MockFacade)(nil).Prune), arg0, arg1) + return &MockFacadePruneCall{Call: call} +} + +// MockFacadePruneCall wrap *gomock.Call +type MockFacadePruneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadePruneCall) Return(arg0 error) *MockFacadePruneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadePruneCall) Do(f func(time.Duration, int) error) *MockFacadePruneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadePruneCall) DoAndReturn(f func(time.Duration, int) error) *MockFacadePruneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelConfigService is a mock of ModelConfigService interface. @@ -89,9 +113,33 @@ func (m *MockModelConfigService) ModelConfig(arg0 context.Context) (*config.Conf } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) ModelConfig(arg0 any) *MockModelConfigServiceModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockModelConfigService)(nil).ModelConfig), arg0) + return &MockModelConfigServiceModelConfigCall{Call: call} +} + +// MockModelConfigServiceModelConfigCall wrap *gomock.Call +type MockModelConfigServiceModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockModelConfigServiceModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -104,7 +152,31 @@ func (m *MockModelConfigService) Watch() (watcher.Watcher[[]string], error) { } // Watch indicates an expected call of Watch. -func (mr *MockModelConfigServiceMockRecorder) Watch() *gomock.Call { +func (mr *MockModelConfigServiceMockRecorder) Watch() *MockModelConfigServiceWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockModelConfigService)(nil).Watch)) + return &MockModelConfigServiceWatchCall{Call: call} +} + +// MockModelConfigServiceWatchCall wrap *gomock.Call +type MockModelConfigServiceWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelConfigServiceWatchCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelConfigServiceWatchCall) Do(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelConfigServiceWatchCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockModelConfigServiceWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/pruner/package_test.go b/internal/worker/pruner/package_test.go index e2d16885a7f..794f8f775e2 100644 --- a/internal/worker/pruner/package_test.go +++ b/internal/worker/pruner/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks_facade.go github.com/juju/juju/internal/worker/pruner Facade,ModelConfigService +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks_facade.go github.com/juju/juju/internal/worker/pruner Facade,ModelConfigService func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/querylogger/clock_mock_test.go b/internal/worker/querylogger/clock_mock_test.go index c6f6992462f..a6409ba2229 100644 --- a/internal/worker/querylogger/clock_mock_test.go +++ b/internal/worker/querylogger/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package querylogger -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package querylogger -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package querylogger is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/querylogger/package_mock_test.go b/internal/worker/querylogger/package_mock_test.go index 8bca9a6b82a..9b5dd235cd8 100644 --- a/internal/worker/querylogger/package_mock_test.go +++ b/internal/worker/querylogger/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package querylogger -destination package_mock_test.go github.com/juju/juju/internal/worker/querylogger Logger +// mockgen -typed -package querylogger -destination package_mock_test.go github.com/juju/juju/internal/worker/querylogger Logger // // Package querylogger is a generated GoMock package. @@ -49,10 +49,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -66,8 +90,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/querylogger/package_test.go b/internal/worker/querylogger/package_test.go index b1d9219b207..f657a8184d0 100644 --- a/internal/worker/querylogger/package_test.go +++ b/internal/worker/querylogger/package_test.go @@ -11,8 +11,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package querylogger -destination package_mock_test.go github.com/juju/juju/internal/worker/querylogger Logger -//go:generate go run go.uber.org/mock/mockgen -package querylogger -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package querylogger -destination package_mock_test.go github.com/juju/juju/internal/worker/querylogger Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package querylogger -destination clock_mock_test.go github.com/juju/clock Clock,Timer func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/reboot/mocks/facade_mock.go b/internal/worker/reboot/mocks/facade_mock.go index 77d8fe52126..87bc2c660db 100644 --- a/internal/worker/reboot/mocks/facade_mock.go +++ b/internal/worker/reboot/mocks/facade_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/agent/reboot Client +// mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/agent/reboot Client // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClient) ClearReboot() error { } // ClearReboot indicates an expected call of ClearReboot. -func (mr *MockClientMockRecorder) ClearReboot() *gomock.Call { +func (mr *MockClientMockRecorder) ClearReboot() *MockClientClearRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearReboot", reflect.TypeOf((*MockClient)(nil).ClearReboot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearReboot", reflect.TypeOf((*MockClient)(nil).ClearReboot)) + return &MockClientClearRebootCall{Call: call} +} + +// MockClientClearRebootCall wrap *gomock.Call +type MockClientClearRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientClearRebootCall) Return(arg0 error) *MockClientClearRebootCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientClearRebootCall) Do(f func() error) *MockClientClearRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientClearRebootCall) DoAndReturn(f func() error) *MockClientClearRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRebootAction mocks base method. @@ -64,9 +88,33 @@ func (m *MockClient) GetRebootAction() (params.RebootAction, error) { } // GetRebootAction indicates an expected call of GetRebootAction. -func (mr *MockClientMockRecorder) GetRebootAction() *gomock.Call { +func (mr *MockClientMockRecorder) GetRebootAction() *MockClientGetRebootActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRebootAction", reflect.TypeOf((*MockClient)(nil).GetRebootAction)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRebootAction", reflect.TypeOf((*MockClient)(nil).GetRebootAction)) + return &MockClientGetRebootActionCall{Call: call} +} + +// MockClientGetRebootActionCall wrap *gomock.Call +type MockClientGetRebootActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientGetRebootActionCall) Return(arg0 params.RebootAction, arg1 error) *MockClientGetRebootActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientGetRebootActionCall) Do(f func() (params.RebootAction, error)) *MockClientGetRebootActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientGetRebootActionCall) DoAndReturn(f func() (params.RebootAction, error)) *MockClientGetRebootActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RequestReboot mocks base method. @@ -78,9 +126,33 @@ func (m *MockClient) RequestReboot() error { } // RequestReboot indicates an expected call of RequestReboot. -func (mr *MockClientMockRecorder) RequestReboot() *gomock.Call { +func (mr *MockClientMockRecorder) RequestReboot() *MockClientRequestRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockClient)(nil).RequestReboot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockClient)(nil).RequestReboot)) + return &MockClientRequestRebootCall{Call: call} +} + +// MockClientRequestRebootCall wrap *gomock.Call +type MockClientRequestRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientRequestRebootCall) Return(arg0 error) *MockClientRequestRebootCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientRequestRebootCall) Do(f func() error) *MockClientRequestRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientRequestRebootCall) DoAndReturn(f func() error) *MockClientRequestRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForRebootEvent mocks base method. @@ -93,7 +165,31 @@ func (m *MockClient) WatchForRebootEvent() (watcher.Watcher[struct{}], error) { } // WatchForRebootEvent indicates an expected call of WatchForRebootEvent. -func (mr *MockClientMockRecorder) WatchForRebootEvent() *gomock.Call { +func (mr *MockClientMockRecorder) WatchForRebootEvent() *MockClientWatchForRebootEventCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForRebootEvent", reflect.TypeOf((*MockClient)(nil).WatchForRebootEvent)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForRebootEvent", reflect.TypeOf((*MockClient)(nil).WatchForRebootEvent)) + return &MockClientWatchForRebootEventCall{Call: call} +} + +// MockClientWatchForRebootEventCall wrap *gomock.Call +type MockClientWatchForRebootEventCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientWatchForRebootEventCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockClientWatchForRebootEventCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientWatchForRebootEventCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockClientWatchForRebootEventCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientWatchForRebootEventCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockClientWatchForRebootEventCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/reboot/mocks/lock_mock.go b/internal/worker/reboot/mocks/lock_mock.go index 1d4570bb927..91edf4bcecc 100644 --- a/internal/worker/reboot/mocks/lock_mock.go +++ b/internal/worker/reboot/mocks/lock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/lock_mock.go github.com/juju/juju/core/machinelock Lock +// mockgen -typed -package mocks -destination mocks/lock_mock.go github.com/juju/juju/core/machinelock Lock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockLock) Acquire(arg0 machinelock.Spec) (func(), error) { } // Acquire indicates an expected call of Acquire. -func (mr *MockLockMockRecorder) Acquire(arg0 any) *gomock.Call { +func (mr *MockLockMockRecorder) Acquire(arg0 any) *MockLockAcquireCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockLock)(nil).Acquire), arg0) + return &MockLockAcquireCall{Call: call} +} + +// MockLockAcquireCall wrap *gomock.Call +type MockLockAcquireCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockAcquireCall) Return(arg0 func(), arg1 error) *MockLockAcquireCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockAcquireCall) Do(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockAcquireCall) DoAndReturn(f func(machinelock.Spec) (func(), error)) *MockLockAcquireCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -68,7 +92,31 @@ func (m *MockLock) Report(arg0 ...machinelock.ReportOption) (string, error) { } // Report indicates an expected call of Report. -func (mr *MockLockMockRecorder) Report(arg0 ...any) *gomock.Call { +func (mr *MockLockMockRecorder) Report(arg0 ...any) *MockLockReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockLock)(nil).Report), arg0...) + return &MockLockReportCall{Call: call} +} + +// MockLockReportCall wrap *gomock.Call +type MockLockReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockReportCall) Return(arg0 string, arg1 error) *MockLockReportCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockReportCall) Do(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockReportCall) DoAndReturn(f func(...machinelock.ReportOption) (string, error)) *MockLockReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/reboot/package_test.go b/internal/worker/reboot/package_test.go index 2264031df13..081992f4ed1 100644 --- a/internal/worker/reboot/package_test.go +++ b/internal/worker/reboot/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/agent/reboot Client -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/lock_mock.go github.com/juju/juju/core/machinelock Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/facade_mock.go github.com/juju/juju/api/agent/reboot Client +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/lock_mock.go github.com/juju/juju/core/machinelock Lock func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/secretbackendrotate/mocks/client_mock.go b/internal/worker/secretbackendrotate/mocks/client_mock.go index fb28b14e506..d3b5b6d2225 100644 --- a/internal/worker/secretbackendrotate/mocks/client_mock.go +++ b/internal/worker/secretbackendrotate/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go -source rotate.go +// mockgen -typed -package mocks -destination mocks/client_mock.go -source rotate.go // // Package mocks is a generated GoMock package. @@ -73,10 +73,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretBackendManagerFacade is a mock of SecretBackendManagerFacade interface. @@ -115,9 +139,33 @@ func (m *MockSecretBackendManagerFacade) RotateBackendTokens(info ...string) err } // RotateBackendTokens indicates an expected call of RotateBackendTokens. -func (mr *MockSecretBackendManagerFacadeMockRecorder) RotateBackendTokens(info ...any) *gomock.Call { +func (mr *MockSecretBackendManagerFacadeMockRecorder) RotateBackendTokens(info ...any) *MockSecretBackendManagerFacadeRotateBackendTokensCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RotateBackendTokens", reflect.TypeOf((*MockSecretBackendManagerFacade)(nil).RotateBackendTokens), info...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RotateBackendTokens", reflect.TypeOf((*MockSecretBackendManagerFacade)(nil).RotateBackendTokens), info...) + return &MockSecretBackendManagerFacadeRotateBackendTokensCall{Call: call} +} + +// MockSecretBackendManagerFacadeRotateBackendTokensCall wrap *gomock.Call +type MockSecretBackendManagerFacadeRotateBackendTokensCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendManagerFacadeRotateBackendTokensCall) Return(arg0 error) *MockSecretBackendManagerFacadeRotateBackendTokensCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendManagerFacadeRotateBackendTokensCall) Do(f func(...string) error) *MockSecretBackendManagerFacadeRotateBackendTokensCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendManagerFacadeRotateBackendTokensCall) DoAndReturn(f func(...string) error) *MockSecretBackendManagerFacadeRotateBackendTokensCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchTokenRotationChanges mocks base method. @@ -130,7 +178,31 @@ func (m *MockSecretBackendManagerFacade) WatchTokenRotationChanges() (watcher.Se } // WatchTokenRotationChanges indicates an expected call of WatchTokenRotationChanges. -func (mr *MockSecretBackendManagerFacadeMockRecorder) WatchTokenRotationChanges() *gomock.Call { +func (mr *MockSecretBackendManagerFacadeMockRecorder) WatchTokenRotationChanges() *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchTokenRotationChanges", reflect.TypeOf((*MockSecretBackendManagerFacade)(nil).WatchTokenRotationChanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchTokenRotationChanges", reflect.TypeOf((*MockSecretBackendManagerFacade)(nil).WatchTokenRotationChanges)) + return &MockSecretBackendManagerFacadeWatchTokenRotationChangesCall{Call: call} +} + +// MockSecretBackendManagerFacadeWatchTokenRotationChangesCall wrap *gomock.Call +type MockSecretBackendManagerFacadeWatchTokenRotationChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall) Return(arg0 watcher.SecretBackendRotateWatcher, arg1 error) *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall) Do(f func() (watcher.SecretBackendRotateWatcher, error)) *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall) DoAndReturn(f func() (watcher.SecretBackendRotateWatcher, error)) *MockSecretBackendManagerFacadeWatchTokenRotationChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretbackendrotate/mocks/watcher_mock.go b/internal/worker/secretbackendrotate/mocks/watcher_mock.go index 345389be1ee..343a63c57ab 100644 --- a/internal/worker/secretbackendrotate/mocks/watcher_mock.go +++ b/internal/worker/secretbackendrotate/mocks/watcher_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher +// mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockSecretBackendRotateWatcher) Changes() <-chan []watcher.SecretBacken } // Changes indicates an expected call of Changes. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Changes() *MockSecretBackendRotateWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Changes)) + return &MockSecretBackendRotateWatcherChangesCall{Call: call} +} + +// MockSecretBackendRotateWatcherChangesCall wrap *gomock.Call +type MockSecretBackendRotateWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherChangesCall) Return(arg0 <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherChangesCall) Do(f func() <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherChangesCall) DoAndReturn(f func() <-chan []watcher.SecretBackendRotateChange) *MockSecretBackendRotateWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -60,9 +84,33 @@ func (m *MockSecretBackendRotateWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Kill() *MockSecretBackendRotateWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Kill)) + return &MockSecretBackendRotateWatcherKillCall{Call: call} +} + +// MockSecretBackendRotateWatcherKillCall wrap *gomock.Call +type MockSecretBackendRotateWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherKillCall) Return() *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherKillCall) Do(f func()) *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherKillCall) DoAndReturn(f func()) *MockSecretBackendRotateWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -74,7 +122,31 @@ func (m *MockSecretBackendRotateWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockSecretBackendRotateWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockSecretBackendRotateWatcherMockRecorder) Wait() *MockSecretBackendRotateWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretBackendRotateWatcher)(nil).Wait)) + return &MockSecretBackendRotateWatcherWaitCall{Call: call} +} + +// MockSecretBackendRotateWatcherWaitCall wrap *gomock.Call +type MockSecretBackendRotateWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretBackendRotateWatcherWaitCall) Return(arg0 error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretBackendRotateWatcherWaitCall) Do(f func() error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretBackendRotateWatcherWaitCall) DoAndReturn(f func() error) *MockSecretBackendRotateWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretbackendrotate/package_test.go b/internal/worker/secretbackendrotate/package_test.go index 4f06d85792e..638b59a6f3b 100644 --- a/internal/worker/secretbackendrotate/package_test.go +++ b/internal/worker/secretbackendrotate/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go -source rotate.go -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go -source rotate.go +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretBackendRotateWatcher func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/secretexpire/mocks/client_mock.go b/internal/worker/secretexpire/mocks/client_mock.go index a11e98b93d8..e7c80331bd3 100644 --- a/internal/worker/secretexpire/mocks/client_mock.go +++ b/internal/worker/secretexpire/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go -source secretexpire.go +// mockgen -typed -package mocks -destination mocks/client_mock.go -source secretexpire.go // // Package mocks is a generated GoMock package. @@ -74,10 +74,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -91,10 +115,34 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretManagerFacade is a mock of SecretManagerFacade interface. @@ -134,7 +182,31 @@ func (m *MockSecretManagerFacade) WatchSecretRevisionsExpiryChanges(ownerTags .. } // WatchSecretRevisionsExpiryChanges indicates an expected call of WatchSecretRevisionsExpiryChanges. -func (mr *MockSecretManagerFacadeMockRecorder) WatchSecretRevisionsExpiryChanges(ownerTags ...any) *gomock.Call { +func (mr *MockSecretManagerFacadeMockRecorder) WatchSecretRevisionsExpiryChanges(ownerTags ...any) *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretRevisionsExpiryChanges", reflect.TypeOf((*MockSecretManagerFacade)(nil).WatchSecretRevisionsExpiryChanges), ownerTags...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretRevisionsExpiryChanges", reflect.TypeOf((*MockSecretManagerFacade)(nil).WatchSecretRevisionsExpiryChanges), ownerTags...) + return &MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall{Call: call} +} + +// MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall wrap *gomock.Call +type MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall) Return(arg0 watcher.SecretTriggerWatcher, arg1 error) *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall) Do(f func(...names.Tag) (watcher.SecretTriggerWatcher, error)) *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall) DoAndReturn(f func(...names.Tag) (watcher.SecretTriggerWatcher, error)) *MockSecretManagerFacadeWatchSecretRevisionsExpiryChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretexpire/package_test.go b/internal/worker/secretexpire/package_test.go index e84cc96f267..0e91dcc03ca 100644 --- a/internal/worker/secretexpire/package_test.go +++ b/internal/worker/secretexpire/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go -source secretexpire.go +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go -source secretexpire.go func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/secretrotate/mocks/client_mock.go b/internal/worker/secretrotate/mocks/client_mock.go index c0370dee05a..c282dc808a4 100644 --- a/internal/worker/secretrotate/mocks/client_mock.go +++ b/internal/worker/secretrotate/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go -source secretrotate.go +// mockgen -typed -package mocks -destination mocks/client_mock.go -source secretrotate.go // // Package mocks is a generated GoMock package. @@ -74,10 +74,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretManagerFacade is a mock of SecretManagerFacade interface. @@ -117,7 +141,31 @@ func (m *MockSecretManagerFacade) WatchSecretsRotationChanges(ownerTags ...names } // WatchSecretsRotationChanges indicates an expected call of WatchSecretsRotationChanges. -func (mr *MockSecretManagerFacadeMockRecorder) WatchSecretsRotationChanges(ownerTags ...any) *gomock.Call { +func (mr *MockSecretManagerFacadeMockRecorder) WatchSecretsRotationChanges(ownerTags ...any) *MockSecretManagerFacadeWatchSecretsRotationChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretsRotationChanges", reflect.TypeOf((*MockSecretManagerFacade)(nil).WatchSecretsRotationChanges), ownerTags...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretsRotationChanges", reflect.TypeOf((*MockSecretManagerFacade)(nil).WatchSecretsRotationChanges), ownerTags...) + return &MockSecretManagerFacadeWatchSecretsRotationChangesCall{Call: call} +} + +// MockSecretManagerFacadeWatchSecretsRotationChangesCall wrap *gomock.Call +type MockSecretManagerFacadeWatchSecretsRotationChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretManagerFacadeWatchSecretsRotationChangesCall) Return(arg0 watcher.SecretTriggerWatcher, arg1 error) *MockSecretManagerFacadeWatchSecretsRotationChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretManagerFacadeWatchSecretsRotationChangesCall) Do(f func(...names.Tag) (watcher.SecretTriggerWatcher, error)) *MockSecretManagerFacadeWatchSecretsRotationChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretManagerFacadeWatchSecretsRotationChangesCall) DoAndReturn(f func(...names.Tag) (watcher.SecretTriggerWatcher, error)) *MockSecretManagerFacadeWatchSecretsRotationChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretrotate/mocks/watcher_mock.go b/internal/worker/secretrotate/mocks/watcher_mock.go index 4b30abd2f50..cc93accdec7 100644 --- a/internal/worker/secretrotate/mocks/watcher_mock.go +++ b/internal/worker/secretrotate/mocks/watcher_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretTriggerWatcher +// mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretTriggerWatcher // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockSecretTriggerWatcher) Changes() <-chan []watcher.SecretTriggerChang } // Changes indicates an expected call of Changes. -func (mr *MockSecretTriggerWatcherMockRecorder) Changes() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Changes() *MockSecretTriggerWatcherChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Changes)) + return &MockSecretTriggerWatcherChangesCall{Call: call} +} + +// MockSecretTriggerWatcherChangesCall wrap *gomock.Call +type MockSecretTriggerWatcherChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherChangesCall) Return(arg0 <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherChangesCall) Do(f func() <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherChangesCall) DoAndReturn(f func() <-chan []watcher.SecretTriggerChange) *MockSecretTriggerWatcherChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -60,9 +84,33 @@ func (m *MockSecretTriggerWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockSecretTriggerWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Kill() *MockSecretTriggerWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Kill)) + return &MockSecretTriggerWatcherKillCall{Call: call} +} + +// MockSecretTriggerWatcherKillCall wrap *gomock.Call +type MockSecretTriggerWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherKillCall) Return() *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherKillCall) Do(f func()) *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherKillCall) DoAndReturn(f func()) *MockSecretTriggerWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -74,7 +122,31 @@ func (m *MockSecretTriggerWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockSecretTriggerWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockSecretTriggerWatcherMockRecorder) Wait() *MockSecretTriggerWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockSecretTriggerWatcher)(nil).Wait)) + return &MockSecretTriggerWatcherWaitCall{Call: call} +} + +// MockSecretTriggerWatcherWaitCall wrap *gomock.Call +type MockSecretTriggerWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretTriggerWatcherWaitCall) Return(arg0 error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretTriggerWatcherWaitCall) Do(f func() error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretTriggerWatcherWaitCall) DoAndReturn(f func() error) *MockSecretTriggerWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretrotate/package_test.go b/internal/worker/secretrotate/package_test.go index 10f5092c93e..3fbd89b79eb 100644 --- a/internal/worker/secretrotate/package_test.go +++ b/internal/worker/secretrotate/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go -source secretrotate.go -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretTriggerWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go -source secretrotate.go +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/core/watcher SecretTriggerWatcher func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/secretsdrainworker/mocks/secrets_mock.go b/internal/worker/secretsdrainworker/mocks/secrets_mock.go index 5f20447c840..eb5c47276e4 100644 --- a/internal/worker/secretsdrainworker/mocks/secrets_mock.go +++ b/internal/worker/secretsdrainworker/mocks/secrets_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secrets_mock.go github.com/juju/juju/internal/secrets BackendsClient +// mockgen -typed -package mocks -destination mocks/secrets_mock.go github.com/juju/juju/internal/secrets BackendsClient // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockBackendsClient) DeleteContent(arg0 *secrets.URI, arg1 int) error { } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockBackendsClientMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) DeleteContent(arg0, arg1 any) *MockBackendsClientDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockBackendsClient)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockBackendsClient)(nil).DeleteContent), arg0, arg1) + return &MockBackendsClientDeleteContentCall{Call: call} +} + +// MockBackendsClientDeleteContentCall wrap *gomock.Call +type MockBackendsClientDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientDeleteContentCall) Return(arg0 error) *MockBackendsClientDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientDeleteContentCall) Do(f func(*secrets.URI, int) error) *MockBackendsClientDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientDeleteContentCall) DoAndReturn(f func(*secrets.URI, int) error) *MockBackendsClientDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteExternalContent mocks base method. @@ -63,9 +87,33 @@ func (m *MockBackendsClient) DeleteExternalContent(arg0 secrets.ValueRef) error } // DeleteExternalContent indicates an expected call of DeleteExternalContent. -func (mr *MockBackendsClientMockRecorder) DeleteExternalContent(arg0 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) DeleteExternalContent(arg0 any) *MockBackendsClientDeleteExternalContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExternalContent", reflect.TypeOf((*MockBackendsClient)(nil).DeleteExternalContent), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExternalContent", reflect.TypeOf((*MockBackendsClient)(nil).DeleteExternalContent), arg0) + return &MockBackendsClientDeleteExternalContentCall{Call: call} +} + +// MockBackendsClientDeleteExternalContentCall wrap *gomock.Call +type MockBackendsClientDeleteExternalContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientDeleteExternalContentCall) Return(arg0 error) *MockBackendsClientDeleteExternalContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientDeleteExternalContentCall) Do(f func(secrets.ValueRef) error) *MockBackendsClientDeleteExternalContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientDeleteExternalContentCall) DoAndReturn(f func(secrets.ValueRef) error) *MockBackendsClientDeleteExternalContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetBackend mocks base method. @@ -79,9 +127,33 @@ func (m *MockBackendsClient) GetBackend(arg0 *string, arg1 bool) (provider.Secre } // GetBackend indicates an expected call of GetBackend. -func (mr *MockBackendsClientMockRecorder) GetBackend(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) GetBackend(arg0, arg1 any) *MockBackendsClientGetBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackend", reflect.TypeOf((*MockBackendsClient)(nil).GetBackend), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackend", reflect.TypeOf((*MockBackendsClient)(nil).GetBackend), arg0, arg1) + return &MockBackendsClientGetBackendCall{Call: call} +} + +// MockBackendsClientGetBackendCall wrap *gomock.Call +type MockBackendsClientGetBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientGetBackendCall) Return(arg0 provider.SecretsBackend, arg1 string, arg2 error) *MockBackendsClientGetBackendCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientGetBackendCall) Do(f func(*string, bool) (provider.SecretsBackend, string, error)) *MockBackendsClientGetBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientGetBackendCall) DoAndReturn(f func(*string, bool) (provider.SecretsBackend, string, error)) *MockBackendsClientGetBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -94,9 +166,33 @@ func (m *MockBackendsClient) GetContent(arg0 *secrets.URI, arg1 string, arg2, ar } // GetContent indicates an expected call of GetContent. -func (mr *MockBackendsClientMockRecorder) GetContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) GetContent(arg0, arg1, arg2, arg3 any) *MockBackendsClientGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockBackendsClient)(nil).GetContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockBackendsClient)(nil).GetContent), arg0, arg1, arg2, arg3) + return &MockBackendsClientGetContentCall{Call: call} +} + +// MockBackendsClientGetContentCall wrap *gomock.Call +type MockBackendsClientGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockBackendsClientGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientGetContentCall) Do(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockBackendsClientGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientGetContentCall) DoAndReturn(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockBackendsClientGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRevisionContent mocks base method. @@ -109,9 +205,33 @@ func (m *MockBackendsClient) GetRevisionContent(arg0 *secrets.URI, arg1 int) (se } // GetRevisionContent indicates an expected call of GetRevisionContent. -func (mr *MockBackendsClientMockRecorder) GetRevisionContent(arg0, arg1 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) GetRevisionContent(arg0, arg1 any) *MockBackendsClientGetRevisionContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionContent", reflect.TypeOf((*MockBackendsClient)(nil).GetRevisionContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevisionContent", reflect.TypeOf((*MockBackendsClient)(nil).GetRevisionContent), arg0, arg1) + return &MockBackendsClientGetRevisionContentCall{Call: call} +} + +// MockBackendsClientGetRevisionContentCall wrap *gomock.Call +type MockBackendsClientGetRevisionContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientGetRevisionContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockBackendsClientGetRevisionContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientGetRevisionContentCall) Do(f func(*secrets.URI, int) (secrets.SecretValue, error)) *MockBackendsClientGetRevisionContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientGetRevisionContentCall) DoAndReturn(f func(*secrets.URI, int) (secrets.SecretValue, error)) *MockBackendsClientGetRevisionContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -124,7 +244,31 @@ func (m *MockBackendsClient) SaveContent(arg0 *secrets.URI, arg1 int, arg2 secre } // SaveContent indicates an expected call of SaveContent. -func (mr *MockBackendsClientMockRecorder) SaveContent(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBackendsClientMockRecorder) SaveContent(arg0, arg1, arg2 any) *MockBackendsClientSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockBackendsClient)(nil).SaveContent), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockBackendsClient)(nil).SaveContent), arg0, arg1, arg2) + return &MockBackendsClientSaveContentCall{Call: call} +} + +// MockBackendsClientSaveContentCall wrap *gomock.Call +type MockBackendsClientSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBackendsClientSaveContentCall) Return(arg0 secrets.ValueRef, arg1 error) *MockBackendsClientSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBackendsClientSaveContentCall) Do(f func(*secrets.URI, int, secrets.SecretValue) (secrets.ValueRef, error)) *MockBackendsClientSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBackendsClientSaveContentCall) DoAndReturn(f func(*secrets.URI, int, secrets.SecretValue) (secrets.ValueRef, error)) *MockBackendsClientSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretsdrainworker/mocks/secretsdrainworker_mock.go b/internal/worker/secretsdrainworker/mocks/secretsdrainworker_mock.go index f282440bd37..bd61057681a 100644 --- a/internal/worker/secretsdrainworker/mocks/secretsdrainworker_mock.go +++ b/internal/worker/secretsdrainworker/mocks/secretsdrainworker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretsdrainworker_mock.go github.com/juju/juju/internal/worker/secretsdrainworker Logger,SecretsDrainFacade +// mockgen -typed -package mocks -destination mocks/secretsdrainworker_mock.go github.com/juju/juju/internal/worker/secretsdrainworker Logger,SecretsDrainFacade // // Package mocks is a generated GoMock package. @@ -52,10 +52,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -69,10 +93,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -86,10 +134,34 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsDrainFacade is a mock of SecretsDrainFacade interface. @@ -125,9 +197,33 @@ func (m *MockSecretsDrainFacade) ChangeSecretBackend(arg0 []secretsdrain.ChangeS } // ChangeSecretBackend indicates an expected call of ChangeSecretBackend. -func (mr *MockSecretsDrainFacadeMockRecorder) ChangeSecretBackend(arg0 any) *gomock.Call { +func (mr *MockSecretsDrainFacadeMockRecorder) ChangeSecretBackend(arg0 any) *MockSecretsDrainFacadeChangeSecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretsDrainFacade)(nil).ChangeSecretBackend), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeSecretBackend", reflect.TypeOf((*MockSecretsDrainFacade)(nil).ChangeSecretBackend), arg0) + return &MockSecretsDrainFacadeChangeSecretBackendCall{Call: call} +} + +// MockSecretsDrainFacadeChangeSecretBackendCall wrap *gomock.Call +type MockSecretsDrainFacadeChangeSecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsDrainFacadeChangeSecretBackendCall) Return(arg0 secretsdrain.ChangeSecretBackendResult, arg1 error) *MockSecretsDrainFacadeChangeSecretBackendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsDrainFacadeChangeSecretBackendCall) Do(f func([]secretsdrain.ChangeSecretBackendArg) (secretsdrain.ChangeSecretBackendResult, error)) *MockSecretsDrainFacadeChangeSecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsDrainFacadeChangeSecretBackendCall) DoAndReturn(f func([]secretsdrain.ChangeSecretBackendArg) (secretsdrain.ChangeSecretBackendResult, error)) *MockSecretsDrainFacadeChangeSecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecretsToDrain mocks base method. @@ -140,9 +236,33 @@ func (m *MockSecretsDrainFacade) GetSecretsToDrain() ([]secrets.SecretMetadataFo } // GetSecretsToDrain indicates an expected call of GetSecretsToDrain. -func (mr *MockSecretsDrainFacadeMockRecorder) GetSecretsToDrain() *gomock.Call { +func (mr *MockSecretsDrainFacadeMockRecorder) GetSecretsToDrain() *MockSecretsDrainFacadeGetSecretsToDrainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretsToDrain", reflect.TypeOf((*MockSecretsDrainFacade)(nil).GetSecretsToDrain)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretsToDrain", reflect.TypeOf((*MockSecretsDrainFacade)(nil).GetSecretsToDrain)) + return &MockSecretsDrainFacadeGetSecretsToDrainCall{Call: call} +} + +// MockSecretsDrainFacadeGetSecretsToDrainCall wrap *gomock.Call +type MockSecretsDrainFacadeGetSecretsToDrainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsDrainFacadeGetSecretsToDrainCall) Return(arg0 []secrets.SecretMetadataForDrain, arg1 error) *MockSecretsDrainFacadeGetSecretsToDrainCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsDrainFacadeGetSecretsToDrainCall) Do(f func() ([]secrets.SecretMetadataForDrain, error)) *MockSecretsDrainFacadeGetSecretsToDrainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsDrainFacadeGetSecretsToDrainCall) DoAndReturn(f func() ([]secrets.SecretMetadataForDrain, error)) *MockSecretsDrainFacadeGetSecretsToDrainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchSecretBackendChanged mocks base method. @@ -155,7 +275,31 @@ func (m *MockSecretsDrainFacade) WatchSecretBackendChanged() (watcher.Watcher[st } // WatchSecretBackendChanged indicates an expected call of WatchSecretBackendChanged. -func (mr *MockSecretsDrainFacadeMockRecorder) WatchSecretBackendChanged() *gomock.Call { +func (mr *MockSecretsDrainFacadeMockRecorder) WatchSecretBackendChanged() *MockSecretsDrainFacadeWatchSecretBackendChangedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendChanged", reflect.TypeOf((*MockSecretsDrainFacade)(nil).WatchSecretBackendChanged)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchSecretBackendChanged", reflect.TypeOf((*MockSecretsDrainFacade)(nil).WatchSecretBackendChanged)) + return &MockSecretsDrainFacadeWatchSecretBackendChangedCall{Call: call} +} + +// MockSecretsDrainFacadeWatchSecretBackendChangedCall wrap *gomock.Call +type MockSecretsDrainFacadeWatchSecretBackendChangedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsDrainFacadeWatchSecretBackendChangedCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockSecretsDrainFacadeWatchSecretBackendChangedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsDrainFacadeWatchSecretBackendChangedCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockSecretsDrainFacadeWatchSecretBackendChangedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsDrainFacadeWatchSecretBackendChangedCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockSecretsDrainFacadeWatchSecretBackendChangedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretsdrainworker/mocks/secretsprovider_mock.go b/internal/worker/secretsdrainworker/mocks/secretsprovider_mock.go index f77ec5334a7..870e5ff2efc 100644 --- a/internal/worker/secretsdrainworker/mocks/secretsprovider_mock.go +++ b/internal/worker/secretsdrainworker/mocks/secretsprovider_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/secretsprovider_mock.go github.com/juju/juju/internal/secrets/provider SecretsBackend +// mockgen -typed -package mocks -destination mocks/secretsprovider_mock.go github.com/juju/juju/internal/secrets/provider SecretsBackend // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSecretsBackend) DeleteContent(arg0 context.Context, arg1 string) er } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *MockSecretsBackendDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + return &MockSecretsBackendDeleteContentCall{Call: call} +} + +// MockSecretsBackendDeleteContentCall wrap *gomock.Call +type MockSecretsBackendDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteContentCall) Return(arg0 error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteContentCall) Do(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteContentCall) DoAndReturn(f func(context.Context, string) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -64,9 +88,33 @@ func (m *MockSecretsBackend) GetContent(arg0 context.Context, arg1 string) (secr } // GetContent indicates an expected call of GetContent. -func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1 any) *MockSecretsBackendGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1) + return &MockSecretsBackendGetContentCall{Call: call} +} + +// MockSecretsBackendGetContentCall wrap *gomock.Call +type MockSecretsBackendGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendGetContentCall) Do(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendGetContentCall) DoAndReturn(f func(context.Context, string) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Ping mocks base method. @@ -78,9 +126,33 @@ func (m *MockSecretsBackend) Ping() error { } // Ping indicates an expected call of Ping. -func (mr *MockSecretsBackendMockRecorder) Ping() *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) Ping() *MockSecretsBackendPingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockSecretsBackend)(nil).Ping)) + return &MockSecretsBackendPingCall{Call: call} +} + +// MockSecretsBackendPingCall wrap *gomock.Call +type MockSecretsBackendPingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendPingCall) Return(arg0 error) *MockSecretsBackendPingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendPingCall) Do(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendPingCall) DoAndReturn(f func() error) *MockSecretsBackendPingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -93,7 +165,31 @@ func (m *MockSecretsBackend) SaveContent(arg0 context.Context, arg1 *secrets.URI } // SaveContent indicates an expected call of SaveContent. -func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2, arg3 any) *MockSecretsBackendSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2, arg3) + return &MockSecretsBackendSaveContentCall{Call: call} +} + +// MockSecretsBackendSaveContentCall wrap *gomock.Call +type MockSecretsBackendSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendSaveContentCall) Return(arg0 string, arg1 error) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendSaveContentCall) Do(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendSaveContentCall) DoAndReturn(f func(context.Context, *secrets.URI, int, secrets.SecretValue) (string, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretsdrainworker/package_test.go b/internal/worker/secretsdrainworker/package_test.go index 387ab99f8e7..48bd53bf840 100644 --- a/internal/worker/secretsdrainworker/package_test.go +++ b/internal/worker/secretsdrainworker/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretsdrainworker_mock.go github.com/juju/juju/internal/worker/secretsdrainworker Logger,SecretsDrainFacade -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secrets_mock.go github.com/juju/juju/internal/secrets BackendsClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/secretsprovider_mock.go github.com/juju/juju/internal/secrets/provider SecretsBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretsdrainworker_mock.go github.com/juju/juju/internal/worker/secretsdrainworker Logger,SecretsDrainFacade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secrets_mock.go github.com/juju/juju/internal/secrets BackendsClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/secretsprovider_mock.go github.com/juju/juju/internal/secrets/provider SecretsBackend func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/secretsdrainworker/worker_test.go b/internal/worker/secretsdrainworker/worker_test.go index 9fa810f89bd..7105c0d0b22 100644 --- a/internal/worker/secretsdrainworker/worker_test.go +++ b/internal/worker/secretsdrainworker/worker_test.go @@ -4,6 +4,7 @@ package secretsdrainworker_test import ( + "context" "time" "github.com/juju/errors" @@ -110,7 +111,7 @@ func (s *workerSuite) TestDrainNoOPS(c *gc.C) { }, }, }, nil), - s.backendClient.EXPECT().GetBackend(nil, true).DoAndReturn(func(*string, bool) (*provider.SecretsBackend, string, error) { + s.backendClient.EXPECT().GetBackend(nil, true).DoAndReturn(func(*string, bool) (provider.SecretsBackend, string, error) { close(s.done) return nil, "backend-1", nil }), @@ -157,7 +158,7 @@ func (s *workerSuite) TestDrainBetweenExternalBackends(c *gc.C) { }, }, ).Return(secretsdrain.ChangeSecretBackendResult{Results: []error{nil}}, nil), - oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ any, _ string) error { + oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ context.Context, _ string) error { close(s.done) return nil }), @@ -239,7 +240,7 @@ func (s *workerSuite) TestDrainFromExternalToInternal(c *gc.C) { }, }, ).Return(secretsdrain.ChangeSecretBackendResult{Results: []error{nil}}, nil), - oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ any, _ string) error { + oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ context.Context, _ string) error { close(s.done) return nil }), @@ -306,7 +307,7 @@ func (s *workerSuite) TestDrainPartiallyFailed(c *gc.C) { errors.New("failed"), // 2nd one failed. }}, nil), // We only delete for the 1st revision. - oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ any, _ string) error { + oldBackend.EXPECT().DeleteContent(gomock.Any(), "revision-1").DoAndReturn(func(_ context.Context, _ string) error { close(s.done) return nil }), diff --git a/internal/worker/secretspruner/mocks/worker_mock.go b/internal/worker/secretspruner/mocks/worker_mock.go index 3065fec2f4f..c08530545f7 100644 --- a/internal/worker/secretspruner/mocks/worker_mock.go +++ b/internal/worker/secretspruner/mocks/worker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/juju/internal/worker/secretspruner Logger,SecretsFacade +// mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/juju/internal/worker/secretspruner Logger,SecretsFacade // // Package mocks is a generated GoMock package. @@ -50,10 +50,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -67,10 +91,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -84,10 +132,34 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsFacade is a mock of SecretsFacade interface. @@ -122,9 +194,33 @@ func (m *MockSecretsFacade) DeleteObsoleteUserSecrets() error { } // DeleteObsoleteUserSecrets indicates an expected call of DeleteObsoleteUserSecrets. -func (mr *MockSecretsFacadeMockRecorder) DeleteObsoleteUserSecrets() *gomock.Call { +func (mr *MockSecretsFacadeMockRecorder) DeleteObsoleteUserSecrets() *MockSecretsFacadeDeleteObsoleteUserSecretsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObsoleteUserSecrets", reflect.TypeOf((*MockSecretsFacade)(nil).DeleteObsoleteUserSecrets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObsoleteUserSecrets", reflect.TypeOf((*MockSecretsFacade)(nil).DeleteObsoleteUserSecrets)) + return &MockSecretsFacadeDeleteObsoleteUserSecretsCall{Call: call} +} + +// MockSecretsFacadeDeleteObsoleteUserSecretsCall wrap *gomock.Call +type MockSecretsFacadeDeleteObsoleteUserSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsFacadeDeleteObsoleteUserSecretsCall) Return(arg0 error) *MockSecretsFacadeDeleteObsoleteUserSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsFacadeDeleteObsoleteUserSecretsCall) Do(f func() error) *MockSecretsFacadeDeleteObsoleteUserSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsFacadeDeleteObsoleteUserSecretsCall) DoAndReturn(f func() error) *MockSecretsFacadeDeleteObsoleteUserSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRevisionsToPrune mocks base method. @@ -137,7 +233,31 @@ func (m *MockSecretsFacade) WatchRevisionsToPrune() (watcher.Watcher[struct{}], } // WatchRevisionsToPrune indicates an expected call of WatchRevisionsToPrune. -func (mr *MockSecretsFacadeMockRecorder) WatchRevisionsToPrune() *gomock.Call { +func (mr *MockSecretsFacadeMockRecorder) WatchRevisionsToPrune() *MockSecretsFacadeWatchRevisionsToPruneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRevisionsToPrune", reflect.TypeOf((*MockSecretsFacade)(nil).WatchRevisionsToPrune)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRevisionsToPrune", reflect.TypeOf((*MockSecretsFacade)(nil).WatchRevisionsToPrune)) + return &MockSecretsFacadeWatchRevisionsToPruneCall{Call: call} +} + +// MockSecretsFacadeWatchRevisionsToPruneCall wrap *gomock.Call +type MockSecretsFacadeWatchRevisionsToPruneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsFacadeWatchRevisionsToPruneCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockSecretsFacadeWatchRevisionsToPruneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsFacadeWatchRevisionsToPruneCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockSecretsFacadeWatchRevisionsToPruneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsFacadeWatchRevisionsToPruneCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockSecretsFacadeWatchRevisionsToPruneCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/secretspruner/package_test.go b/internal/worker/secretspruner/package_test.go index 5b6aaadbfa8..9bb36f5cbbc 100644 --- a/internal/worker/secretspruner/package_test.go +++ b/internal/worker/secretspruner/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/worker_mock.go github.com/juju/juju/internal/worker/secretspruner Logger,SecretsFacade +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/worker_mock.go github.com/juju/juju/internal/worker/secretspruner Logger,SecretsFacade func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/servicefactory/changestream_mock_test.go b/internal/worker/servicefactory/changestream_mock_test.go index 5a572ccb475..c6b06d95601 100644 --- a/internal/worker/servicefactory/changestream_mock_test.go +++ b/internal/worker/servicefactory/changestream_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package servicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter +// mockgen -typed -package servicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter // // Package servicefactory is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockWatchableDBGetter) GetWatchableDB(arg0 string) (changestream.Watcha } // GetWatchableDB indicates an expected call of GetWatchableDB. -func (mr *MockWatchableDBGetterMockRecorder) GetWatchableDB(arg0 any) *gomock.Call { +func (mr *MockWatchableDBGetterMockRecorder) GetWatchableDB(arg0 any) *MockWatchableDBGetterGetWatchableDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWatchableDB", reflect.TypeOf((*MockWatchableDBGetter)(nil).GetWatchableDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWatchableDB", reflect.TypeOf((*MockWatchableDBGetter)(nil).GetWatchableDB), arg0) + return &MockWatchableDBGetterGetWatchableDBCall{Call: call} +} + +// MockWatchableDBGetterGetWatchableDBCall wrap *gomock.Call +type MockWatchableDBGetterGetWatchableDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWatchableDBGetterGetWatchableDBCall) Return(arg0 changestream.WatchableDB, arg1 error) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWatchableDBGetterGetWatchableDBCall) Do(f func(string) (changestream.WatchableDB, error)) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWatchableDBGetterGetWatchableDBCall) DoAndReturn(f func(string) (changestream.WatchableDB, error)) *MockWatchableDBGetterGetWatchableDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/servicefactory/database_mock_test.go b/internal/worker/servicefactory/database_mock_test.go index 8cec1e07266..3799e41ed6e 100644 --- a/internal/worker/servicefactory/database_mock_test.go +++ b/internal/worker/servicefactory/database_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package servicefactory -destination database_mock_test.go github.com/juju/juju/core/database DBDeleter +// mockgen -typed -package servicefactory -destination database_mock_test.go github.com/juju/juju/core/database DBDeleter // // Package servicefactory is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockDBDeleter) DeleteDB(arg0 string) error { } // DeleteDB indicates an expected call of DeleteDB. -func (mr *MockDBDeleterMockRecorder) DeleteDB(arg0 any) *gomock.Call { +func (mr *MockDBDeleterMockRecorder) DeleteDB(arg0 any) *MockDBDeleterDeleteDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDB", reflect.TypeOf((*MockDBDeleter)(nil).DeleteDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDB", reflect.TypeOf((*MockDBDeleter)(nil).DeleteDB), arg0) + return &MockDBDeleterDeleteDBCall{Call: call} +} + +// MockDBDeleterDeleteDBCall wrap *gomock.Call +type MockDBDeleterDeleteDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBDeleterDeleteDBCall) Return(arg0 error) *MockDBDeleterDeleteDBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBDeleterDeleteDBCall) Do(f func(string) error) *MockDBDeleterDeleteDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBDeleterDeleteDBCall) DoAndReturn(f func(string) error) *MockDBDeleterDeleteDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/servicefactory/package_test.go b/internal/worker/servicefactory/package_test.go index 3392e2ba43d..fefd0f4a174 100644 --- a/internal/worker/servicefactory/package_test.go +++ b/internal/worker/servicefactory/package_test.go @@ -12,11 +12,11 @@ import ( domaintesting "github.com/juju/juju/domain/schema/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package servicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory,ModelServiceFactory,ServiceFactory,ServiceFactoryGetter -//go:generate go run go.uber.org/mock/mockgen -package servicefactory -destination servicefactory_logger_mock_test.go github.com/juju/juju/internal/worker/servicefactory Logger -//go:generate go run go.uber.org/mock/mockgen -package servicefactory -destination database_mock_test.go github.com/juju/juju/core/database DBDeleter -//go:generate go run go.uber.org/mock/mockgen -package servicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter -//go:generate go run go.uber.org/mock/mockgen -package servicefactory -destination providertracker_mock_test.go github.com/juju/juju/core/providertracker Provider,ProviderFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package servicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory,ModelServiceFactory,ServiceFactory,ServiceFactoryGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package servicefactory -destination servicefactory_logger_mock_test.go github.com/juju/juju/internal/worker/servicefactory Logger +//go:generate go run go.uber.org/mock/mockgen -typed -package servicefactory -destination database_mock_test.go github.com/juju/juju/core/database DBDeleter +//go:generate go run go.uber.org/mock/mockgen -typed -package servicefactory -destination changestream_mock_test.go github.com/juju/juju/core/changestream WatchableDBGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package servicefactory -destination providertracker_mock_test.go github.com/juju/juju/core/providertracker Provider,ProviderFactory func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/servicefactory/providertracker_mock_test.go b/internal/worker/servicefactory/providertracker_mock_test.go index 9d62068a709..49b5ee8aeb5 100644 --- a/internal/worker/servicefactory/providertracker_mock_test.go +++ b/internal/worker/servicefactory/providertracker_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package servicefactory -destination providertracker_mock_test.go github.com/juju/juju/core/providertracker Provider,ProviderFactory +// mockgen -typed -package servicefactory -destination providertracker_mock_test.go github.com/juju/juju/core/providertracker Provider,ProviderFactory // // Package servicefactory is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockProvider) AdoptResources(arg0 envcontext.ProviderCallContext, arg1 } // AdoptResources indicates an expected call of AdoptResources. -func (mr *MockProviderMockRecorder) AdoptResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProviderMockRecorder) AdoptResources(arg0, arg1, arg2 any) *MockProviderAdoptResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockProvider)(nil).AdoptResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdoptResources", reflect.TypeOf((*MockProvider)(nil).AdoptResources), arg0, arg1, arg2) + return &MockProviderAdoptResourcesCall{Call: call} +} + +// MockProviderAdoptResourcesCall wrap *gomock.Call +type MockProviderAdoptResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderAdoptResourcesCall) Return(arg0 error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderAdoptResourcesCall) Do(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderAdoptResourcesCall) DoAndReturn(f func(envcontext.ProviderCallContext, string, version.Number) error) *MockProviderAdoptResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bootstrap mocks base method. @@ -70,9 +94,33 @@ func (m *MockProvider) Bootstrap(arg0 environs.BootstrapContext, arg1 envcontext } // Bootstrap indicates an expected call of Bootstrap. -func (mr *MockProviderMockRecorder) Bootstrap(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Bootstrap(arg0, arg1, arg2 any) *MockProviderBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockProvider)(nil).Bootstrap), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrap", reflect.TypeOf((*MockProvider)(nil).Bootstrap), arg0, arg1, arg2) + return &MockProviderBootstrapCall{Call: call} +} + +// MockProviderBootstrapCall wrap *gomock.Call +type MockProviderBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderBootstrapCall) Return(arg0 *environs.BootstrapResult, arg1 error) *MockProviderBootstrapCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderBootstrapCall) Do(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockProviderBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, envcontext.ProviderCallContext, environs.BootstrapParams) (*environs.BootstrapResult, error)) *MockProviderBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -84,9 +132,33 @@ func (m *MockProvider) Config() *config.Config { } // Config indicates an expected call of Config. -func (mr *MockProviderMockRecorder) Config() *gomock.Call { +func (mr *MockProviderMockRecorder) Config() *MockProviderConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProvider)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockProvider)(nil).Config)) + return &MockProviderConfigCall{Call: call} +} + +// MockProviderConfigCall wrap *gomock.Call +type MockProviderConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderConfigCall) Return(arg0 *config.Config) *MockProviderConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderConfigCall) Do(f func() *config.Config) *MockProviderConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderConfigCall) DoAndReturn(f func() *config.Config) *MockProviderConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConstraintsValidator mocks base method. @@ -99,9 +171,33 @@ func (m *MockProvider) ConstraintsValidator(arg0 envcontext.ProviderCallContext) } // ConstraintsValidator indicates an expected call of ConstraintsValidator. -func (mr *MockProviderMockRecorder) ConstraintsValidator(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) ConstraintsValidator(arg0 any) *MockProviderConstraintsValidatorCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockProvider)(nil).ConstraintsValidator), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConstraintsValidator", reflect.TypeOf((*MockProvider)(nil).ConstraintsValidator), arg0) + return &MockProviderConstraintsValidatorCall{Call: call} +} + +// MockProviderConstraintsValidatorCall wrap *gomock.Call +type MockProviderConstraintsValidatorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderConstraintsValidatorCall) Return(arg0 constraints.Validator, arg1 error) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderConstraintsValidatorCall) Do(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderConstraintsValidatorCall) DoAndReturn(f func(envcontext.ProviderCallContext) (constraints.Validator, error)) *MockProviderConstraintsValidatorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Create mocks base method. @@ -113,9 +209,33 @@ func (m *MockProvider) Create(arg0 envcontext.ProviderCallContext, arg1 environs } // Create indicates an expected call of Create. -func (mr *MockProviderMockRecorder) Create(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Create(arg0, arg1 any) *MockProviderCreateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProvider)(nil).Create), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProvider)(nil).Create), arg0, arg1) + return &MockProviderCreateCall{Call: call} +} + +// MockProviderCreateCall wrap *gomock.Call +type MockProviderCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderCreateCall) Return(arg0 error) *MockProviderCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderCreateCall) Do(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockProviderCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderCreateCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.CreateParams) error) *MockProviderCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -127,9 +247,33 @@ func (m *MockProvider) Destroy(arg0 envcontext.ProviderCallContext) error { } // Destroy indicates an expected call of Destroy. -func (mr *MockProviderMockRecorder) Destroy(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) Destroy(arg0 any) *MockProviderDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockProvider)(nil).Destroy), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockProvider)(nil).Destroy), arg0) + return &MockProviderDestroyCall{Call: call} +} + +// MockProviderDestroyCall wrap *gomock.Call +type MockProviderDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderDestroyCall) Return(arg0 error) *MockProviderDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderDestroyCall) Do(f func(envcontext.ProviderCallContext) error) *MockProviderDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderDestroyCall) DoAndReturn(f func(envcontext.ProviderCallContext) error) *MockProviderDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyController mocks base method. @@ -141,9 +285,33 @@ func (m *MockProvider) DestroyController(arg0 envcontext.ProviderCallContext, ar } // DestroyController indicates an expected call of DestroyController. -func (mr *MockProviderMockRecorder) DestroyController(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) DestroyController(arg0, arg1 any) *MockProviderDestroyControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockProvider)(nil).DestroyController), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyController", reflect.TypeOf((*MockProvider)(nil).DestroyController), arg0, arg1) + return &MockProviderDestroyControllerCall{Call: call} +} + +// MockProviderDestroyControllerCall wrap *gomock.Call +type MockProviderDestroyControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderDestroyControllerCall) Return(arg0 error) *MockProviderDestroyControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderDestroyControllerCall) Do(f func(envcontext.ProviderCallContext, string) error) *MockProviderDestroyControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderDestroyControllerCall) DoAndReturn(f func(envcontext.ProviderCallContext, string) error) *MockProviderDestroyControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrecheckInstance mocks base method. @@ -155,9 +323,33 @@ func (m *MockProvider) PrecheckInstance(arg0 envcontext.ProviderCallContext, arg } // PrecheckInstance indicates an expected call of PrecheckInstance. -func (mr *MockProviderMockRecorder) PrecheckInstance(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) PrecheckInstance(arg0, arg1 any) *MockProviderPrecheckInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockProvider)(nil).PrecheckInstance), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrecheckInstance", reflect.TypeOf((*MockProvider)(nil).PrecheckInstance), arg0, arg1) + return &MockProviderPrecheckInstanceCall{Call: call} +} + +// MockProviderPrecheckInstanceCall wrap *gomock.Call +type MockProviderPrecheckInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderPrecheckInstanceCall) Return(arg0 error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderPrecheckInstanceCall) Do(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderPrecheckInstanceCall) DoAndReturn(f func(envcontext.ProviderCallContext, environs.PrecheckInstanceParams) error) *MockProviderPrecheckInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareForBootstrap mocks base method. @@ -169,9 +361,33 @@ func (m *MockProvider) PrepareForBootstrap(arg0 environs.BootstrapContext, arg1 } // PrepareForBootstrap indicates an expected call of PrepareForBootstrap. -func (mr *MockProviderMockRecorder) PrepareForBootstrap(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) PrepareForBootstrap(arg0, arg1 any) *MockProviderPrepareForBootstrapCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockProvider)(nil).PrepareForBootstrap), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareForBootstrap", reflect.TypeOf((*MockProvider)(nil).PrepareForBootstrap), arg0, arg1) + return &MockProviderPrepareForBootstrapCall{Call: call} +} + +// MockProviderPrepareForBootstrapCall wrap *gomock.Call +type MockProviderPrepareForBootstrapCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderPrepareForBootstrapCall) Return(arg0 error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderPrepareForBootstrapCall) Do(f func(environs.BootstrapContext, string) error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderPrepareForBootstrapCall) DoAndReturn(f func(environs.BootstrapContext, string) error) *MockProviderPrepareForBootstrapCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConfig mocks base method. @@ -183,9 +399,33 @@ func (m *MockProvider) SetConfig(arg0 context.Context, arg1 *config.Config) erro } // SetConfig indicates an expected call of SetConfig. -func (mr *MockProviderMockRecorder) SetConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderMockRecorder) SetConfig(arg0, arg1 any) *MockProviderSetConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockProvider)(nil).SetConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockProvider)(nil).SetConfig), arg0, arg1) + return &MockProviderSetConfigCall{Call: call} +} + +// MockProviderSetConfigCall wrap *gomock.Call +type MockProviderSetConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderSetConfigCall) Return(arg0 error) *MockProviderSetConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderSetConfigCall) Do(f func(context.Context, *config.Config) error) *MockProviderSetConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderSetConfigCall) DoAndReturn(f func(context.Context, *config.Config) error) *MockProviderSetConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProvider mocks base method. @@ -198,9 +438,33 @@ func (m *MockProvider) StorageProvider(arg0 storage.ProviderType) (storage.Provi } // StorageProvider indicates an expected call of StorageProvider. -func (mr *MockProviderMockRecorder) StorageProvider(arg0 any) *gomock.Call { +func (mr *MockProviderMockRecorder) StorageProvider(arg0 any) *MockProviderStorageProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProvider)(nil).StorageProvider), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockProvider)(nil).StorageProvider), arg0) + return &MockProviderStorageProviderCall{Call: call} +} + +// MockProviderStorageProviderCall wrap *gomock.Call +type MockProviderStorageProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderStorageProviderCall) Return(arg0 storage.Provider, arg1 error) *MockProviderStorageProviderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderStorageProviderCall) Do(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderStorageProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderStorageProviderCall) DoAndReturn(f func(storage.ProviderType) (storage.Provider, error)) *MockProviderStorageProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageProviderTypes mocks base method. @@ -213,9 +477,33 @@ func (m *MockProvider) StorageProviderTypes() ([]storage.ProviderType, error) { } // StorageProviderTypes indicates an expected call of StorageProviderTypes. -func (mr *MockProviderMockRecorder) StorageProviderTypes() *gomock.Call { +func (mr *MockProviderMockRecorder) StorageProviderTypes() *MockProviderStorageProviderTypesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProvider)(nil).StorageProviderTypes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProviderTypes", reflect.TypeOf((*MockProvider)(nil).StorageProviderTypes)) + return &MockProviderStorageProviderTypesCall{Call: call} +} + +// MockProviderStorageProviderTypesCall wrap *gomock.Call +type MockProviderStorageProviderTypesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderStorageProviderTypesCall) Return(arg0 []storage.ProviderType, arg1 error) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderStorageProviderTypesCall) Do(f func() ([]storage.ProviderType, error)) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderStorageProviderTypesCall) DoAndReturn(f func() ([]storage.ProviderType, error)) *MockProviderStorageProviderTypesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockProviderFactory is a mock of ProviderFactory interface. @@ -251,7 +539,31 @@ func (m *MockProviderFactory) ProviderForModel(arg0 context.Context, arg1 string } // ProviderForModel indicates an expected call of ProviderForModel. -func (mr *MockProviderFactoryMockRecorder) ProviderForModel(arg0, arg1 any) *gomock.Call { +func (mr *MockProviderFactoryMockRecorder) ProviderForModel(arg0, arg1 any) *MockProviderFactoryProviderForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderForModel", reflect.TypeOf((*MockProviderFactory)(nil).ProviderForModel), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderForModel", reflect.TypeOf((*MockProviderFactory)(nil).ProviderForModel), arg0, arg1) + return &MockProviderFactoryProviderForModelCall{Call: call} +} + +// MockProviderFactoryProviderForModelCall wrap *gomock.Call +type MockProviderFactoryProviderForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProviderFactoryProviderForModelCall) Return(arg0 providertracker.Provider, arg1 error) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProviderFactoryProviderForModelCall) Do(f func(context.Context, string) (providertracker.Provider, error)) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProviderFactoryProviderForModelCall) DoAndReturn(f func(context.Context, string) (providertracker.Provider, error)) *MockProviderFactoryProviderForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/servicefactory/servicefactory_logger_mock_test.go b/internal/worker/servicefactory/servicefactory_logger_mock_test.go index b506f7db51b..d0760a4d959 100644 --- a/internal/worker/servicefactory/servicefactory_logger_mock_test.go +++ b/internal/worker/servicefactory/servicefactory_logger_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package servicefactory -destination servicefactory_logger_mock_test.go github.com/juju/juju/internal/worker/servicefactory Logger +// mockgen -typed -package servicefactory -destination servicefactory_logger_mock_test.go github.com/juju/juju/internal/worker/servicefactory Logger // // Package servicefactory is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLogger) Child(arg0 string) Logger { } // Child indicates an expected call of Child. -func (mr *MockLoggerMockRecorder) Child(arg0 any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Child(arg0 any) *MockLoggerChildCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Child", reflect.TypeOf((*MockLogger)(nil).Child), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Child", reflect.TypeOf((*MockLogger)(nil).Child), arg0) + return &MockLoggerChildCall{Call: call} +} + +// MockLoggerChildCall wrap *gomock.Call +type MockLoggerChildCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerChildCall) Return(arg0 Logger) *MockLoggerChildCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerChildCall) Do(f func(string) Logger) *MockLoggerChildCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerChildCall) DoAndReturn(f func(string) Logger) *MockLoggerChildCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Debugf mocks base method. @@ -63,10 +87,34 @@ func (m *MockLogger) Debugf(arg0 string, arg1 ...any) { } // Debugf indicates an expected call of Debugf. -func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Debugf(arg0 any, arg1 ...any) *MockLoggerDebugfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockLogger)(nil).Debugf), varargs...) + return &MockLoggerDebugfCall{Call: call} +} + +// MockLoggerDebugfCall wrap *gomock.Call +type MockLoggerDebugfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerDebugfCall) Return() *MockLoggerDebugfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerDebugfCall) Do(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerDebugfCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Errorf mocks base method. @@ -80,10 +128,34 @@ func (m *MockLogger) Errorf(arg0 string, arg1 ...any) { } // Errorf indicates an expected call of Errorf. -func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Errorf(arg0 any, arg1 ...any) *MockLoggerErrorfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockLogger)(nil).Errorf), varargs...) + return &MockLoggerErrorfCall{Call: call} +} + +// MockLoggerErrorfCall wrap *gomock.Call +type MockLoggerErrorfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerErrorfCall) Return() *MockLoggerErrorfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerErrorfCall) Do(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerErrorfCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Infof mocks base method. @@ -97,10 +169,34 @@ func (m *MockLogger) Infof(arg0 string, arg1 ...any) { } // Infof indicates an expected call of Infof. -func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Infof(arg0 any, arg1 ...any) *MockLoggerInfofCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockLogger)(nil).Infof), varargs...) + return &MockLoggerInfofCall{Call: call} +} + +// MockLoggerInfofCall wrap *gomock.Call +type MockLoggerInfofCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerInfofCall) Return() *MockLoggerInfofCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerInfofCall) Do(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerInfofCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfofCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tracef mocks base method. @@ -114,10 +210,34 @@ func (m *MockLogger) Tracef(arg0 string, arg1 ...any) { } // Tracef indicates an expected call of Tracef. -func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Tracef(arg0 any, arg1 ...any) *MockLoggerTracefCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockLogger)(nil).Tracef), varargs...) + return &MockLoggerTracefCall{Call: call} +} + +// MockLoggerTracefCall wrap *gomock.Call +type MockLoggerTracefCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerTracefCall) Return() *MockLoggerTracefCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerTracefCall) Do(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerTracefCall) DoAndReturn(f func(string, ...any)) *MockLoggerTracefCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Warningf mocks base method. @@ -131,8 +251,32 @@ func (m *MockLogger) Warningf(arg0 string, arg1 ...any) { } // Warningf indicates an expected call of Warningf. -func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockLoggerMockRecorder) Warningf(arg0 any, arg1 ...any) *MockLoggerWarningfCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockLogger)(nil).Warningf), varargs...) + return &MockLoggerWarningfCall{Call: call} +} + +// MockLoggerWarningfCall wrap *gomock.Call +type MockLoggerWarningfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLoggerWarningfCall) Return() *MockLoggerWarningfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLoggerWarningfCall) Do(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLoggerWarningfCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningfCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/servicefactory/servicefactory_mock_test.go b/internal/worker/servicefactory/servicefactory_mock_test.go index 5df343e3442..6931380d2cd 100644 --- a/internal/worker/servicefactory/servicefactory_mock_test.go +++ b/internal/worker/servicefactory/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package servicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory,ModelServiceFactory,ServiceFactory,ServiceFactoryGetter +// mockgen -typed -package servicefactory -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory,ModelServiceFactory,ServiceFactory,ServiceFactoryGetter // // Package servicefactory is a generated GoMock package. @@ -71,9 +71,33 @@ func (m *MockControllerServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockControllerServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Access() *MockControllerServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + return &MockControllerServiceFactoryAccessCall{Call: call} +} + +// MockControllerServiceFactoryAccessCall wrap *gomock.Call +type MockControllerServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAccessCall) Return(arg0 *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAccessCall) Do(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -85,9 +109,33 @@ func (m *MockControllerServiceFactory) AgentObjectStore() *service15.WatchableSe } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *MockControllerServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + return &MockControllerServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockControllerServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockControllerServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Return(arg0 *service15.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Do(f func() *service15.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -99,9 +147,33 @@ func (m *MockControllerServiceFactory) AutocertCache() *service2.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *MockControllerServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + return &MockControllerServiceFactoryAutocertCacheCall{Call: call} +} + +// MockControllerServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockControllerServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAutocertCacheCall) Return(arg0 *service2.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAutocertCacheCall) Do(f func() *service2.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service2.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -113,9 +185,33 @@ func (m *MockControllerServiceFactory) Cloud() *service4.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *MockControllerServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + return &MockControllerServiceFactoryCloudCall{Call: call} +} + +// MockControllerServiceFactoryCloudCall wrap *gomock.Call +type MockControllerServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCloudCall) Return(arg0 *service4.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCloudCall) Do(f func() *service4.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCloudCall) DoAndReturn(f func() *service4.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -127,9 +223,33 @@ func (m *MockControllerServiceFactory) ControllerConfig() *service5.WatchableSer } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *MockControllerServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + return &MockControllerServiceFactoryControllerConfigCall{Call: call} +} + +// MockControllerServiceFactoryControllerConfigCall wrap *gomock.Call +type MockControllerServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerConfigCall) Return(arg0 *service5.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerConfigCall) Do(f func() *service5.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerConfigCall) DoAndReturn(f func() *service5.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -141,9 +261,33 @@ func (m *MockControllerServiceFactory) ControllerNode() *service6.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *MockControllerServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + return &MockControllerServiceFactoryControllerNodeCall{Call: call} +} + +// MockControllerServiceFactoryControllerNodeCall wrap *gomock.Call +type MockControllerServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerNodeCall) Return(arg0 *service6.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerNodeCall) Do(f func() *service6.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerNodeCall) DoAndReturn(f func() *service6.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -155,9 +299,33 @@ func (m *MockControllerServiceFactory) Credential() *service7.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockControllerServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Credential() *MockControllerServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + return &MockControllerServiceFactoryCredentialCall{Call: call} +} + +// MockControllerServiceFactoryCredentialCall wrap *gomock.Call +type MockControllerServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCredentialCall) Return(arg0 *service7.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCredentialCall) Do(f func() *service7.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCredentialCall) DoAndReturn(f func() *service7.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -169,9 +337,33 @@ func (m *MockControllerServiceFactory) ExternalController() *service8.WatchableS } // ExternalController indicates an expected call of ExternalController. -func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *MockControllerServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + return &MockControllerServiceFactoryExternalControllerCall{Call: call} +} + +// MockControllerServiceFactoryExternalControllerCall wrap *gomock.Call +type MockControllerServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryExternalControllerCall) Return(arg0 *service8.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryExternalControllerCall) Do(f func() *service8.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryExternalControllerCall) DoAndReturn(f func() *service8.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -183,9 +375,33 @@ func (m *MockControllerServiceFactory) Flag() *service9.Service { } // Flag indicates an expected call of Flag. -func (mr *MockControllerServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Flag() *MockControllerServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + return &MockControllerServiceFactoryFlagCall{Call: call} +} + +// MockControllerServiceFactoryFlagCall wrap *gomock.Call +type MockControllerServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryFlagCall) Return(arg0 *service9.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryFlagCall) Do(f func() *service9.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryFlagCall) DoAndReturn(f func() *service9.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -197,9 +413,33 @@ func (m *MockControllerServiceFactory) Model() *service11.Service { } // Model indicates an expected call of Model. -func (mr *MockControllerServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Model() *MockControllerServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + return &MockControllerServiceFactoryModelCall{Call: call} +} + +// MockControllerServiceFactoryModelCall wrap *gomock.Call +type MockControllerServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelCall) Return(arg0 *service11.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelCall) Do(f func() *service11.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelCall) DoAndReturn(f func() *service11.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -211,9 +451,33 @@ func (m *MockControllerServiceFactory) ModelDefaults() *service13.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *MockControllerServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + return &MockControllerServiceFactoryModelDefaultsCall{Call: call} +} + +// MockControllerServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockControllerServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelDefaultsCall) Return(arg0 *service13.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelDefaultsCall) Do(f func() *service13.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service13.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -225,9 +489,33 @@ func (m *MockControllerServiceFactory) SecretBackend() *service17.WatchableServi } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *MockControllerServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + return &MockControllerServiceFactorySecretBackendCall{Call: call} +} + +// MockControllerServiceFactorySecretBackendCall wrap *gomock.Call +type MockControllerServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactorySecretBackendCall) Return(arg0 *service17.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactorySecretBackendCall) Do(f func() *service17.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactorySecretBackendCall) DoAndReturn(f func() *service17.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -239,9 +527,33 @@ func (m *MockControllerServiceFactory) Upgrade() *service20.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *MockControllerServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + return &MockControllerServiceFactoryUpgradeCall{Call: call} +} + +// MockControllerServiceFactoryUpgradeCall wrap *gomock.Call +type MockControllerServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryUpgradeCall) Return(arg0 *service20.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryUpgradeCall) Do(f func() *service20.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryUpgradeCall) DoAndReturn(f func() *service20.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelServiceFactory is a mock of ModelServiceFactory interface. @@ -276,9 +588,33 @@ func (m *MockModelServiceFactory) Annotation() *service0.Service { } // Annotation indicates an expected call of Annotation. -func (mr *MockModelServiceFactoryMockRecorder) Annotation() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Annotation() *MockModelServiceFactoryAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockModelServiceFactory)(nil).Annotation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockModelServiceFactory)(nil).Annotation)) + return &MockModelServiceFactoryAnnotationCall{Call: call} +} + +// MockModelServiceFactoryAnnotationCall wrap *gomock.Call +type MockModelServiceFactoryAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryAnnotationCall) Return(arg0 *service0.Service) *MockModelServiceFactoryAnnotationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryAnnotationCall) Do(f func() *service0.Service) *MockModelServiceFactoryAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryAnnotationCall) DoAndReturn(f func() *service0.Service) *MockModelServiceFactoryAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -290,9 +626,33 @@ func (m *MockModelServiceFactory) Application(arg0 storage.ProviderRegistry) *se } // Application indicates an expected call of Application. -func (mr *MockModelServiceFactoryMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Application(arg0 any) *MockModelServiceFactoryApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockModelServiceFactory)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockModelServiceFactory)(nil).Application), arg0) + return &MockModelServiceFactoryApplicationCall{Call: call} +} + +// MockModelServiceFactoryApplicationCall wrap *gomock.Call +type MockModelServiceFactoryApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryApplicationCall) Return(arg0 *service1.Service) *MockModelServiceFactoryApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryApplicationCall) Do(f func(storage.ProviderRegistry) *service1.Service) *MockModelServiceFactoryApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryApplicationCall) DoAndReturn(f func(storage.ProviderRegistry) *service1.Service) *MockModelServiceFactoryApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BlockDevice mocks base method. @@ -304,9 +664,33 @@ func (m *MockModelServiceFactory) BlockDevice() *service3.WatchableService { } // BlockDevice indicates an expected call of BlockDevice. -func (mr *MockModelServiceFactoryMockRecorder) BlockDevice() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) BlockDevice() *MockModelServiceFactoryBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockModelServiceFactory)(nil).BlockDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockModelServiceFactory)(nil).BlockDevice)) + return &MockModelServiceFactoryBlockDeviceCall{Call: call} +} + +// MockModelServiceFactoryBlockDeviceCall wrap *gomock.Call +type MockModelServiceFactoryBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryBlockDeviceCall) Return(arg0 *service3.WatchableService) *MockModelServiceFactoryBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryBlockDeviceCall) Do(f func() *service3.WatchableService) *MockModelServiceFactoryBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryBlockDeviceCall) DoAndReturn(f func() *service3.WatchableService) *MockModelServiceFactoryBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -318,9 +702,33 @@ func (m *MockModelServiceFactory) Config() *service12.WatchableService { } // Config indicates an expected call of Config. -func (mr *MockModelServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Config() *MockModelServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockModelServiceFactory)(nil).Config)) + return &MockModelServiceFactoryConfigCall{Call: call} +} + +// MockModelServiceFactoryConfigCall wrap *gomock.Call +type MockModelServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryConfigCall) Return(arg0 *service12.WatchableService) *MockModelServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryConfigCall) Do(f func() *service12.WatchableService) *MockModelServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryConfigCall) DoAndReturn(f func() *service12.WatchableService) *MockModelServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -332,9 +740,33 @@ func (m *MockModelServiceFactory) Machine() *service10.Service { } // Machine indicates an expected call of Machine. -func (mr *MockModelServiceFactoryMockRecorder) Machine() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Machine() *MockModelServiceFactoryMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockModelServiceFactory)(nil).Machine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockModelServiceFactory)(nil).Machine)) + return &MockModelServiceFactoryMachineCall{Call: call} +} + +// MockModelServiceFactoryMachineCall wrap *gomock.Call +type MockModelServiceFactoryMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryMachineCall) Return(arg0 *service10.Service) *MockModelServiceFactoryMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryMachineCall) Do(f func() *service10.Service) *MockModelServiceFactoryMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryMachineCall) DoAndReturn(f func() *service10.Service) *MockModelServiceFactoryMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelInfo mocks base method. @@ -346,9 +778,33 @@ func (m *MockModelServiceFactory) ModelInfo() *service11.ModelService { } // ModelInfo indicates an expected call of ModelInfo. -func (mr *MockModelServiceFactoryMockRecorder) ModelInfo() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) ModelInfo() *MockModelServiceFactoryModelInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockModelServiceFactory)(nil).ModelInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockModelServiceFactory)(nil).ModelInfo)) + return &MockModelServiceFactoryModelInfoCall{Call: call} +} + +// MockModelServiceFactoryModelInfoCall wrap *gomock.Call +type MockModelServiceFactoryModelInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryModelInfoCall) Return(arg0 *service11.ModelService) *MockModelServiceFactoryModelInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryModelInfoCall) Do(f func() *service11.ModelService) *MockModelServiceFactoryModelInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryModelInfoCall) DoAndReturn(f func() *service11.ModelService) *MockModelServiceFactoryModelInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Network mocks base method. @@ -360,9 +816,33 @@ func (m *MockModelServiceFactory) Network() *service14.WatchableService { } // Network indicates an expected call of Network. -func (mr *MockModelServiceFactoryMockRecorder) Network() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Network() *MockModelServiceFactoryNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockModelServiceFactory)(nil).Network)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockModelServiceFactory)(nil).Network)) + return &MockModelServiceFactoryNetworkCall{Call: call} +} + +// MockModelServiceFactoryNetworkCall wrap *gomock.Call +type MockModelServiceFactoryNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryNetworkCall) Return(arg0 *service14.WatchableService) *MockModelServiceFactoryNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryNetworkCall) Do(f func() *service14.WatchableService) *MockModelServiceFactoryNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryNetworkCall) DoAndReturn(f func() *service14.WatchableService) *MockModelServiceFactoryNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStore mocks base method. @@ -374,9 +854,33 @@ func (m *MockModelServiceFactory) ObjectStore() *service15.WatchableService { } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockModelServiceFactoryMockRecorder) ObjectStore() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) ObjectStore() *MockModelServiceFactoryObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockModelServiceFactory)(nil).ObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockModelServiceFactory)(nil).ObjectStore)) + return &MockModelServiceFactoryObjectStoreCall{Call: call} +} + +// MockModelServiceFactoryObjectStoreCall wrap *gomock.Call +type MockModelServiceFactoryObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryObjectStoreCall) Return(arg0 *service15.WatchableService) *MockModelServiceFactoryObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryObjectStoreCall) Do(f func() *service15.WatchableService) *MockModelServiceFactoryObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockModelServiceFactoryObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secret mocks base method. @@ -388,9 +892,33 @@ func (m *MockModelServiceFactory) Secret(arg0 service16.BackendAdminConfigGetter } // Secret indicates an expected call of Secret. -func (mr *MockModelServiceFactoryMockRecorder) Secret(arg0 any) *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Secret(arg0 any) *MockModelServiceFactorySecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockModelServiceFactory)(nil).Secret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockModelServiceFactory)(nil).Secret), arg0) + return &MockModelServiceFactorySecretCall{Call: call} +} + +// MockModelServiceFactorySecretCall wrap *gomock.Call +type MockModelServiceFactorySecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactorySecretCall) Return(arg0 *service16.WatchableService) *MockModelServiceFactorySecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactorySecretCall) Do(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockModelServiceFactorySecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactorySecretCall) DoAndReturn(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockModelServiceFactorySecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -402,9 +930,33 @@ func (m *MockModelServiceFactory) Storage(arg0 storage.ProviderRegistry) *servic } // Storage indicates an expected call of Storage. -func (mr *MockModelServiceFactoryMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Storage(arg0 any) *MockModelServiceFactoryStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockModelServiceFactory)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockModelServiceFactory)(nil).Storage), arg0) + return &MockModelServiceFactoryStorageCall{Call: call} +} + +// MockModelServiceFactoryStorageCall wrap *gomock.Call +type MockModelServiceFactoryStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryStorageCall) Return(arg0 *service18.Service) *MockModelServiceFactoryStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryStorageCall) Do(f func(storage.ProviderRegistry) *service18.Service) *MockModelServiceFactoryStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryStorageCall) DoAndReturn(f func(storage.ProviderRegistry) *service18.Service) *MockModelServiceFactoryStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -416,9 +968,33 @@ func (m *MockModelServiceFactory) Unit() *service19.Service { } // Unit indicates an expected call of Unit. -func (mr *MockModelServiceFactoryMockRecorder) Unit() *gomock.Call { +func (mr *MockModelServiceFactoryMockRecorder) Unit() *MockModelServiceFactoryUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockModelServiceFactory)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockModelServiceFactory)(nil).Unit)) + return &MockModelServiceFactoryUnitCall{Call: call} +} + +// MockModelServiceFactoryUnitCall wrap *gomock.Call +type MockModelServiceFactoryUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceFactoryUnitCall) Return(arg0 *service19.Service) *MockModelServiceFactoryUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceFactoryUnitCall) Do(f func() *service19.Service) *MockModelServiceFactoryUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceFactoryUnitCall) DoAndReturn(f func() *service19.Service) *MockModelServiceFactoryUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceFactory is a mock of ServiceFactory interface. @@ -453,9 +1029,33 @@ func (m *MockServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Access() *MockServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockServiceFactory)(nil).Access)) + return &MockServiceFactoryAccessCall{Call: call} +} + +// MockServiceFactoryAccessCall wrap *gomock.Call +type MockServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAccessCall) Return(arg0 *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAccessCall) Do(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -467,9 +1067,33 @@ func (m *MockServiceFactory) AgentObjectStore() *service15.WatchableService { } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AgentObjectStore() *MockServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).AgentObjectStore)) + return &MockServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAgentObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAgentObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotation mocks base method. @@ -481,9 +1105,33 @@ func (m *MockServiceFactory) Annotation() *service0.Service { } // Annotation indicates an expected call of Annotation. -func (mr *MockServiceFactoryMockRecorder) Annotation() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Annotation() *MockServiceFactoryAnnotationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotation", reflect.TypeOf((*MockServiceFactory)(nil).Annotation)) + return &MockServiceFactoryAnnotationCall{Call: call} +} + +// MockServiceFactoryAnnotationCall wrap *gomock.Call +type MockServiceFactoryAnnotationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAnnotationCall) Return(arg0 *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAnnotationCall) Do(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAnnotationCall) DoAndReturn(f func() *service0.Service) *MockServiceFactoryAnnotationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -495,9 +1143,33 @@ func (m *MockServiceFactory) Application(arg0 storage.ProviderRegistry) *service } // Application indicates an expected call of Application. -func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Application(arg0 any) *MockServiceFactoryApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockServiceFactory)(nil).Application), arg0) + return &MockServiceFactoryApplicationCall{Call: call} +} + +// MockServiceFactoryApplicationCall wrap *gomock.Call +type MockServiceFactoryApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryApplicationCall) Return(arg0 *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryApplicationCall) Do(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryApplicationCall) DoAndReturn(f func(storage.ProviderRegistry) *service1.Service) *MockServiceFactoryApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -509,9 +1181,33 @@ func (m *MockServiceFactory) AutocertCache() *service2.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) AutocertCache() *MockServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockServiceFactory)(nil).AutocertCache)) + return &MockServiceFactoryAutocertCacheCall{Call: call} +} + +// MockServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryAutocertCacheCall) Return(arg0 *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryAutocertCacheCall) Do(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service2.Service) *MockServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BlockDevice mocks base method. @@ -523,9 +1219,33 @@ func (m *MockServiceFactory) BlockDevice() *service3.WatchableService { } // BlockDevice indicates an expected call of BlockDevice. -func (mr *MockServiceFactoryMockRecorder) BlockDevice() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) BlockDevice() *MockServiceFactoryBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevice", reflect.TypeOf((*MockServiceFactory)(nil).BlockDevice)) + return &MockServiceFactoryBlockDeviceCall{Call: call} +} + +// MockServiceFactoryBlockDeviceCall wrap *gomock.Call +type MockServiceFactoryBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryBlockDeviceCall) Return(arg0 *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryBlockDeviceCall) Do(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryBlockDeviceCall) DoAndReturn(f func() *service3.WatchableService) *MockServiceFactoryBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -537,9 +1257,33 @@ func (m *MockServiceFactory) Cloud() *service4.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Cloud() *MockServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockServiceFactory)(nil).Cloud)) + return &MockServiceFactoryCloudCall{Call: call} +} + +// MockServiceFactoryCloudCall wrap *gomock.Call +type MockServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCloudCall) Return(arg0 *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCloudCall) Do(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCloudCall) DoAndReturn(f func() *service4.WatchableService) *MockServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Config mocks base method. @@ -551,9 +1295,33 @@ func (m *MockServiceFactory) Config() *service12.WatchableService { } // Config indicates an expected call of Config. -func (mr *MockServiceFactoryMockRecorder) Config() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Config() *MockServiceFactoryConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockServiceFactory)(nil).Config)) + return &MockServiceFactoryConfigCall{Call: call} +} + +// MockServiceFactoryConfigCall wrap *gomock.Call +type MockServiceFactoryConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryConfigCall) Return(arg0 *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryConfigCall) Do(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryConfigCall) DoAndReturn(f func() *service12.WatchableService) *MockServiceFactoryConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -565,9 +1333,33 @@ func (m *MockServiceFactory) ControllerConfig() *service5.WatchableService { } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerConfig() *MockServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockServiceFactory)(nil).ControllerConfig)) + return &MockServiceFactoryControllerConfigCall{Call: call} +} + +// MockServiceFactoryControllerConfigCall wrap *gomock.Call +type MockServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerConfigCall) Return(arg0 *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerConfigCall) Do(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerConfigCall) DoAndReturn(f func() *service5.WatchableService) *MockServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -579,9 +1371,33 @@ func (m *MockServiceFactory) ControllerNode() *service6.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ControllerNode() *MockServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockServiceFactory)(nil).ControllerNode)) + return &MockServiceFactoryControllerNodeCall{Call: call} +} + +// MockServiceFactoryControllerNodeCall wrap *gomock.Call +type MockServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryControllerNodeCall) Return(arg0 *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryControllerNodeCall) Do(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryControllerNodeCall) DoAndReturn(f func() *service6.Service) *MockServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -593,9 +1409,33 @@ func (m *MockServiceFactory) Credential() *service7.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Credential() *MockServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockServiceFactory)(nil).Credential)) + return &MockServiceFactoryCredentialCall{Call: call} +} + +// MockServiceFactoryCredentialCall wrap *gomock.Call +type MockServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryCredentialCall) Return(arg0 *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryCredentialCall) Do(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryCredentialCall) DoAndReturn(f func() *service7.WatchableService) *MockServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -607,9 +1447,33 @@ func (m *MockServiceFactory) ExternalController() *service8.WatchableService { } // ExternalController indicates an expected call of ExternalController. -func (mr *MockServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ExternalController() *MockServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockServiceFactory)(nil).ExternalController)) + return &MockServiceFactoryExternalControllerCall{Call: call} +} + +// MockServiceFactoryExternalControllerCall wrap *gomock.Call +type MockServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryExternalControllerCall) Return(arg0 *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryExternalControllerCall) Do(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryExternalControllerCall) DoAndReturn(f func() *service8.WatchableService) *MockServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -621,9 +1485,33 @@ func (m *MockServiceFactory) Flag() *service9.Service { } // Flag indicates an expected call of Flag. -func (mr *MockServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Flag() *MockServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockServiceFactory)(nil).Flag)) + return &MockServiceFactoryFlagCall{Call: call} +} + +// MockServiceFactoryFlagCall wrap *gomock.Call +type MockServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryFlagCall) Return(arg0 *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryFlagCall) Do(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryFlagCall) DoAndReturn(f func() *service9.Service) *MockServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Machine mocks base method. @@ -635,9 +1523,33 @@ func (m *MockServiceFactory) Machine() *service10.Service { } // Machine indicates an expected call of Machine. -func (mr *MockServiceFactoryMockRecorder) Machine() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Machine() *MockServiceFactoryMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockServiceFactory)(nil).Machine)) + return &MockServiceFactoryMachineCall{Call: call} +} + +// MockServiceFactoryMachineCall wrap *gomock.Call +type MockServiceFactoryMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryMachineCall) Return(arg0 *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryMachineCall) Do(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryMachineCall) DoAndReturn(f func() *service10.Service) *MockServiceFactoryMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -649,9 +1561,33 @@ func (m *MockServiceFactory) Model() *service11.Service { } // Model indicates an expected call of Model. -func (mr *MockServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Model() *MockServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockServiceFactory)(nil).Model)) + return &MockServiceFactoryModelCall{Call: call} +} + +// MockServiceFactoryModelCall wrap *gomock.Call +type MockServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelCall) Return(arg0 *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelCall) Do(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelCall) DoAndReturn(f func() *service11.Service) *MockServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -663,9 +1599,33 @@ func (m *MockServiceFactory) ModelDefaults() *service13.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelDefaults() *MockServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockServiceFactory)(nil).ModelDefaults)) + return &MockServiceFactoryModelDefaultsCall{Call: call} +} + +// MockServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelDefaultsCall) Return(arg0 *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelDefaultsCall) Do(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service13.Service) *MockServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelInfo mocks base method. @@ -677,9 +1637,33 @@ func (m *MockServiceFactory) ModelInfo() *service11.ModelService { } // ModelInfo indicates an expected call of ModelInfo. -func (mr *MockServiceFactoryMockRecorder) ModelInfo() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ModelInfo() *MockServiceFactoryModelInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockServiceFactory)(nil).ModelInfo)) + return &MockServiceFactoryModelInfoCall{Call: call} +} + +// MockServiceFactoryModelInfoCall wrap *gomock.Call +type MockServiceFactoryModelInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryModelInfoCall) Return(arg0 *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryModelInfoCall) Do(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryModelInfoCall) DoAndReturn(f func() *service11.ModelService) *MockServiceFactoryModelInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Network mocks base method. @@ -691,9 +1675,33 @@ func (m *MockServiceFactory) Network() *service14.WatchableService { } // Network indicates an expected call of Network. -func (mr *MockServiceFactoryMockRecorder) Network() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Network() *MockServiceFactoryNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockServiceFactory)(nil).Network)) + return &MockServiceFactoryNetworkCall{Call: call} +} + +// MockServiceFactoryNetworkCall wrap *gomock.Call +type MockServiceFactoryNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryNetworkCall) Return(arg0 *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryNetworkCall) Do(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryNetworkCall) DoAndReturn(f func() *service14.WatchableService) *MockServiceFactoryNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStore mocks base method. @@ -705,9 +1713,33 @@ func (m *MockServiceFactory) ObjectStore() *service15.WatchableService { } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockServiceFactoryMockRecorder) ObjectStore() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) ObjectStore() *MockServiceFactoryObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockServiceFactory)(nil).ObjectStore)) + return &MockServiceFactoryObjectStoreCall{Call: call} +} + +// MockServiceFactoryObjectStoreCall wrap *gomock.Call +type MockServiceFactoryObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryObjectStoreCall) Return(arg0 *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryObjectStoreCall) Do(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryObjectStoreCall) DoAndReturn(f func() *service15.WatchableService) *MockServiceFactoryObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Secret mocks base method. @@ -719,9 +1751,33 @@ func (m *MockServiceFactory) Secret(arg0 service16.BackendAdminConfigGetter) *se } // Secret indicates an expected call of Secret. -func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Secret(arg0 any) *MockServiceFactorySecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secret", reflect.TypeOf((*MockServiceFactory)(nil).Secret), arg0) + return &MockServiceFactorySecretCall{Call: call} +} + +// MockServiceFactorySecretCall wrap *gomock.Call +type MockServiceFactorySecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretCall) Return(arg0 *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretCall) Do(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretCall) DoAndReturn(f func(service16.BackendAdminConfigGetter) *service16.WatchableService) *MockServiceFactorySecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -733,9 +1789,33 @@ func (m *MockServiceFactory) SecretBackend() *service17.WatchableService { } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) SecretBackend() *MockServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockServiceFactory)(nil).SecretBackend)) + return &MockServiceFactorySecretBackendCall{Call: call} +} + +// MockServiceFactorySecretBackendCall wrap *gomock.Call +type MockServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactorySecretBackendCall) Return(arg0 *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactorySecretBackendCall) Do(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactorySecretBackendCall) DoAndReturn(f func() *service17.WatchableService) *MockServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -747,9 +1827,33 @@ func (m *MockServiceFactory) Storage(arg0 storage.ProviderRegistry) *service18.S } // Storage indicates an expected call of Storage. -func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Storage(arg0 any) *MockServiceFactoryStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockServiceFactory)(nil).Storage), arg0) + return &MockServiceFactoryStorageCall{Call: call} +} + +// MockServiceFactoryStorageCall wrap *gomock.Call +type MockServiceFactoryStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryStorageCall) Return(arg0 *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryStorageCall) Do(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryStorageCall) DoAndReturn(f func(storage.ProviderRegistry) *service18.Service) *MockServiceFactoryStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -761,9 +1865,33 @@ func (m *MockServiceFactory) Unit() *service19.Service { } // Unit indicates an expected call of Unit. -func (mr *MockServiceFactoryMockRecorder) Unit() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Unit() *MockServiceFactoryUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockServiceFactory)(nil).Unit)) + return &MockServiceFactoryUnitCall{Call: call} +} + +// MockServiceFactoryUnitCall wrap *gomock.Call +type MockServiceFactoryUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUnitCall) Return(arg0 *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUnitCall) Do(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUnitCall) DoAndReturn(f func() *service19.Service) *MockServiceFactoryUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -775,9 +1903,33 @@ func (m *MockServiceFactory) Upgrade() *service20.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockServiceFactoryMockRecorder) Upgrade() *MockServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockServiceFactory)(nil).Upgrade)) + return &MockServiceFactoryUpgradeCall{Call: call} +} + +// MockServiceFactoryUpgradeCall wrap *gomock.Call +type MockServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryUpgradeCall) Return(arg0 *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryUpgradeCall) Do(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryUpgradeCall) DoAndReturn(f func() *service20.WatchableService) *MockServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockServiceFactoryGetter is a mock of ServiceFactoryGetter interface. @@ -812,7 +1964,31 @@ func (m *MockServiceFactoryGetter) FactoryForModel(arg0 string) servicefactory.S } // FactoryForModel indicates an expected call of FactoryForModel. -func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *gomock.Call { +func (mr *MockServiceFactoryGetterMockRecorder) FactoryForModel(arg0 any) *MockServiceFactoryGetterFactoryForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FactoryForModel", reflect.TypeOf((*MockServiceFactoryGetter)(nil).FactoryForModel), arg0) + return &MockServiceFactoryGetterFactoryForModelCall{Call: call} +} + +// MockServiceFactoryGetterFactoryForModelCall wrap *gomock.Call +type MockServiceFactoryGetterFactoryForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceFactoryGetterFactoryForModelCall) Return(arg0 servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceFactoryGetterFactoryForModelCall) Do(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceFactoryGetterFactoryForModelCall) DoAndReturn(f func(string) servicefactory.ServiceFactory) *MockServiceFactoryGetterFactoryForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/stateconverter/mocks/agent_mock.go b/internal/worker/stateconverter/mocks/agent_mock.go index c17db0c53bc..87bd7ba156a 100644 --- a/internal/worker/stateconverter/mocks/agent_mock.go +++ b/internal/worker/stateconverter/mocks/agent_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config // // Package mocks is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/stateconverter/mocks/dependency_mock.go b/internal/worker/stateconverter/mocks/dependency_mock.go index 23ed06ab12f..5c5a3b29ee8 100644 --- a/internal/worker/stateconverter/mocks/dependency_mock.go +++ b/internal/worker/stateconverter/mocks/dependency_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +// mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockGetter) Get(arg0 string, arg1 any) error { } // Get indicates an expected call of Get. -func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockGetterMockRecorder) Get(arg0, arg1 any) *MockGetterGetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGetter)(nil).Get), arg0, arg1) + return &MockGetterGetCall{Call: call} +} + +// MockGetterGetCall wrap *gomock.Call +type MockGetterGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGetterGetCall) Return(arg0 error) *MockGetterGetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGetterGetCall) Do(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGetterGetCall) DoAndReturn(f func(string, any) error) *MockGetterGetCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/stateconverter/mocks/machiner_mock.go b/internal/worker/stateconverter/mocks/machiner_mock.go index 7c86437c6c6..e83a83ef99e 100644 --- a/internal/worker/stateconverter/mocks/machiner_mock.go +++ b/internal/worker/stateconverter/mocks/machiner_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/machiner_mock.go github.com/juju/juju/internal/worker/stateconverter Machiner,Machine +// mockgen -typed -package mocks -destination mocks/machiner_mock.go github.com/juju/juju/internal/worker/stateconverter Machiner,Machine // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockMachiner) Machine(arg0 context.Context, arg1 names.MachineTag) (sta } // Machine indicates an expected call of Machine. -func (mr *MockMachinerMockRecorder) Machine(arg0, arg1 any) *gomock.Call { +func (mr *MockMachinerMockRecorder) Machine(arg0, arg1 any) *MockMachinerMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockMachiner)(nil).Machine), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockMachiner)(nil).Machine), arg0, arg1) + return &MockMachinerMachineCall{Call: call} +} + +// MockMachinerMachineCall wrap *gomock.Call +type MockMachinerMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinerMachineCall) Return(arg0 stateconverter.Machine, arg1 error) *MockMachinerMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinerMachineCall) Do(f func(context.Context, names.MachineTag) (stateconverter.Machine, error)) *MockMachinerMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinerMachineCall) DoAndReturn(f func(context.Context, names.MachineTag) (stateconverter.Machine, error)) *MockMachinerMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -91,9 +115,33 @@ func (m *MockMachine) Jobs() (*params.JobsResult, error) { } // Jobs indicates an expected call of Jobs. -func (mr *MockMachineMockRecorder) Jobs() *gomock.Call { +func (mr *MockMachineMockRecorder) Jobs() *MockMachineJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + return &MockMachineJobsCall{Call: call} +} + +// MockMachineJobsCall wrap *gomock.Call +type MockMachineJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineJobsCall) Return(arg0 *params.JobsResult, arg1 error) *MockMachineJobsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineJobsCall) Do(f func() (*params.JobsResult, error)) *MockMachineJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineJobsCall) DoAndReturn(f func() (*params.JobsResult, error)) *MockMachineJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -106,7 +154,31 @@ func (m *MockMachine) Watch() (watcher.Watcher[struct{}], error) { } // Watch indicates an expected call of Watch. -func (mr *MockMachineMockRecorder) Watch() *gomock.Call { +func (mr *MockMachineMockRecorder) Watch() *MockMachineWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMachine)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockMachine)(nil).Watch)) + return &MockMachineWatchCall{Call: call} +} + +// MockMachineWatchCall wrap *gomock.Call +type MockMachineWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineWatchCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockMachineWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineWatchCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockMachineWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineWatchCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockMachineWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/stateconverter/package_test.go b/internal/worker/stateconverter/package_test.go index 70daba28f38..dba30411970 100644 --- a/internal/worker/stateconverter/package_test.go +++ b/internal/worker/stateconverter/package_test.go @@ -12,9 +12,9 @@ import ( "github.com/juju/juju/core/watcher" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machiner_mock.go github.com/juju/juju/internal/worker/stateconverter Machiner,Machine -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/machiner_mock.go github.com/juju/juju/internal/worker/stateconverter Machiner,Machine +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/dependency_mock.go github.com/juju/worker/v4/dependency Getter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/agent_mock.go github.com/juju/juju/agent Agent,Config func TestAll(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/trace/agent_mock_test.go b/internal/worker/trace/agent_mock_test.go index c4256f5db42..9e3812ee2b0 100644 --- a/internal/worker/trace/agent_mock_test.go +++ b/internal/worker/trace/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package trace -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +// mockgen -typed -package trace -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config // // Package trace is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -71,9 +95,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -109,9 +157,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -124,9 +196,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -138,9 +234,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -152,9 +272,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -166,9 +310,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -180,9 +348,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -194,9 +386,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -208,9 +424,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -223,9 +463,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -237,9 +501,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -251,9 +539,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -265,9 +577,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -279,9 +615,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -293,9 +653,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -307,9 +691,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -322,9 +730,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -336,9 +768,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -350,9 +806,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -364,9 +844,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -378,9 +882,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -392,9 +920,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -406,9 +958,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -420,9 +996,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -434,9 +1034,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -448,9 +1072,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -462,9 +1110,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -476,9 +1148,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -491,9 +1187,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -505,9 +1225,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -519,9 +1263,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -533,9 +1301,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -547,9 +1339,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -561,9 +1377,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -576,7 +1416,31 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/trace/clock_mock_test.go b/internal/worker/trace/clock_mock_test.go index c2c2f5b6a39..35592334e0d 100644 --- a/internal/worker/trace/clock_mock_test.go +++ b/internal/worker/trace/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package trace -destination clock_mock_test.go github.com/juju/clock Clock,Timer +// mockgen -typed -package trace -destination clock_mock_test.go github.com/juju/clock Clock,Timer // // Package trace is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,9 +163,33 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockTimer is a mock of Timer interface. @@ -128,9 +224,33 @@ func (m *MockTimer) Chan() <-chan time.Time { } // Chan indicates an expected call of Chan. -func (mr *MockTimerMockRecorder) Chan() *gomock.Call { +func (mr *MockTimerMockRecorder) Chan() *MockTimerChanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Chan", reflect.TypeOf((*MockTimer)(nil).Chan)) + return &MockTimerChanCall{Call: call} +} + +// MockTimerChanCall wrap *gomock.Call +type MockTimerChanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerChanCall) Return(arg0 <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerChanCall) Do(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerChanCall) DoAndReturn(f func() <-chan time.Time) *MockTimerChanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Reset mocks base method. @@ -142,9 +262,33 @@ func (m *MockTimer) Reset(arg0 time.Duration) bool { } // Reset indicates an expected call of Reset. -func (mr *MockTimerMockRecorder) Reset(arg0 any) *gomock.Call { +func (mr *MockTimerMockRecorder) Reset(arg0 any) *MockTimerResetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTimer)(nil).Reset), arg0) + return &MockTimerResetCall{Call: call} +} + +// MockTimerResetCall wrap *gomock.Call +type MockTimerResetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerResetCall) Return(arg0 bool) *MockTimerResetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerResetCall) Do(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerResetCall) DoAndReturn(f func(time.Duration) bool) *MockTimerResetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -156,7 +300,31 @@ func (m *MockTimer) Stop() bool { } // Stop indicates an expected call of Stop. -func (mr *MockTimerMockRecorder) Stop() *gomock.Call { +func (mr *MockTimerMockRecorder) Stop() *MockTimerStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTimer)(nil).Stop)) + return &MockTimerStopCall{Call: call} +} + +// MockTimerStopCall wrap *gomock.Call +type MockTimerStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTimerStopCall) Return(arg0 bool) *MockTimerStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTimerStopCall) Do(f func() bool) *MockTimerStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTimerStopCall) DoAndReturn(f func() bool) *MockTimerStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/trace/package_test.go b/internal/worker/trace/package_test.go index 53529044234..4822e4f8290 100644 --- a/internal/worker/trace/package_test.go +++ b/internal/worker/trace/package_test.go @@ -18,10 +18,10 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package trace -destination clock_mock_test.go github.com/juju/clock Clock,Timer -//go:generate go run go.uber.org/mock/mockgen -package trace -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config -//go:generate go run go.uber.org/mock/mockgen -package trace -destination tracer_mock_test.go github.com/juju/juju/internal/worker/trace TrackedTracer,Client,ClientTracer,ClientTracerProvider -//go:generate go run go.uber.org/mock/mockgen -package trace -destination trace_mock_test.go go.opentelemetry.io/otel/trace Span +//go:generate go run go.uber.org/mock/mockgen -typed -package trace -destination clock_mock_test.go github.com/juju/clock Clock,Timer +//go:generate go run go.uber.org/mock/mockgen -typed -package trace -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config +//go:generate go run go.uber.org/mock/mockgen -typed -package trace -destination tracer_mock_test.go github.com/juju/juju/internal/worker/trace TrackedTracer,Client,ClientTracer,ClientTracerProvider +//go:generate go run go.uber.org/mock/mockgen -typed -package trace -destination trace_mock_test.go go.opentelemetry.io/otel/trace Span func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/trace/trace_mock_test.go b/internal/worker/trace/trace_mock_test.go index 87669a67d50..5b2f30f58a3 100644 --- a/internal/worker/trace/trace_mock_test.go +++ b/internal/worker/trace/trace_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package trace -destination trace_mock_test.go go.opentelemetry.io/otel/trace Span +// mockgen -typed -package trace -destination trace_mock_test.go go.opentelemetry.io/otel/trace Span // // Package trace is a generated GoMock package. @@ -52,10 +52,34 @@ func (m *MockSpan) AddEvent(arg0 string, arg1 ...trace.EventOption) { } // AddEvent indicates an expected call of AddEvent. -func (mr *MockSpanMockRecorder) AddEvent(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSpanMockRecorder) AddEvent(arg0 any, arg1 ...any) *MockSpanAddEventCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEvent", reflect.TypeOf((*MockSpan)(nil).AddEvent), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEvent", reflect.TypeOf((*MockSpan)(nil).AddEvent), varargs...) + return &MockSpanAddEventCall{Call: call} +} + +// MockSpanAddEventCall wrap *gomock.Call +type MockSpanAddEventCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanAddEventCall) Return() *MockSpanAddEventCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanAddEventCall) Do(f func(string, ...trace.EventOption)) *MockSpanAddEventCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanAddEventCall) DoAndReturn(f func(string, ...trace.EventOption)) *MockSpanAddEventCall { + c.Call = c.Call.DoAndReturn(f) + return c } // End mocks base method. @@ -69,9 +93,33 @@ func (m *MockSpan) End(arg0 ...trace.SpanEndOption) { } // End indicates an expected call of End. -func (mr *MockSpanMockRecorder) End(arg0 ...any) *gomock.Call { +func (mr *MockSpanMockRecorder) End(arg0 ...any) *MockSpanEndCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "End", reflect.TypeOf((*MockSpan)(nil).End), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "End", reflect.TypeOf((*MockSpan)(nil).End), arg0...) + return &MockSpanEndCall{Call: call} +} + +// MockSpanEndCall wrap *gomock.Call +type MockSpanEndCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanEndCall) Return() *MockSpanEndCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanEndCall) Do(f func(...trace.SpanEndOption)) *MockSpanEndCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanEndCall) DoAndReturn(f func(...trace.SpanEndOption)) *MockSpanEndCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsRecording mocks base method. @@ -83,9 +131,33 @@ func (m *MockSpan) IsRecording() bool { } // IsRecording indicates an expected call of IsRecording. -func (mr *MockSpanMockRecorder) IsRecording() *gomock.Call { +func (mr *MockSpanMockRecorder) IsRecording() *MockSpanIsRecordingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRecording", reflect.TypeOf((*MockSpan)(nil).IsRecording)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRecording", reflect.TypeOf((*MockSpan)(nil).IsRecording)) + return &MockSpanIsRecordingCall{Call: call} +} + +// MockSpanIsRecordingCall wrap *gomock.Call +type MockSpanIsRecordingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanIsRecordingCall) Return(arg0 bool) *MockSpanIsRecordingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanIsRecordingCall) Do(f func() bool) *MockSpanIsRecordingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanIsRecordingCall) DoAndReturn(f func() bool) *MockSpanIsRecordingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RecordError mocks base method. @@ -99,10 +171,34 @@ func (m *MockSpan) RecordError(arg0 error, arg1 ...trace.EventOption) { } // RecordError indicates an expected call of RecordError. -func (mr *MockSpanMockRecorder) RecordError(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSpanMockRecorder) RecordError(arg0 any, arg1 ...any) *MockSpanRecordErrorCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordError", reflect.TypeOf((*MockSpan)(nil).RecordError), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordError", reflect.TypeOf((*MockSpan)(nil).RecordError), varargs...) + return &MockSpanRecordErrorCall{Call: call} +} + +// MockSpanRecordErrorCall wrap *gomock.Call +type MockSpanRecordErrorCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanRecordErrorCall) Return() *MockSpanRecordErrorCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanRecordErrorCall) Do(f func(error, ...trace.EventOption)) *MockSpanRecordErrorCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanRecordErrorCall) DoAndReturn(f func(error, ...trace.EventOption)) *MockSpanRecordErrorCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAttributes mocks base method. @@ -116,9 +212,33 @@ func (m *MockSpan) SetAttributes(arg0 ...attribute.KeyValue) { } // SetAttributes indicates an expected call of SetAttributes. -func (mr *MockSpanMockRecorder) SetAttributes(arg0 ...any) *gomock.Call { +func (mr *MockSpanMockRecorder) SetAttributes(arg0 ...any) *MockSpanSetAttributesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAttributes", reflect.TypeOf((*MockSpan)(nil).SetAttributes), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAttributes", reflect.TypeOf((*MockSpan)(nil).SetAttributes), arg0...) + return &MockSpanSetAttributesCall{Call: call} +} + +// MockSpanSetAttributesCall wrap *gomock.Call +type MockSpanSetAttributesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanSetAttributesCall) Return() *MockSpanSetAttributesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanSetAttributesCall) Do(f func(...attribute.KeyValue)) *MockSpanSetAttributesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanSetAttributesCall) DoAndReturn(f func(...attribute.KeyValue)) *MockSpanSetAttributesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetName mocks base method. @@ -128,9 +248,33 @@ func (m *MockSpan) SetName(arg0 string) { } // SetName indicates an expected call of SetName. -func (mr *MockSpanMockRecorder) SetName(arg0 any) *gomock.Call { +func (mr *MockSpanMockRecorder) SetName(arg0 any) *MockSpanSetNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetName", reflect.TypeOf((*MockSpan)(nil).SetName), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetName", reflect.TypeOf((*MockSpan)(nil).SetName), arg0) + return &MockSpanSetNameCall{Call: call} +} + +// MockSpanSetNameCall wrap *gomock.Call +type MockSpanSetNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanSetNameCall) Return() *MockSpanSetNameCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanSetNameCall) Do(f func(string)) *MockSpanSetNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanSetNameCall) DoAndReturn(f func(string)) *MockSpanSetNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -140,9 +284,33 @@ func (m *MockSpan) SetStatus(arg0 codes.Code, arg1 string) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockSpanMockRecorder) SetStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockSpanMockRecorder) SetStatus(arg0, arg1 any) *MockSpanSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockSpan)(nil).SetStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockSpan)(nil).SetStatus), arg0, arg1) + return &MockSpanSetStatusCall{Call: call} +} + +// MockSpanSetStatusCall wrap *gomock.Call +type MockSpanSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanSetStatusCall) Return() *MockSpanSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanSetStatusCall) Do(f func(codes.Code, string)) *MockSpanSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanSetStatusCall) DoAndReturn(f func(codes.Code, string)) *MockSpanSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SpanContext mocks base method. @@ -154,9 +322,33 @@ func (m *MockSpan) SpanContext() trace.SpanContext { } // SpanContext indicates an expected call of SpanContext. -func (mr *MockSpanMockRecorder) SpanContext() *gomock.Call { +func (mr *MockSpanMockRecorder) SpanContext() *MockSpanSpanContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpanContext", reflect.TypeOf((*MockSpan)(nil).SpanContext)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpanContext", reflect.TypeOf((*MockSpan)(nil).SpanContext)) + return &MockSpanSpanContextCall{Call: call} +} + +// MockSpanSpanContextCall wrap *gomock.Call +type MockSpanSpanContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanSpanContextCall) Return(arg0 trace.SpanContext) *MockSpanSpanContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanSpanContextCall) Do(f func() trace.SpanContext) *MockSpanSpanContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanSpanContextCall) DoAndReturn(f func() trace.SpanContext) *MockSpanSpanContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TracerProvider mocks base method. @@ -168,9 +360,33 @@ func (m *MockSpan) TracerProvider() trace.TracerProvider { } // TracerProvider indicates an expected call of TracerProvider. -func (mr *MockSpanMockRecorder) TracerProvider() *gomock.Call { +func (mr *MockSpanMockRecorder) TracerProvider() *MockSpanTracerProviderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TracerProvider", reflect.TypeOf((*MockSpan)(nil).TracerProvider)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TracerProvider", reflect.TypeOf((*MockSpan)(nil).TracerProvider)) + return &MockSpanTracerProviderCall{Call: call} +} + +// MockSpanTracerProviderCall wrap *gomock.Call +type MockSpanTracerProviderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanTracerProviderCall) Return(arg0 trace.TracerProvider) *MockSpanTracerProviderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanTracerProviderCall) Do(f func() trace.TracerProvider) *MockSpanTracerProviderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanTracerProviderCall) DoAndReturn(f func() trace.TracerProvider) *MockSpanTracerProviderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // span mocks base method. @@ -180,7 +396,31 @@ func (m *MockSpan) span() { } // span indicates an expected call of span. -func (mr *MockSpanMockRecorder) span() *gomock.Call { +func (mr *MockSpanMockRecorder) span() *MockSpanspanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "span", reflect.TypeOf((*MockSpan)(nil).span)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "span", reflect.TypeOf((*MockSpan)(nil).span)) + return &MockSpanspanCall{Call: call} +} + +// MockSpanspanCall wrap *gomock.Call +type MockSpanspanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSpanspanCall) Return() *MockSpanspanCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSpanspanCall) Do(f func()) *MockSpanspanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSpanspanCall) DoAndReturn(f func()) *MockSpanspanCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/trace/tracer_mock_test.go b/internal/worker/trace/tracer_mock_test.go index 77f6ceab624..7e01ef7bc8e 100644 --- a/internal/worker/trace/tracer_mock_test.go +++ b/internal/worker/trace/tracer_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package trace -destination tracer_mock_test.go github.com/juju/juju/internal/worker/trace TrackedTracer,Client,ClientTracer,ClientTracerProvider +// mockgen -typed -package trace -destination tracer_mock_test.go github.com/juju/juju/internal/worker/trace TrackedTracer,Client,ClientTracer,ClientTracerProvider // // Package trace is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockTrackedTracer) Enabled() bool { } // Enabled indicates an expected call of Enabled. -func (mr *MockTrackedTracerMockRecorder) Enabled() *gomock.Call { +func (mr *MockTrackedTracerMockRecorder) Enabled() *MockTrackedTracerEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockTrackedTracer)(nil).Enabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockTrackedTracer)(nil).Enabled)) + return &MockTrackedTracerEnabledCall{Call: call} +} + +// MockTrackedTracerEnabledCall wrap *gomock.Call +type MockTrackedTracerEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedTracerEnabledCall) Return(arg0 bool) *MockTrackedTracerEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedTracerEnabledCall) Do(f func() bool) *MockTrackedTracerEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedTracerEnabledCall) DoAndReturn(f func() bool) *MockTrackedTracerEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -62,9 +86,33 @@ func (m *MockTrackedTracer) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockTrackedTracerMockRecorder) Kill() *gomock.Call { +func (mr *MockTrackedTracerMockRecorder) Kill() *MockTrackedTracerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedTracer)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockTrackedTracer)(nil).Kill)) + return &MockTrackedTracerKillCall{Call: call} +} + +// MockTrackedTracerKillCall wrap *gomock.Call +type MockTrackedTracerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedTracerKillCall) Return() *MockTrackedTracerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedTracerKillCall) Do(f func()) *MockTrackedTracerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedTracerKillCall) DoAndReturn(f func()) *MockTrackedTracerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Start mocks base method. @@ -81,10 +129,34 @@ func (m *MockTrackedTracer) Start(arg0 context.Context, arg1 string, arg2 ...tra } // Start indicates an expected call of Start. -func (mr *MockTrackedTracerMockRecorder) Start(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockTrackedTracerMockRecorder) Start(arg0, arg1 any, arg2 ...any) *MockTrackedTracerStartCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTrackedTracer)(nil).Start), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTrackedTracer)(nil).Start), varargs...) + return &MockTrackedTracerStartCall{Call: call} +} + +// MockTrackedTracerStartCall wrap *gomock.Call +type MockTrackedTracerStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedTracerStartCall) Return(arg0 context.Context, arg1 trace.Span) *MockTrackedTracerStartCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedTracerStartCall) Do(f func(context.Context, string, ...trace.Option) (context.Context, trace.Span)) *MockTrackedTracerStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedTracerStartCall) DoAndReturn(f func(context.Context, string, ...trace.Option) (context.Context, trace.Span)) *MockTrackedTracerStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -96,9 +168,33 @@ func (m *MockTrackedTracer) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockTrackedTracerMockRecorder) Wait() *gomock.Call { +func (mr *MockTrackedTracerMockRecorder) Wait() *MockTrackedTracerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedTracer)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockTrackedTracer)(nil).Wait)) + return &MockTrackedTracerWaitCall{Call: call} +} + +// MockTrackedTracerWaitCall wrap *gomock.Call +type MockTrackedTracerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTrackedTracerWaitCall) Return(arg0 error) *MockTrackedTracerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTrackedTracerWaitCall) Do(f func() error) *MockTrackedTracerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTrackedTracerWaitCall) DoAndReturn(f func() error) *MockTrackedTracerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClient is a mock of Client interface. @@ -133,9 +229,33 @@ func (m *MockClient) Start(arg0 context.Context) error { } // Start indicates an expected call of Start. -func (mr *MockClientMockRecorder) Start(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Start(arg0 any) *MockClientStartCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClient)(nil).Start), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClient)(nil).Start), arg0) + return &MockClientStartCall{Call: call} +} + +// MockClientStartCall wrap *gomock.Call +type MockClientStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStartCall) Return(arg0 error) *MockClientStartCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStartCall) Do(f func(context.Context) error) *MockClientStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStartCall) DoAndReturn(f func(context.Context) error) *MockClientStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Stop mocks base method. @@ -147,9 +267,33 @@ func (m *MockClient) Stop(arg0 context.Context) error { } // Stop indicates an expected call of Stop. -func (mr *MockClientMockRecorder) Stop(arg0 any) *gomock.Call { +func (mr *MockClientMockRecorder) Stop(arg0 any) *MockClientStopCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockClient)(nil).Stop), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockClient)(nil).Stop), arg0) + return &MockClientStopCall{Call: call} +} + +// MockClientStopCall wrap *gomock.Call +type MockClientStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientStopCall) Return(arg0 error) *MockClientStopCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientStopCall) Do(f func(context.Context) error) *MockClientStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientStopCall) DoAndReturn(f func(context.Context) error) *MockClientStopCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClientTracer is a mock of ClientTracer interface. @@ -189,10 +333,34 @@ func (m *MockClientTracer) Start(arg0 context.Context, arg1 string, arg2 ...trac } // Start indicates an expected call of Start. -func (mr *MockClientTracerMockRecorder) Start(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockClientTracerMockRecorder) Start(arg0, arg1 any, arg2 ...any) *MockClientTracerStartCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClientTracer)(nil).Start), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClientTracer)(nil).Start), varargs...) + return &MockClientTracerStartCall{Call: call} +} + +// MockClientTracerStartCall wrap *gomock.Call +type MockClientTracerStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientTracerStartCall) Return(arg0 context.Context, arg1 ClientSpan) *MockClientTracerStartCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientTracerStartCall) Do(f func(context.Context, string, ...trace1.SpanStartOption) (context.Context, ClientSpan)) *MockClientTracerStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientTracerStartCall) DoAndReturn(f func(context.Context, string, ...trace1.SpanStartOption) (context.Context, ClientSpan)) *MockClientTracerStartCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockClientTracerProvider is a mock of ClientTracerProvider interface. @@ -227,9 +395,33 @@ func (m *MockClientTracerProvider) ForceFlush(arg0 context.Context) error { } // ForceFlush indicates an expected call of ForceFlush. -func (mr *MockClientTracerProviderMockRecorder) ForceFlush(arg0 any) *gomock.Call { +func (mr *MockClientTracerProviderMockRecorder) ForceFlush(arg0 any) *MockClientTracerProviderForceFlushCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceFlush", reflect.TypeOf((*MockClientTracerProvider)(nil).ForceFlush), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceFlush", reflect.TypeOf((*MockClientTracerProvider)(nil).ForceFlush), arg0) + return &MockClientTracerProviderForceFlushCall{Call: call} +} + +// MockClientTracerProviderForceFlushCall wrap *gomock.Call +type MockClientTracerProviderForceFlushCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientTracerProviderForceFlushCall) Return(arg0 error) *MockClientTracerProviderForceFlushCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientTracerProviderForceFlushCall) Do(f func(context.Context) error) *MockClientTracerProviderForceFlushCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientTracerProviderForceFlushCall) DoAndReturn(f func(context.Context) error) *MockClientTracerProviderForceFlushCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Shutdown mocks base method. @@ -241,7 +433,31 @@ func (m *MockClientTracerProvider) Shutdown(arg0 context.Context) error { } // Shutdown indicates an expected call of Shutdown. -func (mr *MockClientTracerProviderMockRecorder) Shutdown(arg0 any) *gomock.Call { +func (mr *MockClientTracerProviderMockRecorder) Shutdown(arg0 any) *MockClientTracerProviderShutdownCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockClientTracerProvider)(nil).Shutdown), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockClientTracerProvider)(nil).Shutdown), arg0) + return &MockClientTracerProviderShutdownCall{Call: call} +} + +// MockClientTracerProviderShutdownCall wrap *gomock.Call +type MockClientTracerProviderShutdownCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientTracerProviderShutdownCall) Return(arg0 error) *MockClientTracerProviderShutdownCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientTracerProviderShutdownCall) Do(f func(context.Context) error) *MockClientTracerProviderShutdownCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientTracerProviderShutdownCall) DoAndReturn(f func(context.Context) error) *MockClientTracerProviderShutdownCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/undertaker/credentialapi_mock_test.go b/internal/worker/undertaker/credentialapi_mock_test.go index 23ccac102ae..003b2287492 100644 --- a/internal/worker/undertaker/credentialapi_mock_test.go +++ b/internal/worker/undertaker/credentialapi_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package undertaker_test -destination credentialapi_mock_test.go github.com/juju/juju/internal/worker/common CredentialAPI +// mockgen -typed -package undertaker_test -destination credentialapi_mock_test.go github.com/juju/juju/internal/worker/common CredentialAPI // // Package undertaker_test is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockCredentialAPI) InvalidateModelCredential(arg0 context.Context, arg1 } // InvalidateModelCredential indicates an expected call of InvalidateModelCredential. -func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialAPIMockRecorder) InvalidateModelCredential(arg0, arg1 any) *MockCredentialAPIInvalidateModelCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateModelCredential", reflect.TypeOf((*MockCredentialAPI)(nil).InvalidateModelCredential), arg0, arg1) + return &MockCredentialAPIInvalidateModelCredentialCall{Call: call} +} + +// MockCredentialAPIInvalidateModelCredentialCall wrap *gomock.Call +type MockCredentialAPIInvalidateModelCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCredentialAPIInvalidateModelCredentialCall) Return(arg0 error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCredentialAPIInvalidateModelCredentialCall) Do(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCredentialAPIInvalidateModelCredentialCall) DoAndReturn(f func(context.Context, string) error) *MockCredentialAPIInvalidateModelCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/undertaker/facade_mock_test.go b/internal/worker/undertaker/facade_mock_test.go index 83476977cb2..3bdc495b10b 100644 --- a/internal/worker/undertaker/facade_mock_test.go +++ b/internal/worker/undertaker/facade_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package undertaker_test -destination facade_mock_test.go github.com/juju/juju/internal/worker/undertaker Facade +// mockgen -typed -package undertaker_test -destination facade_mock_test.go github.com/juju/juju/internal/worker/undertaker Facade // // Package undertaker_test is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockFacade) CloudSpec(arg0 context.Context) (cloudspec.CloudSpec, error } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockFacadeMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) CloudSpec(arg0 any) *MockFacadeCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockFacade)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockFacade)(nil).CloudSpec), arg0) + return &MockFacadeCloudSpecCall{Call: call} +} + +// MockFacadeCloudSpecCall wrap *gomock.Call +type MockFacadeCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeCloudSpecCall) Return(arg0 cloudspec.CloudSpec, arg1 error) *MockFacadeCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeCloudSpecCall) Do(f func(context.Context) (cloudspec.CloudSpec, error)) *MockFacadeCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeCloudSpecCall) DoAndReturn(f func(context.Context) (cloudspec.CloudSpec, error)) *MockFacadeCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -69,9 +93,33 @@ func (m *MockFacade) ModelConfig(arg0 context.Context) (*config.Config, error) { } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockFacadeMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) ModelConfig(arg0 any) *MockFacadeModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockFacade)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockFacade)(nil).ModelConfig), arg0) + return &MockFacadeModelConfigCall{Call: call} +} + +// MockFacadeModelConfigCall wrap *gomock.Call +type MockFacadeModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockFacadeModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockFacadeModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockFacadeModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelInfo mocks base method. @@ -84,9 +132,33 @@ func (m *MockFacade) ModelInfo() (params.UndertakerModelInfoResult, error) { } // ModelInfo indicates an expected call of ModelInfo. -func (mr *MockFacadeMockRecorder) ModelInfo() *gomock.Call { +func (mr *MockFacadeMockRecorder) ModelInfo() *MockFacadeModelInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockFacade)(nil).ModelInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelInfo", reflect.TypeOf((*MockFacade)(nil).ModelInfo)) + return &MockFacadeModelInfoCall{Call: call} +} + +// MockFacadeModelInfoCall wrap *gomock.Call +type MockFacadeModelInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeModelInfoCall) Return(arg0 params.UndertakerModelInfoResult, arg1 error) *MockFacadeModelInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeModelInfoCall) Do(f func() (params.UndertakerModelInfoResult, error)) *MockFacadeModelInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeModelInfoCall) DoAndReturn(f func() (params.UndertakerModelInfoResult, error)) *MockFacadeModelInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProcessDyingModel mocks base method. @@ -98,9 +170,33 @@ func (m *MockFacade) ProcessDyingModel() error { } // ProcessDyingModel indicates an expected call of ProcessDyingModel. -func (mr *MockFacadeMockRecorder) ProcessDyingModel() *gomock.Call { +func (mr *MockFacadeMockRecorder) ProcessDyingModel() *MockFacadeProcessDyingModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessDyingModel", reflect.TypeOf((*MockFacade)(nil).ProcessDyingModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessDyingModel", reflect.TypeOf((*MockFacade)(nil).ProcessDyingModel)) + return &MockFacadeProcessDyingModelCall{Call: call} +} + +// MockFacadeProcessDyingModelCall wrap *gomock.Call +type MockFacadeProcessDyingModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeProcessDyingModelCall) Return(arg0 error) *MockFacadeProcessDyingModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeProcessDyingModelCall) Do(f func() error) *MockFacadeProcessDyingModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeProcessDyingModelCall) DoAndReturn(f func() error) *MockFacadeProcessDyingModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveModel mocks base method. @@ -112,9 +208,33 @@ func (m *MockFacade) RemoveModel() error { } // RemoveModel indicates an expected call of RemoveModel. -func (mr *MockFacadeMockRecorder) RemoveModel() *gomock.Call { +func (mr *MockFacadeMockRecorder) RemoveModel() *MockFacadeRemoveModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockFacade)(nil).RemoveModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockFacade)(nil).RemoveModel)) + return &MockFacadeRemoveModelCall{Call: call} +} + +// MockFacadeRemoveModelCall wrap *gomock.Call +type MockFacadeRemoveModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeRemoveModelCall) Return(arg0 error) *MockFacadeRemoveModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeRemoveModelCall) Do(f func() error) *MockFacadeRemoveModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeRemoveModelCall) DoAndReturn(f func() error) *MockFacadeRemoveModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -126,9 +246,33 @@ func (m *MockFacade) SetStatus(arg0 status.Status, arg1 string, arg2 map[string] } // SetStatus indicates an expected call of SetStatus. -func (mr *MockFacadeMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockFacadeSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockFacade)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockFacade)(nil).SetStatus), arg0, arg1, arg2) + return &MockFacadeSetStatusCall{Call: call} +} + +// MockFacadeSetStatusCall wrap *gomock.Call +type MockFacadeSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeSetStatusCall) Return(arg0 error) *MockFacadeSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockFacadeSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockFacadeSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModel mocks base method. @@ -141,9 +285,33 @@ func (m *MockFacade) WatchModel() (watcher.Watcher[struct{}], error) { } // WatchModel indicates an expected call of WatchModel. -func (mr *MockFacadeMockRecorder) WatchModel() *gomock.Call { +func (mr *MockFacadeMockRecorder) WatchModel() *MockFacadeWatchModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModel", reflect.TypeOf((*MockFacade)(nil).WatchModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModel", reflect.TypeOf((*MockFacade)(nil).WatchModel)) + return &MockFacadeWatchModelCall{Call: call} +} + +// MockFacadeWatchModelCall wrap *gomock.Call +type MockFacadeWatchModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeWatchModelCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockFacadeWatchModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeWatchModelCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeWatchModelCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchModelResources mocks base method. @@ -156,7 +324,31 @@ func (m *MockFacade) WatchModelResources() (watcher.Watcher[struct{}], error) { } // WatchModelResources indicates an expected call of WatchModelResources. -func (mr *MockFacadeMockRecorder) WatchModelResources() *gomock.Call { +func (mr *MockFacadeMockRecorder) WatchModelResources() *MockFacadeWatchModelResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelResources", reflect.TypeOf((*MockFacade)(nil).WatchModelResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchModelResources", reflect.TypeOf((*MockFacade)(nil).WatchModelResources)) + return &MockFacadeWatchModelResourcesCall{Call: call} +} + +// MockFacadeWatchModelResourcesCall wrap *gomock.Call +type MockFacadeWatchModelResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeWatchModelResourcesCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockFacadeWatchModelResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeWatchModelResourcesCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchModelResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeWatchModelResourcesCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchModelResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/undertaker/package_test.go b/internal/worker/undertaker/package_test.go index fde21de4060..2827efdbaeb 100644 --- a/internal/worker/undertaker/package_test.go +++ b/internal/worker/undertaker/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package undertaker_test -destination facade_mock_test.go github.com/juju/juju/internal/worker/undertaker Facade -//go:generate go run go.uber.org/mock/mockgen -package undertaker_test -destination credentialapi_mock_test.go github.com/juju/juju/internal/worker/common CredentialAPI +//go:generate go run go.uber.org/mock/mockgen -typed -package undertaker_test -destination facade_mock_test.go github.com/juju/juju/internal/worker/undertaker Facade +//go:generate go run go.uber.org/mock/mockgen -typed -package undertaker_test -destination credentialapi_mock_test.go github.com/juju/juju/internal/worker/common CredentialAPI func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/api/domain_mocks.go b/internal/worker/uniter/api/domain_mocks.go index 15fdf2454fa..a3db476b515 100644 --- a/internal/worker/uniter/api/domain_mocks.go +++ b/internal/worker/uniter/api/domain_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package api -destination domain_mocks.go github.com/juju/juju/internal/worker/uniter/api Unit,Relation,RelationUnit,Application,Charm +// mockgen -typed -package api -destination domain_mocks.go github.com/juju/juju/internal/worker/uniter/api Unit,Relation,RelationUnit,Application,Charm // // Package api is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockUnit) Application(arg0 context.Context) (Application, error) { } // Application indicates an expected call of Application. -func (mr *MockUnitMockRecorder) Application(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Application(arg0 any) *MockUnitApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUnit)(nil).Application), arg0) + return &MockUnitApplicationCall{Call: call} +} + +// MockUnitApplicationCall wrap *gomock.Call +type MockUnitApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationCall) Return(arg0 Application, arg1 error) *MockUnitApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationCall) Do(f func(context.Context) (Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationCall) DoAndReturn(f func(context.Context) (Application, error)) *MockUnitApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationName mocks base method. @@ -72,9 +96,33 @@ func (m *MockUnit) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockUnitMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockUnitMockRecorder) ApplicationName() *MockUnitApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockUnit)(nil).ApplicationName)) + return &MockUnitApplicationNameCall{Call: call} +} + +// MockUnitApplicationNameCall wrap *gomock.Call +type MockUnitApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationNameCall) Return(arg0 string) *MockUnitApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationNameCall) Do(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationNameCall) DoAndReturn(f func() string) *MockUnitApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationTag mocks base method. @@ -86,9 +134,33 @@ func (m *MockUnit) ApplicationTag() names.ApplicationTag { } // ApplicationTag indicates an expected call of ApplicationTag. -func (mr *MockUnitMockRecorder) ApplicationTag() *gomock.Call { +func (mr *MockUnitMockRecorder) ApplicationTag() *MockUnitApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockUnit)(nil).ApplicationTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationTag", reflect.TypeOf((*MockUnit)(nil).ApplicationTag)) + return &MockUnitApplicationTagCall{Call: call} +} + +// MockUnitApplicationTagCall wrap *gomock.Call +type MockUnitApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitApplicationTagCall) Return(arg0 names.ApplicationTag) *MockUnitApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitApplicationTagCall) Do(f func() names.ApplicationTag) *MockUnitApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockUnitApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AssignedMachine mocks base method. @@ -101,9 +173,33 @@ func (m *MockUnit) AssignedMachine() (names.MachineTag, error) { } // AssignedMachine indicates an expected call of AssignedMachine. -func (mr *MockUnitMockRecorder) AssignedMachine() *gomock.Call { +func (mr *MockUnitMockRecorder) AssignedMachine() *MockUnitAssignedMachineCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachine", reflect.TypeOf((*MockUnit)(nil).AssignedMachine)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachine", reflect.TypeOf((*MockUnit)(nil).AssignedMachine)) + return &MockUnitAssignedMachineCall{Call: call} +} + +// MockUnitAssignedMachineCall wrap *gomock.Call +type MockUnitAssignedMachineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAssignedMachineCall) Return(arg0 names.MachineTag, arg1 error) *MockUnitAssignedMachineCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAssignedMachineCall) Do(f func() (names.MachineTag, error)) *MockUnitAssignedMachineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAssignedMachineCall) DoAndReturn(f func() (names.MachineTag, error)) *MockUnitAssignedMachineCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AvailabilityZone mocks base method. @@ -116,9 +212,33 @@ func (m *MockUnit) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockUnitMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockUnitMockRecorder) AvailabilityZone() *MockUnitAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockUnit)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockUnit)(nil).AvailabilityZone)) + return &MockUnitAvailabilityZoneCall{Call: call} +} + +// MockUnitAvailabilityZoneCall wrap *gomock.Call +type MockUnitAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockUnitAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitAvailabilityZoneCall) Do(f func() (string, error)) *MockUnitAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockUnitAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CanApplyLXDProfile mocks base method. @@ -131,9 +251,33 @@ func (m *MockUnit) CanApplyLXDProfile() (bool, error) { } // CanApplyLXDProfile indicates an expected call of CanApplyLXDProfile. -func (mr *MockUnitMockRecorder) CanApplyLXDProfile() *gomock.Call { +func (mr *MockUnitMockRecorder) CanApplyLXDProfile() *MockUnitCanApplyLXDProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanApplyLXDProfile", reflect.TypeOf((*MockUnit)(nil).CanApplyLXDProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanApplyLXDProfile", reflect.TypeOf((*MockUnit)(nil).CanApplyLXDProfile)) + return &MockUnitCanApplyLXDProfileCall{Call: call} +} + +// MockUnitCanApplyLXDProfileCall wrap *gomock.Call +type MockUnitCanApplyLXDProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitCanApplyLXDProfileCall) Return(arg0 bool, arg1 error) *MockUnitCanApplyLXDProfileCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitCanApplyLXDProfileCall) Do(f func() (bool, error)) *MockUnitCanApplyLXDProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitCanApplyLXDProfileCall) DoAndReturn(f func() (bool, error)) *MockUnitCanApplyLXDProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -146,9 +290,33 @@ func (m *MockUnit) CharmURL() (string, error) { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockUnitMockRecorder) CharmURL() *gomock.Call { +func (mr *MockUnitMockRecorder) CharmURL() *MockUnitCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockUnit)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockUnit)(nil).CharmURL)) + return &MockUnitCharmURLCall{Call: call} +} + +// MockUnitCharmURLCall wrap *gomock.Call +type MockUnitCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitCharmURLCall) Return(arg0 string, arg1 error) *MockUnitCharmURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitCharmURLCall) Do(f func() (string, error)) *MockUnitCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitCharmURLCall) DoAndReturn(f func() (string, error)) *MockUnitCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClearResolved mocks base method. @@ -160,9 +328,33 @@ func (m *MockUnit) ClearResolved() error { } // ClearResolved indicates an expected call of ClearResolved. -func (mr *MockUnitMockRecorder) ClearResolved() *gomock.Call { +func (mr *MockUnitMockRecorder) ClearResolved() *MockUnitClearResolvedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearResolved", reflect.TypeOf((*MockUnit)(nil).ClearResolved)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearResolved", reflect.TypeOf((*MockUnit)(nil).ClearResolved)) + return &MockUnitClearResolvedCall{Call: call} +} + +// MockUnitClearResolvedCall wrap *gomock.Call +type MockUnitClearResolvedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitClearResolvedCall) Return(arg0 error) *MockUnitClearResolvedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitClearResolvedCall) Do(f func() error) *MockUnitClearResolvedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitClearResolvedCall) DoAndReturn(f func() error) *MockUnitClearResolvedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CommitHookChanges mocks base method. @@ -174,9 +366,33 @@ func (m *MockUnit) CommitHookChanges(arg0 params.CommitHookChangesArgs) error { } // CommitHookChanges indicates an expected call of CommitHookChanges. -func (mr *MockUnitMockRecorder) CommitHookChanges(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) CommitHookChanges(arg0 any) *MockUnitCommitHookChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHookChanges", reflect.TypeOf((*MockUnit)(nil).CommitHookChanges), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHookChanges", reflect.TypeOf((*MockUnit)(nil).CommitHookChanges), arg0) + return &MockUnitCommitHookChangesCall{Call: call} +} + +// MockUnitCommitHookChangesCall wrap *gomock.Call +type MockUnitCommitHookChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitCommitHookChangesCall) Return(arg0 error) *MockUnitCommitHookChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitCommitHookChangesCall) Do(f func(params.CommitHookChangesArgs) error) *MockUnitCommitHookChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitCommitHookChangesCall) DoAndReturn(f func(params.CommitHookChangesArgs) error) *MockUnitCommitHookChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConfigSettings mocks base method. @@ -189,9 +405,33 @@ func (m *MockUnit) ConfigSettings() (charm.Settings, error) { } // ConfigSettings indicates an expected call of ConfigSettings. -func (mr *MockUnitMockRecorder) ConfigSettings() *gomock.Call { +func (mr *MockUnitMockRecorder) ConfigSettings() *MockUnitConfigSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockUnit)(nil).ConfigSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockUnit)(nil).ConfigSettings)) + return &MockUnitConfigSettingsCall{Call: call} +} + +// MockUnitConfigSettingsCall wrap *gomock.Call +type MockUnitConfigSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitConfigSettingsCall) Return(arg0 charm.Settings, arg1 error) *MockUnitConfigSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitConfigSettingsCall) Do(f func() (charm.Settings, error)) *MockUnitConfigSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitConfigSettingsCall) DoAndReturn(f func() (charm.Settings, error)) *MockUnitConfigSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Destroy mocks base method. @@ -203,9 +443,33 @@ func (m *MockUnit) Destroy() error { } // Destroy indicates an expected call of Destroy. -func (mr *MockUnitMockRecorder) Destroy() *gomock.Call { +func (mr *MockUnitMockRecorder) Destroy() *MockUnitDestroyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockUnit)(nil).Destroy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*MockUnit)(nil).Destroy)) + return &MockUnitDestroyCall{Call: call} +} + +// MockUnitDestroyCall wrap *gomock.Call +type MockUnitDestroyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitDestroyCall) Return(arg0 error) *MockUnitDestroyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitDestroyCall) Do(f func() error) *MockUnitDestroyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitDestroyCall) DoAndReturn(f func() error) *MockUnitDestroyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyAllSubordinates mocks base method. @@ -217,9 +481,33 @@ func (m *MockUnit) DestroyAllSubordinates() error { } // DestroyAllSubordinates indicates an expected call of DestroyAllSubordinates. -func (mr *MockUnitMockRecorder) DestroyAllSubordinates() *gomock.Call { +func (mr *MockUnitMockRecorder) DestroyAllSubordinates() *MockUnitDestroyAllSubordinatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllSubordinates", reflect.TypeOf((*MockUnit)(nil).DestroyAllSubordinates)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllSubordinates", reflect.TypeOf((*MockUnit)(nil).DestroyAllSubordinates)) + return &MockUnitDestroyAllSubordinatesCall{Call: call} +} + +// MockUnitDestroyAllSubordinatesCall wrap *gomock.Call +type MockUnitDestroyAllSubordinatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitDestroyAllSubordinatesCall) Return(arg0 error) *MockUnitDestroyAllSubordinatesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitDestroyAllSubordinatesCall) Do(f func() error) *MockUnitDestroyAllSubordinatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitDestroyAllSubordinatesCall) DoAndReturn(f func() error) *MockUnitDestroyAllSubordinatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnsureDead mocks base method. @@ -231,9 +519,33 @@ func (m *MockUnit) EnsureDead() error { } // EnsureDead indicates an expected call of EnsureDead. -func (mr *MockUnitMockRecorder) EnsureDead() *gomock.Call { +func (mr *MockUnitMockRecorder) EnsureDead() *MockUnitEnsureDeadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockUnit)(nil).EnsureDead)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureDead", reflect.TypeOf((*MockUnit)(nil).EnsureDead)) + return &MockUnitEnsureDeadCall{Call: call} +} + +// MockUnitEnsureDeadCall wrap *gomock.Call +type MockUnitEnsureDeadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitEnsureDeadCall) Return(arg0 error) *MockUnitEnsureDeadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitEnsureDeadCall) Do(f func() error) *MockUnitEnsureDeadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitEnsureDeadCall) DoAndReturn(f func() error) *MockUnitEnsureDeadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasSubordinates mocks base method. @@ -246,9 +558,33 @@ func (m *MockUnit) HasSubordinates() (bool, error) { } // HasSubordinates indicates an expected call of HasSubordinates. -func (mr *MockUnitMockRecorder) HasSubordinates() *gomock.Call { +func (mr *MockUnitMockRecorder) HasSubordinates() *MockUnitHasSubordinatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSubordinates", reflect.TypeOf((*MockUnit)(nil).HasSubordinates)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSubordinates", reflect.TypeOf((*MockUnit)(nil).HasSubordinates)) + return &MockUnitHasSubordinatesCall{Call: call} +} + +// MockUnitHasSubordinatesCall wrap *gomock.Call +type MockUnitHasSubordinatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitHasSubordinatesCall) Return(arg0 bool, arg1 error) *MockUnitHasSubordinatesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitHasSubordinatesCall) Do(f func() (bool, error)) *MockUnitHasSubordinatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitHasSubordinatesCall) DoAndReturn(f func() (bool, error)) *MockUnitHasSubordinatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfileName mocks base method. @@ -261,9 +597,33 @@ func (m *MockUnit) LXDProfileName() (string, error) { } // LXDProfileName indicates an expected call of LXDProfileName. -func (mr *MockUnitMockRecorder) LXDProfileName() *gomock.Call { +func (mr *MockUnitMockRecorder) LXDProfileName() *MockUnitLXDProfileNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileName", reflect.TypeOf((*MockUnit)(nil).LXDProfileName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileName", reflect.TypeOf((*MockUnit)(nil).LXDProfileName)) + return &MockUnitLXDProfileNameCall{Call: call} +} + +// MockUnitLXDProfileNameCall wrap *gomock.Call +type MockUnitLXDProfileNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLXDProfileNameCall) Return(arg0 string, arg1 error) *MockUnitLXDProfileNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLXDProfileNameCall) Do(f func() (string, error)) *MockUnitLXDProfileNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLXDProfileNameCall) DoAndReturn(f func() (string, error)) *MockUnitLXDProfileNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -275,9 +635,33 @@ func (m *MockUnit) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockUnitMockRecorder) Life() *gomock.Call { +func (mr *MockUnitMockRecorder) Life() *MockUnitLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockUnit)(nil).Life)) + return &MockUnitLifeCall{Call: call} +} + +// MockUnitLifeCall wrap *gomock.Call +type MockUnitLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLifeCall) Return(arg0 life.Value) *MockUnitLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLifeCall) Do(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLifeCall) DoAndReturn(f func() life.Value) *MockUnitLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogActionMessage mocks base method. @@ -289,9 +673,33 @@ func (m *MockUnit) LogActionMessage(arg0 names.ActionTag, arg1 string) error { } // LogActionMessage indicates an expected call of LogActionMessage. -func (mr *MockUnitMockRecorder) LogActionMessage(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) LogActionMessage(arg0, arg1 any) *MockUnitLogActionMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockUnit)(nil).LogActionMessage), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockUnit)(nil).LogActionMessage), arg0, arg1) + return &MockUnitLogActionMessageCall{Call: call} +} + +// MockUnitLogActionMessageCall wrap *gomock.Call +type MockUnitLogActionMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitLogActionMessageCall) Return(arg0 error) *MockUnitLogActionMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitLogActionMessageCall) Do(f func(names.ActionTag, string) error) *MockUnitLogActionMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitLogActionMessageCall) DoAndReturn(f func(names.ActionTag, string) error) *MockUnitLogActionMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -303,9 +711,33 @@ func (m *MockUnit) Name() string { } // Name indicates an expected call of Name. -func (mr *MockUnitMockRecorder) Name() *gomock.Call { +func (mr *MockUnitMockRecorder) Name() *MockUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockUnit)(nil).Name)) + return &MockUnitNameCall{Call: call} +} + +// MockUnitNameCall wrap *gomock.Call +type MockUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNameCall) Return(arg0 string) *MockUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNameCall) Do(f func() string) *MockUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNameCall) DoAndReturn(f func() string) *MockUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInfo mocks base method. @@ -318,9 +750,33 @@ func (m *MockUnit) NetworkInfo(arg0 []string, arg1 *int) (map[string]params.Netw } // NetworkInfo indicates an expected call of NetworkInfo. -func (mr *MockUnitMockRecorder) NetworkInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) NetworkInfo(arg0, arg1 any) *MockUnitNetworkInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockUnit)(nil).NetworkInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockUnit)(nil).NetworkInfo), arg0, arg1) + return &MockUnitNetworkInfoCall{Call: call} +} + +// MockUnitNetworkInfoCall wrap *gomock.Call +type MockUnitNetworkInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitNetworkInfoCall) Return(arg0 map[string]params.NetworkInfoResult, arg1 error) *MockUnitNetworkInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitNetworkInfoCall) Do(f func([]string, *int) (map[string]params.NetworkInfoResult, error)) *MockUnitNetworkInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitNetworkInfoCall) DoAndReturn(f func([]string, *int) (map[string]params.NetworkInfoResult, error)) *MockUnitNetworkInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrincipalName mocks base method. @@ -334,9 +790,33 @@ func (m *MockUnit) PrincipalName() (string, bool, error) { } // PrincipalName indicates an expected call of PrincipalName. -func (mr *MockUnitMockRecorder) PrincipalName() *gomock.Call { +func (mr *MockUnitMockRecorder) PrincipalName() *MockUnitPrincipalNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrincipalName", reflect.TypeOf((*MockUnit)(nil).PrincipalName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrincipalName", reflect.TypeOf((*MockUnit)(nil).PrincipalName)) + return &MockUnitPrincipalNameCall{Call: call} +} + +// MockUnitPrincipalNameCall wrap *gomock.Call +type MockUnitPrincipalNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPrincipalNameCall) Return(arg0 string, arg1 bool, arg2 error) *MockUnitPrincipalNameCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPrincipalNameCall) Do(f func() (string, bool, error)) *MockUnitPrincipalNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPrincipalNameCall) DoAndReturn(f func() (string, bool, error)) *MockUnitPrincipalNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrivateAddress mocks base method. @@ -349,9 +829,33 @@ func (m *MockUnit) PrivateAddress() (string, error) { } // PrivateAddress indicates an expected call of PrivateAddress. -func (mr *MockUnitMockRecorder) PrivateAddress() *gomock.Call { +func (mr *MockUnitMockRecorder) PrivateAddress() *MockUnitPrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockUnit)(nil).PrivateAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockUnit)(nil).PrivateAddress)) + return &MockUnitPrivateAddressCall{Call: call} +} + +// MockUnitPrivateAddressCall wrap *gomock.Call +type MockUnitPrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPrivateAddressCall) Return(arg0 string, arg1 error) *MockUnitPrivateAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPrivateAddressCall) Do(f func() (string, error)) *MockUnitPrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPrivateAddressCall) DoAndReturn(f func() (string, error)) *MockUnitPrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderID mocks base method. @@ -363,9 +867,33 @@ func (m *MockUnit) ProviderID() string { } // ProviderID indicates an expected call of ProviderID. -func (mr *MockUnitMockRecorder) ProviderID() *gomock.Call { +func (mr *MockUnitMockRecorder) ProviderID() *MockUnitProviderIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderID", reflect.TypeOf((*MockUnit)(nil).ProviderID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderID", reflect.TypeOf((*MockUnit)(nil).ProviderID)) + return &MockUnitProviderIDCall{Call: call} +} + +// MockUnitProviderIDCall wrap *gomock.Call +type MockUnitProviderIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitProviderIDCall) Return(arg0 string) *MockUnitProviderIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitProviderIDCall) Do(f func() string) *MockUnitProviderIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitProviderIDCall) DoAndReturn(f func() string) *MockUnitProviderIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -378,9 +906,33 @@ func (m *MockUnit) PublicAddress() (string, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockUnitMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockUnitMockRecorder) PublicAddress() *MockUnitPublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockUnit)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockUnit)(nil).PublicAddress)) + return &MockUnitPublicAddressCall{Call: call} +} + +// MockUnitPublicAddressCall wrap *gomock.Call +type MockUnitPublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPublicAddressCall) Return(arg0 string, arg1 error) *MockUnitPublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPublicAddressCall) Do(f func() (string, error)) *MockUnitPublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPublicAddressCall) DoAndReturn(f func() (string, error)) *MockUnitPublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -392,9 +944,33 @@ func (m *MockUnit) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockUnitMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) Refresh(arg0 any) *MockUnitRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockUnit)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockUnit)(nil).Refresh), arg0) + return &MockUnitRefreshCall{Call: call} +} + +// MockUnitRefreshCall wrap *gomock.Call +type MockUnitRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRefreshCall) Return(arg0 error) *MockUnitRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRefreshCall) Do(f func(context.Context) error) *MockUnitRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRefreshCall) DoAndReturn(f func(context.Context) error) *MockUnitRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationsStatus mocks base method. @@ -407,9 +983,33 @@ func (m *MockUnit) RelationsStatus() ([]uniter.RelationStatus, error) { } // RelationsStatus indicates an expected call of RelationsStatus. -func (mr *MockUnitMockRecorder) RelationsStatus() *gomock.Call { +func (mr *MockUnitMockRecorder) RelationsStatus() *MockUnitRelationsStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationsStatus", reflect.TypeOf((*MockUnit)(nil).RelationsStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationsStatus", reflect.TypeOf((*MockUnit)(nil).RelationsStatus)) + return &MockUnitRelationsStatusCall{Call: call} +} + +// MockUnitRelationsStatusCall wrap *gomock.Call +type MockUnitRelationsStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRelationsStatusCall) Return(arg0 []uniter.RelationStatus, arg1 error) *MockUnitRelationsStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRelationsStatusCall) Do(f func() ([]uniter.RelationStatus, error)) *MockUnitRelationsStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRelationsStatusCall) DoAndReturn(f func() ([]uniter.RelationStatus, error)) *MockUnitRelationsStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RequestReboot mocks base method. @@ -421,9 +1021,33 @@ func (m *MockUnit) RequestReboot() error { } // RequestReboot indicates an expected call of RequestReboot. -func (mr *MockUnitMockRecorder) RequestReboot() *gomock.Call { +func (mr *MockUnitMockRecorder) RequestReboot() *MockUnitRequestRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockUnit)(nil).RequestReboot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockUnit)(nil).RequestReboot)) + return &MockUnitRequestRebootCall{Call: call} +} + +// MockUnitRequestRebootCall wrap *gomock.Call +type MockUnitRequestRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitRequestRebootCall) Return(arg0 error) *MockUnitRequestRebootCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitRequestRebootCall) Do(f func() error) *MockUnitRequestRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitRequestRebootCall) DoAndReturn(f func() error) *MockUnitRequestRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Resolved mocks base method. @@ -435,9 +1059,33 @@ func (m *MockUnit) Resolved() params.ResolvedMode { } // Resolved indicates an expected call of Resolved. -func (mr *MockUnitMockRecorder) Resolved() *gomock.Call { +func (mr *MockUnitMockRecorder) Resolved() *MockUnitResolvedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolved", reflect.TypeOf((*MockUnit)(nil).Resolved)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolved", reflect.TypeOf((*MockUnit)(nil).Resolved)) + return &MockUnitResolvedCall{Call: call} +} + +// MockUnitResolvedCall wrap *gomock.Call +type MockUnitResolvedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitResolvedCall) Return(arg0 params.ResolvedMode) *MockUnitResolvedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitResolvedCall) Do(f func() params.ResolvedMode) *MockUnitResolvedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitResolvedCall) DoAndReturn(f func() params.ResolvedMode) *MockUnitResolvedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAgentStatus mocks base method. @@ -449,9 +1097,33 @@ func (m *MockUnit) SetAgentStatus(arg0 status.Status, arg1 string, arg2 map[stri } // SetAgentStatus indicates an expected call of SetAgentStatus. -func (mr *MockUnitMockRecorder) SetAgentStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetAgentStatus(arg0, arg1, arg2 any) *MockUnitSetAgentStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAgentStatus", reflect.TypeOf((*MockUnit)(nil).SetAgentStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAgentStatus", reflect.TypeOf((*MockUnit)(nil).SetAgentStatus), arg0, arg1, arg2) + return &MockUnitSetAgentStatusCall{Call: call} +} + +// MockUnitSetAgentStatusCall wrap *gomock.Call +type MockUnitSetAgentStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetAgentStatusCall) Return(arg0 error) *MockUnitSetAgentStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetAgentStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockUnitSetAgentStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetAgentStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockUnitSetAgentStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmURL mocks base method. @@ -463,9 +1135,33 @@ func (m *MockUnit) SetCharmURL(arg0 string) error { } // SetCharmURL indicates an expected call of SetCharmURL. -func (mr *MockUnitMockRecorder) SetCharmURL(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetCharmURL(arg0 any) *MockUnitSetCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmURL", reflect.TypeOf((*MockUnit)(nil).SetCharmURL), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmURL", reflect.TypeOf((*MockUnit)(nil).SetCharmURL), arg0) + return &MockUnitSetCharmURLCall{Call: call} +} + +// MockUnitSetCharmURLCall wrap *gomock.Call +type MockUnitSetCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetCharmURLCall) Return(arg0 error) *MockUnitSetCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetCharmURLCall) Do(f func(string) error) *MockUnitSetCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetCharmURLCall) DoAndReturn(f func(string) error) *MockUnitSetCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetState mocks base method. @@ -477,9 +1173,33 @@ func (m *MockUnit) SetState(arg0 params.SetUnitStateArg) error { } // SetState indicates an expected call of SetState. -func (mr *MockUnitMockRecorder) SetState(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetState(arg0 any) *MockUnitSetStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockUnit)(nil).SetState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockUnit)(nil).SetState), arg0) + return &MockUnitSetStateCall{Call: call} +} + +// MockUnitSetStateCall wrap *gomock.Call +type MockUnitSetStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetStateCall) Return(arg0 error) *MockUnitSetStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetStateCall) Do(f func(params.SetUnitStateArg) error) *MockUnitSetStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetStateCall) DoAndReturn(f func(params.SetUnitStateArg) error) *MockUnitSetStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitStatus mocks base method. @@ -491,9 +1211,33 @@ func (m *MockUnit) SetUnitStatus(arg0 context.Context, arg1 status.Status, arg2 } // SetUnitStatus indicates an expected call of SetUnitStatus. -func (mr *MockUnitMockRecorder) SetUnitStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetUnitStatus(arg0, arg1, arg2, arg3 any) *MockUnitSetUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockUnit)(nil).SetUnitStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockUnit)(nil).SetUnitStatus), arg0, arg1, arg2, arg3) + return &MockUnitSetUnitStatusCall{Call: call} +} + +// MockUnitSetUnitStatusCall wrap *gomock.Call +type MockUnitSetUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetUnitStatusCall) Return(arg0 error) *MockUnitSetUnitStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetUnitStatusCall) Do(f func(context.Context, status.Status, string, map[string]any) error) *MockUnitSetUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetUnitStatusCall) DoAndReturn(f func(context.Context, status.Status, string, map[string]any) error) *MockUnitSetUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradeSeriesStatus mocks base method. @@ -505,9 +1249,33 @@ func (m *MockUnit) SetUpgradeSeriesStatus(arg0 model.UpgradeSeriesStatus, arg1 s } // SetUpgradeSeriesStatus indicates an expected call of SetUpgradeSeriesStatus. -func (mr *MockUnitMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *MockUnitSetUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUnit)(nil).SetUpgradeSeriesStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockUnit)(nil).SetUpgradeSeriesStatus), arg0, arg1) + return &MockUnitSetUpgradeSeriesStatusCall{Call: call} +} + +// MockUnitSetUpgradeSeriesStatusCall wrap *gomock.Call +type MockUnitSetUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitSetUpgradeSeriesStatusCall) Return(arg0 error) *MockUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitSetUpgradeSeriesStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitSetUpgradeSeriesStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockUnitSetUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // State mocks base method. @@ -520,9 +1288,33 @@ func (m *MockUnit) State() (params.UnitStateResult, error) { } // State indicates an expected call of State. -func (mr *MockUnitMockRecorder) State() *gomock.Call { +func (mr *MockUnitMockRecorder) State() *MockUnitStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnit)(nil).State)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnit)(nil).State)) + return &MockUnitStateCall{Call: call} +} + +// MockUnitStateCall wrap *gomock.Call +type MockUnitStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateCall) Return(arg0 params.UnitStateResult, arg1 error) *MockUnitStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateCall) Do(f func() (params.UnitStateResult, error)) *MockUnitStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateCall) DoAndReturn(f func() (params.UnitStateResult, error)) *MockUnitStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -534,9 +1326,33 @@ func (m *MockUnit) Tag() names.UnitTag { } // Tag indicates an expected call of Tag. -func (mr *MockUnitMockRecorder) Tag() *gomock.Call { +func (mr *MockUnitMockRecorder) Tag() *MockUnitTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockUnit)(nil).Tag)) + return &MockUnitTagCall{Call: call} +} + +// MockUnitTagCall wrap *gomock.Call +type MockUnitTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitTagCall) Return(arg0 names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitTagCall) Do(f func() names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitTagCall) DoAndReturn(f func() names.UnitTag) *MockUnitTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStatus mocks base method. @@ -549,9 +1365,33 @@ func (m *MockUnit) UnitStatus(arg0 context.Context) (params.StatusResult, error) } // UnitStatus indicates an expected call of UnitStatus. -func (mr *MockUnitMockRecorder) UnitStatus(arg0 any) *gomock.Call { +func (mr *MockUnitMockRecorder) UnitStatus(arg0 any) *MockUnitUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockUnit)(nil).UnitStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockUnit)(nil).UnitStatus), arg0) + return &MockUnitUnitStatusCall{Call: call} +} + +// MockUnitUnitStatusCall wrap *gomock.Call +type MockUnitUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUnitStatusCall) Return(arg0 params.StatusResult, arg1 error) *MockUnitUnitStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUnitStatusCall) Do(f func(context.Context) (params.StatusResult, error)) *MockUnitUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUnitStatusCall) DoAndReturn(f func(context.Context) (params.StatusResult, error)) *MockUnitUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeSeriesStatus mocks base method. @@ -565,9 +1405,33 @@ func (m *MockUnit) UpgradeSeriesStatus() (model.UpgradeSeriesStatus, string, err } // UpgradeSeriesStatus indicates an expected call of UpgradeSeriesStatus. -func (mr *MockUnitMockRecorder) UpgradeSeriesStatus() *gomock.Call { +func (mr *MockUnitMockRecorder) UpgradeSeriesStatus() *MockUnitUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUnit)(nil).UpgradeSeriesStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeSeriesStatus", reflect.TypeOf((*MockUnit)(nil).UpgradeSeriesStatus)) + return &MockUnitUpgradeSeriesStatusCall{Call: call} +} + +// MockUnitUpgradeSeriesStatusCall wrap *gomock.Call +type MockUnitUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitUpgradeSeriesStatusCall) Return(arg0 model.UpgradeSeriesStatus, arg1 string, arg2 error) *MockUnitUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitUpgradeSeriesStatusCall) Do(f func() (model.UpgradeSeriesStatus, string, error)) *MockUnitUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitUpgradeSeriesStatusCall) DoAndReturn(f func() (model.UpgradeSeriesStatus, string, error)) *MockUnitUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -580,9 +1444,33 @@ func (m *MockUnit) Watch() (watcher.Watcher[struct{}], error) { } // Watch indicates an expected call of Watch. -func (mr *MockUnitMockRecorder) Watch() *gomock.Call { +func (mr *MockUnitMockRecorder) Watch() *MockUnitWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockUnit)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockUnit)(nil).Watch)) + return &MockUnitWatchCall{Call: call} +} + +// MockUnitWatchCall wrap *gomock.Call +type MockUnitWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUnitWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchActionNotifications mocks base method. @@ -595,9 +1483,33 @@ func (m *MockUnit) WatchActionNotifications() (watcher.Watcher[[]string], error) } // WatchActionNotifications indicates an expected call of WatchActionNotifications. -func (mr *MockUnitMockRecorder) WatchActionNotifications() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchActionNotifications() *MockUnitWatchActionNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockUnit)(nil).WatchActionNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchActionNotifications", reflect.TypeOf((*MockUnit)(nil).WatchActionNotifications)) + return &MockUnitWatchActionNotificationsCall{Call: call} +} + +// MockUnitWatchActionNotificationsCall wrap *gomock.Call +type MockUnitWatchActionNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchActionNotificationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchActionNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchActionNotificationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchActionNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchActionNotificationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchActionNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchAddressesHash mocks base method. @@ -610,9 +1522,33 @@ func (m *MockUnit) WatchAddressesHash() (watcher.Watcher[[]string], error) { } // WatchAddressesHash indicates an expected call of WatchAddressesHash. -func (mr *MockUnitMockRecorder) WatchAddressesHash() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchAddressesHash() *MockUnitWatchAddressesHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAddressesHash", reflect.TypeOf((*MockUnit)(nil).WatchAddressesHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAddressesHash", reflect.TypeOf((*MockUnit)(nil).WatchAddressesHash)) + return &MockUnitWatchAddressesHashCall{Call: call} +} + +// MockUnitWatchAddressesHashCall wrap *gomock.Call +type MockUnitWatchAddressesHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchAddressesHashCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchAddressesHashCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchAddressesHashCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchAddressesHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchAddressesHashCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchAddressesHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchConfigSettingsHash mocks base method. @@ -625,9 +1561,33 @@ func (m *MockUnit) WatchConfigSettingsHash() (watcher.Watcher[[]string], error) } // WatchConfigSettingsHash indicates an expected call of WatchConfigSettingsHash. -func (mr *MockUnitMockRecorder) WatchConfigSettingsHash() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchConfigSettingsHash() *MockUnitWatchConfigSettingsHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConfigSettingsHash", reflect.TypeOf((*MockUnit)(nil).WatchConfigSettingsHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConfigSettingsHash", reflect.TypeOf((*MockUnit)(nil).WatchConfigSettingsHash)) + return &MockUnitWatchConfigSettingsHashCall{Call: call} +} + +// MockUnitWatchConfigSettingsHashCall wrap *gomock.Call +type MockUnitWatchConfigSettingsHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchConfigSettingsHashCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchConfigSettingsHashCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchConfigSettingsHashCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchConfigSettingsHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchConfigSettingsHashCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchConfigSettingsHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchInstanceData mocks base method. @@ -640,9 +1600,33 @@ func (m *MockUnit) WatchInstanceData() (watcher.Watcher[struct{}], error) { } // WatchInstanceData indicates an expected call of WatchInstanceData. -func (mr *MockUnitMockRecorder) WatchInstanceData() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchInstanceData() *MockUnitWatchInstanceDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockUnit)(nil).WatchInstanceData)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockUnit)(nil).WatchInstanceData)) + return &MockUnitWatchInstanceDataCall{Call: call} +} + +// MockUnitWatchInstanceDataCall wrap *gomock.Call +type MockUnitWatchInstanceDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchInstanceDataCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUnitWatchInstanceDataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchInstanceDataCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchInstanceDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchInstanceDataCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchInstanceDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRelations mocks base method. @@ -655,9 +1639,33 @@ func (m *MockUnit) WatchRelations() (watcher.Watcher[[]string], error) { } // WatchRelations indicates an expected call of WatchRelations. -func (mr *MockUnitMockRecorder) WatchRelations() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchRelations() *MockUnitWatchRelationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRelations", reflect.TypeOf((*MockUnit)(nil).WatchRelations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRelations", reflect.TypeOf((*MockUnit)(nil).WatchRelations)) + return &MockUnitWatchRelationsCall{Call: call} +} + +// MockUnitWatchRelationsCall wrap *gomock.Call +type MockUnitWatchRelationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchRelationsCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchRelationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchRelationsCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchRelationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchRelationsCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchRelationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchStorage mocks base method. @@ -670,9 +1678,33 @@ func (m *MockUnit) WatchStorage() (watcher.Watcher[[]string], error) { } // WatchStorage indicates an expected call of WatchStorage. -func (mr *MockUnitMockRecorder) WatchStorage() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchStorage() *MockUnitWatchStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchStorage", reflect.TypeOf((*MockUnit)(nil).WatchStorage)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchStorage", reflect.TypeOf((*MockUnit)(nil).WatchStorage)) + return &MockUnitWatchStorageCall{Call: call} +} + +// MockUnitWatchStorageCall wrap *gomock.Call +type MockUnitWatchStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchStorageCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchStorageCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchStorageCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchTrustConfigSettingsHash mocks base method. @@ -685,9 +1717,33 @@ func (m *MockUnit) WatchTrustConfigSettingsHash() (watcher.Watcher[[]string], er } // WatchTrustConfigSettingsHash indicates an expected call of WatchTrustConfigSettingsHash. -func (mr *MockUnitMockRecorder) WatchTrustConfigSettingsHash() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchTrustConfigSettingsHash() *MockUnitWatchTrustConfigSettingsHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchTrustConfigSettingsHash", reflect.TypeOf((*MockUnit)(nil).WatchTrustConfigSettingsHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchTrustConfigSettingsHash", reflect.TypeOf((*MockUnit)(nil).WatchTrustConfigSettingsHash)) + return &MockUnitWatchTrustConfigSettingsHashCall{Call: call} +} + +// MockUnitWatchTrustConfigSettingsHashCall wrap *gomock.Call +type MockUnitWatchTrustConfigSettingsHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchTrustConfigSettingsHashCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockUnitWatchTrustConfigSettingsHashCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchTrustConfigSettingsHashCall) Do(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchTrustConfigSettingsHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchTrustConfigSettingsHashCall) DoAndReturn(f func() (watcher.Watcher[[]string], error)) *MockUnitWatchTrustConfigSettingsHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpgradeSeriesNotifications mocks base method. @@ -700,9 +1756,33 @@ func (m *MockUnit) WatchUpgradeSeriesNotifications() (watcher.Watcher[struct{}], } // WatchUpgradeSeriesNotifications indicates an expected call of WatchUpgradeSeriesNotifications. -func (mr *MockUnitMockRecorder) WatchUpgradeSeriesNotifications() *gomock.Call { +func (mr *MockUnitMockRecorder) WatchUpgradeSeriesNotifications() *MockUnitWatchUpgradeSeriesNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUnit)(nil).WatchUpgradeSeriesNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockUnit)(nil).WatchUpgradeSeriesNotifications)) + return &MockUnitWatchUpgradeSeriesNotificationsCall{Call: call} +} + +// MockUnitWatchUpgradeSeriesNotificationsCall wrap *gomock.Call +type MockUnitWatchUpgradeSeriesNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitWatchUpgradeSeriesNotificationsCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUnitWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitWatchUpgradeSeriesNotificationsCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitWatchUpgradeSeriesNotificationsCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockUnitWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelation is a mock of Relation interface. @@ -738,9 +1818,33 @@ func (m *MockRelation) Endpoint(arg0 context.Context) (*uniter.Endpoint, error) } // Endpoint indicates an expected call of Endpoint. -func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Endpoint(arg0 any) *MockRelationEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelation)(nil).Endpoint), arg0) + return &MockRelationEndpointCall{Call: call} +} + +// MockRelationEndpointCall wrap *gomock.Call +type MockRelationEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationEndpointCall) Return(arg0 *uniter.Endpoint, arg1 error) *MockRelationEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationEndpointCall) Do(f func(context.Context) (*uniter.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationEndpointCall) DoAndReturn(f func(context.Context) (*uniter.Endpoint, error)) *MockRelationEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -752,9 +1856,33 @@ func (m *MockRelation) Id() int { } // Id indicates an expected call of Id. -func (mr *MockRelationMockRecorder) Id() *gomock.Call { +func (mr *MockRelationMockRecorder) Id() *MockRelationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockRelation)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockRelation)(nil).Id)) + return &MockRelationIdCall{Call: call} +} + +// MockRelationIdCall wrap *gomock.Call +type MockRelationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationIdCall) Return(arg0 int) *MockRelationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationIdCall) Do(f func() int) *MockRelationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationIdCall) DoAndReturn(f func() int) *MockRelationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -766,9 +1894,33 @@ func (m *MockRelation) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockRelationMockRecorder) Life() *gomock.Call { +func (mr *MockRelationMockRecorder) Life() *MockRelationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockRelation)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockRelation)(nil).Life)) + return &MockRelationLifeCall{Call: call} +} + +// MockRelationLifeCall wrap *gomock.Call +type MockRelationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationLifeCall) Return(arg0 life.Value) *MockRelationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationLifeCall) Do(f func() life.Value) *MockRelationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationLifeCall) DoAndReturn(f func() life.Value) *MockRelationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OtherApplication mocks base method. @@ -780,9 +1932,33 @@ func (m *MockRelation) OtherApplication() string { } // OtherApplication indicates an expected call of OtherApplication. -func (mr *MockRelationMockRecorder) OtherApplication() *gomock.Call { +func (mr *MockRelationMockRecorder) OtherApplication() *MockRelationOtherApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OtherApplication", reflect.TypeOf((*MockRelation)(nil).OtherApplication)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OtherApplication", reflect.TypeOf((*MockRelation)(nil).OtherApplication)) + return &MockRelationOtherApplicationCall{Call: call} +} + +// MockRelationOtherApplicationCall wrap *gomock.Call +type MockRelationOtherApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationOtherApplicationCall) Return(arg0 string) *MockRelationOtherApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationOtherApplicationCall) Do(f func() string) *MockRelationOtherApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationOtherApplicationCall) DoAndReturn(f func() string) *MockRelationOtherApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -794,9 +1970,33 @@ func (m *MockRelation) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockRelationMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Refresh(arg0 any) *MockRelationRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockRelation)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockRelation)(nil).Refresh), arg0) + return &MockRelationRefreshCall{Call: call} +} + +// MockRelationRefreshCall wrap *gomock.Call +type MockRelationRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationRefreshCall) Return(arg0 error) *MockRelationRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationRefreshCall) Do(f func(context.Context) error) *MockRelationRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationRefreshCall) DoAndReturn(f func(context.Context) error) *MockRelationRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -808,9 +2008,33 @@ func (m *MockRelation) SetStatus(arg0 context.Context, arg1 relation.Status) err } // SetStatus indicates an expected call of SetStatus. -func (mr *MockRelationMockRecorder) SetStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationMockRecorder) SetStatus(arg0, arg1 any) *MockRelationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRelation)(nil).SetStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRelation)(nil).SetStatus), arg0, arg1) + return &MockRelationSetStatusCall{Call: call} +} + +// MockRelationSetStatusCall wrap *gomock.Call +type MockRelationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSetStatusCall) Return(arg0 error) *MockRelationSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSetStatusCall) Do(f func(context.Context, relation.Status) error) *MockRelationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSetStatusCall) DoAndReturn(f func(context.Context, relation.Status) error) *MockRelationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -822,9 +2046,33 @@ func (m *MockRelation) String() string { } // String indicates an expected call of String. -func (mr *MockRelationMockRecorder) String() *gomock.Call { +func (mr *MockRelationMockRecorder) String() *MockRelationStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRelation)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockRelation)(nil).String)) + return &MockRelationStringCall{Call: call} +} + +// MockRelationStringCall wrap *gomock.Call +type MockRelationStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStringCall) Return(arg0 string) *MockRelationStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStringCall) Do(f func() string) *MockRelationStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStringCall) DoAndReturn(f func() string) *MockRelationStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Suspended mocks base method. @@ -836,9 +2084,33 @@ func (m *MockRelation) Suspended() bool { } // Suspended indicates an expected call of Suspended. -func (mr *MockRelationMockRecorder) Suspended() *gomock.Call { +func (mr *MockRelationMockRecorder) Suspended() *MockRelationSuspendedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockRelation)(nil).Suspended)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockRelation)(nil).Suspended)) + return &MockRelationSuspendedCall{Call: call} +} + +// MockRelationSuspendedCall wrap *gomock.Call +type MockRelationSuspendedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationSuspendedCall) Return(arg0 bool) *MockRelationSuspendedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationSuspendedCall) Do(f func() bool) *MockRelationSuspendedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationSuspendedCall) DoAndReturn(f func() bool) *MockRelationSuspendedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -850,9 +2122,33 @@ func (m *MockRelation) Tag() names.RelationTag { } // Tag indicates an expected call of Tag. -func (mr *MockRelationMockRecorder) Tag() *gomock.Call { +func (mr *MockRelationMockRecorder) Tag() *MockRelationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRelation)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRelation)(nil).Tag)) + return &MockRelationTagCall{Call: call} +} + +// MockRelationTagCall wrap *gomock.Call +type MockRelationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationTagCall) Return(arg0 names.RelationTag) *MockRelationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationTagCall) Do(f func() names.RelationTag) *MockRelationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationTagCall) DoAndReturn(f func() names.RelationTag) *MockRelationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -865,9 +2161,33 @@ func (m *MockRelation) Unit(arg0 context.Context, arg1 names.UnitTag) (RelationU } // Unit indicates an expected call of Unit. -func (mr *MockRelationMockRecorder) Unit(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationMockRecorder) Unit(arg0, arg1 any) *MockRelationUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockRelation)(nil).Unit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockRelation)(nil).Unit), arg0, arg1) + return &MockRelationUnitCall{Call: call} +} + +// MockRelationUnitCall wrap *gomock.Call +type MockRelationUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitCall) Return(arg0 RelationUnit, arg1 error) *MockRelationUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitCall) Do(f func(context.Context, names.UnitTag) (RelationUnit, error)) *MockRelationUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (RelationUnit, error)) *MockRelationUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSuspended mocks base method. @@ -877,9 +2197,33 @@ func (m *MockRelation) UpdateSuspended(arg0 bool) { } // UpdateSuspended indicates an expected call of UpdateSuspended. -func (mr *MockRelationMockRecorder) UpdateSuspended(arg0 any) *gomock.Call { +func (mr *MockRelationMockRecorder) UpdateSuspended(arg0 any) *MockRelationUpdateSuspendedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSuspended", reflect.TypeOf((*MockRelation)(nil).UpdateSuspended), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSuspended", reflect.TypeOf((*MockRelation)(nil).UpdateSuspended), arg0) + return &MockRelationUpdateSuspendedCall{Call: call} +} + +// MockRelationUpdateSuspendedCall wrap *gomock.Call +type MockRelationUpdateSuspendedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUpdateSuspendedCall) Return() *MockRelationUpdateSuspendedCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUpdateSuspendedCall) Do(f func(bool)) *MockRelationUpdateSuspendedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUpdateSuspendedCall) DoAndReturn(f func(bool)) *MockRelationUpdateSuspendedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationUnit is a mock of RelationUnit interface. @@ -915,9 +2259,33 @@ func (m *MockRelationUnit) ApplicationSettings() (*uniter.Settings, error) { } // ApplicationSettings indicates an expected call of ApplicationSettings. -func (mr *MockRelationUnitMockRecorder) ApplicationSettings() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) ApplicationSettings() *MockRelationUnitApplicationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelationUnit)(nil).ApplicationSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockRelationUnit)(nil).ApplicationSettings)) + return &MockRelationUnitApplicationSettingsCall{Call: call} +} + +// MockRelationUnitApplicationSettingsCall wrap *gomock.Call +type MockRelationUnitApplicationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitApplicationSettingsCall) Return(arg0 *uniter.Settings, arg1 error) *MockRelationUnitApplicationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitApplicationSettingsCall) Do(f func() (*uniter.Settings, error)) *MockRelationUnitApplicationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitApplicationSettingsCall) DoAndReturn(f func() (*uniter.Settings, error)) *MockRelationUnitApplicationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoint mocks base method. @@ -929,9 +2297,33 @@ func (m *MockRelationUnit) Endpoint() uniter.Endpoint { } // Endpoint indicates an expected call of Endpoint. -func (mr *MockRelationUnitMockRecorder) Endpoint() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) Endpoint() *MockRelationUnitEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelationUnit)(nil).Endpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockRelationUnit)(nil).Endpoint)) + return &MockRelationUnitEndpointCall{Call: call} +} + +// MockRelationUnitEndpointCall wrap *gomock.Call +type MockRelationUnitEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitEndpointCall) Return(arg0 uniter.Endpoint) *MockRelationUnitEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitEndpointCall) Do(f func() uniter.Endpoint) *MockRelationUnitEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitEndpointCall) DoAndReturn(f func() uniter.Endpoint) *MockRelationUnitEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EnterScope mocks base method. @@ -943,9 +2335,33 @@ func (m *MockRelationUnit) EnterScope() error { } // EnterScope indicates an expected call of EnterScope. -func (mr *MockRelationUnitMockRecorder) EnterScope() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) EnterScope() *MockRelationUnitEnterScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnterScope", reflect.TypeOf((*MockRelationUnit)(nil).EnterScope)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnterScope", reflect.TypeOf((*MockRelationUnit)(nil).EnterScope)) + return &MockRelationUnitEnterScopeCall{Call: call} +} + +// MockRelationUnitEnterScopeCall wrap *gomock.Call +type MockRelationUnitEnterScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitEnterScopeCall) Return(arg0 error) *MockRelationUnitEnterScopeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitEnterScopeCall) Do(f func() error) *MockRelationUnitEnterScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitEnterScopeCall) DoAndReturn(f func() error) *MockRelationUnitEnterScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeaveScope mocks base method. @@ -957,9 +2373,33 @@ func (m *MockRelationUnit) LeaveScope() error { } // LeaveScope indicates an expected call of LeaveScope. -func (mr *MockRelationUnitMockRecorder) LeaveScope() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) LeaveScope() *MockRelationUnitLeaveScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaveScope", reflect.TypeOf((*MockRelationUnit)(nil).LeaveScope)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaveScope", reflect.TypeOf((*MockRelationUnit)(nil).LeaveScope)) + return &MockRelationUnitLeaveScopeCall{Call: call} +} + +// MockRelationUnitLeaveScopeCall wrap *gomock.Call +type MockRelationUnitLeaveScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitLeaveScopeCall) Return(arg0 error) *MockRelationUnitLeaveScopeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitLeaveScopeCall) Do(f func() error) *MockRelationUnitLeaveScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitLeaveScopeCall) DoAndReturn(f func() error) *MockRelationUnitLeaveScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadSettings mocks base method. @@ -972,9 +2412,33 @@ func (m *MockRelationUnit) ReadSettings(arg0 string) (params.Settings, error) { } // ReadSettings indicates an expected call of ReadSettings. -func (mr *MockRelationUnitMockRecorder) ReadSettings(arg0 any) *gomock.Call { +func (mr *MockRelationUnitMockRecorder) ReadSettings(arg0 any) *MockRelationUnitReadSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSettings", reflect.TypeOf((*MockRelationUnit)(nil).ReadSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSettings", reflect.TypeOf((*MockRelationUnit)(nil).ReadSettings), arg0) + return &MockRelationUnitReadSettingsCall{Call: call} +} + +// MockRelationUnitReadSettingsCall wrap *gomock.Call +type MockRelationUnitReadSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitReadSettingsCall) Return(arg0 params.Settings, arg1 error) *MockRelationUnitReadSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitReadSettingsCall) Do(f func(string) (params.Settings, error)) *MockRelationUnitReadSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitReadSettingsCall) DoAndReturn(f func(string) (params.Settings, error)) *MockRelationUnitReadSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -986,9 +2450,33 @@ func (m *MockRelationUnit) Relation() Relation { } // Relation indicates an expected call of Relation. -func (mr *MockRelationUnitMockRecorder) Relation() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) Relation() *MockRelationUnitRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockRelationUnit)(nil).Relation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockRelationUnit)(nil).Relation)) + return &MockRelationUnitRelationCall{Call: call} +} + +// MockRelationUnitRelationCall wrap *gomock.Call +type MockRelationUnitRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitRelationCall) Return(arg0 Relation) *MockRelationUnitRelationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitRelationCall) Do(f func() Relation) *MockRelationUnitRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitRelationCall) DoAndReturn(f func() Relation) *MockRelationUnitRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Settings mocks base method. @@ -1001,9 +2489,33 @@ func (m *MockRelationUnit) Settings() (*uniter.Settings, error) { } // Settings indicates an expected call of Settings. -func (mr *MockRelationUnitMockRecorder) Settings() *gomock.Call { +func (mr *MockRelationUnitMockRecorder) Settings() *MockRelationUnitSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockRelationUnit)(nil).Settings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockRelationUnit)(nil).Settings)) + return &MockRelationUnitSettingsCall{Call: call} +} + +// MockRelationUnitSettingsCall wrap *gomock.Call +type MockRelationUnitSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationUnitSettingsCall) Return(arg0 *uniter.Settings, arg1 error) *MockRelationUnitSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationUnitSettingsCall) Do(f func() (*uniter.Settings, error)) *MockRelationUnitSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationUnitSettingsCall) DoAndReturn(f func() (*uniter.Settings, error)) *MockRelationUnitSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplication is a mock of Application interface. @@ -1039,9 +2551,33 @@ func (m *MockApplication) CharmModifiedVersion() (int, error) { } // CharmModifiedVersion indicates an expected call of CharmModifiedVersion. -func (mr *MockApplicationMockRecorder) CharmModifiedVersion() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmModifiedVersion() *MockApplicationCharmModifiedVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmModifiedVersion", reflect.TypeOf((*MockApplication)(nil).CharmModifiedVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmModifiedVersion", reflect.TypeOf((*MockApplication)(nil).CharmModifiedVersion)) + return &MockApplicationCharmModifiedVersionCall{Call: call} +} + +// MockApplicationCharmModifiedVersionCall wrap *gomock.Call +type MockApplicationCharmModifiedVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmModifiedVersionCall) Return(arg0 int, arg1 error) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmModifiedVersionCall) Do(f func() (int, error)) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmModifiedVersionCall) DoAndReturn(f func() (int, error)) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -1055,9 +2591,33 @@ func (m *MockApplication) CharmURL() (string, bool, error) { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 string, arg1 bool, arg2 error) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() (string, bool, error)) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() (string, bool, error)) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -1069,9 +2629,33 @@ func (m *MockApplication) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockApplicationMockRecorder) Life() *gomock.Call { +func (mr *MockApplicationMockRecorder) Life() *MockApplicationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockApplication)(nil).Life)) + return &MockApplicationLifeCall{Call: call} +} + +// MockApplicationLifeCall wrap *gomock.Call +type MockApplicationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationLifeCall) Return(arg0 life.Value) *MockApplicationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationLifeCall) Do(f func() life.Value) *MockApplicationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationLifeCall) DoAndReturn(f func() life.Value) *MockApplicationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Refresh mocks base method. @@ -1083,9 +2667,33 @@ func (m *MockApplication) Refresh(arg0 context.Context) error { } // Refresh indicates an expected call of Refresh. -func (mr *MockApplicationMockRecorder) Refresh(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Refresh(arg0 any) *MockApplicationRefreshCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockApplication)(nil).Refresh), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockApplication)(nil).Refresh), arg0) + return &MockApplicationRefreshCall{Call: call} +} + +// MockApplicationRefreshCall wrap *gomock.Call +type MockApplicationRefreshCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationRefreshCall) Return(arg0 error) *MockApplicationRefreshCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationRefreshCall) Do(f func(context.Context) error) *MockApplicationRefreshCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationRefreshCall) DoAndReturn(f func(context.Context) error) *MockApplicationRefreshCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -1097,9 +2705,33 @@ func (m *MockApplication) SetStatus(arg0 string, arg1 status.Status, arg2 string } // SetStatus indicates an expected call of SetStatus. -func (mr *MockApplicationMockRecorder) SetStatus(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetStatus(arg0, arg1, arg2, arg3 any) *MockApplicationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0, arg1, arg2, arg3) + return &MockApplicationSetStatusCall{Call: call} +} + +// MockApplicationSetStatusCall wrap *gomock.Call +type MockApplicationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetStatusCall) Return(arg0 error) *MockApplicationSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetStatusCall) Do(f func(string, status.Status, string, map[string]any) error) *MockApplicationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetStatusCall) DoAndReturn(f func(string, status.Status, string, map[string]any) error) *MockApplicationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -1112,9 +2744,33 @@ func (m *MockApplication) Status(arg0 string) (params.ApplicationStatusResult, e } // Status indicates an expected call of Status. -func (mr *MockApplicationMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) Status(arg0 any) *MockApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockApplication)(nil).Status), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockApplication)(nil).Status), arg0) + return &MockApplicationStatusCall{Call: call} +} + +// MockApplicationStatusCall wrap *gomock.Call +type MockApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationStatusCall) Return(arg0 params.ApplicationStatusResult, arg1 error) *MockApplicationStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationStatusCall) Do(f func(string) (params.ApplicationStatusResult, error)) *MockApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationStatusCall) DoAndReturn(f func(string) (params.ApplicationStatusResult, error)) *MockApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1126,9 +2782,33 @@ func (m *MockApplication) Tag() names.ApplicationTag { } // Tag indicates an expected call of Tag. -func (mr *MockApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockApplicationMockRecorder) Tag() *MockApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + return &MockApplicationTagCall{Call: call} +} + +// MockApplicationTagCall wrap *gomock.Call +type MockApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -1141,9 +2821,33 @@ func (m *MockApplication) Watch() (watcher.Watcher[struct{}], error) { } // Watch indicates an expected call of Watch. -func (mr *MockApplicationMockRecorder) Watch() *gomock.Call { +func (mr *MockApplicationMockRecorder) Watch() *MockApplicationWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockApplication)(nil).Watch)) + return &MockApplicationWatchCall{Call: call} +} + +// MockApplicationWatchCall wrap *gomock.Call +type MockApplicationWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationWatchCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockApplicationWatchCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationWatchCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationWatchCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchLeadershipSettings mocks base method. @@ -1156,9 +2860,33 @@ func (m *MockApplication) WatchLeadershipSettings() (watcher.Watcher[struct{}], } // WatchLeadershipSettings indicates an expected call of WatchLeadershipSettings. -func (mr *MockApplicationMockRecorder) WatchLeadershipSettings() *gomock.Call { +func (mr *MockApplicationMockRecorder) WatchLeadershipSettings() *MockApplicationWatchLeadershipSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLeadershipSettings", reflect.TypeOf((*MockApplication)(nil).WatchLeadershipSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchLeadershipSettings", reflect.TypeOf((*MockApplication)(nil).WatchLeadershipSettings)) + return &MockApplicationWatchLeadershipSettingsCall{Call: call} +} + +// MockApplicationWatchLeadershipSettingsCall wrap *gomock.Call +type MockApplicationWatchLeadershipSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationWatchLeadershipSettingsCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockApplicationWatchLeadershipSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationWatchLeadershipSettingsCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchLeadershipSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationWatchLeadershipSettingsCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockApplicationWatchLeadershipSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCharm is a mock of Charm interface. @@ -1194,9 +2922,33 @@ func (m *MockCharm) ArchiveSha256() (string, error) { } // ArchiveSha256 indicates an expected call of ArchiveSha256. -func (mr *MockCharmMockRecorder) ArchiveSha256() *gomock.Call { +func (mr *MockCharmMockRecorder) ArchiveSha256() *MockCharmArchiveSha256Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveSha256", reflect.TypeOf((*MockCharm)(nil).ArchiveSha256)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveSha256", reflect.TypeOf((*MockCharm)(nil).ArchiveSha256)) + return &MockCharmArchiveSha256Call{Call: call} +} + +// MockCharmArchiveSha256Call wrap *gomock.Call +type MockCharmArchiveSha256Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmArchiveSha256Call) Return(arg0 string, arg1 error) *MockCharmArchiveSha256Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmArchiveSha256Call) Do(f func() (string, error)) *MockCharmArchiveSha256Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmArchiveSha256Call) DoAndReturn(f func() (string, error)) *MockCharmArchiveSha256Call { + c.Call = c.Call.DoAndReturn(f) + return c } // LXDProfileRequired mocks base method. @@ -1209,9 +2961,33 @@ func (m *MockCharm) LXDProfileRequired() (bool, error) { } // LXDProfileRequired indicates an expected call of LXDProfileRequired. -func (mr *MockCharmMockRecorder) LXDProfileRequired() *gomock.Call { +func (mr *MockCharmMockRecorder) LXDProfileRequired() *MockCharmLXDProfileRequiredCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileRequired", reflect.TypeOf((*MockCharm)(nil).LXDProfileRequired)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileRequired", reflect.TypeOf((*MockCharm)(nil).LXDProfileRequired)) + return &MockCharmLXDProfileRequiredCall{Call: call} +} + +// MockCharmLXDProfileRequiredCall wrap *gomock.Call +type MockCharmLXDProfileRequiredCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmLXDProfileRequiredCall) Return(arg0 bool, arg1 error) *MockCharmLXDProfileRequiredCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmLXDProfileRequiredCall) Do(f func() (bool, error)) *MockCharmLXDProfileRequiredCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmLXDProfileRequiredCall) DoAndReturn(f func() (bool, error)) *MockCharmLXDProfileRequiredCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -1223,7 +2999,31 @@ func (m *MockCharm) URL() string { } // URL indicates an expected call of URL. -func (mr *MockCharmMockRecorder) URL() *gomock.Call { +func (mr *MockCharmMockRecorder) URL() *MockCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockCharm)(nil).URL)) + return &MockCharmURLCall{Call: call} +} + +// MockCharmURLCall wrap *gomock.Call +type MockCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCharmURLCall) Return(arg0 string) *MockCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCharmURLCall) Do(f func() string) *MockCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCharmURLCall) DoAndReturn(f func() string) *MockCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/api/package_test.go b/internal/worker/uniter/api/package_test.go index 2039a9f9d44..a1aff1cd9d8 100644 --- a/internal/worker/uniter/api/package_test.go +++ b/internal/worker/uniter/api/package_test.go @@ -9,9 +9,9 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package api -destination uniter_mocks.go -source=./interface_generics.go -//go:generate go run go.uber.org/mock/mockgen -package api -destination domain_mocks.go github.com/juju/juju/internal/worker/uniter/api Unit,Relation,RelationUnit,Application,Charm -//go:generate go run go.uber.org/mock/mockgen -package api -destination secrets_mocks.go github.com/juju/juju/internal/worker/uniter/api SecretsClient,SecretsBackend +//go:generate go run go.uber.org/mock/mockgen -typed -package api -destination uniter_mocks.go -source=./interface_generics.go +//go:generate go run go.uber.org/mock/mockgen -typed -package api -destination domain_mocks.go github.com/juju/juju/internal/worker/uniter/api Unit,Relation,RelationUnit,Application,Charm +//go:generate go run go.uber.org/mock/mockgen -typed -package api -destination secrets_mocks.go github.com/juju/juju/internal/worker/uniter/api SecretsClient,SecretsBackend func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/api/secrets_mocks.go b/internal/worker/uniter/api/secrets_mocks.go index 6818feb14c2..13c12512af7 100644 --- a/internal/worker/uniter/api/secrets_mocks.go +++ b/internal/worker/uniter/api/secrets_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package api -destination secrets_mocks.go github.com/juju/juju/internal/worker/uniter/api SecretsClient,SecretsBackend +// mockgen -typed -package api -destination secrets_mocks.go github.com/juju/juju/internal/worker/uniter/api SecretsClient,SecretsBackend // // Package api is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockSecretsClient) CreateSecretURIs(arg0 int) ([]*secrets.URI, error) { } // CreateSecretURIs indicates an expected call of CreateSecretURIs. -func (mr *MockSecretsClientMockRecorder) CreateSecretURIs(arg0 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) CreateSecretURIs(arg0 any) *MockSecretsClientCreateSecretURIsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretsClient)(nil).CreateSecretURIs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretsClient)(nil).CreateSecretURIs), arg0) + return &MockSecretsClientCreateSecretURIsCall{Call: call} +} + +// MockSecretsClientCreateSecretURIsCall wrap *gomock.Call +type MockSecretsClientCreateSecretURIsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientCreateSecretURIsCall) Return(arg0 []*secrets.URI, arg1 error) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientCreateSecretURIsCall) Do(f func(int) ([]*secrets.URI, error)) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientCreateSecretURIsCall) DoAndReturn(f func(int) ([]*secrets.URI, error)) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumerSecretsRevisionInfo mocks base method. @@ -66,9 +90,33 @@ func (m *MockSecretsClient) GetConsumerSecretsRevisionInfo(arg0 string, arg1 []s } // GetConsumerSecretsRevisionInfo indicates an expected call of GetConsumerSecretsRevisionInfo. -func (mr *MockSecretsClientMockRecorder) GetConsumerSecretsRevisionInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) GetConsumerSecretsRevisionInfo(arg0, arg1 any) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumerSecretsRevisionInfo", reflect.TypeOf((*MockSecretsClient)(nil).GetConsumerSecretsRevisionInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumerSecretsRevisionInfo", reflect.TypeOf((*MockSecretsClient)(nil).GetConsumerSecretsRevisionInfo), arg0, arg1) + return &MockSecretsClientGetConsumerSecretsRevisionInfoCall{Call: call} +} + +// MockSecretsClientGetConsumerSecretsRevisionInfoCall wrap *gomock.Call +type MockSecretsClientGetConsumerSecretsRevisionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) Return(arg0 map[string]secrets.SecretRevisionInfo, arg1 error) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) Do(f func(string, []string) (map[string]secrets.SecretRevisionInfo, error)) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) DoAndReturn(f func(string, []string) (map[string]secrets.SecretRevisionInfo, error)) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretMetadata mocks base method. @@ -81,9 +129,33 @@ func (m *MockSecretsClient) SecretMetadata() ([]secrets.SecretOwnerMetadata, err } // SecretMetadata indicates an expected call of SecretMetadata. -func (mr *MockSecretsClientMockRecorder) SecretMetadata() *gomock.Call { +func (mr *MockSecretsClientMockRecorder) SecretMetadata() *MockSecretsClientSecretMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockSecretsClient)(nil).SecretMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockSecretsClient)(nil).SecretMetadata)) + return &MockSecretsClientSecretMetadataCall{Call: call} +} + +// MockSecretsClientSecretMetadataCall wrap *gomock.Call +type MockSecretsClientSecretMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientSecretMetadataCall) Return(arg0 []secrets.SecretOwnerMetadata, arg1 error) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientSecretMetadataCall) Do(f func() ([]secrets.SecretOwnerMetadata, error)) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientSecretMetadataCall) DoAndReturn(f func() ([]secrets.SecretOwnerMetadata, error)) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretRotated mocks base method. @@ -95,9 +167,33 @@ func (m *MockSecretsClient) SecretRotated(arg0 string, arg1 int) error { } // SecretRotated indicates an expected call of SecretRotated. -func (mr *MockSecretsClientMockRecorder) SecretRotated(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) SecretRotated(arg0, arg1 any) *MockSecretsClientSecretRotatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretsClient)(nil).SecretRotated), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretsClient)(nil).SecretRotated), arg0, arg1) + return &MockSecretsClientSecretRotatedCall{Call: call} +} + +// MockSecretsClientSecretRotatedCall wrap *gomock.Call +type MockSecretsClientSecretRotatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientSecretRotatedCall) Return(arg0 error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientSecretRotatedCall) Do(f func(string, int) error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientSecretRotatedCall) DoAndReturn(f func(string, int) error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchConsumedSecretsChanges mocks base method. @@ -110,9 +206,33 @@ func (m *MockSecretsClient) WatchConsumedSecretsChanges(arg0 string) (watcher.Wa } // WatchConsumedSecretsChanges indicates an expected call of WatchConsumedSecretsChanges. -func (mr *MockSecretsClientMockRecorder) WatchConsumedSecretsChanges(arg0 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) WatchConsumedSecretsChanges(arg0 any) *MockSecretsClientWatchConsumedSecretsChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsClient)(nil).WatchConsumedSecretsChanges), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsClient)(nil).WatchConsumedSecretsChanges), arg0) + return &MockSecretsClientWatchConsumedSecretsChangesCall{Call: call} +} + +// MockSecretsClientWatchConsumedSecretsChangesCall wrap *gomock.Call +type MockSecretsClientWatchConsumedSecretsChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) Do(f func(string) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) DoAndReturn(f func(string) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchObsolete mocks base method. @@ -129,9 +249,33 @@ func (m *MockSecretsClient) WatchObsolete(arg0 ...names.Tag) (watcher.Watcher[[] } // WatchObsolete indicates an expected call of WatchObsolete. -func (mr *MockSecretsClientMockRecorder) WatchObsolete(arg0 ...any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) WatchObsolete(arg0 ...any) *MockSecretsClientWatchObsoleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretsClient)(nil).WatchObsolete), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretsClient)(nil).WatchObsolete), arg0...) + return &MockSecretsClientWatchObsoleteCall{Call: call} +} + +// MockSecretsClientWatchObsoleteCall wrap *gomock.Call +type MockSecretsClientWatchObsoleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientWatchObsoleteCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientWatchObsoleteCall) Do(f func(...names.Tag) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientWatchObsoleteCall) DoAndReturn(f func(...names.Tag) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockSecretsBackend is a mock of SecretsBackend interface. @@ -166,9 +310,33 @@ func (m *MockSecretsBackend) DeleteContent(arg0 *secrets.URI, arg1 int) error { } // DeleteContent indicates an expected call of DeleteContent. -func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteContent(arg0, arg1 any) *MockSecretsBackendDeleteContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteContent), arg0, arg1) + return &MockSecretsBackendDeleteContentCall{Call: call} +} + +// MockSecretsBackendDeleteContentCall wrap *gomock.Call +type MockSecretsBackendDeleteContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteContentCall) Return(arg0 error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteContentCall) Do(f func(*secrets.URI, int) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteContentCall) DoAndReturn(f func(*secrets.URI, int) error) *MockSecretsBackendDeleteContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteExternalContent mocks base method. @@ -180,9 +348,33 @@ func (m *MockSecretsBackend) DeleteExternalContent(arg0 secrets.ValueRef) error } // DeleteExternalContent indicates an expected call of DeleteExternalContent. -func (mr *MockSecretsBackendMockRecorder) DeleteExternalContent(arg0 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) DeleteExternalContent(arg0 any) *MockSecretsBackendDeleteExternalContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExternalContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteExternalContent), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExternalContent", reflect.TypeOf((*MockSecretsBackend)(nil).DeleteExternalContent), arg0) + return &MockSecretsBackendDeleteExternalContentCall{Call: call} +} + +// MockSecretsBackendDeleteExternalContentCall wrap *gomock.Call +type MockSecretsBackendDeleteExternalContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendDeleteExternalContentCall) Return(arg0 error) *MockSecretsBackendDeleteExternalContentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendDeleteExternalContentCall) Do(f func(secrets.ValueRef) error) *MockSecretsBackendDeleteExternalContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendDeleteExternalContentCall) DoAndReturn(f func(secrets.ValueRef) error) *MockSecretsBackendDeleteExternalContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetContent mocks base method. @@ -195,9 +387,33 @@ func (m *MockSecretsBackend) GetContent(arg0 *secrets.URI, arg1 string, arg2, ar } // GetContent indicates an expected call of GetContent. -func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) GetContent(arg0, arg1, arg2, arg3 any) *MockSecretsBackendGetContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockSecretsBackend)(nil).GetContent), arg0, arg1, arg2, arg3) + return &MockSecretsBackendGetContentCall{Call: call} +} + +// MockSecretsBackendGetContentCall wrap *gomock.Call +type MockSecretsBackendGetContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendGetContentCall) Return(arg0 secrets.SecretValue, arg1 error) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendGetContentCall) Do(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendGetContentCall) DoAndReturn(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockSecretsBackendGetContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SaveContent mocks base method. @@ -210,7 +426,31 @@ func (m *MockSecretsBackend) SaveContent(arg0 *secrets.URI, arg1 int, arg2 secre } // SaveContent indicates an expected call of SaveContent. -func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretsBackendMockRecorder) SaveContent(arg0, arg1, arg2 any) *MockSecretsBackendSaveContentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveContent", reflect.TypeOf((*MockSecretsBackend)(nil).SaveContent), arg0, arg1, arg2) + return &MockSecretsBackendSaveContentCall{Call: call} +} + +// MockSecretsBackendSaveContentCall wrap *gomock.Call +type MockSecretsBackendSaveContentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsBackendSaveContentCall) Return(arg0 secrets.ValueRef, arg1 error) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsBackendSaveContentCall) Do(f func(*secrets.URI, int, secrets.SecretValue) (secrets.ValueRef, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsBackendSaveContentCall) DoAndReturn(f func(*secrets.URI, int, secrets.SecretValue) (secrets.ValueRef, error)) *MockSecretsBackendSaveContentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/api/uniter_mocks.go b/internal/worker/uniter/api/uniter_mocks.go index 1026bd2aec5..0393df675c3 100644 --- a/internal/worker/uniter/api/uniter_mocks.go +++ b/internal/worker/uniter/api/uniter_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package api -destination uniter_mocks.go -source=./interface_generics.go +// mockgen -typed -package api -destination uniter_mocks.go -source=./interface_generics.go // // Package api is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockUniterClient) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockUniterClientMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockUniterClientMockRecorder) APIAddresses() *MockUniterClientAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockUniterClient)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockUniterClient)(nil).APIAddresses)) + return &MockUniterClientAPIAddressesCall{Call: call} +} + +// MockUniterClientAPIAddressesCall wrap *gomock.Call +type MockUniterClientAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientAPIAddressesCall) Return(arg0 []string, arg1 error) *MockUniterClientAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientAPIAddressesCall) Do(f func() ([]string, error)) *MockUniterClientAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockUniterClientAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Action mocks base method. @@ -73,9 +97,33 @@ func (m *MockUniterClient) Action(ctx context.Context, tag names.ActionTag) (*un } // Action indicates an expected call of Action. -func (mr *MockUniterClientMockRecorder) Action(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Action(ctx, tag any) *MockUniterClientActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Action", reflect.TypeOf((*MockUniterClient)(nil).Action), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Action", reflect.TypeOf((*MockUniterClient)(nil).Action), ctx, tag) + return &MockUniterClientActionCall{Call: call} +} + +// MockUniterClientActionCall wrap *gomock.Call +type MockUniterClientActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientActionCall) Return(arg0 *uniter.Action, arg1 error) *MockUniterClientActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientActionCall) Do(f func(context.Context, names.ActionTag) (*uniter.Action, error)) *MockUniterClientActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientActionCall) DoAndReturn(f func(context.Context, names.ActionTag) (*uniter.Action, error)) *MockUniterClientActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionBegin mocks base method. @@ -87,9 +135,33 @@ func (m *MockUniterClient) ActionBegin(ctx context.Context, tag names.ActionTag) } // ActionBegin indicates an expected call of ActionBegin. -func (mr *MockUniterClientMockRecorder) ActionBegin(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) ActionBegin(ctx, tag any) *MockUniterClientActionBeginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionBegin", reflect.TypeOf((*MockUniterClient)(nil).ActionBegin), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionBegin", reflect.TypeOf((*MockUniterClient)(nil).ActionBegin), ctx, tag) + return &MockUniterClientActionBeginCall{Call: call} +} + +// MockUniterClientActionBeginCall wrap *gomock.Call +type MockUniterClientActionBeginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientActionBeginCall) Return(arg0 error) *MockUniterClientActionBeginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientActionBeginCall) Do(f func(context.Context, names.ActionTag) error) *MockUniterClientActionBeginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientActionBeginCall) DoAndReturn(f func(context.Context, names.ActionTag) error) *MockUniterClientActionBeginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionFinish mocks base method. @@ -101,9 +173,33 @@ func (m *MockUniterClient) ActionFinish(ctx context.Context, tag names.ActionTag } // ActionFinish indicates an expected call of ActionFinish. -func (mr *MockUniterClientMockRecorder) ActionFinish(ctx, tag, status, results, message any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) ActionFinish(ctx, tag, status, results, message any) *MockUniterClientActionFinishCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionFinish", reflect.TypeOf((*MockUniterClient)(nil).ActionFinish), ctx, tag, status, results, message) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionFinish", reflect.TypeOf((*MockUniterClient)(nil).ActionFinish), ctx, tag, status, results, message) + return &MockUniterClientActionFinishCall{Call: call} +} + +// MockUniterClientActionFinishCall wrap *gomock.Call +type MockUniterClientActionFinishCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientActionFinishCall) Return(arg0 error) *MockUniterClientActionFinishCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientActionFinishCall) Do(f func(context.Context, names.ActionTag, string, map[string]any, string) error) *MockUniterClientActionFinishCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientActionFinishCall) DoAndReturn(f func(context.Context, names.ActionTag, string, map[string]any, string) error) *MockUniterClientActionFinishCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionStatus mocks base method. @@ -116,9 +212,33 @@ func (m *MockUniterClient) ActionStatus(ctx context.Context, tag names.ActionTag } // ActionStatus indicates an expected call of ActionStatus. -func (mr *MockUniterClientMockRecorder) ActionStatus(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) ActionStatus(ctx, tag any) *MockUniterClientActionStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionStatus", reflect.TypeOf((*MockUniterClient)(nil).ActionStatus), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionStatus", reflect.TypeOf((*MockUniterClient)(nil).ActionStatus), ctx, tag) + return &MockUniterClientActionStatusCall{Call: call} +} + +// MockUniterClientActionStatusCall wrap *gomock.Call +type MockUniterClientActionStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientActionStatusCall) Return(arg0 string, arg1 error) *MockUniterClientActionStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientActionStatusCall) Do(f func(context.Context, names.ActionTag) (string, error)) *MockUniterClientActionStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientActionStatusCall) DoAndReturn(f func(context.Context, names.ActionTag) (string, error)) *MockUniterClientActionStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Application mocks base method. @@ -131,9 +251,33 @@ func (m *MockUniterClient) Application(ctx context.Context, tag names.Applicatio } // Application indicates an expected call of Application. -func (mr *MockUniterClientMockRecorder) Application(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Application(ctx, tag any) *MockUniterClientApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUniterClient)(nil).Application), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Application", reflect.TypeOf((*MockUniterClient)(nil).Application), ctx, tag) + return &MockUniterClientApplicationCall{Call: call} +} + +// MockUniterClientApplicationCall wrap *gomock.Call +type MockUniterClientApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientApplicationCall) Return(arg0 Application, arg1 error) *MockUniterClientApplicationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientApplicationCall) Do(f func(context.Context, names.ApplicationTag) (Application, error)) *MockUniterClientApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientApplicationCall) DoAndReturn(f func(context.Context, names.ApplicationTag) (Application, error)) *MockUniterClientApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Charm mocks base method. @@ -146,9 +290,33 @@ func (m *MockUniterClient) Charm(curl string) (Charm, error) { } // Charm indicates an expected call of Charm. -func (mr *MockUniterClientMockRecorder) Charm(curl any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Charm(curl any) *MockUniterClientCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockUniterClient)(nil).Charm), curl) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockUniterClient)(nil).Charm), curl) + return &MockUniterClientCharmCall{Call: call} +} + +// MockUniterClientCharmCall wrap *gomock.Call +type MockUniterClientCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientCharmCall) Return(arg0 Charm, arg1 error) *MockUniterClientCharmCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientCharmCall) Do(f func(string) (Charm, error)) *MockUniterClientCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientCharmCall) DoAndReturn(f func(string) (Charm, error)) *MockUniterClientCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudAPIVersion mocks base method. @@ -161,9 +329,33 @@ func (m *MockUniterClient) CloudAPIVersion(arg0 context.Context) (string, error) } // CloudAPIVersion indicates an expected call of CloudAPIVersion. -func (mr *MockUniterClientMockRecorder) CloudAPIVersion(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) CloudAPIVersion(arg0 any) *MockUniterClientCloudAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAPIVersion", reflect.TypeOf((*MockUniterClient)(nil).CloudAPIVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAPIVersion", reflect.TypeOf((*MockUniterClient)(nil).CloudAPIVersion), arg0) + return &MockUniterClientCloudAPIVersionCall{Call: call} +} + +// MockUniterClientCloudAPIVersionCall wrap *gomock.Call +type MockUniterClientCloudAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientCloudAPIVersionCall) Return(arg0 string, arg1 error) *MockUniterClientCloudAPIVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientCloudAPIVersionCall) Do(f func(context.Context) (string, error)) *MockUniterClientCloudAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientCloudAPIVersionCall) DoAndReturn(f func(context.Context) (string, error)) *MockUniterClientCloudAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -176,9 +368,33 @@ func (m *MockUniterClient) CloudSpec(arg0 context.Context) (*params.CloudSpec, e } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockUniterClientMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) CloudSpec(arg0 any) *MockUniterClientCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockUniterClient)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockUniterClient)(nil).CloudSpec), arg0) + return &MockUniterClientCloudSpecCall{Call: call} +} + +// MockUniterClientCloudSpecCall wrap *gomock.Call +type MockUniterClientCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientCloudSpecCall) Return(arg0 *params.CloudSpec, arg1 error) *MockUniterClientCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientCloudSpecCall) Do(f func(context.Context) (*params.CloudSpec, error)) *MockUniterClientCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientCloudSpecCall) DoAndReturn(f func(context.Context) (*params.CloudSpec, error)) *MockUniterClientCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DestroyUnitStorageAttachments mocks base method. @@ -190,9 +406,33 @@ func (m *MockUniterClient) DestroyUnitStorageAttachments(arg0 names.UnitTag) err } // DestroyUnitStorageAttachments indicates an expected call of DestroyUnitStorageAttachments. -func (mr *MockUniterClientMockRecorder) DestroyUnitStorageAttachments(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) DestroyUnitStorageAttachments(arg0 any) *MockUniterClientDestroyUnitStorageAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnitStorageAttachments", reflect.TypeOf((*MockUniterClient)(nil).DestroyUnitStorageAttachments), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnitStorageAttachments", reflect.TypeOf((*MockUniterClient)(nil).DestroyUnitStorageAttachments), arg0) + return &MockUniterClientDestroyUnitStorageAttachmentsCall{Call: call} +} + +// MockUniterClientDestroyUnitStorageAttachmentsCall wrap *gomock.Call +type MockUniterClientDestroyUnitStorageAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientDestroyUnitStorageAttachmentsCall) Return(arg0 error) *MockUniterClientDestroyUnitStorageAttachmentsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientDestroyUnitStorageAttachmentsCall) Do(f func(names.UnitTag) error) *MockUniterClientDestroyUnitStorageAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientDestroyUnitStorageAttachmentsCall) DoAndReturn(f func(names.UnitTag) error) *MockUniterClientDestroyUnitStorageAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GoalState mocks base method. @@ -205,9 +445,33 @@ func (m *MockUniterClient) GoalState(arg0 context.Context) (application.GoalStat } // GoalState indicates an expected call of GoalState. -func (mr *MockUniterClientMockRecorder) GoalState(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) GoalState(arg0 any) *MockUniterClientGoalStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockUniterClient)(nil).GoalState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockUniterClient)(nil).GoalState), arg0) + return &MockUniterClientGoalStateCall{Call: call} +} + +// MockUniterClientGoalStateCall wrap *gomock.Call +type MockUniterClientGoalStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientGoalStateCall) Return(arg0 application.GoalState, arg1 error) *MockUniterClientGoalStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientGoalStateCall) Do(f func(context.Context) (application.GoalState, error)) *MockUniterClientGoalStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientGoalStateCall) DoAndReturn(f func(context.Context) (application.GoalState, error)) *MockUniterClientGoalStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeadershipSettings mocks base method. @@ -219,9 +483,33 @@ func (m *MockUniterClient) LeadershipSettings() uniter.LeadershipSettingsAccesso } // LeadershipSettings indicates an expected call of LeadershipSettings. -func (mr *MockUniterClientMockRecorder) LeadershipSettings() *gomock.Call { +func (mr *MockUniterClientMockRecorder) LeadershipSettings() *MockUniterClientLeadershipSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipSettings", reflect.TypeOf((*MockUniterClient)(nil).LeadershipSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipSettings", reflect.TypeOf((*MockUniterClient)(nil).LeadershipSettings)) + return &MockUniterClientLeadershipSettingsCall{Call: call} +} + +// MockUniterClientLeadershipSettingsCall wrap *gomock.Call +type MockUniterClientLeadershipSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientLeadershipSettingsCall) Return(arg0 uniter.LeadershipSettingsAccessor) *MockUniterClientLeadershipSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientLeadershipSettingsCall) Do(f func() uniter.LeadershipSettingsAccessor) *MockUniterClientLeadershipSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientLeadershipSettingsCall) DoAndReturn(f func() uniter.LeadershipSettingsAccessor) *MockUniterClientLeadershipSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -234,9 +522,33 @@ func (m *MockUniterClient) Model(arg0 context.Context) (*types.Model, error) { } // Model indicates an expected call of Model. -func (mr *MockUniterClientMockRecorder) Model(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Model(arg0 any) *MockUniterClientModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockUniterClient)(nil).Model), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockUniterClient)(nil).Model), arg0) + return &MockUniterClientModelCall{Call: call} +} + +// MockUniterClientModelCall wrap *gomock.Call +type MockUniterClientModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientModelCall) Return(arg0 *types.Model, arg1 error) *MockUniterClientModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientModelCall) Do(f func(context.Context) (*types.Model, error)) *MockUniterClientModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientModelCall) DoAndReturn(f func(context.Context) (*types.Model, error)) *MockUniterClientModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelConfig mocks base method. @@ -249,9 +561,33 @@ func (m *MockUniterClient) ModelConfig(arg0 context.Context) (*config.Config, er } // ModelConfig indicates an expected call of ModelConfig. -func (mr *MockUniterClientMockRecorder) ModelConfig(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) ModelConfig(arg0 any) *MockUniterClientModelConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockUniterClient)(nil).ModelConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockUniterClient)(nil).ModelConfig), arg0) + return &MockUniterClientModelConfigCall{Call: call} +} + +// MockUniterClientModelConfigCall wrap *gomock.Call +type MockUniterClientModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientModelConfigCall) Return(arg0 *config.Config, arg1 error) *MockUniterClientModelConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientModelConfigCall) Do(f func(context.Context) (*config.Config, error)) *MockUniterClientModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientModelConfigCall) DoAndReturn(f func(context.Context) (*config.Config, error)) *MockUniterClientModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedMachinePortRangesByEndpoint mocks base method. @@ -264,9 +600,33 @@ func (m *MockUniterClient) OpenedMachinePortRangesByEndpoint(ctx context.Context } // OpenedMachinePortRangesByEndpoint indicates an expected call of OpenedMachinePortRangesByEndpoint. -func (mr *MockUniterClientMockRecorder) OpenedMachinePortRangesByEndpoint(ctx, machineTag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) OpenedMachinePortRangesByEndpoint(ctx, machineTag any) *MockUniterClientOpenedMachinePortRangesByEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedMachinePortRangesByEndpoint", reflect.TypeOf((*MockUniterClient)(nil).OpenedMachinePortRangesByEndpoint), ctx, machineTag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedMachinePortRangesByEndpoint", reflect.TypeOf((*MockUniterClient)(nil).OpenedMachinePortRangesByEndpoint), ctx, machineTag) + return &MockUniterClientOpenedMachinePortRangesByEndpointCall{Call: call} +} + +// MockUniterClientOpenedMachinePortRangesByEndpointCall wrap *gomock.Call +type MockUniterClientOpenedMachinePortRangesByEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientOpenedMachinePortRangesByEndpointCall) Return(arg0 map[names.UnitTag]network.GroupedPortRanges, arg1 error) *MockUniterClientOpenedMachinePortRangesByEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientOpenedMachinePortRangesByEndpointCall) Do(f func(context.Context, names.MachineTag) (map[names.UnitTag]network.GroupedPortRanges, error)) *MockUniterClientOpenedMachinePortRangesByEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientOpenedMachinePortRangesByEndpointCall) DoAndReturn(f func(context.Context, names.MachineTag) (map[names.UnitTag]network.GroupedPortRanges, error)) *MockUniterClientOpenedMachinePortRangesByEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRangesByEndpoint mocks base method. @@ -279,9 +639,33 @@ func (m *MockUniterClient) OpenedPortRangesByEndpoint(ctx context.Context) (map[ } // OpenedPortRangesByEndpoint indicates an expected call of OpenedPortRangesByEndpoint. -func (mr *MockUniterClientMockRecorder) OpenedPortRangesByEndpoint(ctx any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) OpenedPortRangesByEndpoint(ctx any) *MockUniterClientOpenedPortRangesByEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesByEndpoint", reflect.TypeOf((*MockUniterClient)(nil).OpenedPortRangesByEndpoint), ctx) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRangesByEndpoint", reflect.TypeOf((*MockUniterClient)(nil).OpenedPortRangesByEndpoint), ctx) + return &MockUniterClientOpenedPortRangesByEndpointCall{Call: call} +} + +// MockUniterClientOpenedPortRangesByEndpointCall wrap *gomock.Call +type MockUniterClientOpenedPortRangesByEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientOpenedPortRangesByEndpointCall) Return(arg0 map[names.UnitTag]network.GroupedPortRanges, arg1 error) *MockUniterClientOpenedPortRangesByEndpointCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientOpenedPortRangesByEndpointCall) Do(f func(context.Context) (map[names.UnitTag]network.GroupedPortRanges, error)) *MockUniterClientOpenedPortRangesByEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientOpenedPortRangesByEndpointCall) DoAndReturn(f func(context.Context) (map[names.UnitTag]network.GroupedPortRanges, error)) *MockUniterClientOpenedPortRangesByEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -294,9 +678,33 @@ func (m *MockUniterClient) Relation(ctx context.Context, tag names.RelationTag) } // Relation indicates an expected call of Relation. -func (mr *MockUniterClientMockRecorder) Relation(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Relation(ctx, tag any) *MockUniterClientRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockUniterClient)(nil).Relation), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockUniterClient)(nil).Relation), ctx, tag) + return &MockUniterClientRelationCall{Call: call} +} + +// MockUniterClientRelationCall wrap *gomock.Call +type MockUniterClientRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientRelationCall) Return(arg0 Relation, arg1 error) *MockUniterClientRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientRelationCall) Do(f func(context.Context, names.RelationTag) (Relation, error)) *MockUniterClientRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientRelationCall) DoAndReturn(f func(context.Context, names.RelationTag) (Relation, error)) *MockUniterClientRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationById mocks base method. @@ -309,9 +717,33 @@ func (m *MockUniterClient) RelationById(arg0 context.Context, arg1 int) (Relatio } // RelationById indicates an expected call of RelationById. -func (mr *MockUniterClientMockRecorder) RelationById(arg0, arg1 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) RelationById(arg0, arg1 any) *MockUniterClientRelationByIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationById", reflect.TypeOf((*MockUniterClient)(nil).RelationById), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationById", reflect.TypeOf((*MockUniterClient)(nil).RelationById), arg0, arg1) + return &MockUniterClientRelationByIdCall{Call: call} +} + +// MockUniterClientRelationByIdCall wrap *gomock.Call +type MockUniterClientRelationByIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientRelationByIdCall) Return(arg0 Relation, arg1 error) *MockUniterClientRelationByIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientRelationByIdCall) Do(f func(context.Context, int) (Relation, error)) *MockUniterClientRelationByIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientRelationByIdCall) DoAndReturn(f func(context.Context, int) (Relation, error)) *MockUniterClientRelationByIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveStorageAttachment mocks base method. @@ -323,9 +755,33 @@ func (m *MockUniterClient) RemoveStorageAttachment(arg0 names.StorageTag, arg1 n } // RemoveStorageAttachment indicates an expected call of RemoveStorageAttachment. -func (mr *MockUniterClientMockRecorder) RemoveStorageAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) RemoveStorageAttachment(arg0, arg1 any) *MockUniterClientRemoveStorageAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveStorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).RemoveStorageAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveStorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).RemoveStorageAttachment), arg0, arg1) + return &MockUniterClientRemoveStorageAttachmentCall{Call: call} +} + +// MockUniterClientRemoveStorageAttachmentCall wrap *gomock.Call +type MockUniterClientRemoveStorageAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientRemoveStorageAttachmentCall) Return(arg0 error) *MockUniterClientRemoveStorageAttachmentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientRemoveStorageAttachmentCall) Do(f func(names.StorageTag, names.UnitTag) error) *MockUniterClientRemoveStorageAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientRemoveStorageAttachmentCall) DoAndReturn(f func(names.StorageTag, names.UnitTag) error) *MockUniterClientRemoveStorageAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitWorkloadVersion mocks base method. @@ -337,9 +793,33 @@ func (m *MockUniterClient) SetUnitWorkloadVersion(ctx context.Context, tag names } // SetUnitWorkloadVersion indicates an expected call of SetUnitWorkloadVersion. -func (mr *MockUniterClientMockRecorder) SetUnitWorkloadVersion(ctx, tag, version any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) SetUnitWorkloadVersion(ctx, tag, version any) *MockUniterClientSetUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockUniterClient)(nil).SetUnitWorkloadVersion), ctx, tag, version) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockUniterClient)(nil).SetUnitWorkloadVersion), ctx, tag, version) + return &MockUniterClientSetUnitWorkloadVersionCall{Call: call} +} + +// MockUniterClientSetUnitWorkloadVersionCall wrap *gomock.Call +type MockUniterClientSetUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientSetUnitWorkloadVersionCall) Return(arg0 error) *MockUniterClientSetUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientSetUnitWorkloadVersionCall) Do(f func(context.Context, names.UnitTag, string) error) *MockUniterClientSetUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientSetUnitWorkloadVersionCall) DoAndReturn(f func(context.Context, names.UnitTag, string) error) *MockUniterClientSetUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageAttachment mocks base method. @@ -352,9 +832,33 @@ func (m *MockUniterClient) StorageAttachment(arg0 names.StorageTag, arg1 names.U } // StorageAttachment indicates an expected call of StorageAttachment. -func (mr *MockUniterClientMockRecorder) StorageAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) StorageAttachment(arg0, arg1 any) *MockUniterClientStorageAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).StorageAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).StorageAttachment), arg0, arg1) + return &MockUniterClientStorageAttachmentCall{Call: call} +} + +// MockUniterClientStorageAttachmentCall wrap *gomock.Call +type MockUniterClientStorageAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientStorageAttachmentCall) Return(arg0 params.StorageAttachment, arg1 error) *MockUniterClientStorageAttachmentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientStorageAttachmentCall) Do(f func(names.StorageTag, names.UnitTag) (params.StorageAttachment, error)) *MockUniterClientStorageAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientStorageAttachmentCall) DoAndReturn(f func(names.StorageTag, names.UnitTag) (params.StorageAttachment, error)) *MockUniterClientStorageAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageAttachmentLife mocks base method. @@ -367,9 +871,33 @@ func (m *MockUniterClient) StorageAttachmentLife(arg0 []params.StorageAttachment } // StorageAttachmentLife indicates an expected call of StorageAttachmentLife. -func (mr *MockUniterClientMockRecorder) StorageAttachmentLife(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) StorageAttachmentLife(arg0 any) *MockUniterClientStorageAttachmentLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageAttachmentLife", reflect.TypeOf((*MockUniterClient)(nil).StorageAttachmentLife), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageAttachmentLife", reflect.TypeOf((*MockUniterClient)(nil).StorageAttachmentLife), arg0) + return &MockUniterClientStorageAttachmentLifeCall{Call: call} +} + +// MockUniterClientStorageAttachmentLifeCall wrap *gomock.Call +type MockUniterClientStorageAttachmentLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientStorageAttachmentLifeCall) Return(arg0 []params.LifeResult, arg1 error) *MockUniterClientStorageAttachmentLifeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientStorageAttachmentLifeCall) Do(f func([]params.StorageAttachmentId) ([]params.LifeResult, error)) *MockUniterClientStorageAttachmentLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientStorageAttachmentLifeCall) DoAndReturn(f func([]params.StorageAttachmentId) ([]params.LifeResult, error)) *MockUniterClientStorageAttachmentLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -382,9 +910,33 @@ func (m *MockUniterClient) Unit(ctx context.Context, tag names.UnitTag) (Unit, e } // Unit indicates an expected call of Unit. -func (mr *MockUniterClientMockRecorder) Unit(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) Unit(ctx, tag any) *MockUniterClientUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUniterClient)(nil).Unit), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUniterClient)(nil).Unit), ctx, tag) + return &MockUniterClientUnitCall{Call: call} +} + +// MockUniterClientUnitCall wrap *gomock.Call +type MockUniterClientUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientUnitCall) Return(arg0 Unit, arg1 error) *MockUniterClientUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientUnitCall) Do(f func(context.Context, names.UnitTag) (Unit, error)) *MockUniterClientUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (Unit, error)) *MockUniterClientUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStorageAttachments mocks base method. @@ -397,9 +949,33 @@ func (m *MockUniterClient) UnitStorageAttachments(arg0 names.UnitTag) ([]params. } // UnitStorageAttachments indicates an expected call of UnitStorageAttachments. -func (mr *MockUniterClientMockRecorder) UnitStorageAttachments(arg0 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) UnitStorageAttachments(arg0 any) *MockUniterClientUnitStorageAttachmentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockUniterClient)(nil).UnitStorageAttachments), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStorageAttachments", reflect.TypeOf((*MockUniterClient)(nil).UnitStorageAttachments), arg0) + return &MockUniterClientUnitStorageAttachmentsCall{Call: call} +} + +// MockUniterClientUnitStorageAttachmentsCall wrap *gomock.Call +type MockUniterClientUnitStorageAttachmentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientUnitStorageAttachmentsCall) Return(arg0 []params.StorageAttachmentId, arg1 error) *MockUniterClientUnitStorageAttachmentsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientUnitStorageAttachmentsCall) Do(f func(names.UnitTag) ([]params.StorageAttachmentId, error)) *MockUniterClientUnitStorageAttachmentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientUnitStorageAttachmentsCall) DoAndReturn(f func(names.UnitTag) ([]params.StorageAttachmentId, error)) *MockUniterClientUnitStorageAttachmentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitWorkloadVersion mocks base method. @@ -412,9 +988,33 @@ func (m *MockUniterClient) UnitWorkloadVersion(ctx context.Context, tag names.Un } // UnitWorkloadVersion indicates an expected call of UnitWorkloadVersion. -func (mr *MockUniterClientMockRecorder) UnitWorkloadVersion(ctx, tag any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) UnitWorkloadVersion(ctx, tag any) *MockUniterClientUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockUniterClient)(nil).UnitWorkloadVersion), ctx, tag) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockUniterClient)(nil).UnitWorkloadVersion), ctx, tag) + return &MockUniterClientUnitWorkloadVersionCall{Call: call} +} + +// MockUniterClientUnitWorkloadVersionCall wrap *gomock.Call +type MockUniterClientUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientUnitWorkloadVersionCall) Return(arg0 string, arg1 error) *MockUniterClientUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientUnitWorkloadVersionCall) Do(f func(context.Context, names.UnitTag) (string, error)) *MockUniterClientUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientUnitWorkloadVersionCall) DoAndReturn(f func(context.Context, names.UnitTag) (string, error)) *MockUniterClientUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateStatusHookInterval mocks base method. @@ -427,9 +1027,33 @@ func (m *MockUniterClient) UpdateStatusHookInterval() (time.Duration, error) { } // UpdateStatusHookInterval indicates an expected call of UpdateStatusHookInterval. -func (mr *MockUniterClientMockRecorder) UpdateStatusHookInterval() *gomock.Call { +func (mr *MockUniterClientMockRecorder) UpdateStatusHookInterval() *MockUniterClientUpdateStatusHookIntervalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatusHookInterval", reflect.TypeOf((*MockUniterClient)(nil).UpdateStatusHookInterval)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatusHookInterval", reflect.TypeOf((*MockUniterClient)(nil).UpdateStatusHookInterval)) + return &MockUniterClientUpdateStatusHookIntervalCall{Call: call} +} + +// MockUniterClientUpdateStatusHookIntervalCall wrap *gomock.Call +type MockUniterClientUpdateStatusHookIntervalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientUpdateStatusHookIntervalCall) Return(arg0 time.Duration, arg1 error) *MockUniterClientUpdateStatusHookIntervalCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientUpdateStatusHookIntervalCall) Do(f func() (time.Duration, error)) *MockUniterClientUpdateStatusHookIntervalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientUpdateStatusHookIntervalCall) DoAndReturn(f func() (time.Duration, error)) *MockUniterClientUpdateStatusHookIntervalCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchRelationUnits mocks base method. @@ -442,9 +1066,33 @@ func (m *MockUniterClient) WatchRelationUnits(arg0 context.Context, arg1 names.R } // WatchRelationUnits indicates an expected call of WatchRelationUnits. -func (mr *MockUniterClientMockRecorder) WatchRelationUnits(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) WatchRelationUnits(arg0, arg1, arg2 any) *MockUniterClientWatchRelationUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRelationUnits", reflect.TypeOf((*MockUniterClient)(nil).WatchRelationUnits), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchRelationUnits", reflect.TypeOf((*MockUniterClient)(nil).WatchRelationUnits), arg0, arg1, arg2) + return &MockUniterClientWatchRelationUnitsCall{Call: call} +} + +// MockUniterClientWatchRelationUnitsCall wrap *gomock.Call +type MockUniterClientWatchRelationUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientWatchRelationUnitsCall) Return(arg0 watcher.RelationUnitsWatcher, arg1 error) *MockUniterClientWatchRelationUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientWatchRelationUnitsCall) Do(f func(context.Context, names.RelationTag, names.UnitTag) (watcher.RelationUnitsWatcher, error)) *MockUniterClientWatchRelationUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientWatchRelationUnitsCall) DoAndReturn(f func(context.Context, names.RelationTag, names.UnitTag) (watcher.RelationUnitsWatcher, error)) *MockUniterClientWatchRelationUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchStorageAttachment mocks base method. @@ -457,9 +1105,33 @@ func (m *MockUniterClient) WatchStorageAttachment(arg0 names.StorageTag, arg1 na } // WatchStorageAttachment indicates an expected call of WatchStorageAttachment. -func (mr *MockUniterClientMockRecorder) WatchStorageAttachment(arg0, arg1 any) *gomock.Call { +func (mr *MockUniterClientMockRecorder) WatchStorageAttachment(arg0, arg1 any) *MockUniterClientWatchStorageAttachmentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchStorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).WatchStorageAttachment), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchStorageAttachment", reflect.TypeOf((*MockUniterClient)(nil).WatchStorageAttachment), arg0, arg1) + return &MockUniterClientWatchStorageAttachmentCall{Call: call} +} + +// MockUniterClientWatchStorageAttachmentCall wrap *gomock.Call +type MockUniterClientWatchStorageAttachmentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientWatchStorageAttachmentCall) Return(arg0 watcher.NotifyWatcher, arg1 error) *MockUniterClientWatchStorageAttachmentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientWatchStorageAttachmentCall) Do(f func(names.StorageTag, names.UnitTag) (watcher.NotifyWatcher, error)) *MockUniterClientWatchStorageAttachmentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientWatchStorageAttachmentCall) DoAndReturn(f func(names.StorageTag, names.UnitTag) (watcher.NotifyWatcher, error)) *MockUniterClientWatchStorageAttachmentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpdateStatusHookInterval mocks base method. @@ -472,7 +1144,31 @@ func (m *MockUniterClient) WatchUpdateStatusHookInterval() (watcher.NotifyWatche } // WatchUpdateStatusHookInterval indicates an expected call of WatchUpdateStatusHookInterval. -func (mr *MockUniterClientMockRecorder) WatchUpdateStatusHookInterval() *gomock.Call { +func (mr *MockUniterClientMockRecorder) WatchUpdateStatusHookInterval() *MockUniterClientWatchUpdateStatusHookIntervalCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpdateStatusHookInterval", reflect.TypeOf((*MockUniterClient)(nil).WatchUpdateStatusHookInterval)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpdateStatusHookInterval", reflect.TypeOf((*MockUniterClient)(nil).WatchUpdateStatusHookInterval)) + return &MockUniterClientWatchUpdateStatusHookIntervalCall{Call: call} +} + +// MockUniterClientWatchUpdateStatusHookIntervalCall wrap *gomock.Call +type MockUniterClientWatchUpdateStatusHookIntervalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUniterClientWatchUpdateStatusHookIntervalCall) Return(arg0 watcher.NotifyWatcher, arg1 error) *MockUniterClientWatchUpdateStatusHookIntervalCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUniterClientWatchUpdateStatusHookIntervalCall) Do(f func() (watcher.NotifyWatcher, error)) *MockUniterClientWatchUpdateStatusHookIntervalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUniterClientWatchUpdateStatusHookIntervalCall) DoAndReturn(f func() (watcher.NotifyWatcher, error)) *MockUniterClientWatchUpdateStatusHookIntervalCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/charm/mocks/mocks.go b/internal/worker/uniter/charm/mocks/mocks.go index 9febe6d27de..2b2dd0a42a2 100644 --- a/internal/worker/uniter/charm/mocks/mocks.go +++ b/internal/worker/uniter/charm/mocks/mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/uniter/charm BundleReader,BundleInfo,Bundle +// mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/uniter/charm BundleReader,BundleInfo,Bundle // // Package mocks is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockBundleReader) Read(arg0 charm.BundleInfo, arg1 <-chan struct{}) (ch } // Read indicates an expected call of Read. -func (mr *MockBundleReaderMockRecorder) Read(arg0, arg1 any) *gomock.Call { +func (mr *MockBundleReaderMockRecorder) Read(arg0, arg1 any) *MockBundleReaderReadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockBundleReader)(nil).Read), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockBundleReader)(nil).Read), arg0, arg1) + return &MockBundleReaderReadCall{Call: call} +} + +// MockBundleReaderReadCall wrap *gomock.Call +type MockBundleReaderReadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleReaderReadCall) Return(arg0 charm.Bundle, arg1 error) *MockBundleReaderReadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleReaderReadCall) Do(f func(charm.BundleInfo, <-chan struct{}) (charm.Bundle, error)) *MockBundleReaderReadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleReaderReadCall) DoAndReturn(f func(charm.BundleInfo, <-chan struct{}) (charm.Bundle, error)) *MockBundleReaderReadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBundleInfo is a mock of BundleInfo interface. @@ -88,9 +112,33 @@ func (m *MockBundleInfo) ArchiveSha256() (string, error) { } // ArchiveSha256 indicates an expected call of ArchiveSha256. -func (mr *MockBundleInfoMockRecorder) ArchiveSha256() *gomock.Call { +func (mr *MockBundleInfoMockRecorder) ArchiveSha256() *MockBundleInfoArchiveSha256Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveSha256", reflect.TypeOf((*MockBundleInfo)(nil).ArchiveSha256)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveSha256", reflect.TypeOf((*MockBundleInfo)(nil).ArchiveSha256)) + return &MockBundleInfoArchiveSha256Call{Call: call} +} + +// MockBundleInfoArchiveSha256Call wrap *gomock.Call +type MockBundleInfoArchiveSha256Call struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleInfoArchiveSha256Call) Return(arg0 string, arg1 error) *MockBundleInfoArchiveSha256Call { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleInfoArchiveSha256Call) Do(f func() (string, error)) *MockBundleInfoArchiveSha256Call { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleInfoArchiveSha256Call) DoAndReturn(f func() (string, error)) *MockBundleInfoArchiveSha256Call { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -102,9 +150,33 @@ func (m *MockBundleInfo) URL() string { } // URL indicates an expected call of URL. -func (mr *MockBundleInfoMockRecorder) URL() *gomock.Call { +func (mr *MockBundleInfoMockRecorder) URL() *MockBundleInfoURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockBundleInfo)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockBundleInfo)(nil).URL)) + return &MockBundleInfoURLCall{Call: call} +} + +// MockBundleInfoURLCall wrap *gomock.Call +type MockBundleInfoURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleInfoURLCall) Return(arg0 string) *MockBundleInfoURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleInfoURLCall) Do(f func() string) *MockBundleInfoURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleInfoURLCall) DoAndReturn(f func() string) *MockBundleInfoURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockBundle is a mock of Bundle interface. @@ -140,9 +212,33 @@ func (m *MockBundle) ArchiveMembers() (set.Strings, error) { } // ArchiveMembers indicates an expected call of ArchiveMembers. -func (mr *MockBundleMockRecorder) ArchiveMembers() *gomock.Call { +func (mr *MockBundleMockRecorder) ArchiveMembers() *MockBundleArchiveMembersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveMembers", reflect.TypeOf((*MockBundle)(nil).ArchiveMembers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ArchiveMembers", reflect.TypeOf((*MockBundle)(nil).ArchiveMembers)) + return &MockBundleArchiveMembersCall{Call: call} +} + +// MockBundleArchiveMembersCall wrap *gomock.Call +type MockBundleArchiveMembersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleArchiveMembersCall) Return(arg0 set.Strings, arg1 error) *MockBundleArchiveMembersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleArchiveMembersCall) Do(f func() (set.Strings, error)) *MockBundleArchiveMembersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleArchiveMembersCall) DoAndReturn(f func() (set.Strings, error)) *MockBundleArchiveMembersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExpandTo mocks base method. @@ -154,7 +250,31 @@ func (m *MockBundle) ExpandTo(arg0 string) error { } // ExpandTo indicates an expected call of ExpandTo. -func (mr *MockBundleMockRecorder) ExpandTo(arg0 any) *gomock.Call { +func (mr *MockBundleMockRecorder) ExpandTo(arg0 any) *MockBundleExpandToCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpandTo", reflect.TypeOf((*MockBundle)(nil).ExpandTo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpandTo", reflect.TypeOf((*MockBundle)(nil).ExpandTo), arg0) + return &MockBundleExpandToCall{Call: call} +} + +// MockBundleExpandToCall wrap *gomock.Call +type MockBundleExpandToCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBundleExpandToCall) Return(arg0 error) *MockBundleExpandToCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBundleExpandToCall) Do(f func(string) error) *MockBundleExpandToCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBundleExpandToCall) DoAndReturn(f func(string) error) *MockBundleExpandToCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/charm/package_test.go b/internal/worker/uniter/charm/package_test.go index 963566f4b20..041a5e15ef2 100644 --- a/internal/worker/uniter/charm/package_test.go +++ b/internal/worker/uniter/charm/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/uniter/charm BundleReader,BundleInfo,Bundle +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mocks.go github.com/juju/juju/internal/worker/uniter/charm BundleReader,BundleInfo,Bundle func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/operation/interface.go b/internal/worker/uniter/operation/interface.go index 92a2cbce465..98a10608c31 100644 --- a/internal/worker/uniter/operation/interface.go +++ b/internal/worker/uniter/operation/interface.go @@ -19,7 +19,7 @@ import ( "github.com/juju/juju/internal/worker/uniter/runner/context" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/interface_mock.go github.com/juju/juju/internal/worker/uniter/operation Operation,Factory,Callbacks +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/interface_mock.go github.com/juju/juju/internal/worker/uniter/operation Operation,Factory,Callbacks // Logger is here to stop the desire of creating a package level Logger. // Don't do this, pass one in to the needed functions. diff --git a/internal/worker/uniter/operation/mocks/interface_mock.go b/internal/worker/uniter/operation/mocks/interface_mock.go index f7023165c36..b486f502df7 100644 --- a/internal/worker/uniter/operation/mocks/interface_mock.go +++ b/internal/worker/uniter/operation/mocks/interface_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/interface_mock.go github.com/juju/juju/internal/worker/uniter/operation Operation,Factory,Callbacks +// mockgen -typed -package mocks -destination mocks/interface_mock.go github.com/juju/juju/internal/worker/uniter/operation Operation,Factory,Callbacks // // Package mocks is a generated GoMock package. @@ -55,9 +55,33 @@ func (m *MockOperation) Commit(arg0 context.Context, arg1 operation.State) (*ope } // Commit indicates an expected call of Commit. -func (mr *MockOperationMockRecorder) Commit(arg0, arg1 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Commit(arg0, arg1 any) *MockOperationCommitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockOperation)(nil).Commit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockOperation)(nil).Commit), arg0, arg1) + return &MockOperationCommitCall{Call: call} +} + +// MockOperationCommitCall wrap *gomock.Call +type MockOperationCommitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationCommitCall) Return(arg0 *operation.State, arg1 error) *MockOperationCommitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationCommitCall) Do(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationCommitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationCommitCall) DoAndReturn(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationCommitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Execute mocks base method. @@ -70,9 +94,33 @@ func (m *MockOperation) Execute(arg0 context.Context, arg1 operation.State) (*op } // Execute indicates an expected call of Execute. -func (mr *MockOperationMockRecorder) Execute(arg0, arg1 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Execute(arg0, arg1 any) *MockOperationExecuteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockOperation)(nil).Execute), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockOperation)(nil).Execute), arg0, arg1) + return &MockOperationExecuteCall{Call: call} +} + +// MockOperationExecuteCall wrap *gomock.Call +type MockOperationExecuteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationExecuteCall) Return(arg0 *operation.State, arg1 error) *MockOperationExecuteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationExecuteCall) Do(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationExecuteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationExecuteCall) DoAndReturn(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationExecuteCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExecutionGroup mocks base method. @@ -84,9 +132,33 @@ func (m *MockOperation) ExecutionGroup() string { } // ExecutionGroup indicates an expected call of ExecutionGroup. -func (mr *MockOperationMockRecorder) ExecutionGroup() *gomock.Call { +func (mr *MockOperationMockRecorder) ExecutionGroup() *MockOperationExecutionGroupCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutionGroup", reflect.TypeOf((*MockOperation)(nil).ExecutionGroup)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutionGroup", reflect.TypeOf((*MockOperation)(nil).ExecutionGroup)) + return &MockOperationExecutionGroupCall{Call: call} +} + +// MockOperationExecutionGroupCall wrap *gomock.Call +type MockOperationExecutionGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationExecutionGroupCall) Return(arg0 string) *MockOperationExecutionGroupCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationExecutionGroupCall) Do(f func() string) *MockOperationExecutionGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationExecutionGroupCall) DoAndReturn(f func() string) *MockOperationExecutionGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NeedsGlobalMachineLock mocks base method. @@ -98,9 +170,33 @@ func (m *MockOperation) NeedsGlobalMachineLock() bool { } // NeedsGlobalMachineLock indicates an expected call of NeedsGlobalMachineLock. -func (mr *MockOperationMockRecorder) NeedsGlobalMachineLock() *gomock.Call { +func (mr *MockOperationMockRecorder) NeedsGlobalMachineLock() *MockOperationNeedsGlobalMachineLockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedsGlobalMachineLock", reflect.TypeOf((*MockOperation)(nil).NeedsGlobalMachineLock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedsGlobalMachineLock", reflect.TypeOf((*MockOperation)(nil).NeedsGlobalMachineLock)) + return &MockOperationNeedsGlobalMachineLockCall{Call: call} +} + +// MockOperationNeedsGlobalMachineLockCall wrap *gomock.Call +type MockOperationNeedsGlobalMachineLockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationNeedsGlobalMachineLockCall) Return(arg0 bool) *MockOperationNeedsGlobalMachineLockCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationNeedsGlobalMachineLockCall) Do(f func() bool) *MockOperationNeedsGlobalMachineLockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationNeedsGlobalMachineLockCall) DoAndReturn(f func() bool) *MockOperationNeedsGlobalMachineLockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Prepare mocks base method. @@ -113,9 +209,33 @@ func (m *MockOperation) Prepare(arg0 context.Context, arg1 operation.State) (*op } // Prepare indicates an expected call of Prepare. -func (mr *MockOperationMockRecorder) Prepare(arg0, arg1 any) *gomock.Call { +func (mr *MockOperationMockRecorder) Prepare(arg0, arg1 any) *MockOperationPrepareCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockOperation)(nil).Prepare), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockOperation)(nil).Prepare), arg0, arg1) + return &MockOperationPrepareCall{Call: call} +} + +// MockOperationPrepareCall wrap *gomock.Call +type MockOperationPrepareCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationPrepareCall) Return(arg0 *operation.State, arg1 error) *MockOperationPrepareCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationPrepareCall) Do(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationPrepareCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationPrepareCall) DoAndReturn(f func(context.Context, operation.State) (*operation.State, error)) *MockOperationPrepareCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteStateChanged mocks base method. @@ -125,9 +245,33 @@ func (m *MockOperation) RemoteStateChanged(arg0 remotestate.Snapshot) { } // RemoteStateChanged indicates an expected call of RemoteStateChanged. -func (mr *MockOperationMockRecorder) RemoteStateChanged(arg0 any) *gomock.Call { +func (mr *MockOperationMockRecorder) RemoteStateChanged(arg0 any) *MockOperationRemoteStateChangedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateChanged", reflect.TypeOf((*MockOperation)(nil).RemoteStateChanged), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateChanged", reflect.TypeOf((*MockOperation)(nil).RemoteStateChanged), arg0) + return &MockOperationRemoteStateChangedCall{Call: call} +} + +// MockOperationRemoteStateChangedCall wrap *gomock.Call +type MockOperationRemoteStateChangedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRemoteStateChangedCall) Return() *MockOperationRemoteStateChangedCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRemoteStateChangedCall) Do(f func(remotestate.Snapshot)) *MockOperationRemoteStateChangedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRemoteStateChangedCall) DoAndReturn(f func(remotestate.Snapshot)) *MockOperationRemoteStateChangedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // String mocks base method. @@ -139,9 +283,33 @@ func (m *MockOperation) String() string { } // String indicates an expected call of String. -func (mr *MockOperationMockRecorder) String() *gomock.Call { +func (mr *MockOperationMockRecorder) String() *MockOperationStringCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockOperation)(nil).String)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockOperation)(nil).String)) + return &MockOperationStringCall{Call: call} +} + +// MockOperationStringCall wrap *gomock.Call +type MockOperationStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationStringCall) Return(arg0 string) *MockOperationStringCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationStringCall) Do(f func() string) *MockOperationStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationStringCall) DoAndReturn(f func() string) *MockOperationStringCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFactory is a mock of Factory interface. @@ -177,9 +345,33 @@ func (m *MockFactory) NewAcceptLeadership() (operation.Operation, error) { } // NewAcceptLeadership indicates an expected call of NewAcceptLeadership. -func (mr *MockFactoryMockRecorder) NewAcceptLeadership() *gomock.Call { +func (mr *MockFactoryMockRecorder) NewAcceptLeadership() *MockFactoryNewAcceptLeadershipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAcceptLeadership", reflect.TypeOf((*MockFactory)(nil).NewAcceptLeadership)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAcceptLeadership", reflect.TypeOf((*MockFactory)(nil).NewAcceptLeadership)) + return &MockFactoryNewAcceptLeadershipCall{Call: call} +} + +// MockFactoryNewAcceptLeadershipCall wrap *gomock.Call +type MockFactoryNewAcceptLeadershipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewAcceptLeadershipCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewAcceptLeadershipCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewAcceptLeadershipCall) Do(f func() (operation.Operation, error)) *MockFactoryNewAcceptLeadershipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewAcceptLeadershipCall) DoAndReturn(f func() (operation.Operation, error)) *MockFactoryNewAcceptLeadershipCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewAction mocks base method. @@ -192,9 +384,33 @@ func (m *MockFactory) NewAction(arg0 context.Context, arg1 string) (operation.Op } // NewAction indicates an expected call of NewAction. -func (mr *MockFactoryMockRecorder) NewAction(arg0, arg1 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewAction(arg0, arg1 any) *MockFactoryNewActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAction", reflect.TypeOf((*MockFactory)(nil).NewAction), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAction", reflect.TypeOf((*MockFactory)(nil).NewAction), arg0, arg1) + return &MockFactoryNewActionCall{Call: call} +} + +// MockFactoryNewActionCall wrap *gomock.Call +type MockFactoryNewActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewActionCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewActionCall) Do(f func(context.Context, string) (operation.Operation, error)) *MockFactoryNewActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewActionCall) DoAndReturn(f func(context.Context, string) (operation.Operation, error)) *MockFactoryNewActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewCommands mocks base method. @@ -207,9 +423,33 @@ func (m *MockFactory) NewCommands(arg0 operation.CommandArgs, arg1 operation.Com } // NewCommands indicates an expected call of NewCommands. -func (mr *MockFactoryMockRecorder) NewCommands(arg0, arg1 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewCommands(arg0, arg1 any) *MockFactoryNewCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCommands", reflect.TypeOf((*MockFactory)(nil).NewCommands), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCommands", reflect.TypeOf((*MockFactory)(nil).NewCommands), arg0, arg1) + return &MockFactoryNewCommandsCall{Call: call} +} + +// MockFactoryNewCommandsCall wrap *gomock.Call +type MockFactoryNewCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewCommandsCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewCommandsCall) Do(f func(operation.CommandArgs, operation.CommandResponseFunc) (operation.Operation, error)) *MockFactoryNewCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewCommandsCall) DoAndReturn(f func(operation.CommandArgs, operation.CommandResponseFunc) (operation.Operation, error)) *MockFactoryNewCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewFailAction mocks base method. @@ -222,9 +462,33 @@ func (m *MockFactory) NewFailAction(arg0 string) (operation.Operation, error) { } // NewFailAction indicates an expected call of NewFailAction. -func (mr *MockFactoryMockRecorder) NewFailAction(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewFailAction(arg0 any) *MockFactoryNewFailActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewFailAction", reflect.TypeOf((*MockFactory)(nil).NewFailAction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewFailAction", reflect.TypeOf((*MockFactory)(nil).NewFailAction), arg0) + return &MockFactoryNewFailActionCall{Call: call} +} + +// MockFactoryNewFailActionCall wrap *gomock.Call +type MockFactoryNewFailActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewFailActionCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewFailActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewFailActionCall) Do(f func(string) (operation.Operation, error)) *MockFactoryNewFailActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewFailActionCall) DoAndReturn(f func(string) (operation.Operation, error)) *MockFactoryNewFailActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewInstall mocks base method. @@ -237,9 +501,33 @@ func (m *MockFactory) NewInstall(arg0 string) (operation.Operation, error) { } // NewInstall indicates an expected call of NewInstall. -func (mr *MockFactoryMockRecorder) NewInstall(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewInstall(arg0 any) *MockFactoryNewInstallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewInstall", reflect.TypeOf((*MockFactory)(nil).NewInstall), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewInstall", reflect.TypeOf((*MockFactory)(nil).NewInstall), arg0) + return &MockFactoryNewInstallCall{Call: call} +} + +// MockFactoryNewInstallCall wrap *gomock.Call +type MockFactoryNewInstallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewInstallCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewInstallCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewInstallCall) Do(f func(string) (operation.Operation, error)) *MockFactoryNewInstallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewInstallCall) DoAndReturn(f func(string) (operation.Operation, error)) *MockFactoryNewInstallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewNoOpFinishUpgradeSeries mocks base method. @@ -252,9 +540,33 @@ func (m *MockFactory) NewNoOpFinishUpgradeSeries() (operation.Operation, error) } // NewNoOpFinishUpgradeSeries indicates an expected call of NewNoOpFinishUpgradeSeries. -func (mr *MockFactoryMockRecorder) NewNoOpFinishUpgradeSeries() *gomock.Call { +func (mr *MockFactoryMockRecorder) NewNoOpFinishUpgradeSeries() *MockFactoryNewNoOpFinishUpgradeSeriesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNoOpFinishUpgradeSeries", reflect.TypeOf((*MockFactory)(nil).NewNoOpFinishUpgradeSeries)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNoOpFinishUpgradeSeries", reflect.TypeOf((*MockFactory)(nil).NewNoOpFinishUpgradeSeries)) + return &MockFactoryNewNoOpFinishUpgradeSeriesCall{Call: call} +} + +// MockFactoryNewNoOpFinishUpgradeSeriesCall wrap *gomock.Call +type MockFactoryNewNoOpFinishUpgradeSeriesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewNoOpFinishUpgradeSeriesCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewNoOpFinishUpgradeSeriesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewNoOpFinishUpgradeSeriesCall) Do(f func() (operation.Operation, error)) *MockFactoryNewNoOpFinishUpgradeSeriesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewNoOpFinishUpgradeSeriesCall) DoAndReturn(f func() (operation.Operation, error)) *MockFactoryNewNoOpFinishUpgradeSeriesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewNoOpSecretsRemoved mocks base method. @@ -267,9 +579,33 @@ func (m *MockFactory) NewNoOpSecretsRemoved(arg0 []string) (operation.Operation, } // NewNoOpSecretsRemoved indicates an expected call of NewNoOpSecretsRemoved. -func (mr *MockFactoryMockRecorder) NewNoOpSecretsRemoved(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewNoOpSecretsRemoved(arg0 any) *MockFactoryNewNoOpSecretsRemovedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNoOpSecretsRemoved", reflect.TypeOf((*MockFactory)(nil).NewNoOpSecretsRemoved), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewNoOpSecretsRemoved", reflect.TypeOf((*MockFactory)(nil).NewNoOpSecretsRemoved), arg0) + return &MockFactoryNewNoOpSecretsRemovedCall{Call: call} +} + +// MockFactoryNewNoOpSecretsRemovedCall wrap *gomock.Call +type MockFactoryNewNoOpSecretsRemovedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewNoOpSecretsRemovedCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewNoOpSecretsRemovedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewNoOpSecretsRemovedCall) Do(f func([]string) (operation.Operation, error)) *MockFactoryNewNoOpSecretsRemovedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewNoOpSecretsRemovedCall) DoAndReturn(f func([]string) (operation.Operation, error)) *MockFactoryNewNoOpSecretsRemovedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewRemoteInit mocks base method. @@ -282,9 +618,33 @@ func (m *MockFactory) NewRemoteInit(arg0 remotestate.ContainerRunningStatus) (op } // NewRemoteInit indicates an expected call of NewRemoteInit. -func (mr *MockFactoryMockRecorder) NewRemoteInit(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewRemoteInit(arg0 any) *MockFactoryNewRemoteInitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteInit", reflect.TypeOf((*MockFactory)(nil).NewRemoteInit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteInit", reflect.TypeOf((*MockFactory)(nil).NewRemoteInit), arg0) + return &MockFactoryNewRemoteInitCall{Call: call} +} + +// MockFactoryNewRemoteInitCall wrap *gomock.Call +type MockFactoryNewRemoteInitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewRemoteInitCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewRemoteInitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewRemoteInitCall) Do(f func(remotestate.ContainerRunningStatus) (operation.Operation, error)) *MockFactoryNewRemoteInitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewRemoteInitCall) DoAndReturn(f func(remotestate.ContainerRunningStatus) (operation.Operation, error)) *MockFactoryNewRemoteInitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewResignLeadership mocks base method. @@ -297,9 +657,33 @@ func (m *MockFactory) NewResignLeadership() (operation.Operation, error) { } // NewResignLeadership indicates an expected call of NewResignLeadership. -func (mr *MockFactoryMockRecorder) NewResignLeadership() *gomock.Call { +func (mr *MockFactoryMockRecorder) NewResignLeadership() *MockFactoryNewResignLeadershipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResignLeadership", reflect.TypeOf((*MockFactory)(nil).NewResignLeadership)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResignLeadership", reflect.TypeOf((*MockFactory)(nil).NewResignLeadership)) + return &MockFactoryNewResignLeadershipCall{Call: call} +} + +// MockFactoryNewResignLeadershipCall wrap *gomock.Call +type MockFactoryNewResignLeadershipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewResignLeadershipCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewResignLeadershipCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewResignLeadershipCall) Do(f func() (operation.Operation, error)) *MockFactoryNewResignLeadershipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewResignLeadershipCall) DoAndReturn(f func() (operation.Operation, error)) *MockFactoryNewResignLeadershipCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewResolvedUpgrade mocks base method. @@ -312,9 +696,33 @@ func (m *MockFactory) NewResolvedUpgrade(arg0 string) (operation.Operation, erro } // NewResolvedUpgrade indicates an expected call of NewResolvedUpgrade. -func (mr *MockFactoryMockRecorder) NewResolvedUpgrade(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewResolvedUpgrade(arg0 any) *MockFactoryNewResolvedUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResolvedUpgrade", reflect.TypeOf((*MockFactory)(nil).NewResolvedUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResolvedUpgrade", reflect.TypeOf((*MockFactory)(nil).NewResolvedUpgrade), arg0) + return &MockFactoryNewResolvedUpgradeCall{Call: call} +} + +// MockFactoryNewResolvedUpgradeCall wrap *gomock.Call +type MockFactoryNewResolvedUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewResolvedUpgradeCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewResolvedUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewResolvedUpgradeCall) Do(f func(string) (operation.Operation, error)) *MockFactoryNewResolvedUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewResolvedUpgradeCall) DoAndReturn(f func(string) (operation.Operation, error)) *MockFactoryNewResolvedUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewRevertUpgrade mocks base method. @@ -327,9 +735,33 @@ func (m *MockFactory) NewRevertUpgrade(arg0 string) (operation.Operation, error) } // NewRevertUpgrade indicates an expected call of NewRevertUpgrade. -func (mr *MockFactoryMockRecorder) NewRevertUpgrade(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewRevertUpgrade(arg0 any) *MockFactoryNewRevertUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRevertUpgrade", reflect.TypeOf((*MockFactory)(nil).NewRevertUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRevertUpgrade", reflect.TypeOf((*MockFactory)(nil).NewRevertUpgrade), arg0) + return &MockFactoryNewRevertUpgradeCall{Call: call} +} + +// MockFactoryNewRevertUpgradeCall wrap *gomock.Call +type MockFactoryNewRevertUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewRevertUpgradeCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewRevertUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewRevertUpgradeCall) Do(f func(string) (operation.Operation, error)) *MockFactoryNewRevertUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewRevertUpgradeCall) DoAndReturn(f func(string) (operation.Operation, error)) *MockFactoryNewRevertUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewRunHook mocks base method. @@ -342,9 +774,33 @@ func (m *MockFactory) NewRunHook(arg0 hook.Info) (operation.Operation, error) { } // NewRunHook indicates an expected call of NewRunHook. -func (mr *MockFactoryMockRecorder) NewRunHook(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewRunHook(arg0 any) *MockFactoryNewRunHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRunHook", reflect.TypeOf((*MockFactory)(nil).NewRunHook), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRunHook", reflect.TypeOf((*MockFactory)(nil).NewRunHook), arg0) + return &MockFactoryNewRunHookCall{Call: call} +} + +// MockFactoryNewRunHookCall wrap *gomock.Call +type MockFactoryNewRunHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewRunHookCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewRunHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewRunHookCall) Do(f func(hook.Info) (operation.Operation, error)) *MockFactoryNewRunHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewRunHookCall) DoAndReturn(f func(hook.Info) (operation.Operation, error)) *MockFactoryNewRunHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewSkipHook mocks base method. @@ -357,9 +813,33 @@ func (m *MockFactory) NewSkipHook(arg0 hook.Info) (operation.Operation, error) { } // NewSkipHook indicates an expected call of NewSkipHook. -func (mr *MockFactoryMockRecorder) NewSkipHook(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewSkipHook(arg0 any) *MockFactoryNewSkipHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewSkipHook", reflect.TypeOf((*MockFactory)(nil).NewSkipHook), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewSkipHook", reflect.TypeOf((*MockFactory)(nil).NewSkipHook), arg0) + return &MockFactoryNewSkipHookCall{Call: call} +} + +// MockFactoryNewSkipHookCall wrap *gomock.Call +type MockFactoryNewSkipHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewSkipHookCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewSkipHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewSkipHookCall) Do(f func(hook.Info) (operation.Operation, error)) *MockFactoryNewSkipHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewSkipHookCall) DoAndReturn(f func(hook.Info) (operation.Operation, error)) *MockFactoryNewSkipHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewSkipRemoteInit mocks base method. @@ -372,9 +852,33 @@ func (m *MockFactory) NewSkipRemoteInit(arg0 bool) (operation.Operation, error) } // NewSkipRemoteInit indicates an expected call of NewSkipRemoteInit. -func (mr *MockFactoryMockRecorder) NewSkipRemoteInit(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewSkipRemoteInit(arg0 any) *MockFactoryNewSkipRemoteInitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewSkipRemoteInit", reflect.TypeOf((*MockFactory)(nil).NewSkipRemoteInit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewSkipRemoteInit", reflect.TypeOf((*MockFactory)(nil).NewSkipRemoteInit), arg0) + return &MockFactoryNewSkipRemoteInitCall{Call: call} +} + +// MockFactoryNewSkipRemoteInitCall wrap *gomock.Call +type MockFactoryNewSkipRemoteInitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewSkipRemoteInitCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewSkipRemoteInitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewSkipRemoteInitCall) Do(f func(bool) (operation.Operation, error)) *MockFactoryNewSkipRemoteInitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewSkipRemoteInitCall) DoAndReturn(f func(bool) (operation.Operation, error)) *MockFactoryNewSkipRemoteInitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewUpgrade mocks base method. @@ -387,9 +891,33 @@ func (m *MockFactory) NewUpgrade(arg0 string) (operation.Operation, error) { } // NewUpgrade indicates an expected call of NewUpgrade. -func (mr *MockFactoryMockRecorder) NewUpgrade(arg0 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewUpgrade(arg0 any) *MockFactoryNewUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewUpgrade", reflect.TypeOf((*MockFactory)(nil).NewUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewUpgrade", reflect.TypeOf((*MockFactory)(nil).NewUpgrade), arg0) + return &MockFactoryNewUpgradeCall{Call: call} +} + +// MockFactoryNewUpgradeCall wrap *gomock.Call +type MockFactoryNewUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewUpgradeCall) Return(arg0 operation.Operation, arg1 error) *MockFactoryNewUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewUpgradeCall) Do(f func(string) (operation.Operation, error)) *MockFactoryNewUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewUpgradeCall) DoAndReturn(f func(string) (operation.Operation, error)) *MockFactoryNewUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockCallbacks is a mock of Callbacks interface. @@ -425,9 +953,33 @@ func (m *MockCallbacks) ActionStatus(arg0 context.Context, arg1 string) (string, } // ActionStatus indicates an expected call of ActionStatus. -func (mr *MockCallbacksMockRecorder) ActionStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) ActionStatus(arg0, arg1 any) *MockCallbacksActionStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionStatus", reflect.TypeOf((*MockCallbacks)(nil).ActionStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionStatus", reflect.TypeOf((*MockCallbacks)(nil).ActionStatus), arg0, arg1) + return &MockCallbacksActionStatusCall{Call: call} +} + +// MockCallbacksActionStatusCall wrap *gomock.Call +type MockCallbacksActionStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksActionStatusCall) Return(arg0 string, arg1 error) *MockCallbacksActionStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksActionStatusCall) Do(f func(context.Context, string) (string, error)) *MockCallbacksActionStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksActionStatusCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockCallbacksActionStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CommitHook mocks base method. @@ -439,9 +991,33 @@ func (m *MockCallbacks) CommitHook(arg0 context.Context, arg1 hook.Info) error { } // CommitHook indicates an expected call of CommitHook. -func (mr *MockCallbacksMockRecorder) CommitHook(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) CommitHook(arg0, arg1 any) *MockCallbacksCommitHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockCallbacks)(nil).CommitHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockCallbacks)(nil).CommitHook), arg0, arg1) + return &MockCallbacksCommitHookCall{Call: call} +} + +// MockCallbacksCommitHookCall wrap *gomock.Call +type MockCallbacksCommitHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksCommitHookCall) Return(arg0 error) *MockCallbacksCommitHookCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksCommitHookCall) Do(f func(context.Context, hook.Info) error) *MockCallbacksCommitHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksCommitHookCall) DoAndReturn(f func(context.Context, hook.Info) error) *MockCallbacksCommitHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FailAction mocks base method. @@ -453,9 +1029,33 @@ func (m *MockCallbacks) FailAction(arg0 context.Context, arg1, arg2 string) erro } // FailAction indicates an expected call of FailAction. -func (mr *MockCallbacksMockRecorder) FailAction(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) FailAction(arg0, arg1, arg2 any) *MockCallbacksFailActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailAction", reflect.TypeOf((*MockCallbacks)(nil).FailAction), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailAction", reflect.TypeOf((*MockCallbacks)(nil).FailAction), arg0, arg1, arg2) + return &MockCallbacksFailActionCall{Call: call} +} + +// MockCallbacksFailActionCall wrap *gomock.Call +type MockCallbacksFailActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksFailActionCall) Return(arg0 error) *MockCallbacksFailActionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksFailActionCall) Do(f func(context.Context, string, string) error) *MockCallbacksFailActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksFailActionCall) DoAndReturn(f func(context.Context, string, string) error) *MockCallbacksFailActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetArchiveInfo mocks base method. @@ -468,9 +1068,33 @@ func (m *MockCallbacks) GetArchiveInfo(arg0 string) (charm.BundleInfo, error) { } // GetArchiveInfo indicates an expected call of GetArchiveInfo. -func (mr *MockCallbacksMockRecorder) GetArchiveInfo(arg0 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) GetArchiveInfo(arg0 any) *MockCallbacksGetArchiveInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetArchiveInfo", reflect.TypeOf((*MockCallbacks)(nil).GetArchiveInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetArchiveInfo", reflect.TypeOf((*MockCallbacks)(nil).GetArchiveInfo), arg0) + return &MockCallbacksGetArchiveInfoCall{Call: call} +} + +// MockCallbacksGetArchiveInfoCall wrap *gomock.Call +type MockCallbacksGetArchiveInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksGetArchiveInfoCall) Return(arg0 charm.BundleInfo, arg1 error) *MockCallbacksGetArchiveInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksGetArchiveInfoCall) Do(f func(string) (charm.BundleInfo, error)) *MockCallbacksGetArchiveInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksGetArchiveInfoCall) DoAndReturn(f func(string) (charm.BundleInfo, error)) *MockCallbacksGetArchiveInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NotifyHookCompleted mocks base method. @@ -480,9 +1104,33 @@ func (m *MockCallbacks) NotifyHookCompleted(arg0 string, arg1 context0.Context) } // NotifyHookCompleted indicates an expected call of NotifyHookCompleted. -func (mr *MockCallbacksMockRecorder) NotifyHookCompleted(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) NotifyHookCompleted(arg0, arg1 any) *MockCallbacksNotifyHookCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyHookCompleted", reflect.TypeOf((*MockCallbacks)(nil).NotifyHookCompleted), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyHookCompleted", reflect.TypeOf((*MockCallbacks)(nil).NotifyHookCompleted), arg0, arg1) + return &MockCallbacksNotifyHookCompletedCall{Call: call} +} + +// MockCallbacksNotifyHookCompletedCall wrap *gomock.Call +type MockCallbacksNotifyHookCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksNotifyHookCompletedCall) Return() *MockCallbacksNotifyHookCompletedCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksNotifyHookCompletedCall) Do(f func(string, context0.Context)) *MockCallbacksNotifyHookCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksNotifyHookCompletedCall) DoAndReturn(f func(string, context0.Context)) *MockCallbacksNotifyHookCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NotifyHookFailed mocks base method. @@ -492,9 +1140,33 @@ func (m *MockCallbacks) NotifyHookFailed(arg0 string, arg1 context0.Context) { } // NotifyHookFailed indicates an expected call of NotifyHookFailed. -func (mr *MockCallbacksMockRecorder) NotifyHookFailed(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) NotifyHookFailed(arg0, arg1 any) *MockCallbacksNotifyHookFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyHookFailed", reflect.TypeOf((*MockCallbacks)(nil).NotifyHookFailed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyHookFailed", reflect.TypeOf((*MockCallbacks)(nil).NotifyHookFailed), arg0, arg1) + return &MockCallbacksNotifyHookFailedCall{Call: call} +} + +// MockCallbacksNotifyHookFailedCall wrap *gomock.Call +type MockCallbacksNotifyHookFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksNotifyHookFailedCall) Return() *MockCallbacksNotifyHookFailedCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksNotifyHookFailedCall) Do(f func(string, context0.Context)) *MockCallbacksNotifyHookFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksNotifyHookFailedCall) DoAndReturn(f func(string, context0.Context)) *MockCallbacksNotifyHookFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareHook mocks base method. @@ -507,9 +1179,33 @@ func (m *MockCallbacks) PrepareHook(arg0 context.Context, arg1 hook.Info) (strin } // PrepareHook indicates an expected call of PrepareHook. -func (mr *MockCallbacksMockRecorder) PrepareHook(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) PrepareHook(arg0, arg1 any) *MockCallbacksPrepareHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockCallbacks)(nil).PrepareHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockCallbacks)(nil).PrepareHook), arg0, arg1) + return &MockCallbacksPrepareHookCall{Call: call} +} + +// MockCallbacksPrepareHookCall wrap *gomock.Call +type MockCallbacksPrepareHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksPrepareHookCall) Return(arg0 string, arg1 error) *MockCallbacksPrepareHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksPrepareHookCall) Do(f func(context.Context, hook.Info) (string, error)) *MockCallbacksPrepareHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksPrepareHookCall) DoAndReturn(f func(context.Context, hook.Info) (string, error)) *MockCallbacksPrepareHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteInit mocks base method. @@ -521,9 +1217,33 @@ func (m *MockCallbacks) RemoteInit(arg0 remotestate.ContainerRunningStatus, arg1 } // RemoteInit indicates an expected call of RemoteInit. -func (mr *MockCallbacksMockRecorder) RemoteInit(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) RemoteInit(arg0, arg1 any) *MockCallbacksRemoteInitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteInit", reflect.TypeOf((*MockCallbacks)(nil).RemoteInit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteInit", reflect.TypeOf((*MockCallbacks)(nil).RemoteInit), arg0, arg1) + return &MockCallbacksRemoteInitCall{Call: call} +} + +// MockCallbacksRemoteInitCall wrap *gomock.Call +type MockCallbacksRemoteInitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksRemoteInitCall) Return(arg0 error) *MockCallbacksRemoteInitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksRemoteInitCall) Do(f func(remotestate.ContainerRunningStatus, <-chan struct{}) error) *MockCallbacksRemoteInitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksRemoteInitCall) DoAndReturn(f func(remotestate.ContainerRunningStatus, <-chan struct{}) error) *MockCallbacksRemoteInitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretsRemoved mocks base method. @@ -535,9 +1255,33 @@ func (m *MockCallbacks) SecretsRemoved(arg0 []string) error { } // SecretsRemoved indicates an expected call of SecretsRemoved. -func (mr *MockCallbacksMockRecorder) SecretsRemoved(arg0 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) SecretsRemoved(arg0 any) *MockCallbacksSecretsRemovedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretsRemoved", reflect.TypeOf((*MockCallbacks)(nil).SecretsRemoved), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretsRemoved", reflect.TypeOf((*MockCallbacks)(nil).SecretsRemoved), arg0) + return &MockCallbacksSecretsRemovedCall{Call: call} +} + +// MockCallbacksSecretsRemovedCall wrap *gomock.Call +type MockCallbacksSecretsRemovedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksSecretsRemovedCall) Return(arg0 error) *MockCallbacksSecretsRemovedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksSecretsRemovedCall) Do(f func([]string) error) *MockCallbacksSecretsRemovedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksSecretsRemovedCall) DoAndReturn(f func([]string) error) *MockCallbacksSecretsRemovedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCurrentCharm mocks base method. @@ -549,9 +1293,33 @@ func (m *MockCallbacks) SetCurrentCharm(arg0 string) error { } // SetCurrentCharm indicates an expected call of SetCurrentCharm. -func (mr *MockCallbacksMockRecorder) SetCurrentCharm(arg0 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) SetCurrentCharm(arg0 any) *MockCallbacksSetCurrentCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentCharm", reflect.TypeOf((*MockCallbacks)(nil).SetCurrentCharm), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCurrentCharm", reflect.TypeOf((*MockCallbacks)(nil).SetCurrentCharm), arg0) + return &MockCallbacksSetCurrentCharmCall{Call: call} +} + +// MockCallbacksSetCurrentCharmCall wrap *gomock.Call +type MockCallbacksSetCurrentCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksSetCurrentCharmCall) Return(arg0 error) *MockCallbacksSetCurrentCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksSetCurrentCharmCall) Do(f func(string) error) *MockCallbacksSetCurrentCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksSetCurrentCharmCall) DoAndReturn(f func(string) error) *MockCallbacksSetCurrentCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetExecutingStatus mocks base method. @@ -563,9 +1331,33 @@ func (m *MockCallbacks) SetExecutingStatus(arg0 string) error { } // SetExecutingStatus indicates an expected call of SetExecutingStatus. -func (mr *MockCallbacksMockRecorder) SetExecutingStatus(arg0 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) SetExecutingStatus(arg0 any) *MockCallbacksSetExecutingStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetExecutingStatus", reflect.TypeOf((*MockCallbacks)(nil).SetExecutingStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetExecutingStatus", reflect.TypeOf((*MockCallbacks)(nil).SetExecutingStatus), arg0) + return &MockCallbacksSetExecutingStatusCall{Call: call} +} + +// MockCallbacksSetExecutingStatusCall wrap *gomock.Call +type MockCallbacksSetExecutingStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksSetExecutingStatusCall) Return(arg0 error) *MockCallbacksSetExecutingStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksSetExecutingStatusCall) Do(f func(string) error) *MockCallbacksSetExecutingStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksSetExecutingStatusCall) DoAndReturn(f func(string) error) *MockCallbacksSetExecutingStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetSecretRotated mocks base method. @@ -577,9 +1369,33 @@ func (m *MockCallbacks) SetSecretRotated(arg0 string, arg1 int) error { } // SetSecretRotated indicates an expected call of SetSecretRotated. -func (mr *MockCallbacksMockRecorder) SetSecretRotated(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) SetSecretRotated(arg0, arg1 any) *MockCallbacksSetSecretRotatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSecretRotated", reflect.TypeOf((*MockCallbacks)(nil).SetSecretRotated), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSecretRotated", reflect.TypeOf((*MockCallbacks)(nil).SetSecretRotated), arg0, arg1) + return &MockCallbacksSetSecretRotatedCall{Call: call} +} + +// MockCallbacksSetSecretRotatedCall wrap *gomock.Call +type MockCallbacksSetSecretRotatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksSetSecretRotatedCall) Return(arg0 error) *MockCallbacksSetSecretRotatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksSetSecretRotatedCall) Do(f func(string, int) error) *MockCallbacksSetSecretRotatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksSetSecretRotatedCall) DoAndReturn(f func(string, int) error) *MockCallbacksSetSecretRotatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradeSeriesStatus mocks base method. @@ -591,7 +1407,31 @@ func (m *MockCallbacks) SetUpgradeSeriesStatus(arg0 model.UpgradeSeriesStatus, a } // SetUpgradeSeriesStatus indicates an expected call of SetUpgradeSeriesStatus. -func (mr *MockCallbacksMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockCallbacksMockRecorder) SetUpgradeSeriesStatus(arg0, arg1 any) *MockCallbacksSetUpgradeSeriesStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockCallbacks)(nil).SetUpgradeSeriesStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradeSeriesStatus", reflect.TypeOf((*MockCallbacks)(nil).SetUpgradeSeriesStatus), arg0, arg1) + return &MockCallbacksSetUpgradeSeriesStatusCall{Call: call} +} + +// MockCallbacksSetUpgradeSeriesStatusCall wrap *gomock.Call +type MockCallbacksSetUpgradeSeriesStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCallbacksSetUpgradeSeriesStatusCall) Return(arg0 error) *MockCallbacksSetUpgradeSeriesStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCallbacksSetUpgradeSeriesStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockCallbacksSetUpgradeSeriesStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCallbacksSetUpgradeSeriesStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockCallbacksSetUpgradeSeriesStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/operation/mocks/uniterstaterw_mock.go b/internal/worker/uniter/operation/mocks/uniterstaterw_mock.go index 5c3bd57c07f..1d186dcaf06 100644 --- a/internal/worker/uniter/operation/mocks/uniterstaterw_mock.go +++ b/internal/worker/uniter/operation/mocks/uniterstaterw_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/uniterstaterw_mock.go github.com/juju/juju/internal/worker/uniter/operation UnitStateReadWriter +// mockgen -typed -package mocks -destination mocks/uniterstaterw_mock.go github.com/juju/juju/internal/worker/uniter/operation UnitStateReadWriter // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockUnitStateReadWriter) SetState(arg0 params.SetUnitStateArg) error { } // SetState indicates an expected call of SetState. -func (mr *MockUnitStateReadWriterMockRecorder) SetState(arg0 any) *gomock.Call { +func (mr *MockUnitStateReadWriterMockRecorder) SetState(arg0 any) *MockUnitStateReadWriterSetStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockUnitStateReadWriter)(nil).SetState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockUnitStateReadWriter)(nil).SetState), arg0) + return &MockUnitStateReadWriterSetStateCall{Call: call} +} + +// MockUnitStateReadWriterSetStateCall wrap *gomock.Call +type MockUnitStateReadWriterSetStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateReadWriterSetStateCall) Return(arg0 error) *MockUnitStateReadWriterSetStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateReadWriterSetStateCall) Do(f func(params.SetUnitStateArg) error) *MockUnitStateReadWriterSetStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateReadWriterSetStateCall) DoAndReturn(f func(params.SetUnitStateArg) error) *MockUnitStateReadWriterSetStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // State mocks base method. @@ -63,7 +87,31 @@ func (m *MockUnitStateReadWriter) State() (params.UnitStateResult, error) { } // State indicates an expected call of State. -func (mr *MockUnitStateReadWriterMockRecorder) State() *gomock.Call { +func (mr *MockUnitStateReadWriterMockRecorder) State() *MockUnitStateReadWriterStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnitStateReadWriter)(nil).State)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnitStateReadWriter)(nil).State)) + return &MockUnitStateReadWriterStateCall{Call: call} +} + +// MockUnitStateReadWriterStateCall wrap *gomock.Call +type MockUnitStateReadWriterStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitStateReadWriterStateCall) Return(arg0 params.UnitStateResult, arg1 error) *MockUnitStateReadWriterStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitStateReadWriterStateCall) Do(f func() (params.UnitStateResult, error)) *MockUnitStateReadWriterStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitStateReadWriterStateCall) DoAndReturn(f func() (params.UnitStateResult, error)) *MockUnitStateReadWriterStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/operation/state.go b/internal/worker/uniter/operation/state.go index d656b13b708..ce1bc0b9214 100644 --- a/internal/worker/uniter/operation/state.go +++ b/internal/worker/uniter/operation/state.go @@ -242,7 +242,7 @@ func NewStateOps(readwriter UnitStateReadWriter) *StateOps { // UnitStateReadWriter encapsulates the methods from a state.Unit // required to set and get unit state. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/uniterstaterw_mock.go github.com/juju/juju/internal/worker/uniter/operation UnitStateReadWriter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/uniterstaterw_mock.go github.com/juju/juju/internal/worker/uniter/operation UnitStateReadWriter type UnitStateReadWriter interface { State() (params.UnitStateResult, error) SetState(unitState params.SetUnitStateArg) error diff --git a/internal/worker/uniter/relation/mocks/mock_relationer.go b/internal/worker/uniter/relation/mocks/mock_relationer.go index 7a7067fe3be..5b750553cb8 100644 --- a/internal/worker/uniter/relation/mocks/mock_relationer.go +++ b/internal/worker/uniter/relation/mocks/mock_relationer.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_relationer.go github.com/juju/juju/internal/worker/uniter/relation Relationer +// mockgen -typed -package mocks -destination mocks/mock_relationer.go github.com/juju/juju/internal/worker/uniter/relation Relationer // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockRelationer) CommitHook(arg0 context.Context, arg1 hook.Info) error } // CommitHook indicates an expected call of CommitHook. -func (mr *MockRelationerMockRecorder) CommitHook(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationerMockRecorder) CommitHook(arg0, arg1 any) *MockRelationerCommitHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockRelationer)(nil).CommitHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockRelationer)(nil).CommitHook), arg0, arg1) + return &MockRelationerCommitHookCall{Call: call} +} + +// MockRelationerCommitHookCall wrap *gomock.Call +type MockRelationerCommitHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerCommitHookCall) Return(arg0 error) *MockRelationerCommitHookCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerCommitHookCall) Do(f func(context.Context, hook.Info) error) *MockRelationerCommitHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerCommitHookCall) DoAndReturn(f func(context.Context, hook.Info) error) *MockRelationerCommitHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContextInfo mocks base method. @@ -65,9 +89,33 @@ func (m *MockRelationer) ContextInfo() *context0.RelationInfo { } // ContextInfo indicates an expected call of ContextInfo. -func (mr *MockRelationerMockRecorder) ContextInfo() *gomock.Call { +func (mr *MockRelationerMockRecorder) ContextInfo() *MockRelationerContextInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextInfo", reflect.TypeOf((*MockRelationer)(nil).ContextInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextInfo", reflect.TypeOf((*MockRelationer)(nil).ContextInfo)) + return &MockRelationerContextInfoCall{Call: call} +} + +// MockRelationerContextInfoCall wrap *gomock.Call +type MockRelationerContextInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerContextInfoCall) Return(arg0 *context0.RelationInfo) *MockRelationerContextInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerContextInfoCall) Do(f func() *context0.RelationInfo) *MockRelationerContextInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerContextInfoCall) DoAndReturn(f func() *context0.RelationInfo) *MockRelationerContextInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsDying mocks base method. @@ -79,9 +127,33 @@ func (m *MockRelationer) IsDying() bool { } // IsDying indicates an expected call of IsDying. -func (mr *MockRelationerMockRecorder) IsDying() *gomock.Call { +func (mr *MockRelationerMockRecorder) IsDying() *MockRelationerIsDyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsDying", reflect.TypeOf((*MockRelationer)(nil).IsDying)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsDying", reflect.TypeOf((*MockRelationer)(nil).IsDying)) + return &MockRelationerIsDyingCall{Call: call} +} + +// MockRelationerIsDyingCall wrap *gomock.Call +type MockRelationerIsDyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerIsDyingCall) Return(arg0 bool) *MockRelationerIsDyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerIsDyingCall) Do(f func() bool) *MockRelationerIsDyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerIsDyingCall) DoAndReturn(f func() bool) *MockRelationerIsDyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsImplicit mocks base method. @@ -93,9 +165,33 @@ func (m *MockRelationer) IsImplicit() bool { } // IsImplicit indicates an expected call of IsImplicit. -func (mr *MockRelationerMockRecorder) IsImplicit() *gomock.Call { +func (mr *MockRelationerMockRecorder) IsImplicit() *MockRelationerIsImplicitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImplicit", reflect.TypeOf((*MockRelationer)(nil).IsImplicit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImplicit", reflect.TypeOf((*MockRelationer)(nil).IsImplicit)) + return &MockRelationerIsImplicitCall{Call: call} +} + +// MockRelationerIsImplicitCall wrap *gomock.Call +type MockRelationerIsImplicitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerIsImplicitCall) Return(arg0 bool) *MockRelationerIsImplicitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerIsImplicitCall) Do(f func() bool) *MockRelationerIsImplicitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerIsImplicitCall) DoAndReturn(f func() bool) *MockRelationerIsImplicitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Join mocks base method. @@ -107,9 +203,33 @@ func (m *MockRelationer) Join() error { } // Join indicates an expected call of Join. -func (mr *MockRelationerMockRecorder) Join() *gomock.Call { +func (mr *MockRelationerMockRecorder) Join() *MockRelationerJoinCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Join", reflect.TypeOf((*MockRelationer)(nil).Join)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Join", reflect.TypeOf((*MockRelationer)(nil).Join)) + return &MockRelationerJoinCall{Call: call} +} + +// MockRelationerJoinCall wrap *gomock.Call +type MockRelationerJoinCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerJoinCall) Return(arg0 error) *MockRelationerJoinCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerJoinCall) Do(f func() error) *MockRelationerJoinCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerJoinCall) DoAndReturn(f func() error) *MockRelationerJoinCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareHook mocks base method. @@ -122,9 +242,33 @@ func (m *MockRelationer) PrepareHook(arg0 hook.Info) (string, error) { } // PrepareHook indicates an expected call of PrepareHook. -func (mr *MockRelationerMockRecorder) PrepareHook(arg0 any) *gomock.Call { +func (mr *MockRelationerMockRecorder) PrepareHook(arg0 any) *MockRelationerPrepareHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockRelationer)(nil).PrepareHook), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockRelationer)(nil).PrepareHook), arg0) + return &MockRelationerPrepareHookCall{Call: call} +} + +// MockRelationerPrepareHookCall wrap *gomock.Call +type MockRelationerPrepareHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerPrepareHookCall) Return(arg0 string, arg1 error) *MockRelationerPrepareHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerPrepareHookCall) Do(f func(hook.Info) (string, error)) *MockRelationerPrepareHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerPrepareHookCall) DoAndReturn(f func(hook.Info) (string, error)) *MockRelationerPrepareHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationUnit mocks base method. @@ -136,9 +280,33 @@ func (m *MockRelationer) RelationUnit() api.RelationUnit { } // RelationUnit indicates an expected call of RelationUnit. -func (mr *MockRelationerMockRecorder) RelationUnit() *gomock.Call { +func (mr *MockRelationerMockRecorder) RelationUnit() *MockRelationerRelationUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationUnit", reflect.TypeOf((*MockRelationer)(nil).RelationUnit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationUnit", reflect.TypeOf((*MockRelationer)(nil).RelationUnit)) + return &MockRelationerRelationUnitCall{Call: call} +} + +// MockRelationerRelationUnitCall wrap *gomock.Call +type MockRelationerRelationUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerRelationUnitCall) Return(arg0 api.RelationUnit) *MockRelationerRelationUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerRelationUnitCall) Do(f func() api.RelationUnit) *MockRelationerRelationUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerRelationUnitCall) DoAndReturn(f func() api.RelationUnit) *MockRelationerRelationUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDying mocks base method. @@ -150,7 +318,31 @@ func (m *MockRelationer) SetDying(arg0 context.Context) error { } // SetDying indicates an expected call of SetDying. -func (mr *MockRelationerMockRecorder) SetDying(arg0 any) *gomock.Call { +func (mr *MockRelationerMockRecorder) SetDying(arg0 any) *MockRelationerSetDyingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDying", reflect.TypeOf((*MockRelationer)(nil).SetDying), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDying", reflect.TypeOf((*MockRelationer)(nil).SetDying), arg0) + return &MockRelationerSetDyingCall{Call: call} +} + +// MockRelationerSetDyingCall wrap *gomock.Call +type MockRelationerSetDyingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationerSetDyingCall) Return(arg0 error) *MockRelationerSetDyingCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationerSetDyingCall) Do(f func(context.Context) error) *MockRelationerSetDyingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationerSetDyingCall) DoAndReturn(f func(context.Context) error) *MockRelationerSetDyingCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/mocks/mock_state_manager.go b/internal/worker/uniter/relation/mocks/mock_state_manager.go index 7bccfbc0a10..18a35ccdcdb 100644 --- a/internal/worker/uniter/relation/mocks/mock_state_manager.go +++ b/internal/worker/uniter/relation/mocks/mock_state_manager.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_state_manager.go github.com/juju/juju/internal/worker/uniter/relation StateManager +// mockgen -typed -package mocks -destination mocks/mock_state_manager.go github.com/juju/juju/internal/worker/uniter/relation StateManager // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockStateManager) KnownIDs() []int { } // KnownIDs indicates an expected call of KnownIDs. -func (mr *MockStateManagerMockRecorder) KnownIDs() *gomock.Call { +func (mr *MockStateManagerMockRecorder) KnownIDs() *MockStateManagerKnownIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KnownIDs", reflect.TypeOf((*MockStateManager)(nil).KnownIDs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KnownIDs", reflect.TypeOf((*MockStateManager)(nil).KnownIDs)) + return &MockStateManagerKnownIDsCall{Call: call} +} + +// MockStateManagerKnownIDsCall wrap *gomock.Call +type MockStateManagerKnownIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateManagerKnownIDsCall) Return(arg0 []int) *MockStateManagerKnownIDsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateManagerKnownIDsCall) Do(f func() []int) *MockStateManagerKnownIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateManagerKnownIDsCall) DoAndReturn(f func() []int) *MockStateManagerKnownIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -64,9 +88,33 @@ func (m *MockStateManager) Relation(arg0 int) (*relation.State, error) { } // Relation indicates an expected call of Relation. -func (mr *MockStateManagerMockRecorder) Relation(arg0 any) *gomock.Call { +func (mr *MockStateManagerMockRecorder) Relation(arg0 any) *MockStateManagerRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockStateManager)(nil).Relation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockStateManager)(nil).Relation), arg0) + return &MockStateManagerRelationCall{Call: call} +} + +// MockStateManagerRelationCall wrap *gomock.Call +type MockStateManagerRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateManagerRelationCall) Return(arg0 *relation.State, arg1 error) *MockStateManagerRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateManagerRelationCall) Do(f func(int) (*relation.State, error)) *MockStateManagerRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateManagerRelationCall) DoAndReturn(f func(int) (*relation.State, error)) *MockStateManagerRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationFound mocks base method. @@ -78,9 +126,33 @@ func (m *MockStateManager) RelationFound(arg0 int) bool { } // RelationFound indicates an expected call of RelationFound. -func (mr *MockStateManagerMockRecorder) RelationFound(arg0 any) *gomock.Call { +func (mr *MockStateManagerMockRecorder) RelationFound(arg0 any) *MockStateManagerRelationFoundCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationFound", reflect.TypeOf((*MockStateManager)(nil).RelationFound), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationFound", reflect.TypeOf((*MockStateManager)(nil).RelationFound), arg0) + return &MockStateManagerRelationFoundCall{Call: call} +} + +// MockStateManagerRelationFoundCall wrap *gomock.Call +type MockStateManagerRelationFoundCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateManagerRelationFoundCall) Return(arg0 bool) *MockStateManagerRelationFoundCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateManagerRelationFoundCall) Do(f func(int) bool) *MockStateManagerRelationFoundCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateManagerRelationFoundCall) DoAndReturn(f func(int) bool) *MockStateManagerRelationFoundCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveRelation mocks base method. @@ -92,9 +164,33 @@ func (m *MockStateManager) RemoveRelation(arg0 context.Context, arg1 int, arg2 r } // RemoveRelation indicates an expected call of RemoveRelation. -func (mr *MockStateManagerMockRecorder) RemoveRelation(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStateManagerMockRecorder) RemoveRelation(arg0, arg1, arg2, arg3 any) *MockStateManagerRemoveRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRelation", reflect.TypeOf((*MockStateManager)(nil).RemoveRelation), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRelation", reflect.TypeOf((*MockStateManager)(nil).RemoveRelation), arg0, arg1, arg2, arg3) + return &MockStateManagerRemoveRelationCall{Call: call} +} + +// MockStateManagerRemoveRelationCall wrap *gomock.Call +type MockStateManagerRemoveRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateManagerRemoveRelationCall) Return(arg0 error) *MockStateManagerRemoveRelationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateManagerRemoveRelationCall) Do(f func(context.Context, int, relation.UnitGetter, map[string]bool) error) *MockStateManagerRemoveRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateManagerRemoveRelationCall) DoAndReturn(f func(context.Context, int, relation.UnitGetter, map[string]bool) error) *MockStateManagerRemoveRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetRelation mocks base method. @@ -106,7 +202,31 @@ func (m *MockStateManager) SetRelation(arg0 *relation.State) error { } // SetRelation indicates an expected call of SetRelation. -func (mr *MockStateManagerMockRecorder) SetRelation(arg0 any) *gomock.Call { +func (mr *MockStateManagerMockRecorder) SetRelation(arg0 any) *MockStateManagerSetRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRelation", reflect.TypeOf((*MockStateManager)(nil).SetRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRelation", reflect.TypeOf((*MockStateManager)(nil).SetRelation), arg0) + return &MockStateManagerSetRelationCall{Call: call} +} + +// MockStateManagerSetRelationCall wrap *gomock.Call +type MockStateManagerSetRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateManagerSetRelationCall) Return(arg0 error) *MockStateManagerSetRelationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateManagerSetRelationCall) Do(f func(*relation.State) error) *MockStateManagerSetRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateManagerSetRelationCall) DoAndReturn(f func(*relation.State) error) *MockStateManagerSetRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/mocks/mock_state_tracker.go b/internal/worker/uniter/relation/mocks/mock_state_tracker.go index d9095df2429..48dd474728a 100644 --- a/internal/worker/uniter/relation/mocks/mock_state_tracker.go +++ b/internal/worker/uniter/relation/mocks/mock_state_tracker.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_state_tracker.go github.com/juju/juju/internal/worker/uniter/relation StateTrackerClient +// mockgen -typed -package mocks -destination mocks/mock_state_tracker.go github.com/juju/juju/internal/worker/uniter/relation StateTrackerClient // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockStateTrackerClient) Relation(arg0 context.Context, arg1 names.Relat } // Relation indicates an expected call of Relation. -func (mr *MockStateTrackerClientMockRecorder) Relation(arg0, arg1 any) *gomock.Call { +func (mr *MockStateTrackerClientMockRecorder) Relation(arg0, arg1 any) *MockStateTrackerClientRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockStateTrackerClient)(nil).Relation), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockStateTrackerClient)(nil).Relation), arg0, arg1) + return &MockStateTrackerClientRelationCall{Call: call} +} + +// MockStateTrackerClientRelationCall wrap *gomock.Call +type MockStateTrackerClientRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerClientRelationCall) Return(arg0 api.Relation, arg1 error) *MockStateTrackerClientRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerClientRelationCall) Do(f func(context.Context, names.RelationTag) (api.Relation, error)) *MockStateTrackerClientRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerClientRelationCall) DoAndReturn(f func(context.Context, names.RelationTag) (api.Relation, error)) *MockStateTrackerClientRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationById mocks base method. @@ -66,9 +90,33 @@ func (m *MockStateTrackerClient) RelationById(arg0 context.Context, arg1 int) (a } // RelationById indicates an expected call of RelationById. -func (mr *MockStateTrackerClientMockRecorder) RelationById(arg0, arg1 any) *gomock.Call { +func (mr *MockStateTrackerClientMockRecorder) RelationById(arg0, arg1 any) *MockStateTrackerClientRelationByIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationById", reflect.TypeOf((*MockStateTrackerClient)(nil).RelationById), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationById", reflect.TypeOf((*MockStateTrackerClient)(nil).RelationById), arg0, arg1) + return &MockStateTrackerClientRelationByIdCall{Call: call} +} + +// MockStateTrackerClientRelationByIdCall wrap *gomock.Call +type MockStateTrackerClientRelationByIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerClientRelationByIdCall) Return(arg0 api.Relation, arg1 error) *MockStateTrackerClientRelationByIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerClientRelationByIdCall) Do(f func(context.Context, int) (api.Relation, error)) *MockStateTrackerClientRelationByIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerClientRelationByIdCall) DoAndReturn(f func(context.Context, int) (api.Relation, error)) *MockStateTrackerClientRelationByIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unit mocks base method. @@ -81,7 +129,31 @@ func (m *MockStateTrackerClient) Unit(arg0 context.Context, arg1 names.UnitTag) } // Unit indicates an expected call of Unit. -func (mr *MockStateTrackerClientMockRecorder) Unit(arg0, arg1 any) *gomock.Call { +func (mr *MockStateTrackerClientMockRecorder) Unit(arg0, arg1 any) *MockStateTrackerClientUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStateTrackerClient)(nil).Unit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockStateTrackerClient)(nil).Unit), arg0, arg1) + return &MockStateTrackerClientUnitCall{Call: call} +} + +// MockStateTrackerClientUnitCall wrap *gomock.Call +type MockStateTrackerClientUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateTrackerClientUnitCall) Return(arg0 api.Unit, arg1 error) *MockStateTrackerClientUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateTrackerClientUnitCall) Do(f func(context.Context, names.UnitTag) (api.Unit, error)) *MockStateTrackerClientUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateTrackerClientUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (api.Unit, error)) *MockStateTrackerClientUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/mocks/mock_statetracker.go b/internal/worker/uniter/relation/mocks/mock_statetracker.go index 1404a4b3a8f..3c1a26000af 100644 --- a/internal/worker/uniter/relation/mocks/mock_statetracker.go +++ b/internal/worker/uniter/relation/mocks/mock_statetracker.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_statetracker.go github.com/juju/juju/internal/worker/uniter/relation RelationStateTracker +// mockgen -typed -package mocks -destination mocks/mock_statetracker.go github.com/juju/juju/internal/worker/uniter/relation RelationStateTracker // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockRelationStateTracker) CommitHook(arg0 context.Context, arg1 hook.In } // CommitHook indicates an expected call of CommitHook. -func (mr *MockRelationStateTrackerMockRecorder) CommitHook(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) CommitHook(arg0, arg1 any) *MockRelationStateTrackerCommitHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockRelationStateTracker)(nil).CommitHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockRelationStateTracker)(nil).CommitHook), arg0, arg1) + return &MockRelationStateTrackerCommitHookCall{Call: call} +} + +// MockRelationStateTrackerCommitHookCall wrap *gomock.Call +type MockRelationStateTrackerCommitHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerCommitHookCall) Return(arg0 error) *MockRelationStateTrackerCommitHookCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerCommitHookCall) Do(f func(context.Context, hook.Info) error) *MockRelationStateTrackerCommitHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerCommitHookCall) DoAndReturn(f func(context.Context, hook.Info) error) *MockRelationStateTrackerCommitHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetInfo mocks base method. @@ -67,9 +91,33 @@ func (m *MockRelationStateTracker) GetInfo() map[int]*context0.RelationInfo { } // GetInfo indicates an expected call of GetInfo. -func (mr *MockRelationStateTrackerMockRecorder) GetInfo() *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) GetInfo() *MockRelationStateTrackerGetInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInfo", reflect.TypeOf((*MockRelationStateTracker)(nil).GetInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInfo", reflect.TypeOf((*MockRelationStateTracker)(nil).GetInfo)) + return &MockRelationStateTrackerGetInfoCall{Call: call} +} + +// MockRelationStateTrackerGetInfoCall wrap *gomock.Call +type MockRelationStateTrackerGetInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerGetInfoCall) Return(arg0 map[int]*context0.RelationInfo) *MockRelationStateTrackerGetInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerGetInfoCall) Do(f func() map[int]*context0.RelationInfo) *MockRelationStateTrackerGetInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerGetInfoCall) DoAndReturn(f func() map[int]*context0.RelationInfo) *MockRelationStateTrackerGetInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasContainerScope mocks base method. @@ -82,9 +130,33 @@ func (m *MockRelationStateTracker) HasContainerScope(arg0 int) (bool, error) { } // HasContainerScope indicates an expected call of HasContainerScope. -func (mr *MockRelationStateTrackerMockRecorder) HasContainerScope(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) HasContainerScope(arg0 any) *MockRelationStateTrackerHasContainerScopeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasContainerScope", reflect.TypeOf((*MockRelationStateTracker)(nil).HasContainerScope), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasContainerScope", reflect.TypeOf((*MockRelationStateTracker)(nil).HasContainerScope), arg0) + return &MockRelationStateTrackerHasContainerScopeCall{Call: call} +} + +// MockRelationStateTrackerHasContainerScopeCall wrap *gomock.Call +type MockRelationStateTrackerHasContainerScopeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerHasContainerScopeCall) Return(arg0 bool, arg1 error) *MockRelationStateTrackerHasContainerScopeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerHasContainerScopeCall) Do(f func(int) (bool, error)) *MockRelationStateTrackerHasContainerScopeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerHasContainerScopeCall) DoAndReturn(f func(int) (bool, error)) *MockRelationStateTrackerHasContainerScopeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsImplicit mocks base method. @@ -97,9 +169,33 @@ func (m *MockRelationStateTracker) IsImplicit(arg0 int) (bool, error) { } // IsImplicit indicates an expected call of IsImplicit. -func (mr *MockRelationStateTrackerMockRecorder) IsImplicit(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) IsImplicit(arg0 any) *MockRelationStateTrackerIsImplicitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImplicit", reflect.TypeOf((*MockRelationStateTracker)(nil).IsImplicit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImplicit", reflect.TypeOf((*MockRelationStateTracker)(nil).IsImplicit), arg0) + return &MockRelationStateTrackerIsImplicitCall{Call: call} +} + +// MockRelationStateTrackerIsImplicitCall wrap *gomock.Call +type MockRelationStateTrackerIsImplicitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerIsImplicitCall) Return(arg0 bool, arg1 error) *MockRelationStateTrackerIsImplicitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerIsImplicitCall) Do(f func(int) (bool, error)) *MockRelationStateTrackerIsImplicitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerIsImplicitCall) DoAndReturn(f func(int) (bool, error)) *MockRelationStateTrackerIsImplicitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsKnown mocks base method. @@ -111,9 +207,33 @@ func (m *MockRelationStateTracker) IsKnown(arg0 int) bool { } // IsKnown indicates an expected call of IsKnown. -func (mr *MockRelationStateTrackerMockRecorder) IsKnown(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) IsKnown(arg0 any) *MockRelationStateTrackerIsKnownCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsKnown", reflect.TypeOf((*MockRelationStateTracker)(nil).IsKnown), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsKnown", reflect.TypeOf((*MockRelationStateTracker)(nil).IsKnown), arg0) + return &MockRelationStateTrackerIsKnownCall{Call: call} +} + +// MockRelationStateTrackerIsKnownCall wrap *gomock.Call +type MockRelationStateTrackerIsKnownCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerIsKnownCall) Return(arg0 bool) *MockRelationStateTrackerIsKnownCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerIsKnownCall) Do(f func(int) bool) *MockRelationStateTrackerIsKnownCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerIsKnownCall) DoAndReturn(f func(int) bool) *MockRelationStateTrackerIsKnownCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsPeerRelation mocks base method. @@ -126,9 +246,33 @@ func (m *MockRelationStateTracker) IsPeerRelation(arg0 int) (bool, error) { } // IsPeerRelation indicates an expected call of IsPeerRelation. -func (mr *MockRelationStateTrackerMockRecorder) IsPeerRelation(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) IsPeerRelation(arg0 any) *MockRelationStateTrackerIsPeerRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPeerRelation", reflect.TypeOf((*MockRelationStateTracker)(nil).IsPeerRelation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPeerRelation", reflect.TypeOf((*MockRelationStateTracker)(nil).IsPeerRelation), arg0) + return &MockRelationStateTrackerIsPeerRelationCall{Call: call} +} + +// MockRelationStateTrackerIsPeerRelationCall wrap *gomock.Call +type MockRelationStateTrackerIsPeerRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerIsPeerRelationCall) Return(arg0 bool, arg1 error) *MockRelationStateTrackerIsPeerRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerIsPeerRelationCall) Do(f func(int) (bool, error)) *MockRelationStateTrackerIsPeerRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerIsPeerRelationCall) DoAndReturn(f func(int) (bool, error)) *MockRelationStateTrackerIsPeerRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalUnitAndApplicationLife mocks base method. @@ -142,9 +286,33 @@ func (m *MockRelationStateTracker) LocalUnitAndApplicationLife(arg0 context.Cont } // LocalUnitAndApplicationLife indicates an expected call of LocalUnitAndApplicationLife. -func (mr *MockRelationStateTrackerMockRecorder) LocalUnitAndApplicationLife(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) LocalUnitAndApplicationLife(arg0 any) *MockRelationStateTrackerLocalUnitAndApplicationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalUnitAndApplicationLife", reflect.TypeOf((*MockRelationStateTracker)(nil).LocalUnitAndApplicationLife), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalUnitAndApplicationLife", reflect.TypeOf((*MockRelationStateTracker)(nil).LocalUnitAndApplicationLife), arg0) + return &MockRelationStateTrackerLocalUnitAndApplicationLifeCall{Call: call} +} + +// MockRelationStateTrackerLocalUnitAndApplicationLifeCall wrap *gomock.Call +type MockRelationStateTrackerLocalUnitAndApplicationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerLocalUnitAndApplicationLifeCall) Return(arg0, arg1 life.Value, arg2 error) *MockRelationStateTrackerLocalUnitAndApplicationLifeCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerLocalUnitAndApplicationLifeCall) Do(f func(context.Context) (life.Value, life.Value, error)) *MockRelationStateTrackerLocalUnitAndApplicationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerLocalUnitAndApplicationLifeCall) DoAndReturn(f func(context.Context) (life.Value, life.Value, error)) *MockRelationStateTrackerLocalUnitAndApplicationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LocalUnitName mocks base method. @@ -156,9 +324,33 @@ func (m *MockRelationStateTracker) LocalUnitName() string { } // LocalUnitName indicates an expected call of LocalUnitName. -func (mr *MockRelationStateTrackerMockRecorder) LocalUnitName() *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) LocalUnitName() *MockRelationStateTrackerLocalUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalUnitName", reflect.TypeOf((*MockRelationStateTracker)(nil).LocalUnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalUnitName", reflect.TypeOf((*MockRelationStateTracker)(nil).LocalUnitName)) + return &MockRelationStateTrackerLocalUnitNameCall{Call: call} +} + +// MockRelationStateTrackerLocalUnitNameCall wrap *gomock.Call +type MockRelationStateTrackerLocalUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerLocalUnitNameCall) Return(arg0 string) *MockRelationStateTrackerLocalUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerLocalUnitNameCall) Do(f func() string) *MockRelationStateTrackerLocalUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerLocalUnitNameCall) DoAndReturn(f func() string) *MockRelationStateTrackerLocalUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -171,9 +363,33 @@ func (m *MockRelationStateTracker) Name(arg0 int) (string, error) { } // Name indicates an expected call of Name. -func (mr *MockRelationStateTrackerMockRecorder) Name(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) Name(arg0 any) *MockRelationStateTrackerNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRelationStateTracker)(nil).Name), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRelationStateTracker)(nil).Name), arg0) + return &MockRelationStateTrackerNameCall{Call: call} +} + +// MockRelationStateTrackerNameCall wrap *gomock.Call +type MockRelationStateTrackerNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerNameCall) Return(arg0 string, arg1 error) *MockRelationStateTrackerNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerNameCall) Do(f func(int) (string, error)) *MockRelationStateTrackerNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerNameCall) DoAndReturn(f func(int) (string, error)) *MockRelationStateTrackerNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareHook mocks base method. @@ -186,9 +402,33 @@ func (m *MockRelationStateTracker) PrepareHook(arg0 hook.Info) (string, error) { } // PrepareHook indicates an expected call of PrepareHook. -func (mr *MockRelationStateTrackerMockRecorder) PrepareHook(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) PrepareHook(arg0 any) *MockRelationStateTrackerPrepareHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockRelationStateTracker)(nil).PrepareHook), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockRelationStateTracker)(nil).PrepareHook), arg0) + return &MockRelationStateTrackerPrepareHookCall{Call: call} +} + +// MockRelationStateTrackerPrepareHookCall wrap *gomock.Call +type MockRelationStateTrackerPrepareHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerPrepareHookCall) Return(arg0 string, arg1 error) *MockRelationStateTrackerPrepareHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerPrepareHookCall) Do(f func(hook.Info) (string, error)) *MockRelationStateTrackerPrepareHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerPrepareHookCall) DoAndReturn(f func(hook.Info) (string, error)) *MockRelationStateTrackerPrepareHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationCreated mocks base method. @@ -200,9 +440,33 @@ func (m *MockRelationStateTracker) RelationCreated(arg0 int) bool { } // RelationCreated indicates an expected call of RelationCreated. -func (mr *MockRelationStateTrackerMockRecorder) RelationCreated(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) RelationCreated(arg0 any) *MockRelationStateTrackerRelationCreatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationCreated", reflect.TypeOf((*MockRelationStateTracker)(nil).RelationCreated), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationCreated", reflect.TypeOf((*MockRelationStateTracker)(nil).RelationCreated), arg0) + return &MockRelationStateTrackerRelationCreatedCall{Call: call} +} + +// MockRelationStateTrackerRelationCreatedCall wrap *gomock.Call +type MockRelationStateTrackerRelationCreatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerRelationCreatedCall) Return(arg0 bool) *MockRelationStateTrackerRelationCreatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerRelationCreatedCall) Do(f func(int) bool) *MockRelationStateTrackerRelationCreatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerRelationCreatedCall) DoAndReturn(f func(int) bool) *MockRelationStateTrackerRelationCreatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplication mocks base method. @@ -214,9 +478,33 @@ func (m *MockRelationStateTracker) RemoteApplication(arg0 int) string { } // RemoteApplication indicates an expected call of RemoteApplication. -func (mr *MockRelationStateTrackerMockRecorder) RemoteApplication(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) RemoteApplication(arg0 any) *MockRelationStateTrackerRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockRelationStateTracker)(nil).RemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplication", reflect.TypeOf((*MockRelationStateTracker)(nil).RemoteApplication), arg0) + return &MockRelationStateTrackerRemoteApplicationCall{Call: call} +} + +// MockRelationStateTrackerRemoteApplicationCall wrap *gomock.Call +type MockRelationStateTrackerRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerRemoteApplicationCall) Return(arg0 string) *MockRelationStateTrackerRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerRemoteApplicationCall) Do(f func(int) string) *MockRelationStateTrackerRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerRemoteApplicationCall) DoAndReturn(f func(int) string) *MockRelationStateTrackerRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -228,9 +516,33 @@ func (m *MockRelationStateTracker) Report() map[string]any { } // Report indicates an expected call of Report. -func (mr *MockRelationStateTrackerMockRecorder) Report() *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) Report() *MockRelationStateTrackerReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockRelationStateTracker)(nil).Report)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockRelationStateTracker)(nil).Report)) + return &MockRelationStateTrackerReportCall{Call: call} +} + +// MockRelationStateTrackerReportCall wrap *gomock.Call +type MockRelationStateTrackerReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerReportCall) Return(arg0 map[string]any) *MockRelationStateTrackerReportCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerReportCall) Do(f func() map[string]any) *MockRelationStateTrackerReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerReportCall) DoAndReturn(f func() map[string]any) *MockRelationStateTrackerReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } // State mocks base method. @@ -243,9 +555,33 @@ func (m *MockRelationStateTracker) State(arg0 int) (*relation.State, error) { } // State indicates an expected call of State. -func (mr *MockRelationStateTrackerMockRecorder) State(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) State(arg0 any) *MockRelationStateTrackerStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockRelationStateTracker)(nil).State), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockRelationStateTracker)(nil).State), arg0) + return &MockRelationStateTrackerStateCall{Call: call} +} + +// MockRelationStateTrackerStateCall wrap *gomock.Call +type MockRelationStateTrackerStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerStateCall) Return(arg0 *relation.State, arg1 error) *MockRelationStateTrackerStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerStateCall) Do(f func(int) (*relation.State, error)) *MockRelationStateTrackerStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerStateCall) DoAndReturn(f func(int) (*relation.State, error)) *MockRelationStateTrackerStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateFound mocks base method. @@ -257,9 +593,33 @@ func (m *MockRelationStateTracker) StateFound(arg0 int) bool { } // StateFound indicates an expected call of StateFound. -func (mr *MockRelationStateTrackerMockRecorder) StateFound(arg0 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) StateFound(arg0 any) *MockRelationStateTrackerStateFoundCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateFound", reflect.TypeOf((*MockRelationStateTracker)(nil).StateFound), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateFound", reflect.TypeOf((*MockRelationStateTracker)(nil).StateFound), arg0) + return &MockRelationStateTrackerStateFoundCall{Call: call} +} + +// MockRelationStateTrackerStateFoundCall wrap *gomock.Call +type MockRelationStateTrackerStateFoundCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerStateFoundCall) Return(arg0 bool) *MockRelationStateTrackerStateFoundCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerStateFoundCall) Do(f func(int) bool) *MockRelationStateTrackerStateFoundCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerStateFoundCall) DoAndReturn(f func(int) bool) *MockRelationStateTrackerStateFoundCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SynchronizeScopes mocks base method. @@ -271,7 +631,31 @@ func (m *MockRelationStateTracker) SynchronizeScopes(arg0 context.Context, arg1 } // SynchronizeScopes indicates an expected call of SynchronizeScopes. -func (mr *MockRelationStateTrackerMockRecorder) SynchronizeScopes(arg0, arg1 any) *gomock.Call { +func (mr *MockRelationStateTrackerMockRecorder) SynchronizeScopes(arg0, arg1 any) *MockRelationStateTrackerSynchronizeScopesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SynchronizeScopes", reflect.TypeOf((*MockRelationStateTracker)(nil).SynchronizeScopes), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SynchronizeScopes", reflect.TypeOf((*MockRelationStateTracker)(nil).SynchronizeScopes), arg0, arg1) + return &MockRelationStateTrackerSynchronizeScopesCall{Call: call} +} + +// MockRelationStateTrackerSynchronizeScopesCall wrap *gomock.Call +type MockRelationStateTrackerSynchronizeScopesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationStateTrackerSynchronizeScopesCall) Return(arg0 error) *MockRelationStateTrackerSynchronizeScopesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationStateTrackerSynchronizeScopesCall) Do(f func(context.Context, remotestate.Snapshot) error) *MockRelationStateTrackerSynchronizeScopesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationStateTrackerSynchronizeScopesCall) DoAndReturn(f func(context.Context, remotestate.Snapshot) error) *MockRelationStateTrackerSynchronizeScopesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/mocks/mock_subordinate_destroyer.go b/internal/worker/uniter/relation/mocks/mock_subordinate_destroyer.go index fca3abae176..ef788eddbcf 100644 --- a/internal/worker/uniter/relation/mocks/mock_subordinate_destroyer.go +++ b/internal/worker/uniter/relation/mocks/mock_subordinate_destroyer.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_subordinate_destroyer.go github.com/juju/juju/internal/worker/uniter/relation SubordinateDestroyer +// mockgen -typed -package mocks -destination mocks/mock_subordinate_destroyer.go github.com/juju/juju/internal/worker/uniter/relation SubordinateDestroyer // // Package mocks is a generated GoMock package. @@ -47,7 +47,31 @@ func (m *MockSubordinateDestroyer) DestroyAllSubordinates() error { } // DestroyAllSubordinates indicates an expected call of DestroyAllSubordinates. -func (mr *MockSubordinateDestroyerMockRecorder) DestroyAllSubordinates() *gomock.Call { +func (mr *MockSubordinateDestroyerMockRecorder) DestroyAllSubordinates() *MockSubordinateDestroyerDestroyAllSubordinatesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllSubordinates", reflect.TypeOf((*MockSubordinateDestroyer)(nil).DestroyAllSubordinates)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyAllSubordinates", reflect.TypeOf((*MockSubordinateDestroyer)(nil).DestroyAllSubordinates)) + return &MockSubordinateDestroyerDestroyAllSubordinatesCall{Call: call} +} + +// MockSubordinateDestroyerDestroyAllSubordinatesCall wrap *gomock.Call +type MockSubordinateDestroyerDestroyAllSubordinatesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubordinateDestroyerDestroyAllSubordinatesCall) Return(arg0 error) *MockSubordinateDestroyerDestroyAllSubordinatesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubordinateDestroyerDestroyAllSubordinatesCall) Do(f func() error) *MockSubordinateDestroyerDestroyAllSubordinatesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubordinateDestroyerDestroyAllSubordinatesCall) DoAndReturn(f func() error) *MockSubordinateDestroyerDestroyAllSubordinatesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/mocks/mock_unit_getter.go b/internal/worker/uniter/relation/mocks/mock_unit_getter.go index efc146fad14..4c697221ec4 100644 --- a/internal/worker/uniter/relation/mocks/mock_unit_getter.go +++ b/internal/worker/uniter/relation/mocks/mock_unit_getter.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mock_unit_getter.go github.com/juju/juju/internal/worker/uniter/relation UnitGetter +// mockgen -typed -package mocks -destination mocks/mock_unit_getter.go github.com/juju/juju/internal/worker/uniter/relation UnitGetter // // Package mocks is a generated GoMock package. @@ -51,7 +51,31 @@ func (m *MockUnitGetter) Unit(arg0 context.Context, arg1 names.UnitTag) (api.Uni } // Unit indicates an expected call of Unit. -func (mr *MockUnitGetterMockRecorder) Unit(arg0, arg1 any) *gomock.Call { +func (mr *MockUnitGetterMockRecorder) Unit(arg0, arg1 any) *MockUnitGetterUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUnitGetter)(nil).Unit), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUnitGetter)(nil).Unit), arg0, arg1) + return &MockUnitGetterUnitCall{Call: call} +} + +// MockUnitGetterUnitCall wrap *gomock.Call +type MockUnitGetterUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitGetterUnitCall) Return(arg0 api.Unit, arg1 error) *MockUnitGetterUnitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitGetterUnitCall) Do(f func(context.Context, names.UnitTag) (api.Unit, error)) *MockUnitGetterUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitGetterUnitCall) DoAndReturn(f func(context.Context, names.UnitTag) (api.Unit, error)) *MockUnitGetterUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/relation/package_test.go b/internal/worker/uniter/relation/package_test.go index 655b3027f40..8ea3fe2ebd6 100644 --- a/internal/worker/uniter/relation/package_test.go +++ b/internal/worker/uniter/relation/package_test.go @@ -13,9 +13,9 @@ func TestPackage(t *stdtesting.T) { gc.TestingT(t) } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_statetracker.go github.com/juju/juju/internal/worker/uniter/relation RelationStateTracker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_relationer.go github.com/juju/juju/internal/worker/uniter/relation Relationer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_subordinate_destroyer.go github.com/juju/juju/internal/worker/uniter/relation SubordinateDestroyer -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_state_tracker.go github.com/juju/juju/internal/worker/uniter/relation StateTrackerClient -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_state_manager.go github.com/juju/juju/internal/worker/uniter/relation StateManager -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mock_unit_getter.go github.com/juju/juju/internal/worker/uniter/relation UnitGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_statetracker.go github.com/juju/juju/internal/worker/uniter/relation RelationStateTracker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_relationer.go github.com/juju/juju/internal/worker/uniter/relation Relationer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_subordinate_destroyer.go github.com/juju/juju/internal/worker/uniter/relation SubordinateDestroyer +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_state_tracker.go github.com/juju/juju/internal/worker/uniter/relation StateTrackerClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_state_manager.go github.com/juju/juju/internal/worker/uniter/relation StateManager +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mock_unit_getter.go github.com/juju/juju/internal/worker/uniter/relation UnitGetter diff --git a/internal/worker/uniter/relation/statetracker_test.go b/internal/worker/uniter/relation/statetracker_test.go index 44a8b6ebcf9..a700648d8fd 100644 --- a/internal/worker/uniter/relation/statetracker_test.go +++ b/internal/worker/uniter/relation/statetracker_test.go @@ -20,6 +20,7 @@ import ( "github.com/juju/juju/api/agent/uniter" "github.com/juju/juju/core/life" corerelation "github.com/juju/juju/core/relation" + "github.com/juju/juju/core/watcher" "github.com/juju/juju/core/watcher/watchertest" "github.com/juju/juju/internal/worker/uniter/api" "github.com/juju/juju/internal/worker/uniter/hook" @@ -708,7 +709,9 @@ func (s *baseStateTrackerSuite) expectRelationsStatus(status []uniter.RelationSt } func (s *baseStateTrackerSuite) expectWatch(c *gc.C) { - do := func() { + s.unitChanges = make(chan struct{}) + s.watcher = watchertest.NewMockNotifyWatcher(s.unitChanges) + s.unit.EXPECT().Watch().DoAndReturn(func() (watcher.Watcher[struct{}], error) { go func() { select { case s.unitChanges <- struct{}{}: @@ -716,10 +719,8 @@ func (s *baseStateTrackerSuite) expectWatch(c *gc.C) { c.Fatal("timed out unit change") } }() - } - s.unitChanges = make(chan struct{}) - s.watcher = watchertest.NewMockNotifyWatcher(s.unitChanges) - s.unit.EXPECT().Watch().Return(s.watcher, nil).Do(do) + return s.watcher, nil + }) } func (s *baseStateTrackerSuite) newStateTracker(c *gc.C) relation.RelationStateTracker { diff --git a/internal/worker/uniter/runner/context/mocks/leadership_mock.go b/internal/worker/uniter/runner/context/mocks/leadership_mock.go index 37f81ff4fde..0a1b47eb576 100644 --- a/internal/worker/uniter/runner/context/mocks/leadership_mock.go +++ b/internal/worker/uniter/runner/context/mocks/leadership_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/internal/worker/uniter/runner/context LeadershipContext +// mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/internal/worker/uniter/runner/context LeadershipContext // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockLeadershipContext) IsLeader() (bool, error) { } // IsLeader indicates an expected call of IsLeader. -func (mr *MockLeadershipContextMockRecorder) IsLeader() *gomock.Call { +func (mr *MockLeadershipContextMockRecorder) IsLeader() *MockLeadershipContextIsLeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockLeadershipContext)(nil).IsLeader)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockLeadershipContext)(nil).IsLeader)) + return &MockLeadershipContextIsLeaderCall{Call: call} +} + +// MockLeadershipContextIsLeaderCall wrap *gomock.Call +type MockLeadershipContextIsLeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipContextIsLeaderCall) Return(arg0 bool, arg1 error) *MockLeadershipContextIsLeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipContextIsLeaderCall) Do(f func() (bool, error)) *MockLeadershipContextIsLeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipContextIsLeaderCall) DoAndReturn(f func() (bool, error)) *MockLeadershipContextIsLeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeaderSettings mocks base method. @@ -63,9 +87,33 @@ func (m *MockLeadershipContext) LeaderSettings() (map[string]string, error) { } // LeaderSettings indicates an expected call of LeaderSettings. -func (mr *MockLeadershipContextMockRecorder) LeaderSettings() *gomock.Call { +func (mr *MockLeadershipContextMockRecorder) LeaderSettings() *MockLeadershipContextLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockLeadershipContext)(nil).LeaderSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockLeadershipContext)(nil).LeaderSettings)) + return &MockLeadershipContextLeaderSettingsCall{Call: call} +} + +// MockLeadershipContextLeaderSettingsCall wrap *gomock.Call +type MockLeadershipContextLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipContextLeaderSettingsCall) Return(arg0 map[string]string, arg1 error) *MockLeadershipContextLeaderSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipContextLeaderSettingsCall) Do(f func() (map[string]string, error)) *MockLeadershipContextLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipContextLeaderSettingsCall) DoAndReturn(f func() (map[string]string, error)) *MockLeadershipContextLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteLeaderSettings mocks base method. @@ -77,7 +125,31 @@ func (m *MockLeadershipContext) WriteLeaderSettings(arg0 map[string]string) erro } // WriteLeaderSettings indicates an expected call of WriteLeaderSettings. -func (mr *MockLeadershipContextMockRecorder) WriteLeaderSettings(arg0 any) *gomock.Call { +func (mr *MockLeadershipContextMockRecorder) WriteLeaderSettings(arg0 any) *MockLeadershipContextWriteLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockLeadershipContext)(nil).WriteLeaderSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockLeadershipContext)(nil).WriteLeaderSettings), arg0) + return &MockLeadershipContextWriteLeaderSettingsCall{Call: call} +} + +// MockLeadershipContextWriteLeaderSettingsCall wrap *gomock.Call +type MockLeadershipContextWriteLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLeadershipContextWriteLeaderSettingsCall) Return(arg0 error) *MockLeadershipContextWriteLeaderSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLeadershipContextWriteLeaderSettingsCall) Do(f func(map[string]string) error) *MockLeadershipContextWriteLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLeadershipContextWriteLeaderSettingsCall) DoAndReturn(f func(map[string]string) error) *MockLeadershipContextWriteLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/context/mocks/payload_mock.go b/internal/worker/uniter/runner/context/mocks/payload_mock.go index 4745c719c5e..f214131c9cd 100644 --- a/internal/worker/uniter/runner/context/mocks/payload_mock.go +++ b/internal/worker/uniter/runner/context/mocks/payload_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ../mocks/payload_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/payloads PayloadAPIClient +// mockgen -typed -package mocks -destination ../mocks/payload_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/payloads PayloadAPIClient // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockPayloadAPIClient) List(arg0 ...string) ([]payloads.Result, error) { } // List indicates an expected call of List. -func (mr *MockPayloadAPIClientMockRecorder) List(arg0 ...any) *gomock.Call { +func (mr *MockPayloadAPIClientMockRecorder) List(arg0 ...any) *MockPayloadAPIClientListCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPayloadAPIClient)(nil).List), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPayloadAPIClient)(nil).List), arg0...) + return &MockPayloadAPIClientListCall{Call: call} +} + +// MockPayloadAPIClientListCall wrap *gomock.Call +type MockPayloadAPIClientListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPayloadAPIClientListCall) Return(arg0 []payloads.Result, arg1 error) *MockPayloadAPIClientListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPayloadAPIClientListCall) Do(f func(...string) ([]payloads.Result, error)) *MockPayloadAPIClientListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPayloadAPIClientListCall) DoAndReturn(f func(...string) ([]payloads.Result, error)) *MockPayloadAPIClientListCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -72,10 +96,34 @@ func (m *MockPayloadAPIClient) SetStatus(arg0 string, arg1 ...string) ([]payload } // SetStatus indicates an expected call of SetStatus. -func (mr *MockPayloadAPIClientMockRecorder) SetStatus(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockPayloadAPIClientMockRecorder) SetStatus(arg0 any, arg1 ...any) *MockPayloadAPIClientSetStatusCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockPayloadAPIClient)(nil).SetStatus), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockPayloadAPIClient)(nil).SetStatus), varargs...) + return &MockPayloadAPIClientSetStatusCall{Call: call} +} + +// MockPayloadAPIClientSetStatusCall wrap *gomock.Call +type MockPayloadAPIClientSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPayloadAPIClientSetStatusCall) Return(arg0 []payloads.Result, arg1 error) *MockPayloadAPIClientSetStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPayloadAPIClientSetStatusCall) Do(f func(string, ...string) ([]payloads.Result, error)) *MockPayloadAPIClientSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPayloadAPIClientSetStatusCall) DoAndReturn(f func(string, ...string) ([]payloads.Result, error)) *MockPayloadAPIClientSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Track mocks base method. @@ -92,9 +140,33 @@ func (m *MockPayloadAPIClient) Track(arg0 ...payloads.Payload) ([]payloads.Resul } // Track indicates an expected call of Track. -func (mr *MockPayloadAPIClientMockRecorder) Track(arg0 ...any) *gomock.Call { +func (mr *MockPayloadAPIClientMockRecorder) Track(arg0 ...any) *MockPayloadAPIClientTrackCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Track", reflect.TypeOf((*MockPayloadAPIClient)(nil).Track), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Track", reflect.TypeOf((*MockPayloadAPIClient)(nil).Track), arg0...) + return &MockPayloadAPIClientTrackCall{Call: call} +} + +// MockPayloadAPIClientTrackCall wrap *gomock.Call +type MockPayloadAPIClientTrackCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPayloadAPIClientTrackCall) Return(arg0 []payloads.Result, arg1 error) *MockPayloadAPIClientTrackCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPayloadAPIClientTrackCall) Do(f func(...payloads.Payload) ([]payloads.Result, error)) *MockPayloadAPIClientTrackCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPayloadAPIClientTrackCall) DoAndReturn(f func(...payloads.Payload) ([]payloads.Result, error)) *MockPayloadAPIClientTrackCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Untrack mocks base method. @@ -111,7 +183,31 @@ func (m *MockPayloadAPIClient) Untrack(arg0 ...string) ([]payloads.Result, error } // Untrack indicates an expected call of Untrack. -func (mr *MockPayloadAPIClientMockRecorder) Untrack(arg0 ...any) *gomock.Call { +func (mr *MockPayloadAPIClientMockRecorder) Untrack(arg0 ...any) *MockPayloadAPIClientUntrackCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrack", reflect.TypeOf((*MockPayloadAPIClient)(nil).Untrack), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrack", reflect.TypeOf((*MockPayloadAPIClient)(nil).Untrack), arg0...) + return &MockPayloadAPIClientUntrackCall{Call: call} +} + +// MockPayloadAPIClientUntrackCall wrap *gomock.Call +type MockPayloadAPIClientUntrackCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPayloadAPIClientUntrackCall) Return(arg0 []payloads.Result, arg1 error) *MockPayloadAPIClientUntrackCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPayloadAPIClientUntrackCall) Do(f func(...string) ([]payloads.Result, error)) *MockPayloadAPIClientUntrackCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPayloadAPIClientUntrackCall) DoAndReturn(f func(...string) ([]payloads.Result, error)) *MockPayloadAPIClientUntrackCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/context/mocks/resource_mock.go b/internal/worker/uniter/runner/context/mocks/resource_mock.go index 61980803920..09b84a0de68 100644 --- a/internal/worker/uniter/runner/context/mocks/resource_mock.go +++ b/internal/worker/uniter/runner/context/mocks/resource_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination ../mocks/resource_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/resources OpenedResourceClient +// mockgen -typed -package mocks -destination ../mocks/resource_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/resources OpenedResourceClient // // Package mocks is a generated GoMock package. @@ -52,7 +52,31 @@ func (m *MockOpenedResourceClient) GetResource(arg0 context.Context, arg1 string } // GetResource indicates an expected call of GetResource. -func (mr *MockOpenedResourceClientMockRecorder) GetResource(arg0, arg1 any) *gomock.Call { +func (mr *MockOpenedResourceClientMockRecorder) GetResource(arg0, arg1 any) *MockOpenedResourceClientGetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockOpenedResourceClient)(nil).GetResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockOpenedResourceClient)(nil).GetResource), arg0, arg1) + return &MockOpenedResourceClientGetResourceCall{Call: call} +} + +// MockOpenedResourceClientGetResourceCall wrap *gomock.Call +type MockOpenedResourceClientGetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOpenedResourceClientGetResourceCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockOpenedResourceClientGetResourceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOpenedResourceClientGetResourceCall) Do(f func(context.Context, string) (resources.Resource, io.ReadCloser, error)) *MockOpenedResourceClientGetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOpenedResourceClientGetResourceCall) DoAndReturn(f func(context.Context, string) (resources.Resource, io.ReadCloser, error)) *MockOpenedResourceClientGetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/context/package_test.go b/internal/worker/uniter/runner/context/package_test.go index e27a834c1a9..b905aefd63f 100644 --- a/internal/worker/uniter/runner/context/package_test.go +++ b/internal/worker/uniter/runner/context/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/internal/worker/uniter/runner/context LeadershipContext +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/leadership_mock.go github.com/juju/juju/internal/worker/uniter/runner/context LeadershipContext func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/runner/context/payloads/package_test.go b/internal/worker/uniter/runner/context/payloads/package_test.go index 86e69388267..c1b44b67b81 100644 --- a/internal/worker/uniter/runner/context/payloads/package_test.go +++ b/internal/worker/uniter/runner/context/payloads/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ../mocks/payload_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/payloads PayloadAPIClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ../mocks/payload_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/payloads PayloadAPIClient func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/runner/context/resources/package_test.go b/internal/worker/uniter/runner/context/resources/package_test.go index ad611fb7e80..48c70dbd4fd 100644 --- a/internal/worker/uniter/runner/context/resources/package_test.go +++ b/internal/worker/uniter/runner/context/resources/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination ../mocks/resource_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/resources OpenedResourceClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination ../mocks/resource_mock.go github.com/juju/juju/internal/worker/uniter/runner/context/resources OpenedResourceClient func Test(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/uniter/runner/jujuc/context.go b/internal/worker/uniter/runner/jujuc/context.go index e256a0143f1..d2ec60a1915 100644 --- a/internal/worker/uniter/runner/jujuc/context.go +++ b/internal/worker/uniter/runner/jujuc/context.go @@ -28,7 +28,7 @@ import ( // Context is the interface that all hook helper commands // depend on to interact with the rest of the system. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc Context +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc Context type Context interface { HookContext relationHookContext @@ -350,7 +350,7 @@ type ContextRelations interface { // ContextRelation expresses the capabilities of a hook with respect to a relation. // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/context_relation_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc ContextRelation +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/context_relation_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc ContextRelation type ContextRelation interface { // Id returns an integer which uniquely identifies the relation. diff --git a/internal/worker/uniter/runner/jujuc/juju-log.go b/internal/worker/uniter/runner/jujuc/juju-log.go index 2a7eaef1306..8237de0c00b 100644 --- a/internal/worker/uniter/runner/jujuc/juju-log.go +++ b/internal/worker/uniter/runner/jujuc/juju-log.go @@ -17,7 +17,7 @@ import ( // JujuLogContext is the Context for the JujuLogCommand // -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/juju-log_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc JujuLogContext +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/juju-log_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc JujuLogContext type JujuLogContext interface { UnitName() string HookRelation() (ContextRelation, error) diff --git a/internal/worker/uniter/runner/jujuc/mocks/context_mock.go b/internal/worker/uniter/runner/jujuc/mocks/context_mock.go index 29b466d0c9d..032de39596e 100644 --- a/internal/worker/uniter/runner/jujuc/mocks/context_mock.go +++ b/internal/worker/uniter/runner/jujuc/mocks/context_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc Context +// mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc Context // // Package mocks is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockContext) ActionParams() (map[string]any, error) { } // ActionParams indicates an expected call of ActionParams. -func (mr *MockContextMockRecorder) ActionParams() *gomock.Call { +func (mr *MockContextMockRecorder) ActionParams() *MockContextActionParamsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionParams", reflect.TypeOf((*MockContext)(nil).ActionParams)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionParams", reflect.TypeOf((*MockContext)(nil).ActionParams)) + return &MockContextActionParamsCall{Call: call} +} + +// MockContextActionParamsCall wrap *gomock.Call +type MockContextActionParamsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextActionParamsCall) Return(arg0 map[string]any, arg1 error) *MockContextActionParamsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextActionParamsCall) Do(f func() (map[string]any, error)) *MockContextActionParamsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextActionParamsCall) DoAndReturn(f func() (map[string]any, error)) *MockContextActionParamsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUnitStorage mocks base method. @@ -72,9 +96,33 @@ func (m *MockContext) AddUnitStorage(arg0 map[string]params.StorageDirectives) e } // AddUnitStorage indicates an expected call of AddUnitStorage. -func (mr *MockContextMockRecorder) AddUnitStorage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) AddUnitStorage(arg0 any) *MockContextAddUnitStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnitStorage", reflect.TypeOf((*MockContext)(nil).AddUnitStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnitStorage", reflect.TypeOf((*MockContext)(nil).AddUnitStorage), arg0) + return &MockContextAddUnitStorageCall{Call: call} +} + +// MockContextAddUnitStorageCall wrap *gomock.Call +type MockContextAddUnitStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAddUnitStorageCall) Return(arg0 error) *MockContextAddUnitStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAddUnitStorageCall) Do(f func(map[string]params.StorageDirectives) error) *MockContextAddUnitStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAddUnitStorageCall) DoAndReturn(f func(map[string]params.StorageDirectives) error) *MockContextAddUnitStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationStatus mocks base method. @@ -87,9 +135,33 @@ func (m *MockContext) ApplicationStatus(arg0 context.Context) (jujuc.Application } // ApplicationStatus indicates an expected call of ApplicationStatus. -func (mr *MockContextMockRecorder) ApplicationStatus(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) ApplicationStatus(arg0 any) *MockContextApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationStatus", reflect.TypeOf((*MockContext)(nil).ApplicationStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationStatus", reflect.TypeOf((*MockContext)(nil).ApplicationStatus), arg0) + return &MockContextApplicationStatusCall{Call: call} +} + +// MockContextApplicationStatusCall wrap *gomock.Call +type MockContextApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextApplicationStatusCall) Return(arg0 jujuc.ApplicationStatusInfo, arg1 error) *MockContextApplicationStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextApplicationStatusCall) Do(f func(context.Context) (jujuc.ApplicationStatusInfo, error)) *MockContextApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextApplicationStatusCall) DoAndReturn(f func(context.Context) (jujuc.ApplicationStatusInfo, error)) *MockContextApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AvailabilityZone mocks base method. @@ -102,9 +174,33 @@ func (m *MockContext) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockContextMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockContextMockRecorder) AvailabilityZone() *MockContextAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContext)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContext)(nil).AvailabilityZone)) + return &MockContextAvailabilityZoneCall{Call: call} +} + +// MockContextAvailabilityZoneCall wrap *gomock.Call +type MockContextAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockContextAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAvailabilityZoneCall) Do(f func() (string, error)) *MockContextAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockContextAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClosePortRange mocks base method. @@ -116,9 +212,33 @@ func (m *MockContext) ClosePortRange(arg0 string, arg1 network.PortRange) error } // ClosePortRange indicates an expected call of ClosePortRange. -func (mr *MockContextMockRecorder) ClosePortRange(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) ClosePortRange(arg0, arg1 any) *MockContextClosePortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePortRange", reflect.TypeOf((*MockContext)(nil).ClosePortRange), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePortRange", reflect.TypeOf((*MockContext)(nil).ClosePortRange), arg0, arg1) + return &MockContextClosePortRangeCall{Call: call} +} + +// MockContextClosePortRangeCall wrap *gomock.Call +type MockContextClosePortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextClosePortRangeCall) Return(arg0 error) *MockContextClosePortRangeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextClosePortRangeCall) Do(f func(string, network.PortRange) error) *MockContextClosePortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextClosePortRangeCall) DoAndReturn(f func(string, network.PortRange) error) *MockContextClosePortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -131,9 +251,33 @@ func (m *MockContext) CloudSpec(arg0 context.Context) (*params.CloudSpec, error) } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockContextMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) CloudSpec(arg0 any) *MockContextCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockContext)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockContext)(nil).CloudSpec), arg0) + return &MockContextCloudSpecCall{Call: call} +} + +// MockContextCloudSpecCall wrap *gomock.Call +type MockContextCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextCloudSpecCall) Return(arg0 *params.CloudSpec, arg1 error) *MockContextCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextCloudSpecCall) Do(f func(context.Context) (*params.CloudSpec, error)) *MockContextCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextCloudSpecCall) DoAndReturn(f func(context.Context) (*params.CloudSpec, error)) *MockContextCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConfigSettings mocks base method. @@ -146,9 +290,33 @@ func (m *MockContext) ConfigSettings() (charm.Settings, error) { } // ConfigSettings indicates an expected call of ConfigSettings. -func (mr *MockContextMockRecorder) ConfigSettings() *gomock.Call { +func (mr *MockContextMockRecorder) ConfigSettings() *MockContextConfigSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockContext)(nil).ConfigSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockContext)(nil).ConfigSettings)) + return &MockContextConfigSettingsCall{Call: call} +} + +// MockContextConfigSettingsCall wrap *gomock.Call +type MockContextConfigSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextConfigSettingsCall) Return(arg0 charm.Settings, arg1 error) *MockContextConfigSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextConfigSettingsCall) Do(f func() (charm.Settings, error)) *MockContextConfigSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextConfigSettingsCall) DoAndReturn(f func() (charm.Settings, error)) *MockContextConfigSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecret mocks base method. @@ -161,9 +329,33 @@ func (m *MockContext) CreateSecret(arg0 *jujuc.SecretCreateArgs) (*secrets.URI, } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockContextMockRecorder) CreateSecret(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) CreateSecret(arg0 any) *MockContextCreateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockContext)(nil).CreateSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockContext)(nil).CreateSecret), arg0) + return &MockContextCreateSecretCall{Call: call} +} + +// MockContextCreateSecretCall wrap *gomock.Call +type MockContextCreateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextCreateSecretCall) Return(arg0 *secrets.URI, arg1 error) *MockContextCreateSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextCreateSecretCall) Do(f func(*jujuc.SecretCreateArgs) (*secrets.URI, error)) *MockContextCreateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextCreateSecretCall) DoAndReturn(f func(*jujuc.SecretCreateArgs) (*secrets.URI, error)) *MockContextCreateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCharmStateValue mocks base method. @@ -175,9 +367,33 @@ func (m *MockContext) DeleteCharmStateValue(arg0 string) error { } // DeleteCharmStateValue indicates an expected call of DeleteCharmStateValue. -func (mr *MockContextMockRecorder) DeleteCharmStateValue(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) DeleteCharmStateValue(arg0 any) *MockContextDeleteCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCharmStateValue", reflect.TypeOf((*MockContext)(nil).DeleteCharmStateValue), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCharmStateValue", reflect.TypeOf((*MockContext)(nil).DeleteCharmStateValue), arg0) + return &MockContextDeleteCharmStateValueCall{Call: call} +} + +// MockContextDeleteCharmStateValueCall wrap *gomock.Call +type MockContextDeleteCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDeleteCharmStateValueCall) Return(arg0 error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDeleteCharmStateValueCall) Do(f func(string) error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDeleteCharmStateValueCall) DoAndReturn(f func(string) error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DownloadResource mocks base method. @@ -190,9 +406,33 @@ func (m *MockContext) DownloadResource(arg0 context.Context, arg1 string) (strin } // DownloadResource indicates an expected call of DownloadResource. -func (mr *MockContextMockRecorder) DownloadResource(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) DownloadResource(arg0, arg1 any) *MockContextDownloadResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockContext)(nil).DownloadResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockContext)(nil).DownloadResource), arg0, arg1) + return &MockContextDownloadResourceCall{Call: call} +} + +// MockContextDownloadResourceCall wrap *gomock.Call +type MockContextDownloadResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDownloadResourceCall) Return(arg0 string, arg1 error) *MockContextDownloadResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDownloadResourceCall) Do(f func(context.Context, string) (string, error)) *MockContextDownloadResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDownloadResourceCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockContextDownloadResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FlushPayloads mocks base method. @@ -204,9 +444,33 @@ func (m *MockContext) FlushPayloads() error { } // FlushPayloads indicates an expected call of FlushPayloads. -func (mr *MockContextMockRecorder) FlushPayloads() *gomock.Call { +func (mr *MockContextMockRecorder) FlushPayloads() *MockContextFlushPayloadsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushPayloads", reflect.TypeOf((*MockContext)(nil).FlushPayloads)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushPayloads", reflect.TypeOf((*MockContext)(nil).FlushPayloads)) + return &MockContextFlushPayloadsCall{Call: call} +} + +// MockContextFlushPayloadsCall wrap *gomock.Call +type MockContextFlushPayloadsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextFlushPayloadsCall) Return(arg0 error) *MockContextFlushPayloadsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextFlushPayloadsCall) Do(f func() error) *MockContextFlushPayloadsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextFlushPayloadsCall) DoAndReturn(f func() error) *MockContextFlushPayloadsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmState mocks base method. @@ -219,9 +483,33 @@ func (m *MockContext) GetCharmState() (map[string]string, error) { } // GetCharmState indicates an expected call of GetCharmState. -func (mr *MockContextMockRecorder) GetCharmState() *gomock.Call { +func (mr *MockContextMockRecorder) GetCharmState() *MockContextGetCharmStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmState", reflect.TypeOf((*MockContext)(nil).GetCharmState)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmState", reflect.TypeOf((*MockContext)(nil).GetCharmState)) + return &MockContextGetCharmStateCall{Call: call} +} + +// MockContextGetCharmStateCall wrap *gomock.Call +type MockContextGetCharmStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetCharmStateCall) Return(arg0 map[string]string, arg1 error) *MockContextGetCharmStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetCharmStateCall) Do(f func() (map[string]string, error)) *MockContextGetCharmStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetCharmStateCall) DoAndReturn(f func() (map[string]string, error)) *MockContextGetCharmStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmStateValue mocks base method. @@ -234,9 +522,33 @@ func (m *MockContext) GetCharmStateValue(arg0 string) (string, error) { } // GetCharmStateValue indicates an expected call of GetCharmStateValue. -func (mr *MockContextMockRecorder) GetCharmStateValue(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetCharmStateValue(arg0 any) *MockContextGetCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmStateValue", reflect.TypeOf((*MockContext)(nil).GetCharmStateValue), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmStateValue", reflect.TypeOf((*MockContext)(nil).GetCharmStateValue), arg0) + return &MockContextGetCharmStateValueCall{Call: call} +} + +// MockContextGetCharmStateValueCall wrap *gomock.Call +type MockContextGetCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetCharmStateValueCall) Return(arg0 string, arg1 error) *MockContextGetCharmStateValueCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetCharmStateValueCall) Do(f func(string) (string, error)) *MockContextGetCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetCharmStateValueCall) DoAndReturn(f func(string) (string, error)) *MockContextGetCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetLogger mocks base method. @@ -248,9 +560,33 @@ func (m *MockContext) GetLogger(arg0 string) loggo.Logger { } // GetLogger indicates an expected call of GetLogger. -func (mr *MockContextMockRecorder) GetLogger(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetLogger(arg0 any) *MockContextGetLoggerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockContext)(nil).GetLogger), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockContext)(nil).GetLogger), arg0) + return &MockContextGetLoggerCall{Call: call} +} + +// MockContextGetLoggerCall wrap *gomock.Call +type MockContextGetLoggerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetLoggerCall) Return(arg0 loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetLoggerCall) Do(f func(string) loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetLoggerCall) DoAndReturn(f func(string) loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPayload mocks base method. @@ -263,9 +599,33 @@ func (m *MockContext) GetPayload(arg0, arg1 string) (*payloads.Payload, error) { } // GetPayload indicates an expected call of GetPayload. -func (mr *MockContextMockRecorder) GetPayload(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetPayload(arg0, arg1 any) *MockContextGetPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayload", reflect.TypeOf((*MockContext)(nil).GetPayload), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayload", reflect.TypeOf((*MockContext)(nil).GetPayload), arg0, arg1) + return &MockContextGetPayloadCall{Call: call} +} + +// MockContextGetPayloadCall wrap *gomock.Call +type MockContextGetPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetPayloadCall) Return(arg0 *payloads.Payload, arg1 error) *MockContextGetPayloadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetPayloadCall) Do(f func(string, string) (*payloads.Payload, error)) *MockContextGetPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetPayloadCall) DoAndReturn(f func(string, string) (*payloads.Payload, error)) *MockContextGetPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecret mocks base method. @@ -278,9 +638,33 @@ func (m *MockContext) GetSecret(arg0 *secrets.URI, arg1 string, arg2, arg3 bool) } // GetSecret indicates an expected call of GetSecret. -func (mr *MockContextMockRecorder) GetSecret(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetSecret(arg0, arg1, arg2, arg3 any) *MockContextGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockContext)(nil).GetSecret), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockContext)(nil).GetSecret), arg0, arg1, arg2, arg3) + return &MockContextGetSecretCall{Call: call} +} + +// MockContextGetSecretCall wrap *gomock.Call +type MockContextGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetSecretCall) Return(arg0 secrets.SecretValue, arg1 error) *MockContextGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetSecretCall) Do(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockContextGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetSecretCall) DoAndReturn(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockContextGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GoalState mocks base method. @@ -293,9 +677,33 @@ func (m *MockContext) GoalState(arg0 context.Context) (*application.GoalState, e } // GoalState indicates an expected call of GoalState. -func (mr *MockContextMockRecorder) GoalState(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GoalState(arg0 any) *MockContextGoalStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockContext)(nil).GoalState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockContext)(nil).GoalState), arg0) + return &MockContextGoalStateCall{Call: call} +} + +// MockContextGoalStateCall wrap *gomock.Call +type MockContextGoalStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGoalStateCall) Return(arg0 *application.GoalState, arg1 error) *MockContextGoalStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGoalStateCall) Do(f func(context.Context) (*application.GoalState, error)) *MockContextGoalStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGoalStateCall) DoAndReturn(f func(context.Context) (*application.GoalState, error)) *MockContextGoalStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecret mocks base method. @@ -307,9 +715,33 @@ func (m *MockContext) GrantSecret(arg0 *secrets.URI, arg1 *jujuc.SecretGrantRevo } // GrantSecret indicates an expected call of GrantSecret. -func (mr *MockContextMockRecorder) GrantSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) GrantSecret(arg0, arg1 any) *MockContextGrantSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockContext)(nil).GrantSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockContext)(nil).GrantSecret), arg0, arg1) + return &MockContextGrantSecretCall{Call: call} +} + +// MockContextGrantSecretCall wrap *gomock.Call +type MockContextGrantSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGrantSecretCall) Return(arg0 error) *MockContextGrantSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGrantSecretCall) Do(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextGrantSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGrantSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextGrantSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookRelation mocks base method. @@ -322,9 +754,33 @@ func (m *MockContext) HookRelation() (jujuc.ContextRelation, error) { } // HookRelation indicates an expected call of HookRelation. -func (mr *MockContextMockRecorder) HookRelation() *gomock.Call { +func (mr *MockContextMockRecorder) HookRelation() *MockContextHookRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockContext)(nil).HookRelation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockContext)(nil).HookRelation)) + return &MockContextHookRelationCall{Call: call} +} + +// MockContextHookRelationCall wrap *gomock.Call +type MockContextHookRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHookRelationCall) Return(arg0 jujuc.ContextRelation, arg1 error) *MockContextHookRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHookRelationCall) Do(f func() (jujuc.ContextRelation, error)) *MockContextHookRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHookRelationCall) DoAndReturn(f func() (jujuc.ContextRelation, error)) *MockContextHookRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookStorage mocks base method. @@ -337,9 +793,33 @@ func (m *MockContext) HookStorage() (jujuc.ContextStorageAttachment, error) { } // HookStorage indicates an expected call of HookStorage. -func (mr *MockContextMockRecorder) HookStorage() *gomock.Call { +func (mr *MockContextMockRecorder) HookStorage() *MockContextHookStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookStorage", reflect.TypeOf((*MockContext)(nil).HookStorage)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookStorage", reflect.TypeOf((*MockContext)(nil).HookStorage)) + return &MockContextHookStorageCall{Call: call} +} + +// MockContextHookStorageCall wrap *gomock.Call +type MockContextHookStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHookStorageCall) Return(arg0 jujuc.ContextStorageAttachment, arg1 error) *MockContextHookStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHookStorageCall) Do(f func() (jujuc.ContextStorageAttachment, error)) *MockContextHookStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHookStorageCall) DoAndReturn(f func() (jujuc.ContextStorageAttachment, error)) *MockContextHookStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLeader mocks base method. @@ -352,9 +832,33 @@ func (m *MockContext) IsLeader() (bool, error) { } // IsLeader indicates an expected call of IsLeader. -func (mr *MockContextMockRecorder) IsLeader() *gomock.Call { +func (mr *MockContextMockRecorder) IsLeader() *MockContextIsLeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockContext)(nil).IsLeader)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockContext)(nil).IsLeader)) + return &MockContextIsLeaderCall{Call: call} +} + +// MockContextIsLeaderCall wrap *gomock.Call +type MockContextIsLeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextIsLeaderCall) Return(arg0 bool, arg1 error) *MockContextIsLeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextIsLeaderCall) Do(f func() (bool, error)) *MockContextIsLeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextIsLeaderCall) DoAndReturn(f func() (bool, error)) *MockContextIsLeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeaderSettings mocks base method. @@ -367,9 +871,33 @@ func (m *MockContext) LeaderSettings() (map[string]string, error) { } // LeaderSettings indicates an expected call of LeaderSettings. -func (mr *MockContextMockRecorder) LeaderSettings() *gomock.Call { +func (mr *MockContextMockRecorder) LeaderSettings() *MockContextLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockContext)(nil).LeaderSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockContext)(nil).LeaderSettings)) + return &MockContextLeaderSettingsCall{Call: call} +} + +// MockContextLeaderSettingsCall wrap *gomock.Call +type MockContextLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextLeaderSettingsCall) Return(arg0 map[string]string, arg1 error) *MockContextLeaderSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextLeaderSettingsCall) Do(f func() (map[string]string, error)) *MockContextLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextLeaderSettingsCall) DoAndReturn(f func() (map[string]string, error)) *MockContextLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListPayloads mocks base method. @@ -382,9 +910,33 @@ func (m *MockContext) ListPayloads() ([]string, error) { } // ListPayloads indicates an expected call of ListPayloads. -func (mr *MockContextMockRecorder) ListPayloads() *gomock.Call { +func (mr *MockContextMockRecorder) ListPayloads() *MockContextListPayloadsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPayloads", reflect.TypeOf((*MockContext)(nil).ListPayloads)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPayloads", reflect.TypeOf((*MockContext)(nil).ListPayloads)) + return &MockContextListPayloadsCall{Call: call} +} + +// MockContextListPayloadsCall wrap *gomock.Call +type MockContextListPayloadsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextListPayloadsCall) Return(arg0 []string, arg1 error) *MockContextListPayloadsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextListPayloadsCall) Do(f func() ([]string, error)) *MockContextListPayloadsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextListPayloadsCall) DoAndReturn(f func() ([]string, error)) *MockContextListPayloadsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogActionMessage mocks base method. @@ -396,9 +948,33 @@ func (m *MockContext) LogActionMessage(arg0 string) error { } // LogActionMessage indicates an expected call of LogActionMessage. -func (mr *MockContextMockRecorder) LogActionMessage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) LogActionMessage(arg0 any) *MockContextLogActionMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockContext)(nil).LogActionMessage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockContext)(nil).LogActionMessage), arg0) + return &MockContextLogActionMessageCall{Call: call} +} + +// MockContextLogActionMessageCall wrap *gomock.Call +type MockContextLogActionMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextLogActionMessageCall) Return(arg0 error) *MockContextLogActionMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextLogActionMessageCall) Do(f func(string) error) *MockContextLogActionMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextLogActionMessageCall) DoAndReturn(f func(string) error) *MockContextLogActionMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInfo mocks base method. @@ -411,9 +987,33 @@ func (m *MockContext) NetworkInfo(arg0 []string, arg1 int) (map[string]params.Ne } // NetworkInfo indicates an expected call of NetworkInfo. -func (mr *MockContextMockRecorder) NetworkInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) NetworkInfo(arg0, arg1 any) *MockContextNetworkInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockContext)(nil).NetworkInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockContext)(nil).NetworkInfo), arg0, arg1) + return &MockContextNetworkInfoCall{Call: call} +} + +// MockContextNetworkInfoCall wrap *gomock.Call +type MockContextNetworkInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextNetworkInfoCall) Return(arg0 map[string]params.NetworkInfoResult, arg1 error) *MockContextNetworkInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextNetworkInfoCall) Do(f func([]string, int) (map[string]params.NetworkInfoResult, error)) *MockContextNetworkInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextNetworkInfoCall) DoAndReturn(f func([]string, int) (map[string]params.NetworkInfoResult, error)) *MockContextNetworkInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenPortRange mocks base method. @@ -425,9 +1025,33 @@ func (m *MockContext) OpenPortRange(arg0 string, arg1 network.PortRange) error { } // OpenPortRange indicates an expected call of OpenPortRange. -func (mr *MockContextMockRecorder) OpenPortRange(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) OpenPortRange(arg0, arg1 any) *MockContextOpenPortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPortRange", reflect.TypeOf((*MockContext)(nil).OpenPortRange), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPortRange", reflect.TypeOf((*MockContext)(nil).OpenPortRange), arg0, arg1) + return &MockContextOpenPortRangeCall{Call: call} +} + +// MockContextOpenPortRangeCall wrap *gomock.Call +type MockContextOpenPortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextOpenPortRangeCall) Return(arg0 error) *MockContextOpenPortRangeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextOpenPortRangeCall) Do(f func(string, network.PortRange) error) *MockContextOpenPortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextOpenPortRangeCall) DoAndReturn(f func(string, network.PortRange) error) *MockContextOpenPortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRanges mocks base method. @@ -439,9 +1063,33 @@ func (m *MockContext) OpenedPortRanges() network.GroupedPortRanges { } // OpenedPortRanges indicates an expected call of OpenedPortRanges. -func (mr *MockContextMockRecorder) OpenedPortRanges() *gomock.Call { +func (mr *MockContextMockRecorder) OpenedPortRanges() *MockContextOpenedPortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockContext)(nil).OpenedPortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockContext)(nil).OpenedPortRanges)) + return &MockContextOpenedPortRangesCall{Call: call} +} + +// MockContextOpenedPortRangesCall wrap *gomock.Call +type MockContextOpenedPortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextOpenedPortRangesCall) Return(arg0 network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextOpenedPortRangesCall) Do(f func() network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextOpenedPortRangesCall) DoAndReturn(f func() network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrivateAddress mocks base method. @@ -454,9 +1102,33 @@ func (m *MockContext) PrivateAddress() (string, error) { } // PrivateAddress indicates an expected call of PrivateAddress. -func (mr *MockContextMockRecorder) PrivateAddress() *gomock.Call { +func (mr *MockContextMockRecorder) PrivateAddress() *MockContextPrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockContext)(nil).PrivateAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockContext)(nil).PrivateAddress)) + return &MockContextPrivateAddressCall{Call: call} +} + +// MockContextPrivateAddressCall wrap *gomock.Call +type MockContextPrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextPrivateAddressCall) Return(arg0 string, arg1 error) *MockContextPrivateAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextPrivateAddressCall) Do(f func() (string, error)) *MockContextPrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextPrivateAddressCall) DoAndReturn(f func() (string, error)) *MockContextPrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -469,9 +1141,33 @@ func (m *MockContext) PublicAddress() (string, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockContextMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockContextMockRecorder) PublicAddress() *MockContextPublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockContext)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockContext)(nil).PublicAddress)) + return &MockContextPublicAddressCall{Call: call} +} + +// MockContextPublicAddressCall wrap *gomock.Call +type MockContextPublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextPublicAddressCall) Return(arg0 string, arg1 error) *MockContextPublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextPublicAddressCall) Do(f func() (string, error)) *MockContextPublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextPublicAddressCall) DoAndReturn(f func() (string, error)) *MockContextPublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -484,9 +1180,33 @@ func (m *MockContext) Relation(arg0 int) (jujuc.ContextRelation, error) { } // Relation indicates an expected call of Relation. -func (mr *MockContextMockRecorder) Relation(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Relation(arg0 any) *MockContextRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockContext)(nil).Relation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockContext)(nil).Relation), arg0) + return &MockContextRelationCall{Call: call} +} + +// MockContextRelationCall wrap *gomock.Call +type MockContextRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationCall) Return(arg0 jujuc.ContextRelation, arg1 error) *MockContextRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationCall) Do(f func(int) (jujuc.ContextRelation, error)) *MockContextRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationCall) DoAndReturn(f func(int) (jujuc.ContextRelation, error)) *MockContextRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationIds mocks base method. @@ -499,9 +1219,33 @@ func (m *MockContext) RelationIds() ([]int, error) { } // RelationIds indicates an expected call of RelationIds. -func (mr *MockContextMockRecorder) RelationIds() *gomock.Call { +func (mr *MockContextMockRecorder) RelationIds() *MockContextRelationIdsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationIds", reflect.TypeOf((*MockContext)(nil).RelationIds)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationIds", reflect.TypeOf((*MockContext)(nil).RelationIds)) + return &MockContextRelationIdsCall{Call: call} +} + +// MockContextRelationIdsCall wrap *gomock.Call +type MockContextRelationIdsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationIdsCall) Return(arg0 []int, arg1 error) *MockContextRelationIdsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationIdsCall) Do(f func() ([]int, error)) *MockContextRelationIdsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationIdsCall) DoAndReturn(f func() ([]int, error)) *MockContextRelationIdsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplicationName mocks base method. @@ -514,9 +1258,33 @@ func (m *MockContext) RemoteApplicationName() (string, error) { } // RemoteApplicationName indicates an expected call of RemoteApplicationName. -func (mr *MockContextMockRecorder) RemoteApplicationName() *gomock.Call { +func (mr *MockContextMockRecorder) RemoteApplicationName() *MockContextRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContext)(nil).RemoteApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContext)(nil).RemoteApplicationName)) + return &MockContextRemoteApplicationNameCall{Call: call} +} + +// MockContextRemoteApplicationNameCall wrap *gomock.Call +type MockContextRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoteApplicationNameCall) Return(arg0 string, arg1 error) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoteApplicationNameCall) Do(f func() (string, error)) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoteApplicationNameCall) DoAndReturn(f func() (string, error)) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteUnitName mocks base method. @@ -529,9 +1297,33 @@ func (m *MockContext) RemoteUnitName() (string, error) { } // RemoteUnitName indicates an expected call of RemoteUnitName. -func (mr *MockContextMockRecorder) RemoteUnitName() *gomock.Call { +func (mr *MockContextMockRecorder) RemoteUnitName() *MockContextRemoteUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteUnitName", reflect.TypeOf((*MockContext)(nil).RemoteUnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteUnitName", reflect.TypeOf((*MockContext)(nil).RemoteUnitName)) + return &MockContextRemoteUnitNameCall{Call: call} +} + +// MockContextRemoteUnitNameCall wrap *gomock.Call +type MockContextRemoteUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoteUnitNameCall) Return(arg0 string, arg1 error) *MockContextRemoteUnitNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoteUnitNameCall) Do(f func() (string, error)) *MockContextRemoteUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoteUnitNameCall) DoAndReturn(f func() (string, error)) *MockContextRemoteUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSecret mocks base method. @@ -543,9 +1335,33 @@ func (m *MockContext) RemoveSecret(arg0 *secrets.URI, arg1 *int) error { } // RemoveSecret indicates an expected call of RemoveSecret. -func (mr *MockContextMockRecorder) RemoveSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) RemoveSecret(arg0, arg1 any) *MockContextRemoveSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockContext)(nil).RemoveSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockContext)(nil).RemoveSecret), arg0, arg1) + return &MockContextRemoveSecretCall{Call: call} +} + +// MockContextRemoveSecretCall wrap *gomock.Call +type MockContextRemoveSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoveSecretCall) Return(arg0 error) *MockContextRemoveSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoveSecretCall) Do(f func(*secrets.URI, *int) error) *MockContextRemoveSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoveSecretCall) DoAndReturn(f func(*secrets.URI, *int) error) *MockContextRemoveSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RequestReboot mocks base method. @@ -557,9 +1373,33 @@ func (m *MockContext) RequestReboot(arg0 jujuc.RebootPriority) error { } // RequestReboot indicates an expected call of RequestReboot. -func (mr *MockContextMockRecorder) RequestReboot(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) RequestReboot(arg0 any) *MockContextRequestRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockContext)(nil).RequestReboot), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockContext)(nil).RequestReboot), arg0) + return &MockContextRequestRebootCall{Call: call} +} + +// MockContextRequestRebootCall wrap *gomock.Call +type MockContextRequestRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRequestRebootCall) Return(arg0 error) *MockContextRequestRebootCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRequestRebootCall) Do(f func(jujuc.RebootPriority) error) *MockContextRequestRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRequestRebootCall) DoAndReturn(f func(jujuc.RebootPriority) error) *MockContextRequestRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecret mocks base method. @@ -571,9 +1411,33 @@ func (m *MockContext) RevokeSecret(arg0 *secrets.URI, arg1 *jujuc.SecretGrantRev } // RevokeSecret indicates an expected call of RevokeSecret. -func (mr *MockContextMockRecorder) RevokeSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) RevokeSecret(arg0, arg1 any) *MockContextRevokeSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockContext)(nil).RevokeSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockContext)(nil).RevokeSecret), arg0, arg1) + return &MockContextRevokeSecretCall{Call: call} +} + +// MockContextRevokeSecretCall wrap *gomock.Call +type MockContextRevokeSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRevokeSecretCall) Return(arg0 error) *MockContextRevokeSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRevokeSecretCall) Do(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextRevokeSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRevokeSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextRevokeSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretMetadata mocks base method. @@ -586,9 +1450,33 @@ func (m *MockContext) SecretMetadata() (map[string]jujuc.SecretMetadata, error) } // SecretMetadata indicates an expected call of SecretMetadata. -func (mr *MockContextMockRecorder) SecretMetadata() *gomock.Call { +func (mr *MockContextMockRecorder) SecretMetadata() *MockContextSecretMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockContext)(nil).SecretMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockContext)(nil).SecretMetadata)) + return &MockContextSecretMetadataCall{Call: call} +} + +// MockContextSecretMetadataCall wrap *gomock.Call +type MockContextSecretMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSecretMetadataCall) Return(arg0 map[string]jujuc.SecretMetadata, arg1 error) *MockContextSecretMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSecretMetadataCall) Do(f func() (map[string]jujuc.SecretMetadata, error)) *MockContextSecretMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSecretMetadataCall) DoAndReturn(f func() (map[string]jujuc.SecretMetadata, error)) *MockContextSecretMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActionFailed mocks base method. @@ -600,9 +1488,33 @@ func (m *MockContext) SetActionFailed() error { } // SetActionFailed indicates an expected call of SetActionFailed. -func (mr *MockContextMockRecorder) SetActionFailed() *gomock.Call { +func (mr *MockContextMockRecorder) SetActionFailed() *MockContextSetActionFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionFailed", reflect.TypeOf((*MockContext)(nil).SetActionFailed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionFailed", reflect.TypeOf((*MockContext)(nil).SetActionFailed)) + return &MockContextSetActionFailedCall{Call: call} +} + +// MockContextSetActionFailedCall wrap *gomock.Call +type MockContextSetActionFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetActionFailedCall) Return(arg0 error) *MockContextSetActionFailedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetActionFailedCall) Do(f func() error) *MockContextSetActionFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetActionFailedCall) DoAndReturn(f func() error) *MockContextSetActionFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActionMessage mocks base method. @@ -614,9 +1526,33 @@ func (m *MockContext) SetActionMessage(arg0 string) error { } // SetActionMessage indicates an expected call of SetActionMessage. -func (mr *MockContextMockRecorder) SetActionMessage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetActionMessage(arg0 any) *MockContextSetActionMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionMessage", reflect.TypeOf((*MockContext)(nil).SetActionMessage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionMessage", reflect.TypeOf((*MockContext)(nil).SetActionMessage), arg0) + return &MockContextSetActionMessageCall{Call: call} +} + +// MockContextSetActionMessageCall wrap *gomock.Call +type MockContextSetActionMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetActionMessageCall) Return(arg0 error) *MockContextSetActionMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetActionMessageCall) Do(f func(string) error) *MockContextSetActionMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetActionMessageCall) DoAndReturn(f func(string) error) *MockContextSetActionMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetApplicationStatus mocks base method. @@ -628,9 +1564,33 @@ func (m *MockContext) SetApplicationStatus(arg0 context.Context, arg1 jujuc.Stat } // SetApplicationStatus indicates an expected call of SetApplicationStatus. -func (mr *MockContextMockRecorder) SetApplicationStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetApplicationStatus(arg0, arg1 any) *MockContextSetApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetApplicationStatus", reflect.TypeOf((*MockContext)(nil).SetApplicationStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetApplicationStatus", reflect.TypeOf((*MockContext)(nil).SetApplicationStatus), arg0, arg1) + return &MockContextSetApplicationStatusCall{Call: call} +} + +// MockContextSetApplicationStatusCall wrap *gomock.Call +type MockContextSetApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetApplicationStatusCall) Return(arg0 error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetApplicationStatusCall) Do(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetApplicationStatusCall) DoAndReturn(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmStateValue mocks base method. @@ -642,9 +1602,33 @@ func (m *MockContext) SetCharmStateValue(arg0, arg1 string) error { } // SetCharmStateValue indicates an expected call of SetCharmStateValue. -func (mr *MockContextMockRecorder) SetCharmStateValue(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetCharmStateValue(arg0, arg1 any) *MockContextSetCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStateValue", reflect.TypeOf((*MockContext)(nil).SetCharmStateValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStateValue", reflect.TypeOf((*MockContext)(nil).SetCharmStateValue), arg0, arg1) + return &MockContextSetCharmStateValueCall{Call: call} +} + +// MockContextSetCharmStateValueCall wrap *gomock.Call +type MockContextSetCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetCharmStateValueCall) Return(arg0 error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetCharmStateValueCall) Do(f func(string, string) error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetCharmStateValueCall) DoAndReturn(f func(string, string) error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPayloadStatus mocks base method. @@ -656,9 +1640,33 @@ func (m *MockContext) SetPayloadStatus(arg0, arg1, arg2 string) error { } // SetPayloadStatus indicates an expected call of SetPayloadStatus. -func (mr *MockContextMockRecorder) SetPayloadStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetPayloadStatus(arg0, arg1, arg2 any) *MockContextSetPayloadStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPayloadStatus", reflect.TypeOf((*MockContext)(nil).SetPayloadStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPayloadStatus", reflect.TypeOf((*MockContext)(nil).SetPayloadStatus), arg0, arg1, arg2) + return &MockContextSetPayloadStatusCall{Call: call} +} + +// MockContextSetPayloadStatusCall wrap *gomock.Call +type MockContextSetPayloadStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetPayloadStatusCall) Return(arg0 error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetPayloadStatusCall) Do(f func(string, string, string) error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetPayloadStatusCall) DoAndReturn(f func(string, string, string) error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitStatus mocks base method. @@ -670,9 +1678,33 @@ func (m *MockContext) SetUnitStatus(arg0 context.Context, arg1 jujuc.StatusInfo) } // SetUnitStatus indicates an expected call of SetUnitStatus. -func (mr *MockContextMockRecorder) SetUnitStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetUnitStatus(arg0, arg1 any) *MockContextSetUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockContext)(nil).SetUnitStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockContext)(nil).SetUnitStatus), arg0, arg1) + return &MockContextSetUnitStatusCall{Call: call} +} + +// MockContextSetUnitStatusCall wrap *gomock.Call +type MockContextSetUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetUnitStatusCall) Return(arg0 error) *MockContextSetUnitStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetUnitStatusCall) Do(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetUnitStatusCall) DoAndReturn(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitWorkloadVersion mocks base method. @@ -684,9 +1716,33 @@ func (m *MockContext) SetUnitWorkloadVersion(arg0 context.Context, arg1 string) } // SetUnitWorkloadVersion indicates an expected call of SetUnitWorkloadVersion. -func (mr *MockContextMockRecorder) SetUnitWorkloadVersion(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetUnitWorkloadVersion(arg0, arg1 any) *MockContextSetUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).SetUnitWorkloadVersion), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).SetUnitWorkloadVersion), arg0, arg1) + return &MockContextSetUnitWorkloadVersionCall{Call: call} +} + +// MockContextSetUnitWorkloadVersionCall wrap *gomock.Call +type MockContextSetUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetUnitWorkloadVersionCall) Return(arg0 error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetUnitWorkloadVersionCall) Do(f func(context.Context, string) error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetUnitWorkloadVersionCall) DoAndReturn(f func(context.Context, string) error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -699,9 +1755,33 @@ func (m *MockContext) Storage(arg0 names.StorageTag) (jujuc.ContextStorageAttach } // Storage indicates an expected call of Storage. -func (mr *MockContextMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Storage(arg0 any) *MockContextStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockContext)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockContext)(nil).Storage), arg0) + return &MockContextStorageCall{Call: call} +} + +// MockContextStorageCall wrap *gomock.Call +type MockContextStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextStorageCall) Return(arg0 jujuc.ContextStorageAttachment, arg1 error) *MockContextStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextStorageCall) Do(f func(names.StorageTag) (jujuc.ContextStorageAttachment, error)) *MockContextStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextStorageCall) DoAndReturn(f func(names.StorageTag) (jujuc.ContextStorageAttachment, error)) *MockContextStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageTags mocks base method. @@ -714,9 +1794,33 @@ func (m *MockContext) StorageTags() ([]names.StorageTag, error) { } // StorageTags indicates an expected call of StorageTags. -func (mr *MockContextMockRecorder) StorageTags() *gomock.Call { +func (mr *MockContextMockRecorder) StorageTags() *MockContextStorageTagsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTags", reflect.TypeOf((*MockContext)(nil).StorageTags)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTags", reflect.TypeOf((*MockContext)(nil).StorageTags)) + return &MockContextStorageTagsCall{Call: call} +} + +// MockContextStorageTagsCall wrap *gomock.Call +type MockContextStorageTagsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextStorageTagsCall) Return(arg0 []names.StorageTag, arg1 error) *MockContextStorageTagsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextStorageTagsCall) Do(f func() ([]names.StorageTag, error)) *MockContextStorageTagsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextStorageTagsCall) DoAndReturn(f func() ([]names.StorageTag, error)) *MockContextStorageTagsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TrackPayload mocks base method. @@ -728,9 +1832,33 @@ func (m *MockContext) TrackPayload(arg0 payloads.Payload) error { } // TrackPayload indicates an expected call of TrackPayload. -func (mr *MockContextMockRecorder) TrackPayload(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) TrackPayload(arg0 any) *MockContextTrackPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackPayload", reflect.TypeOf((*MockContext)(nil).TrackPayload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackPayload", reflect.TypeOf((*MockContext)(nil).TrackPayload), arg0) + return &MockContextTrackPayloadCall{Call: call} +} + +// MockContextTrackPayloadCall wrap *gomock.Call +type MockContextTrackPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextTrackPayloadCall) Return(arg0 error) *MockContextTrackPayloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextTrackPayloadCall) Do(f func(payloads.Payload) error) *MockContextTrackPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextTrackPayloadCall) DoAndReturn(f func(payloads.Payload) error) *MockContextTrackPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitName mocks base method. @@ -742,9 +1870,33 @@ func (m *MockContext) UnitName() string { } // UnitName indicates an expected call of UnitName. -func (mr *MockContextMockRecorder) UnitName() *gomock.Call { +func (mr *MockContextMockRecorder) UnitName() *MockContextUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockContext)(nil).UnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockContext)(nil).UnitName)) + return &MockContextUnitNameCall{Call: call} +} + +// MockContextUnitNameCall wrap *gomock.Call +type MockContextUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitNameCall) Return(arg0 string) *MockContextUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitNameCall) Do(f func() string) *MockContextUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitNameCall) DoAndReturn(f func() string) *MockContextUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStatus mocks base method. @@ -757,9 +1909,33 @@ func (m *MockContext) UnitStatus(arg0 context.Context) (*jujuc.StatusInfo, error } // UnitStatus indicates an expected call of UnitStatus. -func (mr *MockContextMockRecorder) UnitStatus(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) UnitStatus(arg0 any) *MockContextUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockContext)(nil).UnitStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockContext)(nil).UnitStatus), arg0) + return &MockContextUnitStatusCall{Call: call} +} + +// MockContextUnitStatusCall wrap *gomock.Call +type MockContextUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitStatusCall) Return(arg0 *jujuc.StatusInfo, arg1 error) *MockContextUnitStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitStatusCall) Do(f func(context.Context) (*jujuc.StatusInfo, error)) *MockContextUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitStatusCall) DoAndReturn(f func(context.Context) (*jujuc.StatusInfo, error)) *MockContextUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitWorkloadVersion mocks base method. @@ -772,9 +1948,33 @@ func (m *MockContext) UnitWorkloadVersion(arg0 context.Context) (string, error) } // UnitWorkloadVersion indicates an expected call of UnitWorkloadVersion. -func (mr *MockContextMockRecorder) UnitWorkloadVersion(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) UnitWorkloadVersion(arg0 any) *MockContextUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).UnitWorkloadVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).UnitWorkloadVersion), arg0) + return &MockContextUnitWorkloadVersionCall{Call: call} +} + +// MockContextUnitWorkloadVersionCall wrap *gomock.Call +type MockContextUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitWorkloadVersionCall) Return(arg0 string, arg1 error) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitWorkloadVersionCall) Do(f func(context.Context) (string, error)) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitWorkloadVersionCall) DoAndReturn(f func(context.Context) (string, error)) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UntrackPayload mocks base method. @@ -786,9 +1986,33 @@ func (m *MockContext) UntrackPayload(arg0, arg1 string) error { } // UntrackPayload indicates an expected call of UntrackPayload. -func (mr *MockContextMockRecorder) UntrackPayload(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UntrackPayload(arg0, arg1 any) *MockContextUntrackPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntrackPayload", reflect.TypeOf((*MockContext)(nil).UntrackPayload), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntrackPayload", reflect.TypeOf((*MockContext)(nil).UntrackPayload), arg0, arg1) + return &MockContextUntrackPayloadCall{Call: call} +} + +// MockContextUntrackPayloadCall wrap *gomock.Call +type MockContextUntrackPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUntrackPayloadCall) Return(arg0 error) *MockContextUntrackPayloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUntrackPayloadCall) Do(f func(string, string) error) *MockContextUntrackPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUntrackPayloadCall) DoAndReturn(f func(string, string) error) *MockContextUntrackPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateActionResults mocks base method. @@ -800,9 +2024,33 @@ func (m *MockContext) UpdateActionResults(arg0 []string, arg1 any) error { } // UpdateActionResults indicates an expected call of UpdateActionResults. -func (mr *MockContextMockRecorder) UpdateActionResults(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UpdateActionResults(arg0, arg1 any) *MockContextUpdateActionResultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateActionResults", reflect.TypeOf((*MockContext)(nil).UpdateActionResults), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateActionResults", reflect.TypeOf((*MockContext)(nil).UpdateActionResults), arg0, arg1) + return &MockContextUpdateActionResultsCall{Call: call} +} + +// MockContextUpdateActionResultsCall wrap *gomock.Call +type MockContextUpdateActionResultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUpdateActionResultsCall) Return(arg0 error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUpdateActionResultsCall) Do(f func([]string, any) error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUpdateActionResultsCall) DoAndReturn(f func([]string, any) error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecret mocks base method. @@ -814,9 +2062,33 @@ func (m *MockContext) UpdateSecret(arg0 *secrets.URI, arg1 *jujuc.SecretUpdateAr } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockContextMockRecorder) UpdateSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UpdateSecret(arg0, arg1 any) *MockContextUpdateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockContext)(nil).UpdateSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockContext)(nil).UpdateSecret), arg0, arg1) + return &MockContextUpdateSecretCall{Call: call} +} + +// MockContextUpdateSecretCall wrap *gomock.Call +type MockContextUpdateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUpdateSecretCall) Return(arg0 error) *MockContextUpdateSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUpdateSecretCall) Do(f func(*secrets.URI, *jujuc.SecretUpdateArgs) error) *MockContextUpdateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUpdateSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretUpdateArgs) error) *MockContextUpdateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WorkloadName mocks base method. @@ -829,9 +2101,33 @@ func (m *MockContext) WorkloadName() (string, error) { } // WorkloadName indicates an expected call of WorkloadName. -func (mr *MockContextMockRecorder) WorkloadName() *gomock.Call { +func (mr *MockContextMockRecorder) WorkloadName() *MockContextWorkloadNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadName", reflect.TypeOf((*MockContext)(nil).WorkloadName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadName", reflect.TypeOf((*MockContext)(nil).WorkloadName)) + return &MockContextWorkloadNameCall{Call: call} +} + +// MockContextWorkloadNameCall wrap *gomock.Call +type MockContextWorkloadNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextWorkloadNameCall) Return(arg0 string, arg1 error) *MockContextWorkloadNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextWorkloadNameCall) Do(f func() (string, error)) *MockContextWorkloadNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextWorkloadNameCall) DoAndReturn(f func() (string, error)) *MockContextWorkloadNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteLeaderSettings mocks base method. @@ -843,7 +2139,31 @@ func (m *MockContext) WriteLeaderSettings(arg0 map[string]string) error { } // WriteLeaderSettings indicates an expected call of WriteLeaderSettings. -func (mr *MockContextMockRecorder) WriteLeaderSettings(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) WriteLeaderSettings(arg0 any) *MockContextWriteLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockContext)(nil).WriteLeaderSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockContext)(nil).WriteLeaderSettings), arg0) + return &MockContextWriteLeaderSettingsCall{Call: call} +} + +// MockContextWriteLeaderSettingsCall wrap *gomock.Call +type MockContextWriteLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextWriteLeaderSettingsCall) Return(arg0 error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextWriteLeaderSettingsCall) Do(f func(map[string]string) error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextWriteLeaderSettingsCall) DoAndReturn(f func(map[string]string) error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/jujuc/mocks/context_relation_mock.go b/internal/worker/uniter/runner/jujuc/mocks/context_relation_mock.go index c61ade7e7c4..793b97500db 100644 --- a/internal/worker/uniter/runner/jujuc/mocks/context_relation_mock.go +++ b/internal/worker/uniter/runner/jujuc/mocks/context_relation_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/context_relation_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc ContextRelation +// mockgen -typed -package mocks -destination mocks/context_relation_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc ContextRelation // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockContextRelation) ApplicationSettings() (jujuc.Settings, error) { } // ApplicationSettings indicates an expected call of ApplicationSettings. -func (mr *MockContextRelationMockRecorder) ApplicationSettings() *gomock.Call { +func (mr *MockContextRelationMockRecorder) ApplicationSettings() *MockContextRelationApplicationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockContextRelation)(nil).ApplicationSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationSettings", reflect.TypeOf((*MockContextRelation)(nil).ApplicationSettings)) + return &MockContextRelationApplicationSettingsCall{Call: call} +} + +// MockContextRelationApplicationSettingsCall wrap *gomock.Call +type MockContextRelationApplicationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationApplicationSettingsCall) Return(arg0 jujuc.Settings, arg1 error) *MockContextRelationApplicationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationApplicationSettingsCall) Do(f func() (jujuc.Settings, error)) *MockContextRelationApplicationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationApplicationSettingsCall) DoAndReturn(f func() (jujuc.Settings, error)) *MockContextRelationApplicationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FakeId mocks base method. @@ -68,9 +92,33 @@ func (m *MockContextRelation) FakeId() string { } // FakeId indicates an expected call of FakeId. -func (mr *MockContextRelationMockRecorder) FakeId() *gomock.Call { +func (mr *MockContextRelationMockRecorder) FakeId() *MockContextRelationFakeIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FakeId", reflect.TypeOf((*MockContextRelation)(nil).FakeId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FakeId", reflect.TypeOf((*MockContextRelation)(nil).FakeId)) + return &MockContextRelationFakeIdCall{Call: call} +} + +// MockContextRelationFakeIdCall wrap *gomock.Call +type MockContextRelationFakeIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationFakeIdCall) Return(arg0 string) *MockContextRelationFakeIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationFakeIdCall) Do(f func() string) *MockContextRelationFakeIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationFakeIdCall) DoAndReturn(f func() string) *MockContextRelationFakeIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -82,9 +130,33 @@ func (m *MockContextRelation) Id() int { } // Id indicates an expected call of Id. -func (mr *MockContextRelationMockRecorder) Id() *gomock.Call { +func (mr *MockContextRelationMockRecorder) Id() *MockContextRelationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContextRelation)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContextRelation)(nil).Id)) + return &MockContextRelationIdCall{Call: call} +} + +// MockContextRelationIdCall wrap *gomock.Call +type MockContextRelationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationIdCall) Return(arg0 int) *MockContextRelationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationIdCall) Do(f func() int) *MockContextRelationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationIdCall) DoAndReturn(f func() int) *MockContextRelationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Life mocks base method. @@ -96,9 +168,33 @@ func (m *MockContextRelation) Life() life.Value { } // Life indicates an expected call of Life. -func (mr *MockContextRelationMockRecorder) Life() *gomock.Call { +func (mr *MockContextRelationMockRecorder) Life() *MockContextRelationLifeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockContextRelation)(nil).Life)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Life", reflect.TypeOf((*MockContextRelation)(nil).Life)) + return &MockContextRelationLifeCall{Call: call} +} + +// MockContextRelationLifeCall wrap *gomock.Call +type MockContextRelationLifeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationLifeCall) Return(arg0 life.Value) *MockContextRelationLifeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationLifeCall) Do(f func() life.Value) *MockContextRelationLifeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationLifeCall) DoAndReturn(f func() life.Value) *MockContextRelationLifeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -110,9 +206,33 @@ func (m *MockContextRelation) Name() string { } // Name indicates an expected call of Name. -func (mr *MockContextRelationMockRecorder) Name() *gomock.Call { +func (mr *MockContextRelationMockRecorder) Name() *MockContextRelationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockContextRelation)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockContextRelation)(nil).Name)) + return &MockContextRelationNameCall{Call: call} +} + +// MockContextRelationNameCall wrap *gomock.Call +type MockContextRelationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationNameCall) Return(arg0 string) *MockContextRelationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationNameCall) Do(f func() string) *MockContextRelationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationNameCall) DoAndReturn(f func() string) *MockContextRelationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadApplicationSettings mocks base method. @@ -125,9 +245,33 @@ func (m *MockContextRelation) ReadApplicationSettings(arg0 string) (params.Setti } // ReadApplicationSettings indicates an expected call of ReadApplicationSettings. -func (mr *MockContextRelationMockRecorder) ReadApplicationSettings(arg0 any) *gomock.Call { +func (mr *MockContextRelationMockRecorder) ReadApplicationSettings(arg0 any) *MockContextRelationReadApplicationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadApplicationSettings", reflect.TypeOf((*MockContextRelation)(nil).ReadApplicationSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadApplicationSettings", reflect.TypeOf((*MockContextRelation)(nil).ReadApplicationSettings), arg0) + return &MockContextRelationReadApplicationSettingsCall{Call: call} +} + +// MockContextRelationReadApplicationSettingsCall wrap *gomock.Call +type MockContextRelationReadApplicationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationReadApplicationSettingsCall) Return(arg0 params.Settings, arg1 error) *MockContextRelationReadApplicationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationReadApplicationSettingsCall) Do(f func(string) (params.Settings, error)) *MockContextRelationReadApplicationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationReadApplicationSettingsCall) DoAndReturn(f func(string) (params.Settings, error)) *MockContextRelationReadApplicationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ReadSettings mocks base method. @@ -140,9 +284,33 @@ func (m *MockContextRelation) ReadSettings(arg0 string) (params.Settings, error) } // ReadSettings indicates an expected call of ReadSettings. -func (mr *MockContextRelationMockRecorder) ReadSettings(arg0 any) *gomock.Call { +func (mr *MockContextRelationMockRecorder) ReadSettings(arg0 any) *MockContextRelationReadSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSettings", reflect.TypeOf((*MockContextRelation)(nil).ReadSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSettings", reflect.TypeOf((*MockContextRelation)(nil).ReadSettings), arg0) + return &MockContextRelationReadSettingsCall{Call: call} +} + +// MockContextRelationReadSettingsCall wrap *gomock.Call +type MockContextRelationReadSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationReadSettingsCall) Return(arg0 params.Settings, arg1 error) *MockContextRelationReadSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationReadSettingsCall) Do(f func(string) (params.Settings, error)) *MockContextRelationReadSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationReadSettingsCall) DoAndReturn(f func(string) (params.Settings, error)) *MockContextRelationReadSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationTag mocks base method. @@ -154,9 +322,33 @@ func (m *MockContextRelation) RelationTag() names.RelationTag { } // RelationTag indicates an expected call of RelationTag. -func (mr *MockContextRelationMockRecorder) RelationTag() *gomock.Call { +func (mr *MockContextRelationMockRecorder) RelationTag() *MockContextRelationRelationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationTag", reflect.TypeOf((*MockContextRelation)(nil).RelationTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationTag", reflect.TypeOf((*MockContextRelation)(nil).RelationTag)) + return &MockContextRelationRelationTagCall{Call: call} +} + +// MockContextRelationRelationTagCall wrap *gomock.Call +type MockContextRelationRelationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationRelationTagCall) Return(arg0 names.RelationTag) *MockContextRelationRelationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationRelationTagCall) Do(f func() names.RelationTag) *MockContextRelationRelationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationRelationTagCall) DoAndReturn(f func() names.RelationTag) *MockContextRelationRelationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplicationName mocks base method. @@ -168,9 +360,33 @@ func (m *MockContextRelation) RemoteApplicationName() string { } // RemoteApplicationName indicates an expected call of RemoteApplicationName. -func (mr *MockContextRelationMockRecorder) RemoteApplicationName() *gomock.Call { +func (mr *MockContextRelationMockRecorder) RemoteApplicationName() *MockContextRelationRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContextRelation)(nil).RemoteApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContextRelation)(nil).RemoteApplicationName)) + return &MockContextRelationRemoteApplicationNameCall{Call: call} +} + +// MockContextRelationRemoteApplicationNameCall wrap *gomock.Call +type MockContextRelationRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationRemoteApplicationNameCall) Return(arg0 string) *MockContextRelationRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationRemoteApplicationNameCall) Do(f func() string) *MockContextRelationRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationRemoteApplicationNameCall) DoAndReturn(f func() string) *MockContextRelationRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -182,9 +398,33 @@ func (m *MockContextRelation) SetStatus(arg0 context.Context, arg1 relation.Stat } // SetStatus indicates an expected call of SetStatus. -func (mr *MockContextRelationMockRecorder) SetStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockContextRelationMockRecorder) SetStatus(arg0, arg1 any) *MockContextRelationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockContextRelation)(nil).SetStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockContextRelation)(nil).SetStatus), arg0, arg1) + return &MockContextRelationSetStatusCall{Call: call} +} + +// MockContextRelationSetStatusCall wrap *gomock.Call +type MockContextRelationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationSetStatusCall) Return(arg0 error) *MockContextRelationSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationSetStatusCall) Do(f func(context.Context, relation.Status) error) *MockContextRelationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationSetStatusCall) DoAndReturn(f func(context.Context, relation.Status) error) *MockContextRelationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Settings mocks base method. @@ -197,9 +437,33 @@ func (m *MockContextRelation) Settings() (jujuc.Settings, error) { } // Settings indicates an expected call of Settings. -func (mr *MockContextRelationMockRecorder) Settings() *gomock.Call { +func (mr *MockContextRelationMockRecorder) Settings() *MockContextRelationSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockContextRelation)(nil).Settings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Settings", reflect.TypeOf((*MockContextRelation)(nil).Settings)) + return &MockContextRelationSettingsCall{Call: call} +} + +// MockContextRelationSettingsCall wrap *gomock.Call +type MockContextRelationSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationSettingsCall) Return(arg0 jujuc.Settings, arg1 error) *MockContextRelationSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationSettingsCall) Do(f func() (jujuc.Settings, error)) *MockContextRelationSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationSettingsCall) DoAndReturn(f func() (jujuc.Settings, error)) *MockContextRelationSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Suspended mocks base method. @@ -211,9 +475,33 @@ func (m *MockContextRelation) Suspended() bool { } // Suspended indicates an expected call of Suspended. -func (mr *MockContextRelationMockRecorder) Suspended() *gomock.Call { +func (mr *MockContextRelationMockRecorder) Suspended() *MockContextRelationSuspendedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockContextRelation)(nil).Suspended)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Suspended", reflect.TypeOf((*MockContextRelation)(nil).Suspended)) + return &MockContextRelationSuspendedCall{Call: call} +} + +// MockContextRelationSuspendedCall wrap *gomock.Call +type MockContextRelationSuspendedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationSuspendedCall) Return(arg0 bool) *MockContextRelationSuspendedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationSuspendedCall) Do(f func() bool) *MockContextRelationSuspendedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationSuspendedCall) DoAndReturn(f func() bool) *MockContextRelationSuspendedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitNames mocks base method. @@ -225,7 +513,31 @@ func (m *MockContextRelation) UnitNames() []string { } // UnitNames indicates an expected call of UnitNames. -func (mr *MockContextRelationMockRecorder) UnitNames() *gomock.Call { +func (mr *MockContextRelationMockRecorder) UnitNames() *MockContextRelationUnitNamesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitNames", reflect.TypeOf((*MockContextRelation)(nil).UnitNames)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitNames", reflect.TypeOf((*MockContextRelation)(nil).UnitNames)) + return &MockContextRelationUnitNamesCall{Call: call} +} + +// MockContextRelationUnitNamesCall wrap *gomock.Call +type MockContextRelationUnitNamesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationUnitNamesCall) Return(arg0 []string) *MockContextRelationUnitNamesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationUnitNamesCall) Do(f func() []string) *MockContextRelationUnitNamesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationUnitNamesCall) DoAndReturn(f func() []string) *MockContextRelationUnitNamesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/jujuc/mocks/juju-log_mock.go b/internal/worker/uniter/runner/jujuc/mocks/juju-log_mock.go index 58330a9a946..57d38a7335b 100644 --- a/internal/worker/uniter/runner/jujuc/mocks/juju-log_mock.go +++ b/internal/worker/uniter/runner/jujuc/mocks/juju-log_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/juju-log_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc JujuLogContext +// mockgen -typed -package mocks -destination mocks/juju-log_mock.go github.com/juju/juju/internal/worker/uniter/runner/jujuc JujuLogContext // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockJujuLogContext) GetLogger(arg0 string) loggo.Logger { } // GetLogger indicates an expected call of GetLogger. -func (mr *MockJujuLogContextMockRecorder) GetLogger(arg0 any) *gomock.Call { +func (mr *MockJujuLogContextMockRecorder) GetLogger(arg0 any) *MockJujuLogContextGetLoggerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockJujuLogContext)(nil).GetLogger), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockJujuLogContext)(nil).GetLogger), arg0) + return &MockJujuLogContextGetLoggerCall{Call: call} +} + +// MockJujuLogContextGetLoggerCall wrap *gomock.Call +type MockJujuLogContextGetLoggerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuLogContextGetLoggerCall) Return(arg0 loggo.Logger) *MockJujuLogContextGetLoggerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuLogContextGetLoggerCall) Do(f func(string) loggo.Logger) *MockJujuLogContextGetLoggerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuLogContextGetLoggerCall) DoAndReturn(f func(string) loggo.Logger) *MockJujuLogContextGetLoggerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookRelation mocks base method. @@ -64,9 +88,33 @@ func (m *MockJujuLogContext) HookRelation() (jujuc.ContextRelation, error) { } // HookRelation indicates an expected call of HookRelation. -func (mr *MockJujuLogContextMockRecorder) HookRelation() *gomock.Call { +func (mr *MockJujuLogContextMockRecorder) HookRelation() *MockJujuLogContextHookRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockJujuLogContext)(nil).HookRelation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockJujuLogContext)(nil).HookRelation)) + return &MockJujuLogContextHookRelationCall{Call: call} +} + +// MockJujuLogContextHookRelationCall wrap *gomock.Call +type MockJujuLogContextHookRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuLogContextHookRelationCall) Return(arg0 jujuc.ContextRelation, arg1 error) *MockJujuLogContextHookRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuLogContextHookRelationCall) Do(f func() (jujuc.ContextRelation, error)) *MockJujuLogContextHookRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuLogContextHookRelationCall) DoAndReturn(f func() (jujuc.ContextRelation, error)) *MockJujuLogContextHookRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitName mocks base method. @@ -78,7 +126,31 @@ func (m *MockJujuLogContext) UnitName() string { } // UnitName indicates an expected call of UnitName. -func (mr *MockJujuLogContextMockRecorder) UnitName() *gomock.Call { +func (mr *MockJujuLogContextMockRecorder) UnitName() *MockJujuLogContextUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockJujuLogContext)(nil).UnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockJujuLogContext)(nil).UnitName)) + return &MockJujuLogContextUnitNameCall{Call: call} +} + +// MockJujuLogContextUnitNameCall wrap *gomock.Call +type MockJujuLogContextUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJujuLogContextUnitNameCall) Return(arg0 string) *MockJujuLogContextUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJujuLogContextUnitNameCall) Do(f func() string) *MockJujuLogContextUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJujuLogContextUnitNameCall) DoAndReturn(f func() string) *MockJujuLogContextUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/mocks/context_mock.go b/internal/worker/uniter/runner/mocks/context_mock.go index 32e6fab8aa9..38384fba8ac 100644 --- a/internal/worker/uniter/runner/mocks/context_mock.go +++ b/internal/worker/uniter/runner/mocks/context_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/context Context +// mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/context Context // // Package mocks is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockContext) ActionData() (*context0.ActionData, error) { } // ActionData indicates an expected call of ActionData. -func (mr *MockContextMockRecorder) ActionData() *gomock.Call { +func (mr *MockContextMockRecorder) ActionData() *MockContextActionDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionData", reflect.TypeOf((*MockContext)(nil).ActionData)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionData", reflect.TypeOf((*MockContext)(nil).ActionData)) + return &MockContextActionDataCall{Call: call} +} + +// MockContextActionDataCall wrap *gomock.Call +type MockContextActionDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextActionDataCall) Return(arg0 *context0.ActionData, arg1 error) *MockContextActionDataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextActionDataCall) Do(f func() (*context0.ActionData, error)) *MockContextActionDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextActionDataCall) DoAndReturn(f func() (*context0.ActionData, error)) *MockContextActionDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ActionParams mocks base method. @@ -75,9 +99,33 @@ func (m *MockContext) ActionParams() (map[string]any, error) { } // ActionParams indicates an expected call of ActionParams. -func (mr *MockContextMockRecorder) ActionParams() *gomock.Call { +func (mr *MockContextMockRecorder) ActionParams() *MockContextActionParamsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionParams", reflect.TypeOf((*MockContext)(nil).ActionParams)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionParams", reflect.TypeOf((*MockContext)(nil).ActionParams)) + return &MockContextActionParamsCall{Call: call} +} + +// MockContextActionParamsCall wrap *gomock.Call +type MockContextActionParamsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextActionParamsCall) Return(arg0 map[string]any, arg1 error) *MockContextActionParamsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextActionParamsCall) Do(f func() (map[string]any, error)) *MockContextActionParamsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextActionParamsCall) DoAndReturn(f func() (map[string]any, error)) *MockContextActionParamsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUnitStorage mocks base method. @@ -89,9 +137,33 @@ func (m *MockContext) AddUnitStorage(arg0 map[string]params.StorageDirectives) e } // AddUnitStorage indicates an expected call of AddUnitStorage. -func (mr *MockContextMockRecorder) AddUnitStorage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) AddUnitStorage(arg0 any) *MockContextAddUnitStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnitStorage", reflect.TypeOf((*MockContext)(nil).AddUnitStorage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnitStorage", reflect.TypeOf((*MockContext)(nil).AddUnitStorage), arg0) + return &MockContextAddUnitStorageCall{Call: call} +} + +// MockContextAddUnitStorageCall wrap *gomock.Call +type MockContextAddUnitStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAddUnitStorageCall) Return(arg0 error) *MockContextAddUnitStorageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAddUnitStorageCall) Do(f func(map[string]params.StorageDirectives) error) *MockContextAddUnitStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAddUnitStorageCall) DoAndReturn(f func(map[string]params.StorageDirectives) error) *MockContextAddUnitStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationStatus mocks base method. @@ -104,9 +176,33 @@ func (m *MockContext) ApplicationStatus(arg0 context.Context) (jujuc.Application } // ApplicationStatus indicates an expected call of ApplicationStatus. -func (mr *MockContextMockRecorder) ApplicationStatus(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) ApplicationStatus(arg0 any) *MockContextApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationStatus", reflect.TypeOf((*MockContext)(nil).ApplicationStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationStatus", reflect.TypeOf((*MockContext)(nil).ApplicationStatus), arg0) + return &MockContextApplicationStatusCall{Call: call} +} + +// MockContextApplicationStatusCall wrap *gomock.Call +type MockContextApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextApplicationStatusCall) Return(arg0 jujuc.ApplicationStatusInfo, arg1 error) *MockContextApplicationStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextApplicationStatusCall) Do(f func(context.Context) (jujuc.ApplicationStatusInfo, error)) *MockContextApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextApplicationStatusCall) DoAndReturn(f func(context.Context) (jujuc.ApplicationStatusInfo, error)) *MockContextApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AvailabilityZone mocks base method. @@ -119,9 +215,33 @@ func (m *MockContext) AvailabilityZone() (string, error) { } // AvailabilityZone indicates an expected call of AvailabilityZone. -func (mr *MockContextMockRecorder) AvailabilityZone() *gomock.Call { +func (mr *MockContextMockRecorder) AvailabilityZone() *MockContextAvailabilityZoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContext)(nil).AvailabilityZone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailabilityZone", reflect.TypeOf((*MockContext)(nil).AvailabilityZone)) + return &MockContextAvailabilityZoneCall{Call: call} +} + +// MockContextAvailabilityZoneCall wrap *gomock.Call +type MockContextAvailabilityZoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextAvailabilityZoneCall) Return(arg0 string, arg1 error) *MockContextAvailabilityZoneCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextAvailabilityZoneCall) Do(f func() (string, error)) *MockContextAvailabilityZoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextAvailabilityZoneCall) DoAndReturn(f func() (string, error)) *MockContextAvailabilityZoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ClosePortRange mocks base method. @@ -133,9 +253,33 @@ func (m *MockContext) ClosePortRange(arg0 string, arg1 network.PortRange) error } // ClosePortRange indicates an expected call of ClosePortRange. -func (mr *MockContextMockRecorder) ClosePortRange(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) ClosePortRange(arg0, arg1 any) *MockContextClosePortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePortRange", reflect.TypeOf((*MockContext)(nil).ClosePortRange), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosePortRange", reflect.TypeOf((*MockContext)(nil).ClosePortRange), arg0, arg1) + return &MockContextClosePortRangeCall{Call: call} +} + +// MockContextClosePortRangeCall wrap *gomock.Call +type MockContextClosePortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextClosePortRangeCall) Return(arg0 error) *MockContextClosePortRangeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextClosePortRangeCall) Do(f func(string, network.PortRange) error) *MockContextClosePortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextClosePortRangeCall) DoAndReturn(f func(string, network.PortRange) error) *MockContextClosePortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudSpec mocks base method. @@ -148,9 +292,33 @@ func (m *MockContext) CloudSpec(arg0 context.Context) (*params.CloudSpec, error) } // CloudSpec indicates an expected call of CloudSpec. -func (mr *MockContextMockRecorder) CloudSpec(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) CloudSpec(arg0 any) *MockContextCloudSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockContext)(nil).CloudSpec), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudSpec", reflect.TypeOf((*MockContext)(nil).CloudSpec), arg0) + return &MockContextCloudSpecCall{Call: call} +} + +// MockContextCloudSpecCall wrap *gomock.Call +type MockContextCloudSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextCloudSpecCall) Return(arg0 *params.CloudSpec, arg1 error) *MockContextCloudSpecCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextCloudSpecCall) Do(f func(context.Context) (*params.CloudSpec, error)) *MockContextCloudSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextCloudSpecCall) DoAndReturn(f func(context.Context) (*params.CloudSpec, error)) *MockContextCloudSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConfigSettings mocks base method. @@ -163,9 +331,33 @@ func (m *MockContext) ConfigSettings() (charm.Settings, error) { } // ConfigSettings indicates an expected call of ConfigSettings. -func (mr *MockContextMockRecorder) ConfigSettings() *gomock.Call { +func (mr *MockContextMockRecorder) ConfigSettings() *MockContextConfigSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockContext)(nil).ConfigSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSettings", reflect.TypeOf((*MockContext)(nil).ConfigSettings)) + return &MockContextConfigSettingsCall{Call: call} +} + +// MockContextConfigSettingsCall wrap *gomock.Call +type MockContextConfigSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextConfigSettingsCall) Return(arg0 charm.Settings, arg1 error) *MockContextConfigSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextConfigSettingsCall) Do(f func() (charm.Settings, error)) *MockContextConfigSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextConfigSettingsCall) DoAndReturn(f func() (charm.Settings, error)) *MockContextConfigSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateSecret mocks base method. @@ -178,9 +370,33 @@ func (m *MockContext) CreateSecret(arg0 *jujuc.SecretCreateArgs) (*secrets.URI, } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockContextMockRecorder) CreateSecret(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) CreateSecret(arg0 any) *MockContextCreateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockContext)(nil).CreateSecret), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockContext)(nil).CreateSecret), arg0) + return &MockContextCreateSecretCall{Call: call} +} + +// MockContextCreateSecretCall wrap *gomock.Call +type MockContextCreateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextCreateSecretCall) Return(arg0 *secrets.URI, arg1 error) *MockContextCreateSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextCreateSecretCall) Do(f func(*jujuc.SecretCreateArgs) (*secrets.URI, error)) *MockContextCreateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextCreateSecretCall) DoAndReturn(f func(*jujuc.SecretCreateArgs) (*secrets.URI, error)) *MockContextCreateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteCharmStateValue mocks base method. @@ -192,9 +408,33 @@ func (m *MockContext) DeleteCharmStateValue(arg0 string) error { } // DeleteCharmStateValue indicates an expected call of DeleteCharmStateValue. -func (mr *MockContextMockRecorder) DeleteCharmStateValue(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) DeleteCharmStateValue(arg0 any) *MockContextDeleteCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCharmStateValue", reflect.TypeOf((*MockContext)(nil).DeleteCharmStateValue), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCharmStateValue", reflect.TypeOf((*MockContext)(nil).DeleteCharmStateValue), arg0) + return &MockContextDeleteCharmStateValueCall{Call: call} +} + +// MockContextDeleteCharmStateValueCall wrap *gomock.Call +type MockContextDeleteCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDeleteCharmStateValueCall) Return(arg0 error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDeleteCharmStateValueCall) Do(f func(string) error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDeleteCharmStateValueCall) DoAndReturn(f func(string) error) *MockContextDeleteCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DownloadResource mocks base method. @@ -207,9 +447,33 @@ func (m *MockContext) DownloadResource(arg0 context.Context, arg1 string) (strin } // DownloadResource indicates an expected call of DownloadResource. -func (mr *MockContextMockRecorder) DownloadResource(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) DownloadResource(arg0, arg1 any) *MockContextDownloadResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockContext)(nil).DownloadResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadResource", reflect.TypeOf((*MockContext)(nil).DownloadResource), arg0, arg1) + return &MockContextDownloadResourceCall{Call: call} +} + +// MockContextDownloadResourceCall wrap *gomock.Call +type MockContextDownloadResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextDownloadResourceCall) Return(arg0 string, arg1 error) *MockContextDownloadResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextDownloadResourceCall) Do(f func(context.Context, string) (string, error)) *MockContextDownloadResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextDownloadResourceCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockContextDownloadResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flush mocks base method. @@ -221,9 +485,33 @@ func (m *MockContext) Flush(arg0 context.Context, arg1 string, arg2 error) error } // Flush indicates an expected call of Flush. -func (mr *MockContextMockRecorder) Flush(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockContextMockRecorder) Flush(arg0, arg1, arg2 any) *MockContextFlushCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flush", reflect.TypeOf((*MockContext)(nil).Flush), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flush", reflect.TypeOf((*MockContext)(nil).Flush), arg0, arg1, arg2) + return &MockContextFlushCall{Call: call} +} + +// MockContextFlushCall wrap *gomock.Call +type MockContextFlushCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextFlushCall) Return(arg0 error) *MockContextFlushCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextFlushCall) Do(f func(context.Context, string, error) error) *MockContextFlushCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextFlushCall) DoAndReturn(f func(context.Context, string, error) error) *MockContextFlushCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FlushPayloads mocks base method. @@ -235,9 +523,33 @@ func (m *MockContext) FlushPayloads() error { } // FlushPayloads indicates an expected call of FlushPayloads. -func (mr *MockContextMockRecorder) FlushPayloads() *gomock.Call { +func (mr *MockContextMockRecorder) FlushPayloads() *MockContextFlushPayloadsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushPayloads", reflect.TypeOf((*MockContext)(nil).FlushPayloads)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushPayloads", reflect.TypeOf((*MockContext)(nil).FlushPayloads)) + return &MockContextFlushPayloadsCall{Call: call} +} + +// MockContextFlushPayloadsCall wrap *gomock.Call +type MockContextFlushPayloadsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextFlushPayloadsCall) Return(arg0 error) *MockContextFlushPayloadsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextFlushPayloadsCall) Do(f func() error) *MockContextFlushPayloadsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextFlushPayloadsCall) DoAndReturn(f func() error) *MockContextFlushPayloadsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmState mocks base method. @@ -250,9 +562,33 @@ func (m *MockContext) GetCharmState() (map[string]string, error) { } // GetCharmState indicates an expected call of GetCharmState. -func (mr *MockContextMockRecorder) GetCharmState() *gomock.Call { +func (mr *MockContextMockRecorder) GetCharmState() *MockContextGetCharmStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmState", reflect.TypeOf((*MockContext)(nil).GetCharmState)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmState", reflect.TypeOf((*MockContext)(nil).GetCharmState)) + return &MockContextGetCharmStateCall{Call: call} +} + +// MockContextGetCharmStateCall wrap *gomock.Call +type MockContextGetCharmStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetCharmStateCall) Return(arg0 map[string]string, arg1 error) *MockContextGetCharmStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetCharmStateCall) Do(f func() (map[string]string, error)) *MockContextGetCharmStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetCharmStateCall) DoAndReturn(f func() (map[string]string, error)) *MockContextGetCharmStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCharmStateValue mocks base method. @@ -265,9 +601,33 @@ func (m *MockContext) GetCharmStateValue(arg0 string) (string, error) { } // GetCharmStateValue indicates an expected call of GetCharmStateValue. -func (mr *MockContextMockRecorder) GetCharmStateValue(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetCharmStateValue(arg0 any) *MockContextGetCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmStateValue", reflect.TypeOf((*MockContext)(nil).GetCharmStateValue), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmStateValue", reflect.TypeOf((*MockContext)(nil).GetCharmStateValue), arg0) + return &MockContextGetCharmStateValueCall{Call: call} +} + +// MockContextGetCharmStateValueCall wrap *gomock.Call +type MockContextGetCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetCharmStateValueCall) Return(arg0 string, arg1 error) *MockContextGetCharmStateValueCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetCharmStateValueCall) Do(f func(string) (string, error)) *MockContextGetCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetCharmStateValueCall) DoAndReturn(f func(string) (string, error)) *MockContextGetCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetLogger mocks base method. @@ -279,9 +639,33 @@ func (m *MockContext) GetLogger(arg0 string) loggo.Logger { } // GetLogger indicates an expected call of GetLogger. -func (mr *MockContextMockRecorder) GetLogger(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetLogger(arg0 any) *MockContextGetLoggerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockContext)(nil).GetLogger), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogger", reflect.TypeOf((*MockContext)(nil).GetLogger), arg0) + return &MockContextGetLoggerCall{Call: call} +} + +// MockContextGetLoggerCall wrap *gomock.Call +type MockContextGetLoggerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetLoggerCall) Return(arg0 loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetLoggerCall) Do(f func(string) loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetLoggerCall) DoAndReturn(f func(string) loggo.Logger) *MockContextGetLoggerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPayload mocks base method. @@ -294,9 +678,33 @@ func (m *MockContext) GetPayload(arg0, arg1 string) (*payloads.Payload, error) { } // GetPayload indicates an expected call of GetPayload. -func (mr *MockContextMockRecorder) GetPayload(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetPayload(arg0, arg1 any) *MockContextGetPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayload", reflect.TypeOf((*MockContext)(nil).GetPayload), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayload", reflect.TypeOf((*MockContext)(nil).GetPayload), arg0, arg1) + return &MockContextGetPayloadCall{Call: call} +} + +// MockContextGetPayloadCall wrap *gomock.Call +type MockContextGetPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetPayloadCall) Return(arg0 *payloads.Payload, arg1 error) *MockContextGetPayloadCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetPayloadCall) Do(f func(string, string) (*payloads.Payload, error)) *MockContextGetPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetPayloadCall) DoAndReturn(f func(string, string) (*payloads.Payload, error)) *MockContextGetPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetSecret mocks base method. @@ -309,9 +717,33 @@ func (m *MockContext) GetSecret(arg0 *secrets.URI, arg1 string, arg2, arg3 bool) } // GetSecret indicates an expected call of GetSecret. -func (mr *MockContextMockRecorder) GetSecret(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockContextMockRecorder) GetSecret(arg0, arg1, arg2, arg3 any) *MockContextGetSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockContext)(nil).GetSecret), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockContext)(nil).GetSecret), arg0, arg1, arg2, arg3) + return &MockContextGetSecretCall{Call: call} +} + +// MockContextGetSecretCall wrap *gomock.Call +type MockContextGetSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGetSecretCall) Return(arg0 secrets.SecretValue, arg1 error) *MockContextGetSecretCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGetSecretCall) Do(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockContextGetSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGetSecretCall) DoAndReturn(f func(*secrets.URI, string, bool, bool) (secrets.SecretValue, error)) *MockContextGetSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GoalState mocks base method. @@ -324,9 +756,33 @@ func (m *MockContext) GoalState(arg0 context.Context) (*application.GoalState, e } // GoalState indicates an expected call of GoalState. -func (mr *MockContextMockRecorder) GoalState(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) GoalState(arg0 any) *MockContextGoalStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockContext)(nil).GoalState), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GoalState", reflect.TypeOf((*MockContext)(nil).GoalState), arg0) + return &MockContextGoalStateCall{Call: call} +} + +// MockContextGoalStateCall wrap *gomock.Call +type MockContextGoalStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGoalStateCall) Return(arg0 *application.GoalState, arg1 error) *MockContextGoalStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGoalStateCall) Do(f func(context.Context) (*application.GoalState, error)) *MockContextGoalStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGoalStateCall) DoAndReturn(f func(context.Context) (*application.GoalState, error)) *MockContextGoalStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GrantSecret mocks base method. @@ -338,9 +794,33 @@ func (m *MockContext) GrantSecret(arg0 *secrets.URI, arg1 *jujuc.SecretGrantRevo } // GrantSecret indicates an expected call of GrantSecret. -func (mr *MockContextMockRecorder) GrantSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) GrantSecret(arg0, arg1 any) *MockContextGrantSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockContext)(nil).GrantSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockContext)(nil).GrantSecret), arg0, arg1) + return &MockContextGrantSecretCall{Call: call} +} + +// MockContextGrantSecretCall wrap *gomock.Call +type MockContextGrantSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextGrantSecretCall) Return(arg0 error) *MockContextGrantSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextGrantSecretCall) Do(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextGrantSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextGrantSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextGrantSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasExecutionSetUnitStatus mocks base method. @@ -352,9 +832,33 @@ func (m *MockContext) HasExecutionSetUnitStatus() bool { } // HasExecutionSetUnitStatus indicates an expected call of HasExecutionSetUnitStatus. -func (mr *MockContextMockRecorder) HasExecutionSetUnitStatus() *gomock.Call { +func (mr *MockContextMockRecorder) HasExecutionSetUnitStatus() *MockContextHasExecutionSetUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExecutionSetUnitStatus", reflect.TypeOf((*MockContext)(nil).HasExecutionSetUnitStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasExecutionSetUnitStatus", reflect.TypeOf((*MockContext)(nil).HasExecutionSetUnitStatus)) + return &MockContextHasExecutionSetUnitStatusCall{Call: call} +} + +// MockContextHasExecutionSetUnitStatusCall wrap *gomock.Call +type MockContextHasExecutionSetUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHasExecutionSetUnitStatusCall) Return(arg0 bool) *MockContextHasExecutionSetUnitStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHasExecutionSetUnitStatusCall) Do(f func() bool) *MockContextHasExecutionSetUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHasExecutionSetUnitStatusCall) DoAndReturn(f func() bool) *MockContextHasExecutionSetUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookRelation mocks base method. @@ -367,9 +871,33 @@ func (m *MockContext) HookRelation() (jujuc.ContextRelation, error) { } // HookRelation indicates an expected call of HookRelation. -func (mr *MockContextMockRecorder) HookRelation() *gomock.Call { +func (mr *MockContextMockRecorder) HookRelation() *MockContextHookRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockContext)(nil).HookRelation)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookRelation", reflect.TypeOf((*MockContext)(nil).HookRelation)) + return &MockContextHookRelationCall{Call: call} +} + +// MockContextHookRelationCall wrap *gomock.Call +type MockContextHookRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHookRelationCall) Return(arg0 jujuc.ContextRelation, arg1 error) *MockContextHookRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHookRelationCall) Do(f func() (jujuc.ContextRelation, error)) *MockContextHookRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHookRelationCall) DoAndReturn(f func() (jujuc.ContextRelation, error)) *MockContextHookRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookStorage mocks base method. @@ -382,9 +910,33 @@ func (m *MockContext) HookStorage() (jujuc.ContextStorageAttachment, error) { } // HookStorage indicates an expected call of HookStorage. -func (mr *MockContextMockRecorder) HookStorage() *gomock.Call { +func (mr *MockContextMockRecorder) HookStorage() *MockContextHookStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookStorage", reflect.TypeOf((*MockContext)(nil).HookStorage)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookStorage", reflect.TypeOf((*MockContext)(nil).HookStorage)) + return &MockContextHookStorageCall{Call: call} +} + +// MockContextHookStorageCall wrap *gomock.Call +type MockContextHookStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHookStorageCall) Return(arg0 jujuc.ContextStorageAttachment, arg1 error) *MockContextHookStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHookStorageCall) Do(f func() (jujuc.ContextStorageAttachment, error)) *MockContextHookStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHookStorageCall) DoAndReturn(f func() (jujuc.ContextStorageAttachment, error)) *MockContextHookStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HookVars mocks base method. @@ -397,9 +949,33 @@ func (m *MockContext) HookVars(arg0 context.Context, arg1 context0.Paths, arg2 b } // HookVars indicates an expected call of HookVars. -func (mr *MockContextMockRecorder) HookVars(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockContextMockRecorder) HookVars(arg0, arg1, arg2, arg3 any) *MockContextHookVarsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookVars", reflect.TypeOf((*MockContext)(nil).HookVars), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HookVars", reflect.TypeOf((*MockContext)(nil).HookVars), arg0, arg1, arg2, arg3) + return &MockContextHookVarsCall{Call: call} +} + +// MockContextHookVarsCall wrap *gomock.Call +type MockContextHookVarsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextHookVarsCall) Return(arg0 []string, arg1 error) *MockContextHookVarsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextHookVarsCall) Do(f func(context.Context, context0.Paths, bool, context0.Environmenter) ([]string, error)) *MockContextHookVarsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextHookVarsCall) DoAndReturn(f func(context.Context, context0.Paths, bool, context0.Environmenter) ([]string, error)) *MockContextHookVarsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -411,9 +987,33 @@ func (m *MockContext) Id() string { } // Id indicates an expected call of Id. -func (mr *MockContextMockRecorder) Id() *gomock.Call { +func (mr *MockContextMockRecorder) Id() *MockContextIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContext)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockContext)(nil).Id)) + return &MockContextIdCall{Call: call} +} + +// MockContextIdCall wrap *gomock.Call +type MockContextIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextIdCall) Return(arg0 string) *MockContextIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextIdCall) Do(f func() string) *MockContextIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextIdCall) DoAndReturn(f func() string) *MockContextIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsLeader mocks base method. @@ -426,9 +1026,33 @@ func (m *MockContext) IsLeader() (bool, error) { } // IsLeader indicates an expected call of IsLeader. -func (mr *MockContextMockRecorder) IsLeader() *gomock.Call { +func (mr *MockContextMockRecorder) IsLeader() *MockContextIsLeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockContext)(nil).IsLeader)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockContext)(nil).IsLeader)) + return &MockContextIsLeaderCall{Call: call} +} + +// MockContextIsLeaderCall wrap *gomock.Call +type MockContextIsLeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextIsLeaderCall) Return(arg0 bool, arg1 error) *MockContextIsLeaderCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextIsLeaderCall) Do(f func() (bool, error)) *MockContextIsLeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextIsLeaderCall) DoAndReturn(f func() (bool, error)) *MockContextIsLeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeaderSettings mocks base method. @@ -441,9 +1065,33 @@ func (m *MockContext) LeaderSettings() (map[string]string, error) { } // LeaderSettings indicates an expected call of LeaderSettings. -func (mr *MockContextMockRecorder) LeaderSettings() *gomock.Call { +func (mr *MockContextMockRecorder) LeaderSettings() *MockContextLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockContext)(nil).LeaderSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderSettings", reflect.TypeOf((*MockContext)(nil).LeaderSettings)) + return &MockContextLeaderSettingsCall{Call: call} +} + +// MockContextLeaderSettingsCall wrap *gomock.Call +type MockContextLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextLeaderSettingsCall) Return(arg0 map[string]string, arg1 error) *MockContextLeaderSettingsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextLeaderSettingsCall) Do(f func() (map[string]string, error)) *MockContextLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextLeaderSettingsCall) DoAndReturn(f func() (map[string]string, error)) *MockContextLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListPayloads mocks base method. @@ -456,9 +1104,33 @@ func (m *MockContext) ListPayloads() ([]string, error) { } // ListPayloads indicates an expected call of ListPayloads. -func (mr *MockContextMockRecorder) ListPayloads() *gomock.Call { +func (mr *MockContextMockRecorder) ListPayloads() *MockContextListPayloadsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPayloads", reflect.TypeOf((*MockContext)(nil).ListPayloads)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPayloads", reflect.TypeOf((*MockContext)(nil).ListPayloads)) + return &MockContextListPayloadsCall{Call: call} +} + +// MockContextListPayloadsCall wrap *gomock.Call +type MockContextListPayloadsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextListPayloadsCall) Return(arg0 []string, arg1 error) *MockContextListPayloadsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextListPayloadsCall) Do(f func() ([]string, error)) *MockContextListPayloadsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextListPayloadsCall) DoAndReturn(f func() ([]string, error)) *MockContextListPayloadsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogActionMessage mocks base method. @@ -470,9 +1142,33 @@ func (m *MockContext) LogActionMessage(arg0 string) error { } // LogActionMessage indicates an expected call of LogActionMessage. -func (mr *MockContextMockRecorder) LogActionMessage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) LogActionMessage(arg0 any) *MockContextLogActionMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockContext)(nil).LogActionMessage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogActionMessage", reflect.TypeOf((*MockContext)(nil).LogActionMessage), arg0) + return &MockContextLogActionMessageCall{Call: call} +} + +// MockContextLogActionMessageCall wrap *gomock.Call +type MockContextLogActionMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextLogActionMessageCall) Return(arg0 error) *MockContextLogActionMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextLogActionMessageCall) Do(f func(string) error) *MockContextLogActionMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextLogActionMessageCall) DoAndReturn(f func(string) error) *MockContextLogActionMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelType mocks base method. @@ -484,9 +1180,33 @@ func (m *MockContext) ModelType() model.ModelType { } // ModelType indicates an expected call of ModelType. -func (mr *MockContextMockRecorder) ModelType() *gomock.Call { +func (mr *MockContextMockRecorder) ModelType() *MockContextModelTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockContext)(nil).ModelType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockContext)(nil).ModelType)) + return &MockContextModelTypeCall{Call: call} +} + +// MockContextModelTypeCall wrap *gomock.Call +type MockContextModelTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextModelTypeCall) Return(arg0 model.ModelType) *MockContextModelTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextModelTypeCall) Do(f func() model.ModelType) *MockContextModelTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextModelTypeCall) DoAndReturn(f func() model.ModelType) *MockContextModelTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NetworkInfo mocks base method. @@ -499,9 +1219,33 @@ func (m *MockContext) NetworkInfo(arg0 []string, arg1 int) (map[string]params.Ne } // NetworkInfo indicates an expected call of NetworkInfo. -func (mr *MockContextMockRecorder) NetworkInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) NetworkInfo(arg0, arg1 any) *MockContextNetworkInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockContext)(nil).NetworkInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInfo", reflect.TypeOf((*MockContext)(nil).NetworkInfo), arg0, arg1) + return &MockContextNetworkInfoCall{Call: call} +} + +// MockContextNetworkInfoCall wrap *gomock.Call +type MockContextNetworkInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextNetworkInfoCall) Return(arg0 map[string]params.NetworkInfoResult, arg1 error) *MockContextNetworkInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextNetworkInfoCall) Do(f func([]string, int) (map[string]params.NetworkInfoResult, error)) *MockContextNetworkInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextNetworkInfoCall) DoAndReturn(f func([]string, int) (map[string]params.NetworkInfoResult, error)) *MockContextNetworkInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenPortRange mocks base method. @@ -513,9 +1257,33 @@ func (m *MockContext) OpenPortRange(arg0 string, arg1 network.PortRange) error { } // OpenPortRange indicates an expected call of OpenPortRange. -func (mr *MockContextMockRecorder) OpenPortRange(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) OpenPortRange(arg0, arg1 any) *MockContextOpenPortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPortRange", reflect.TypeOf((*MockContext)(nil).OpenPortRange), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPortRange", reflect.TypeOf((*MockContext)(nil).OpenPortRange), arg0, arg1) + return &MockContextOpenPortRangeCall{Call: call} +} + +// MockContextOpenPortRangeCall wrap *gomock.Call +type MockContextOpenPortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextOpenPortRangeCall) Return(arg0 error) *MockContextOpenPortRangeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextOpenPortRangeCall) Do(f func(string, network.PortRange) error) *MockContextOpenPortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextOpenPortRangeCall) DoAndReturn(f func(string, network.PortRange) error) *MockContextOpenPortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRanges mocks base method. @@ -527,9 +1295,33 @@ func (m *MockContext) OpenedPortRanges() network.GroupedPortRanges { } // OpenedPortRanges indicates an expected call of OpenedPortRanges. -func (mr *MockContextMockRecorder) OpenedPortRanges() *gomock.Call { +func (mr *MockContextMockRecorder) OpenedPortRanges() *MockContextOpenedPortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockContext)(nil).OpenedPortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockContext)(nil).OpenedPortRanges)) + return &MockContextOpenedPortRangesCall{Call: call} +} + +// MockContextOpenedPortRangesCall wrap *gomock.Call +type MockContextOpenedPortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextOpenedPortRangesCall) Return(arg0 network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextOpenedPortRangesCall) Do(f func() network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextOpenedPortRangesCall) DoAndReturn(f func() network.GroupedPortRanges) *MockContextOpenedPortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Prepare mocks base method. @@ -541,9 +1333,33 @@ func (m *MockContext) Prepare(arg0 context.Context) error { } // Prepare indicates an expected call of Prepare. -func (mr *MockContextMockRecorder) Prepare(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Prepare(arg0 any) *MockContextPrepareCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockContext)(nil).Prepare), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockContext)(nil).Prepare), arg0) + return &MockContextPrepareCall{Call: call} +} + +// MockContextPrepareCall wrap *gomock.Call +type MockContextPrepareCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextPrepareCall) Return(arg0 error) *MockContextPrepareCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextPrepareCall) Do(f func(context.Context) error) *MockContextPrepareCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextPrepareCall) DoAndReturn(f func(context.Context) error) *MockContextPrepareCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrivateAddress mocks base method. @@ -556,9 +1372,33 @@ func (m *MockContext) PrivateAddress() (string, error) { } // PrivateAddress indicates an expected call of PrivateAddress. -func (mr *MockContextMockRecorder) PrivateAddress() *gomock.Call { +func (mr *MockContextMockRecorder) PrivateAddress() *MockContextPrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockContext)(nil).PrivateAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateAddress", reflect.TypeOf((*MockContext)(nil).PrivateAddress)) + return &MockContextPrivateAddressCall{Call: call} +} + +// MockContextPrivateAddressCall wrap *gomock.Call +type MockContextPrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextPrivateAddressCall) Return(arg0 string, arg1 error) *MockContextPrivateAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextPrivateAddressCall) Do(f func() (string, error)) *MockContextPrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextPrivateAddressCall) DoAndReturn(f func() (string, error)) *MockContextPrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicAddress mocks base method. @@ -571,9 +1411,33 @@ func (m *MockContext) PublicAddress() (string, error) { } // PublicAddress indicates an expected call of PublicAddress. -func (mr *MockContextMockRecorder) PublicAddress() *gomock.Call { +func (mr *MockContextMockRecorder) PublicAddress() *MockContextPublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockContext)(nil).PublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicAddress", reflect.TypeOf((*MockContext)(nil).PublicAddress)) + return &MockContextPublicAddressCall{Call: call} +} + +// MockContextPublicAddressCall wrap *gomock.Call +type MockContextPublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextPublicAddressCall) Return(arg0 string, arg1 error) *MockContextPublicAddressCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextPublicAddressCall) Do(f func() (string, error)) *MockContextPublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextPublicAddressCall) DoAndReturn(f func() (string, error)) *MockContextPublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Relation mocks base method. @@ -586,9 +1450,33 @@ func (m *MockContext) Relation(arg0 int) (jujuc.ContextRelation, error) { } // Relation indicates an expected call of Relation. -func (mr *MockContextMockRecorder) Relation(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Relation(arg0 any) *MockContextRelationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockContext)(nil).Relation), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Relation", reflect.TypeOf((*MockContext)(nil).Relation), arg0) + return &MockContextRelationCall{Call: call} +} + +// MockContextRelationCall wrap *gomock.Call +type MockContextRelationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationCall) Return(arg0 jujuc.ContextRelation, arg1 error) *MockContextRelationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationCall) Do(f func(int) (jujuc.ContextRelation, error)) *MockContextRelationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationCall) DoAndReturn(f func(int) (jujuc.ContextRelation, error)) *MockContextRelationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationIds mocks base method. @@ -601,9 +1489,33 @@ func (m *MockContext) RelationIds() ([]int, error) { } // RelationIds indicates an expected call of RelationIds. -func (mr *MockContextMockRecorder) RelationIds() *gomock.Call { +func (mr *MockContextMockRecorder) RelationIds() *MockContextRelationIdsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationIds", reflect.TypeOf((*MockContext)(nil).RelationIds)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationIds", reflect.TypeOf((*MockContext)(nil).RelationIds)) + return &MockContextRelationIdsCall{Call: call} +} + +// MockContextRelationIdsCall wrap *gomock.Call +type MockContextRelationIdsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRelationIdsCall) Return(arg0 []int, arg1 error) *MockContextRelationIdsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRelationIdsCall) Do(f func() ([]int, error)) *MockContextRelationIdsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRelationIdsCall) DoAndReturn(f func() ([]int, error)) *MockContextRelationIdsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplicationName mocks base method. @@ -616,9 +1528,33 @@ func (m *MockContext) RemoteApplicationName() (string, error) { } // RemoteApplicationName indicates an expected call of RemoteApplicationName. -func (mr *MockContextMockRecorder) RemoteApplicationName() *gomock.Call { +func (mr *MockContextMockRecorder) RemoteApplicationName() *MockContextRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContext)(nil).RemoteApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplicationName", reflect.TypeOf((*MockContext)(nil).RemoteApplicationName)) + return &MockContextRemoteApplicationNameCall{Call: call} +} + +// MockContextRemoteApplicationNameCall wrap *gomock.Call +type MockContextRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoteApplicationNameCall) Return(arg0 string, arg1 error) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoteApplicationNameCall) Do(f func() (string, error)) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoteApplicationNameCall) DoAndReturn(f func() (string, error)) *MockContextRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteUnitName mocks base method. @@ -631,9 +1567,33 @@ func (m *MockContext) RemoteUnitName() (string, error) { } // RemoteUnitName indicates an expected call of RemoteUnitName. -func (mr *MockContextMockRecorder) RemoteUnitName() *gomock.Call { +func (mr *MockContextMockRecorder) RemoteUnitName() *MockContextRemoteUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteUnitName", reflect.TypeOf((*MockContext)(nil).RemoteUnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteUnitName", reflect.TypeOf((*MockContext)(nil).RemoteUnitName)) + return &MockContextRemoteUnitNameCall{Call: call} +} + +// MockContextRemoteUnitNameCall wrap *gomock.Call +type MockContextRemoteUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoteUnitNameCall) Return(arg0 string, arg1 error) *MockContextRemoteUnitNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoteUnitNameCall) Do(f func() (string, error)) *MockContextRemoteUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoteUnitNameCall) DoAndReturn(f func() (string, error)) *MockContextRemoteUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoveSecret mocks base method. @@ -645,9 +1605,33 @@ func (m *MockContext) RemoveSecret(arg0 *secrets.URI, arg1 *int) error { } // RemoveSecret indicates an expected call of RemoveSecret. -func (mr *MockContextMockRecorder) RemoveSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) RemoveSecret(arg0, arg1 any) *MockContextRemoveSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockContext)(nil).RemoveSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockContext)(nil).RemoveSecret), arg0, arg1) + return &MockContextRemoveSecretCall{Call: call} +} + +// MockContextRemoveSecretCall wrap *gomock.Call +type MockContextRemoveSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRemoveSecretCall) Return(arg0 error) *MockContextRemoveSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRemoveSecretCall) Do(f func(*secrets.URI, *int) error) *MockContextRemoveSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRemoveSecretCall) DoAndReturn(f func(*secrets.URI, *int) error) *MockContextRemoveSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RequestReboot mocks base method. @@ -659,9 +1643,33 @@ func (m *MockContext) RequestReboot(arg0 jujuc.RebootPriority) error { } // RequestReboot indicates an expected call of RequestReboot. -func (mr *MockContextMockRecorder) RequestReboot(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) RequestReboot(arg0 any) *MockContextRequestRebootCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockContext)(nil).RequestReboot), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestReboot", reflect.TypeOf((*MockContext)(nil).RequestReboot), arg0) + return &MockContextRequestRebootCall{Call: call} +} + +// MockContextRequestRebootCall wrap *gomock.Call +type MockContextRequestRebootCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRequestRebootCall) Return(arg0 error) *MockContextRequestRebootCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRequestRebootCall) Do(f func(jujuc.RebootPriority) error) *MockContextRequestRebootCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRequestRebootCall) DoAndReturn(f func(jujuc.RebootPriority) error) *MockContextRequestRebootCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResetExecutionSetUnitStatus mocks base method. @@ -671,9 +1679,33 @@ func (m *MockContext) ResetExecutionSetUnitStatus() { } // ResetExecutionSetUnitStatus indicates an expected call of ResetExecutionSetUnitStatus. -func (mr *MockContextMockRecorder) ResetExecutionSetUnitStatus() *gomock.Call { +func (mr *MockContextMockRecorder) ResetExecutionSetUnitStatus() *MockContextResetExecutionSetUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetExecutionSetUnitStatus", reflect.TypeOf((*MockContext)(nil).ResetExecutionSetUnitStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetExecutionSetUnitStatus", reflect.TypeOf((*MockContext)(nil).ResetExecutionSetUnitStatus)) + return &MockContextResetExecutionSetUnitStatusCall{Call: call} +} + +// MockContextResetExecutionSetUnitStatusCall wrap *gomock.Call +type MockContextResetExecutionSetUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextResetExecutionSetUnitStatusCall) Return() *MockContextResetExecutionSetUnitStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextResetExecutionSetUnitStatusCall) Do(f func()) *MockContextResetExecutionSetUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextResetExecutionSetUnitStatusCall) DoAndReturn(f func()) *MockContextResetExecutionSetUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RevokeSecret mocks base method. @@ -685,9 +1717,33 @@ func (m *MockContext) RevokeSecret(arg0 *secrets.URI, arg1 *jujuc.SecretGrantRev } // RevokeSecret indicates an expected call of RevokeSecret. -func (mr *MockContextMockRecorder) RevokeSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) RevokeSecret(arg0, arg1 any) *MockContextRevokeSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockContext)(nil).RevokeSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockContext)(nil).RevokeSecret), arg0, arg1) + return &MockContextRevokeSecretCall{Call: call} +} + +// MockContextRevokeSecretCall wrap *gomock.Call +type MockContextRevokeSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextRevokeSecretCall) Return(arg0 error) *MockContextRevokeSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextRevokeSecretCall) Do(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextRevokeSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextRevokeSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretGrantRevokeArgs) error) *MockContextRevokeSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretMetadata mocks base method. @@ -700,9 +1756,33 @@ func (m *MockContext) SecretMetadata() (map[string]jujuc.SecretMetadata, error) } // SecretMetadata indicates an expected call of SecretMetadata. -func (mr *MockContextMockRecorder) SecretMetadata() *gomock.Call { +func (mr *MockContextMockRecorder) SecretMetadata() *MockContextSecretMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockContext)(nil).SecretMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockContext)(nil).SecretMetadata)) + return &MockContextSecretMetadataCall{Call: call} +} + +// MockContextSecretMetadataCall wrap *gomock.Call +type MockContextSecretMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSecretMetadataCall) Return(arg0 map[string]jujuc.SecretMetadata, arg1 error) *MockContextSecretMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSecretMetadataCall) Do(f func() (map[string]jujuc.SecretMetadata, error)) *MockContextSecretMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSecretMetadataCall) DoAndReturn(f func() (map[string]jujuc.SecretMetadata, error)) *MockContextSecretMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActionFailed mocks base method. @@ -714,9 +1794,33 @@ func (m *MockContext) SetActionFailed() error { } // SetActionFailed indicates an expected call of SetActionFailed. -func (mr *MockContextMockRecorder) SetActionFailed() *gomock.Call { +func (mr *MockContextMockRecorder) SetActionFailed() *MockContextSetActionFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionFailed", reflect.TypeOf((*MockContext)(nil).SetActionFailed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionFailed", reflect.TypeOf((*MockContext)(nil).SetActionFailed)) + return &MockContextSetActionFailedCall{Call: call} +} + +// MockContextSetActionFailedCall wrap *gomock.Call +type MockContextSetActionFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetActionFailedCall) Return(arg0 error) *MockContextSetActionFailedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetActionFailedCall) Do(f func() error) *MockContextSetActionFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetActionFailedCall) DoAndReturn(f func() error) *MockContextSetActionFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetActionMessage mocks base method. @@ -728,9 +1832,33 @@ func (m *MockContext) SetActionMessage(arg0 string) error { } // SetActionMessage indicates an expected call of SetActionMessage. -func (mr *MockContextMockRecorder) SetActionMessage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetActionMessage(arg0 any) *MockContextSetActionMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionMessage", reflect.TypeOf((*MockContext)(nil).SetActionMessage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetActionMessage", reflect.TypeOf((*MockContext)(nil).SetActionMessage), arg0) + return &MockContextSetActionMessageCall{Call: call} +} + +// MockContextSetActionMessageCall wrap *gomock.Call +type MockContextSetActionMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetActionMessageCall) Return(arg0 error) *MockContextSetActionMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetActionMessageCall) Do(f func(string) error) *MockContextSetActionMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetActionMessageCall) DoAndReturn(f func(string) error) *MockContextSetActionMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetApplicationStatus mocks base method. @@ -742,9 +1870,33 @@ func (m *MockContext) SetApplicationStatus(arg0 context.Context, arg1 jujuc.Stat } // SetApplicationStatus indicates an expected call of SetApplicationStatus. -func (mr *MockContextMockRecorder) SetApplicationStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetApplicationStatus(arg0, arg1 any) *MockContextSetApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetApplicationStatus", reflect.TypeOf((*MockContext)(nil).SetApplicationStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetApplicationStatus", reflect.TypeOf((*MockContext)(nil).SetApplicationStatus), arg0, arg1) + return &MockContextSetApplicationStatusCall{Call: call} +} + +// MockContextSetApplicationStatusCall wrap *gomock.Call +type MockContextSetApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetApplicationStatusCall) Return(arg0 error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetApplicationStatusCall) Do(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetApplicationStatusCall) DoAndReturn(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmStateValue mocks base method. @@ -756,9 +1908,33 @@ func (m *MockContext) SetCharmStateValue(arg0, arg1 string) error { } // SetCharmStateValue indicates an expected call of SetCharmStateValue. -func (mr *MockContextMockRecorder) SetCharmStateValue(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetCharmStateValue(arg0, arg1 any) *MockContextSetCharmStateValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStateValue", reflect.TypeOf((*MockContext)(nil).SetCharmStateValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStateValue", reflect.TypeOf((*MockContext)(nil).SetCharmStateValue), arg0, arg1) + return &MockContextSetCharmStateValueCall{Call: call} +} + +// MockContextSetCharmStateValueCall wrap *gomock.Call +type MockContextSetCharmStateValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetCharmStateValueCall) Return(arg0 error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetCharmStateValueCall) Do(f func(string, string) error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetCharmStateValueCall) DoAndReturn(f func(string, string) error) *MockContextSetCharmStateValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPayloadStatus mocks base method. @@ -770,9 +1946,33 @@ func (m *MockContext) SetPayloadStatus(arg0, arg1, arg2 string) error { } // SetPayloadStatus indicates an expected call of SetPayloadStatus. -func (mr *MockContextMockRecorder) SetPayloadStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetPayloadStatus(arg0, arg1, arg2 any) *MockContextSetPayloadStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPayloadStatus", reflect.TypeOf((*MockContext)(nil).SetPayloadStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPayloadStatus", reflect.TypeOf((*MockContext)(nil).SetPayloadStatus), arg0, arg1, arg2) + return &MockContextSetPayloadStatusCall{Call: call} +} + +// MockContextSetPayloadStatusCall wrap *gomock.Call +type MockContextSetPayloadStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetPayloadStatusCall) Return(arg0 error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetPayloadStatusCall) Do(f func(string, string, string) error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetPayloadStatusCall) DoAndReturn(f func(string, string, string) error) *MockContextSetPayloadStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetProcess mocks base method. @@ -782,9 +1982,33 @@ func (m *MockContext) SetProcess(arg0 context0.HookProcess) { } // SetProcess indicates an expected call of SetProcess. -func (mr *MockContextMockRecorder) SetProcess(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetProcess(arg0 any) *MockContextSetProcessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProcess", reflect.TypeOf((*MockContext)(nil).SetProcess), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProcess", reflect.TypeOf((*MockContext)(nil).SetProcess), arg0) + return &MockContextSetProcessCall{Call: call} +} + +// MockContextSetProcessCall wrap *gomock.Call +type MockContextSetProcessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetProcessCall) Return() *MockContextSetProcessCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetProcessCall) Do(f func(context0.HookProcess)) *MockContextSetProcessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetProcessCall) DoAndReturn(f func(context0.HookProcess)) *MockContextSetProcessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitStatus mocks base method. @@ -796,9 +2020,33 @@ func (m *MockContext) SetUnitStatus(arg0 context.Context, arg1 jujuc.StatusInfo) } // SetUnitStatus indicates an expected call of SetUnitStatus. -func (mr *MockContextMockRecorder) SetUnitStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetUnitStatus(arg0, arg1 any) *MockContextSetUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockContext)(nil).SetUnitStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitStatus", reflect.TypeOf((*MockContext)(nil).SetUnitStatus), arg0, arg1) + return &MockContextSetUnitStatusCall{Call: call} +} + +// MockContextSetUnitStatusCall wrap *gomock.Call +type MockContextSetUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetUnitStatusCall) Return(arg0 error) *MockContextSetUnitStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetUnitStatusCall) Do(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetUnitStatusCall) DoAndReturn(f func(context.Context, jujuc.StatusInfo) error) *MockContextSetUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitWorkloadVersion mocks base method. @@ -810,9 +2058,33 @@ func (m *MockContext) SetUnitWorkloadVersion(arg0 context.Context, arg1 string) } // SetUnitWorkloadVersion indicates an expected call of SetUnitWorkloadVersion. -func (mr *MockContextMockRecorder) SetUnitWorkloadVersion(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) SetUnitWorkloadVersion(arg0, arg1 any) *MockContextSetUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).SetUnitWorkloadVersion), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).SetUnitWorkloadVersion), arg0, arg1) + return &MockContextSetUnitWorkloadVersionCall{Call: call} +} + +// MockContextSetUnitWorkloadVersionCall wrap *gomock.Call +type MockContextSetUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextSetUnitWorkloadVersionCall) Return(arg0 error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextSetUnitWorkloadVersionCall) Do(f func(context.Context, string) error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextSetUnitWorkloadVersionCall) DoAndReturn(f func(context.Context, string) error) *MockContextSetUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Storage mocks base method. @@ -825,9 +2097,33 @@ func (m *MockContext) Storage(arg0 names.StorageTag) (jujuc.ContextStorageAttach } // Storage indicates an expected call of Storage. -func (mr *MockContextMockRecorder) Storage(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) Storage(arg0 any) *MockContextStorageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockContext)(nil).Storage), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockContext)(nil).Storage), arg0) + return &MockContextStorageCall{Call: call} +} + +// MockContextStorageCall wrap *gomock.Call +type MockContextStorageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextStorageCall) Return(arg0 jujuc.ContextStorageAttachment, arg1 error) *MockContextStorageCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextStorageCall) Do(f func(names.StorageTag) (jujuc.ContextStorageAttachment, error)) *MockContextStorageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextStorageCall) DoAndReturn(f func(names.StorageTag) (jujuc.ContextStorageAttachment, error)) *MockContextStorageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageTags mocks base method. @@ -840,9 +2136,33 @@ func (m *MockContext) StorageTags() ([]names.StorageTag, error) { } // StorageTags indicates an expected call of StorageTags. -func (mr *MockContextMockRecorder) StorageTags() *gomock.Call { +func (mr *MockContextMockRecorder) StorageTags() *MockContextStorageTagsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTags", reflect.TypeOf((*MockContext)(nil).StorageTags)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageTags", reflect.TypeOf((*MockContext)(nil).StorageTags)) + return &MockContextStorageTagsCall{Call: call} +} + +// MockContextStorageTagsCall wrap *gomock.Call +type MockContextStorageTagsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextStorageTagsCall) Return(arg0 []names.StorageTag, arg1 error) *MockContextStorageTagsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextStorageTagsCall) Do(f func() ([]names.StorageTag, error)) *MockContextStorageTagsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextStorageTagsCall) DoAndReturn(f func() ([]names.StorageTag, error)) *MockContextStorageTagsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TrackPayload mocks base method. @@ -854,9 +2174,33 @@ func (m *MockContext) TrackPayload(arg0 payloads.Payload) error { } // TrackPayload indicates an expected call of TrackPayload. -func (mr *MockContextMockRecorder) TrackPayload(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) TrackPayload(arg0 any) *MockContextTrackPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackPayload", reflect.TypeOf((*MockContext)(nil).TrackPayload), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackPayload", reflect.TypeOf((*MockContext)(nil).TrackPayload), arg0) + return &MockContextTrackPayloadCall{Call: call} +} + +// MockContextTrackPayloadCall wrap *gomock.Call +type MockContextTrackPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextTrackPayloadCall) Return(arg0 error) *MockContextTrackPayloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextTrackPayloadCall) Do(f func(payloads.Payload) error) *MockContextTrackPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextTrackPayloadCall) DoAndReturn(f func(payloads.Payload) error) *MockContextTrackPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitName mocks base method. @@ -868,9 +2212,33 @@ func (m *MockContext) UnitName() string { } // UnitName indicates an expected call of UnitName. -func (mr *MockContextMockRecorder) UnitName() *gomock.Call { +func (mr *MockContextMockRecorder) UnitName() *MockContextUnitNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockContext)(nil).UnitName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitName", reflect.TypeOf((*MockContext)(nil).UnitName)) + return &MockContextUnitNameCall{Call: call} +} + +// MockContextUnitNameCall wrap *gomock.Call +type MockContextUnitNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitNameCall) Return(arg0 string) *MockContextUnitNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitNameCall) Do(f func() string) *MockContextUnitNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitNameCall) DoAndReturn(f func() string) *MockContextUnitNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitStatus mocks base method. @@ -883,9 +2251,33 @@ func (m *MockContext) UnitStatus(arg0 context.Context) (*jujuc.StatusInfo, error } // UnitStatus indicates an expected call of UnitStatus. -func (mr *MockContextMockRecorder) UnitStatus(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) UnitStatus(arg0 any) *MockContextUnitStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockContext)(nil).UnitStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitStatus", reflect.TypeOf((*MockContext)(nil).UnitStatus), arg0) + return &MockContextUnitStatusCall{Call: call} +} + +// MockContextUnitStatusCall wrap *gomock.Call +type MockContextUnitStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitStatusCall) Return(arg0 *jujuc.StatusInfo, arg1 error) *MockContextUnitStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitStatusCall) Do(f func(context.Context) (*jujuc.StatusInfo, error)) *MockContextUnitStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitStatusCall) DoAndReturn(f func(context.Context) (*jujuc.StatusInfo, error)) *MockContextUnitStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitWorkloadVersion mocks base method. @@ -898,9 +2290,33 @@ func (m *MockContext) UnitWorkloadVersion(arg0 context.Context) (string, error) } // UnitWorkloadVersion indicates an expected call of UnitWorkloadVersion. -func (mr *MockContextMockRecorder) UnitWorkloadVersion(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) UnitWorkloadVersion(arg0 any) *MockContextUnitWorkloadVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).UnitWorkloadVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitWorkloadVersion", reflect.TypeOf((*MockContext)(nil).UnitWorkloadVersion), arg0) + return &MockContextUnitWorkloadVersionCall{Call: call} +} + +// MockContextUnitWorkloadVersionCall wrap *gomock.Call +type MockContextUnitWorkloadVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUnitWorkloadVersionCall) Return(arg0 string, arg1 error) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUnitWorkloadVersionCall) Do(f func(context.Context) (string, error)) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUnitWorkloadVersionCall) DoAndReturn(f func(context.Context) (string, error)) *MockContextUnitWorkloadVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UntrackPayload mocks base method. @@ -912,9 +2328,33 @@ func (m *MockContext) UntrackPayload(arg0, arg1 string) error { } // UntrackPayload indicates an expected call of UntrackPayload. -func (mr *MockContextMockRecorder) UntrackPayload(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UntrackPayload(arg0, arg1 any) *MockContextUntrackPayloadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntrackPayload", reflect.TypeOf((*MockContext)(nil).UntrackPayload), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntrackPayload", reflect.TypeOf((*MockContext)(nil).UntrackPayload), arg0, arg1) + return &MockContextUntrackPayloadCall{Call: call} +} + +// MockContextUntrackPayloadCall wrap *gomock.Call +type MockContextUntrackPayloadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUntrackPayloadCall) Return(arg0 error) *MockContextUntrackPayloadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUntrackPayloadCall) Do(f func(string, string) error) *MockContextUntrackPayloadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUntrackPayloadCall) DoAndReturn(f func(string, string) error) *MockContextUntrackPayloadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateActionResults mocks base method. @@ -926,9 +2366,33 @@ func (m *MockContext) UpdateActionResults(arg0 []string, arg1 any) error { } // UpdateActionResults indicates an expected call of UpdateActionResults. -func (mr *MockContextMockRecorder) UpdateActionResults(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UpdateActionResults(arg0, arg1 any) *MockContextUpdateActionResultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateActionResults", reflect.TypeOf((*MockContext)(nil).UpdateActionResults), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateActionResults", reflect.TypeOf((*MockContext)(nil).UpdateActionResults), arg0, arg1) + return &MockContextUpdateActionResultsCall{Call: call} +} + +// MockContextUpdateActionResultsCall wrap *gomock.Call +type MockContextUpdateActionResultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUpdateActionResultsCall) Return(arg0 error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUpdateActionResultsCall) Do(f func([]string, any) error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUpdateActionResultsCall) DoAndReturn(f func([]string, any) error) *MockContextUpdateActionResultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdateSecret mocks base method. @@ -940,9 +2404,33 @@ func (m *MockContext) UpdateSecret(arg0 *secrets.URI, arg1 *jujuc.SecretUpdateAr } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockContextMockRecorder) UpdateSecret(arg0, arg1 any) *gomock.Call { +func (mr *MockContextMockRecorder) UpdateSecret(arg0, arg1 any) *MockContextUpdateSecretCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockContext)(nil).UpdateSecret), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockContext)(nil).UpdateSecret), arg0, arg1) + return &MockContextUpdateSecretCall{Call: call} +} + +// MockContextUpdateSecretCall wrap *gomock.Call +type MockContextUpdateSecretCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextUpdateSecretCall) Return(arg0 error) *MockContextUpdateSecretCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextUpdateSecretCall) Do(f func(*secrets.URI, *jujuc.SecretUpdateArgs) error) *MockContextUpdateSecretCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextUpdateSecretCall) DoAndReturn(f func(*secrets.URI, *jujuc.SecretUpdateArgs) error) *MockContextUpdateSecretCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WorkloadName mocks base method. @@ -955,9 +2443,33 @@ func (m *MockContext) WorkloadName() (string, error) { } // WorkloadName indicates an expected call of WorkloadName. -func (mr *MockContextMockRecorder) WorkloadName() *gomock.Call { +func (mr *MockContextMockRecorder) WorkloadName() *MockContextWorkloadNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadName", reflect.TypeOf((*MockContext)(nil).WorkloadName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkloadName", reflect.TypeOf((*MockContext)(nil).WorkloadName)) + return &MockContextWorkloadNameCall{Call: call} +} + +// MockContextWorkloadNameCall wrap *gomock.Call +type MockContextWorkloadNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextWorkloadNameCall) Return(arg0 string, arg1 error) *MockContextWorkloadNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextWorkloadNameCall) Do(f func() (string, error)) *MockContextWorkloadNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextWorkloadNameCall) DoAndReturn(f func() (string, error)) *MockContextWorkloadNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteLeaderSettings mocks base method. @@ -969,7 +2481,31 @@ func (m *MockContext) WriteLeaderSettings(arg0 map[string]string) error { } // WriteLeaderSettings indicates an expected call of WriteLeaderSettings. -func (mr *MockContextMockRecorder) WriteLeaderSettings(arg0 any) *gomock.Call { +func (mr *MockContextMockRecorder) WriteLeaderSettings(arg0 any) *MockContextWriteLeaderSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockContext)(nil).WriteLeaderSettings), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteLeaderSettings", reflect.TypeOf((*MockContext)(nil).WriteLeaderSettings), arg0) + return &MockContextWriteLeaderSettingsCall{Call: call} +} + +// MockContextWriteLeaderSettingsCall wrap *gomock.Call +type MockContextWriteLeaderSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockContextWriteLeaderSettingsCall) Return(arg0 error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockContextWriteLeaderSettingsCall) Do(f func(map[string]string) error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockContextWriteLeaderSettingsCall) DoAndReturn(f func(map[string]string) error) *MockContextWriteLeaderSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/mocks/factory_mock.go b/internal/worker/uniter/runner/mocks/factory_mock.go index 700f5047434..3934ca84a9a 100644 --- a/internal/worker/uniter/runner/mocks/factory_mock.go +++ b/internal/worker/uniter/runner/mocks/factory_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/factory_mock.go github.com/juju/juju/internal/worker/uniter/runner Factory,Runner +// mockgen -typed -package mocks -destination mocks/factory_mock.go github.com/juju/juju/internal/worker/uniter/runner Factory,Runner // // Package mocks is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockFactory) NewActionRunner(arg0 context.Context, arg1 *uniter.Action, } // NewActionRunner indicates an expected call of NewActionRunner. -func (mr *MockFactoryMockRecorder) NewActionRunner(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewActionRunner(arg0, arg1, arg2 any) *MockFactoryNewActionRunnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewActionRunner", reflect.TypeOf((*MockFactory)(nil).NewActionRunner), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewActionRunner", reflect.TypeOf((*MockFactory)(nil).NewActionRunner), arg0, arg1, arg2) + return &MockFactoryNewActionRunnerCall{Call: call} +} + +// MockFactoryNewActionRunnerCall wrap *gomock.Call +type MockFactoryNewActionRunnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewActionRunnerCall) Return(arg0 runner.Runner, arg1 error) *MockFactoryNewActionRunnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewActionRunnerCall) Do(f func(context.Context, *uniter.Action, <-chan struct{}) (runner.Runner, error)) *MockFactoryNewActionRunnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewActionRunnerCall) DoAndReturn(f func(context.Context, *uniter.Action, <-chan struct{}) (runner.Runner, error)) *MockFactoryNewActionRunnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewCommandRunner mocks base method. @@ -69,9 +93,33 @@ func (m *MockFactory) NewCommandRunner(arg0 context.Context, arg1 context0.Comma } // NewCommandRunner indicates an expected call of NewCommandRunner. -func (mr *MockFactoryMockRecorder) NewCommandRunner(arg0, arg1 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewCommandRunner(arg0, arg1 any) *MockFactoryNewCommandRunnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCommandRunner", reflect.TypeOf((*MockFactory)(nil).NewCommandRunner), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewCommandRunner", reflect.TypeOf((*MockFactory)(nil).NewCommandRunner), arg0, arg1) + return &MockFactoryNewCommandRunnerCall{Call: call} +} + +// MockFactoryNewCommandRunnerCall wrap *gomock.Call +type MockFactoryNewCommandRunnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewCommandRunnerCall) Return(arg0 runner.Runner, arg1 error) *MockFactoryNewCommandRunnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewCommandRunnerCall) Do(f func(context.Context, context0.CommandInfo) (runner.Runner, error)) *MockFactoryNewCommandRunnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewCommandRunnerCall) DoAndReturn(f func(context.Context, context0.CommandInfo) (runner.Runner, error)) *MockFactoryNewCommandRunnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewHookRunner mocks base method. @@ -84,9 +132,33 @@ func (m *MockFactory) NewHookRunner(arg0 context.Context, arg1 hook.Info) (runne } // NewHookRunner indicates an expected call of NewHookRunner. -func (mr *MockFactoryMockRecorder) NewHookRunner(arg0, arg1 any) *gomock.Call { +func (mr *MockFactoryMockRecorder) NewHookRunner(arg0, arg1 any) *MockFactoryNewHookRunnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHookRunner", reflect.TypeOf((*MockFactory)(nil).NewHookRunner), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHookRunner", reflect.TypeOf((*MockFactory)(nil).NewHookRunner), arg0, arg1) + return &MockFactoryNewHookRunnerCall{Call: call} +} + +// MockFactoryNewHookRunnerCall wrap *gomock.Call +type MockFactoryNewHookRunnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFactoryNewHookRunnerCall) Return(arg0 runner.Runner, arg1 error) *MockFactoryNewHookRunnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFactoryNewHookRunnerCall) Do(f func(context.Context, hook.Info) (runner.Runner, error)) *MockFactoryNewHookRunnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFactoryNewHookRunnerCall) DoAndReturn(f func(context.Context, hook.Info) (runner.Runner, error)) *MockFactoryNewHookRunnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRunner is a mock of Runner interface. @@ -121,9 +193,33 @@ func (m *MockRunner) Context() context0.Context { } // Context indicates an expected call of Context. -func (mr *MockRunnerMockRecorder) Context() *gomock.Call { +func (mr *MockRunnerMockRecorder) Context() *MockRunnerContextCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockRunner)(nil).Context)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockRunner)(nil).Context)) + return &MockRunnerContextCall{Call: call} +} + +// MockRunnerContextCall wrap *gomock.Call +type MockRunnerContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerContextCall) Return(arg0 context0.Context) *MockRunnerContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerContextCall) Do(f func() context0.Context) *MockRunnerContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerContextCall) DoAndReturn(f func() context0.Context) *MockRunnerContextCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunAction mocks base method. @@ -136,9 +232,33 @@ func (m *MockRunner) RunAction(arg0 context.Context, arg1 string) (runner.HookHa } // RunAction indicates an expected call of RunAction. -func (mr *MockRunnerMockRecorder) RunAction(arg0, arg1 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) RunAction(arg0, arg1 any) *MockRunnerRunActionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunAction", reflect.TypeOf((*MockRunner)(nil).RunAction), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunAction", reflect.TypeOf((*MockRunner)(nil).RunAction), arg0, arg1) + return &MockRunnerRunActionCall{Call: call} +} + +// MockRunnerRunActionCall wrap *gomock.Call +type MockRunnerRunActionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerRunActionCall) Return(arg0 runner.HookHandlerType, arg1 error) *MockRunnerRunActionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerRunActionCall) Do(f func(context.Context, string) (runner.HookHandlerType, error)) *MockRunnerRunActionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerRunActionCall) DoAndReturn(f func(context.Context, string) (runner.HookHandlerType, error)) *MockRunnerRunActionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunCommands mocks base method. @@ -151,9 +271,33 @@ func (m *MockRunner) RunCommands(arg0 context.Context, arg1 string, arg2 runner. } // RunCommands indicates an expected call of RunCommands. -func (mr *MockRunnerMockRecorder) RunCommands(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) RunCommands(arg0, arg1, arg2 any) *MockRunnerRunCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockRunner)(nil).RunCommands), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunCommands", reflect.TypeOf((*MockRunner)(nil).RunCommands), arg0, arg1, arg2) + return &MockRunnerRunCommandsCall{Call: call} +} + +// MockRunnerRunCommandsCall wrap *gomock.Call +type MockRunnerRunCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerRunCommandsCall) Return(arg0 *exec.ExecResponse, arg1 error) *MockRunnerRunCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerRunCommandsCall) Do(f func(context.Context, string, runner.RunLocation) (*exec.ExecResponse, error)) *MockRunnerRunCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerRunCommandsCall) DoAndReturn(f func(context.Context, string, runner.RunLocation) (*exec.ExecResponse, error)) *MockRunnerRunCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunHook mocks base method. @@ -166,7 +310,31 @@ func (m *MockRunner) RunHook(arg0 context.Context, arg1 string) (runner.HookHand } // RunHook indicates an expected call of RunHook. -func (mr *MockRunnerMockRecorder) RunHook(arg0, arg1 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) RunHook(arg0, arg1 any) *MockRunnerRunHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunHook", reflect.TypeOf((*MockRunner)(nil).RunHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunHook", reflect.TypeOf((*MockRunner)(nil).RunHook), arg0, arg1) + return &MockRunnerRunHookCall{Call: call} +} + +// MockRunnerRunHookCall wrap *gomock.Call +type MockRunnerRunHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerRunHookCall) Return(arg0 runner.HookHandlerType, arg1 error) *MockRunnerRunHookCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerRunHookCall) Do(f func(context.Context, string) (runner.HookHandlerType, error)) *MockRunnerRunHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerRunHookCall) DoAndReturn(f func(context.Context, string) (runner.HookHandlerType, error)) *MockRunnerRunHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/runner/package_test.go b/internal/worker/uniter/runner/package_test.go index 2e2bbe20c2e..d849c861187 100644 --- a/internal/worker/uniter/runner/package_test.go +++ b/internal/worker/uniter/runner/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/factory_mock.go github.com/juju/juju/internal/worker/uniter/runner Factory,Runner -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/context Context +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/factory_mock.go github.com/juju/juju/internal/worker/uniter/runner Factory,Runner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/context_mock.go github.com/juju/juju/internal/worker/uniter/runner/context Context func TestPackage(t *stdtesting.T) { // TODO(fwereade): there's no good reason for this test to use mongo. diff --git a/internal/worker/uniter/secrets/mocks/client_mock.go b/internal/worker/uniter/secrets/mocks/client_mock.go index 7097d25b5be..5e734ee7295 100644 --- a/internal/worker/uniter/secrets/mocks/client_mock.go +++ b/internal/worker/uniter/secrets/mocks/client_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretsClient +// mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretsClient // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockSecretsClient) CreateSecretURIs(arg0 int) ([]*secrets.URI, error) { } // CreateSecretURIs indicates an expected call of CreateSecretURIs. -func (mr *MockSecretsClientMockRecorder) CreateSecretURIs(arg0 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) CreateSecretURIs(arg0 any) *MockSecretsClientCreateSecretURIsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretsClient)(nil).CreateSecretURIs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretURIs", reflect.TypeOf((*MockSecretsClient)(nil).CreateSecretURIs), arg0) + return &MockSecretsClientCreateSecretURIsCall{Call: call} +} + +// MockSecretsClientCreateSecretURIsCall wrap *gomock.Call +type MockSecretsClientCreateSecretURIsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientCreateSecretURIsCall) Return(arg0 []*secrets.URI, arg1 error) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientCreateSecretURIsCall) Do(f func(int) ([]*secrets.URI, error)) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientCreateSecretURIsCall) DoAndReturn(f func(int) ([]*secrets.URI, error)) *MockSecretsClientCreateSecretURIsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetConsumerSecretsRevisionInfo mocks base method. @@ -66,9 +90,33 @@ func (m *MockSecretsClient) GetConsumerSecretsRevisionInfo(arg0 string, arg1 []s } // GetConsumerSecretsRevisionInfo indicates an expected call of GetConsumerSecretsRevisionInfo. -func (mr *MockSecretsClientMockRecorder) GetConsumerSecretsRevisionInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) GetConsumerSecretsRevisionInfo(arg0, arg1 any) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumerSecretsRevisionInfo", reflect.TypeOf((*MockSecretsClient)(nil).GetConsumerSecretsRevisionInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConsumerSecretsRevisionInfo", reflect.TypeOf((*MockSecretsClient)(nil).GetConsumerSecretsRevisionInfo), arg0, arg1) + return &MockSecretsClientGetConsumerSecretsRevisionInfoCall{Call: call} +} + +// MockSecretsClientGetConsumerSecretsRevisionInfoCall wrap *gomock.Call +type MockSecretsClientGetConsumerSecretsRevisionInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) Return(arg0 map[string]secrets.SecretRevisionInfo, arg1 error) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) Do(f func(string, []string) (map[string]secrets.SecretRevisionInfo, error)) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientGetConsumerSecretsRevisionInfoCall) DoAndReturn(f func(string, []string) (map[string]secrets.SecretRevisionInfo, error)) *MockSecretsClientGetConsumerSecretsRevisionInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretMetadata mocks base method. @@ -81,9 +129,33 @@ func (m *MockSecretsClient) SecretMetadata() ([]secrets.SecretOwnerMetadata, err } // SecretMetadata indicates an expected call of SecretMetadata. -func (mr *MockSecretsClientMockRecorder) SecretMetadata() *gomock.Call { +func (mr *MockSecretsClientMockRecorder) SecretMetadata() *MockSecretsClientSecretMetadataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockSecretsClient)(nil).SecretMetadata)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretMetadata", reflect.TypeOf((*MockSecretsClient)(nil).SecretMetadata)) + return &MockSecretsClientSecretMetadataCall{Call: call} +} + +// MockSecretsClientSecretMetadataCall wrap *gomock.Call +type MockSecretsClientSecretMetadataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientSecretMetadataCall) Return(arg0 []secrets.SecretOwnerMetadata, arg1 error) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientSecretMetadataCall) Do(f func() ([]secrets.SecretOwnerMetadata, error)) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientSecretMetadataCall) DoAndReturn(f func() ([]secrets.SecretOwnerMetadata, error)) *MockSecretsClientSecretMetadataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretRotated mocks base method. @@ -95,9 +167,33 @@ func (m *MockSecretsClient) SecretRotated(arg0 string, arg1 int) error { } // SecretRotated indicates an expected call of SecretRotated. -func (mr *MockSecretsClientMockRecorder) SecretRotated(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) SecretRotated(arg0, arg1 any) *MockSecretsClientSecretRotatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretsClient)(nil).SecretRotated), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretRotated", reflect.TypeOf((*MockSecretsClient)(nil).SecretRotated), arg0, arg1) + return &MockSecretsClientSecretRotatedCall{Call: call} +} + +// MockSecretsClientSecretRotatedCall wrap *gomock.Call +type MockSecretsClientSecretRotatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientSecretRotatedCall) Return(arg0 error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientSecretRotatedCall) Do(f func(string, int) error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientSecretRotatedCall) DoAndReturn(f func(string, int) error) *MockSecretsClientSecretRotatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchConsumedSecretsChanges mocks base method. @@ -110,9 +206,33 @@ func (m *MockSecretsClient) WatchConsumedSecretsChanges(arg0 string) (watcher.Wa } // WatchConsumedSecretsChanges indicates an expected call of WatchConsumedSecretsChanges. -func (mr *MockSecretsClientMockRecorder) WatchConsumedSecretsChanges(arg0 any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) WatchConsumedSecretsChanges(arg0 any) *MockSecretsClientWatchConsumedSecretsChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsClient)(nil).WatchConsumedSecretsChanges), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchConsumedSecretsChanges", reflect.TypeOf((*MockSecretsClient)(nil).WatchConsumedSecretsChanges), arg0) + return &MockSecretsClientWatchConsumedSecretsChangesCall{Call: call} +} + +// MockSecretsClientWatchConsumedSecretsChangesCall wrap *gomock.Call +type MockSecretsClientWatchConsumedSecretsChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) Do(f func(string) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientWatchConsumedSecretsChangesCall) DoAndReturn(f func(string) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchConsumedSecretsChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchObsolete mocks base method. @@ -129,7 +249,31 @@ func (m *MockSecretsClient) WatchObsolete(arg0 ...names.Tag) (watcher.Watcher[[] } // WatchObsolete indicates an expected call of WatchObsolete. -func (mr *MockSecretsClientMockRecorder) WatchObsolete(arg0 ...any) *gomock.Call { +func (mr *MockSecretsClientMockRecorder) WatchObsolete(arg0 ...any) *MockSecretsClientWatchObsoleteCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretsClient)(nil).WatchObsolete), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchObsolete", reflect.TypeOf((*MockSecretsClient)(nil).WatchObsolete), arg0...) + return &MockSecretsClientWatchObsoleteCall{Call: call} +} + +// MockSecretsClientWatchObsoleteCall wrap *gomock.Call +type MockSecretsClientWatchObsoleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretsClientWatchObsoleteCall) Return(arg0 watcher.Watcher[[]string], arg1 error) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretsClientWatchObsoleteCall) Do(f func(...names.Tag) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretsClientWatchObsoleteCall) DoAndReturn(f func(...names.Tag) (watcher.Watcher[[]string], error)) *MockSecretsClientWatchObsoleteCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/secrets/mocks/tracker_mock.go b/internal/worker/uniter/secrets/mocks/tracker_mock.go index dcab767fb09..42a8472f4fe 100644 --- a/internal/worker/uniter/secrets/mocks/tracker_mock.go +++ b/internal/worker/uniter/secrets/mocks/tracker_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/tracker_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretStateTracker +// mockgen -typed -package mocks -destination mocks/tracker_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretStateTracker // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSecretStateTracker) CommitHook(arg0 context.Context, arg1 hook.Info } // CommitHook indicates an expected call of CommitHook. -func (mr *MockSecretStateTrackerMockRecorder) CommitHook(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) CommitHook(arg0, arg1 any) *MockSecretStateTrackerCommitHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockSecretStateTracker)(nil).CommitHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitHook", reflect.TypeOf((*MockSecretStateTracker)(nil).CommitHook), arg0, arg1) + return &MockSecretStateTrackerCommitHookCall{Call: call} +} + +// MockSecretStateTrackerCommitHookCall wrap *gomock.Call +type MockSecretStateTrackerCommitHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerCommitHookCall) Return(arg0 error) *MockSecretStateTrackerCommitHookCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerCommitHookCall) Do(f func(context.Context, hook.Info) error) *MockSecretStateTrackerCommitHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerCommitHookCall) DoAndReturn(f func(context.Context, hook.Info) error) *MockSecretStateTrackerCommitHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConsumedSecretRevision mocks base method. @@ -63,9 +87,33 @@ func (m *MockSecretStateTracker) ConsumedSecretRevision(arg0 string) int { } // ConsumedSecretRevision indicates an expected call of ConsumedSecretRevision. -func (mr *MockSecretStateTrackerMockRecorder) ConsumedSecretRevision(arg0 any) *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) ConsumedSecretRevision(arg0 any) *MockSecretStateTrackerConsumedSecretRevisionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumedSecretRevision", reflect.TypeOf((*MockSecretStateTracker)(nil).ConsumedSecretRevision), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumedSecretRevision", reflect.TypeOf((*MockSecretStateTracker)(nil).ConsumedSecretRevision), arg0) + return &MockSecretStateTrackerConsumedSecretRevisionCall{Call: call} +} + +// MockSecretStateTrackerConsumedSecretRevisionCall wrap *gomock.Call +type MockSecretStateTrackerConsumedSecretRevisionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerConsumedSecretRevisionCall) Return(arg0 int) *MockSecretStateTrackerConsumedSecretRevisionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerConsumedSecretRevisionCall) Do(f func(string) int) *MockSecretStateTrackerConsumedSecretRevisionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerConsumedSecretRevisionCall) DoAndReturn(f func(string) int) *MockSecretStateTrackerConsumedSecretRevisionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PrepareHook mocks base method. @@ -77,9 +125,33 @@ func (m *MockSecretStateTracker) PrepareHook(arg0 context.Context, arg1 hook.Inf } // PrepareHook indicates an expected call of PrepareHook. -func (mr *MockSecretStateTrackerMockRecorder) PrepareHook(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) PrepareHook(arg0, arg1 any) *MockSecretStateTrackerPrepareHookCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockSecretStateTracker)(nil).PrepareHook), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareHook", reflect.TypeOf((*MockSecretStateTracker)(nil).PrepareHook), arg0, arg1) + return &MockSecretStateTrackerPrepareHookCall{Call: call} +} + +// MockSecretStateTrackerPrepareHookCall wrap *gomock.Call +type MockSecretStateTrackerPrepareHookCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerPrepareHookCall) Return(arg0 error) *MockSecretStateTrackerPrepareHookCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerPrepareHookCall) Do(f func(context.Context, hook.Info) error) *MockSecretStateTrackerPrepareHookCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerPrepareHookCall) DoAndReturn(f func(context.Context, hook.Info) error) *MockSecretStateTrackerPrepareHookCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Report mocks base method. @@ -91,9 +163,33 @@ func (m *MockSecretStateTracker) Report() map[string]any { } // Report indicates an expected call of Report. -func (mr *MockSecretStateTrackerMockRecorder) Report() *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) Report() *MockSecretStateTrackerReportCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockSecretStateTracker)(nil).Report)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Report", reflect.TypeOf((*MockSecretStateTracker)(nil).Report)) + return &MockSecretStateTrackerReportCall{Call: call} +} + +// MockSecretStateTrackerReportCall wrap *gomock.Call +type MockSecretStateTrackerReportCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerReportCall) Return(arg0 map[string]any) *MockSecretStateTrackerReportCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerReportCall) Do(f func() map[string]any) *MockSecretStateTrackerReportCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerReportCall) DoAndReturn(f func() map[string]any) *MockSecretStateTrackerReportCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretObsoleteRevisions mocks base method. @@ -105,9 +201,33 @@ func (m *MockSecretStateTracker) SecretObsoleteRevisions(arg0 string) []int { } // SecretObsoleteRevisions indicates an expected call of SecretObsoleteRevisions. -func (mr *MockSecretStateTrackerMockRecorder) SecretObsoleteRevisions(arg0 any) *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) SecretObsoleteRevisions(arg0 any) *MockSecretStateTrackerSecretObsoleteRevisionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretObsoleteRevisions", reflect.TypeOf((*MockSecretStateTracker)(nil).SecretObsoleteRevisions), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretObsoleteRevisions", reflect.TypeOf((*MockSecretStateTracker)(nil).SecretObsoleteRevisions), arg0) + return &MockSecretStateTrackerSecretObsoleteRevisionsCall{Call: call} +} + +// MockSecretStateTrackerSecretObsoleteRevisionsCall wrap *gomock.Call +type MockSecretStateTrackerSecretObsoleteRevisionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerSecretObsoleteRevisionsCall) Return(arg0 []int) *MockSecretStateTrackerSecretObsoleteRevisionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerSecretObsoleteRevisionsCall) Do(f func(string) []int) *MockSecretStateTrackerSecretObsoleteRevisionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerSecretObsoleteRevisionsCall) DoAndReturn(f func(string) []int) *MockSecretStateTrackerSecretObsoleteRevisionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretsRemoved mocks base method. @@ -119,7 +239,31 @@ func (m *MockSecretStateTracker) SecretsRemoved(arg0 []string) error { } // SecretsRemoved indicates an expected call of SecretsRemoved. -func (mr *MockSecretStateTrackerMockRecorder) SecretsRemoved(arg0 any) *gomock.Call { +func (mr *MockSecretStateTrackerMockRecorder) SecretsRemoved(arg0 any) *MockSecretStateTrackerSecretsRemovedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretsRemoved", reflect.TypeOf((*MockSecretStateTracker)(nil).SecretsRemoved), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretsRemoved", reflect.TypeOf((*MockSecretStateTracker)(nil).SecretsRemoved), arg0) + return &MockSecretStateTrackerSecretsRemovedCall{Call: call} +} + +// MockSecretStateTrackerSecretsRemovedCall wrap *gomock.Call +type MockSecretStateTrackerSecretsRemovedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSecretStateTrackerSecretsRemovedCall) Return(arg0 error) *MockSecretStateTrackerSecretsRemovedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSecretStateTrackerSecretsRemovedCall) Do(f func([]string) error) *MockSecretStateTrackerSecretsRemovedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSecretStateTrackerSecretsRemovedCall) DoAndReturn(f func([]string) error) *MockSecretStateTrackerSecretsRemovedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/uniter/secrets/package_test.go b/internal/worker/uniter/secrets/package_test.go index 39317a36255..a70cbda29e8 100644 --- a/internal/worker/uniter/secrets/package_test.go +++ b/internal/worker/uniter/secrets/package_test.go @@ -9,8 +9,8 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/tracker_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretStateTracker -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretsClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/tracker_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretStateTracker +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/client_mock.go github.com/juju/juju/internal/worker/uniter/secrets SecretsClient func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/units3caller/api_mocks_test.go b/internal/worker/units3caller/api_mocks_test.go index 4211118d1a4..c0d0a90f06b 100644 --- a/internal/worker/units3caller/api_mocks_test.go +++ b/internal/worker/units3caller/api_mocks_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package units3caller -destination api_mocks_test.go github.com/juju/juju/api Connection +// mockgen -typed -package units3caller -destination api_mocks_test.go github.com/juju/juju/api Connection // // Package units3caller is a generated GoMock package. @@ -57,9 +57,33 @@ func (m *MockConnection) APICall(arg0 context.Context, arg1 string, arg2 int, ar } // APICall indicates an expected call of APICall. -func (mr *MockConnectionMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockConnectionAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockConnection)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockConnection)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockConnectionAPICallCall{Call: call} +} + +// MockConnectionAPICallCall wrap *gomock.Call +type MockConnectionAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionAPICallCall) Return(arg0 error) *MockConnectionAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockConnectionAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockConnectionAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIHostPorts mocks base method. @@ -71,9 +95,33 @@ func (m *MockConnection) APIHostPorts() []network.MachineHostPorts { } // APIHostPorts indicates an expected call of APIHostPorts. -func (mr *MockConnectionMockRecorder) APIHostPorts() *gomock.Call { +func (mr *MockConnectionMockRecorder) APIHostPorts() *MockConnectionAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPorts", reflect.TypeOf((*MockConnection)(nil).APIHostPorts)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIHostPorts", reflect.TypeOf((*MockConnection)(nil).APIHostPorts)) + return &MockConnectionAPIHostPortsCall{Call: call} +} + +// MockConnectionAPIHostPortsCall wrap *gomock.Call +type MockConnectionAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionAPIHostPortsCall) Return(arg0 []network.MachineHostPorts) *MockConnectionAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionAPIHostPortsCall) Do(f func() []network.MachineHostPorts) *MockConnectionAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionAPIHostPortsCall) DoAndReturn(f func() []network.MachineHostPorts) *MockConnectionAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Addr mocks base method. @@ -85,9 +133,33 @@ func (m *MockConnection) Addr() string { } // Addr indicates an expected call of Addr. -func (mr *MockConnectionMockRecorder) Addr() *gomock.Call { +func (mr *MockConnectionMockRecorder) Addr() *MockConnectionAddrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addr", reflect.TypeOf((*MockConnection)(nil).Addr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addr", reflect.TypeOf((*MockConnection)(nil).Addr)) + return &MockConnectionAddrCall{Call: call} +} + +// MockConnectionAddrCall wrap *gomock.Call +type MockConnectionAddrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionAddrCall) Return(arg0 string) *MockConnectionAddrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionAddrCall) Do(f func() string) *MockConnectionAddrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionAddrCall) DoAndReturn(f func() string) *MockConnectionAddrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AuthTag mocks base method. @@ -99,9 +171,33 @@ func (m *MockConnection) AuthTag() names.Tag { } // AuthTag indicates an expected call of AuthTag. -func (mr *MockConnectionMockRecorder) AuthTag() *gomock.Call { +func (mr *MockConnectionMockRecorder) AuthTag() *MockConnectionAuthTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthTag", reflect.TypeOf((*MockConnection)(nil).AuthTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthTag", reflect.TypeOf((*MockConnection)(nil).AuthTag)) + return &MockConnectionAuthTagCall{Call: call} +} + +// MockConnectionAuthTagCall wrap *gomock.Call +type MockConnectionAuthTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionAuthTagCall) Return(arg0 names.Tag) *MockConnectionAuthTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionAuthTagCall) Do(f func() names.Tag) *MockConnectionAuthTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionAuthTagCall) DoAndReturn(f func() names.Tag) *MockConnectionAuthTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -113,9 +209,33 @@ func (m *MockConnection) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockConnectionMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockConnectionMockRecorder) BakeryClient() *MockConnectionBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockConnection)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockConnection)(nil).BakeryClient)) + return &MockConnectionBakeryClientCall{Call: call} +} + +// MockConnectionBakeryClientCall wrap *gomock.Call +type MockConnectionBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockConnectionBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockConnectionBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockConnectionBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -127,9 +247,33 @@ func (m *MockConnection) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockConnectionMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) BestFacadeVersion(arg0 any) *MockConnectionBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockConnection)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockConnection)(nil).BestFacadeVersion), arg0) + return &MockConnectionBestFacadeVersionCall{Call: call} +} + +// MockConnectionBestFacadeVersionCall wrap *gomock.Call +type MockConnectionBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionBestFacadeVersionCall) Return(arg0 int) *MockConnectionBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionBestFacadeVersionCall) Do(f func(string) int) *MockConnectionBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockConnectionBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Broken mocks base method. @@ -141,9 +285,33 @@ func (m *MockConnection) Broken() <-chan struct{} { } // Broken indicates an expected call of Broken. -func (mr *MockConnectionMockRecorder) Broken() *gomock.Call { +func (mr *MockConnectionMockRecorder) Broken() *MockConnectionBrokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broken", reflect.TypeOf((*MockConnection)(nil).Broken)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broken", reflect.TypeOf((*MockConnection)(nil).Broken)) + return &MockConnectionBrokenCall{Call: call} +} + +// MockConnectionBrokenCall wrap *gomock.Call +type MockConnectionBrokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionBrokenCall) Return(arg0 <-chan struct{}) *MockConnectionBrokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionBrokenCall) Do(f func() <-chan struct{}) *MockConnectionBrokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionBrokenCall) DoAndReturn(f func() <-chan struct{}) *MockConnectionBrokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Close mocks base method. @@ -155,9 +323,33 @@ func (m *MockConnection) Close() error { } // Close indicates an expected call of Close. -func (mr *MockConnectionMockRecorder) Close() *gomock.Call { +func (mr *MockConnectionMockRecorder) Close() *MockConnectionCloseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnection)(nil).Close)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnection)(nil).Close)) + return &MockConnectionCloseCall{Call: call} +} + +// MockConnectionCloseCall wrap *gomock.Call +type MockConnectionCloseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionCloseCall) Return(arg0 error) *MockConnectionCloseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionCloseCall) Do(f func() error) *MockConnectionCloseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionCloseCall) DoAndReturn(f func() error) *MockConnectionCloseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -170,9 +362,33 @@ func (m *MockConnection) ConnectControllerStream(arg0 context.Context, arg1 stri } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockConnectionMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockConnectionConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockConnection)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockConnection)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockConnectionConnectControllerStreamCall{Call: call} +} + +// MockConnectionConnectControllerStreamCall wrap *gomock.Call +type MockConnectionConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockConnectionConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockConnectionConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockConnectionConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -185,9 +401,33 @@ func (m *MockConnection) ConnectStream(arg0 context.Context, arg1 string, arg2 u } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockConnectionMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockConnectionConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockConnection)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockConnection)(nil).ConnectStream), arg0, arg1, arg2) + return &MockConnectionConnectStreamCall{Call: call} +} + +// MockConnectionConnectStreamCall wrap *gomock.Call +type MockConnectionConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockConnectionConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockConnectionConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockConnectionConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerAccess mocks base method. @@ -199,9 +439,33 @@ func (m *MockConnection) ControllerAccess() string { } // ControllerAccess indicates an expected call of ControllerAccess. -func (mr *MockConnectionMockRecorder) ControllerAccess() *gomock.Call { +func (mr *MockConnectionMockRecorder) ControllerAccess() *MockConnectionControllerAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAccess", reflect.TypeOf((*MockConnection)(nil).ControllerAccess)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerAccess", reflect.TypeOf((*MockConnection)(nil).ControllerAccess)) + return &MockConnectionControllerAccessCall{Call: call} +} + +// MockConnectionControllerAccessCall wrap *gomock.Call +type MockConnectionControllerAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionControllerAccessCall) Return(arg0 string) *MockConnectionControllerAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionControllerAccessCall) Do(f func() string) *MockConnectionControllerAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionControllerAccessCall) DoAndReturn(f func() string) *MockConnectionControllerAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerTag mocks base method. @@ -213,9 +477,33 @@ func (m *MockConnection) ControllerTag() names.ControllerTag { } // ControllerTag indicates an expected call of ControllerTag. -func (mr *MockConnectionMockRecorder) ControllerTag() *gomock.Call { +func (mr *MockConnectionMockRecorder) ControllerTag() *MockConnectionControllerTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockConnection)(nil).ControllerTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerTag", reflect.TypeOf((*MockConnection)(nil).ControllerTag)) + return &MockConnectionControllerTagCall{Call: call} +} + +// MockConnectionControllerTagCall wrap *gomock.Call +type MockConnectionControllerTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionControllerTagCall) Return(arg0 names.ControllerTag) *MockConnectionControllerTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionControllerTagCall) Do(f func() names.ControllerTag) *MockConnectionControllerTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionControllerTagCall) DoAndReturn(f func() names.ControllerTag) *MockConnectionControllerTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CookieURL mocks base method. @@ -227,9 +515,33 @@ func (m *MockConnection) CookieURL() *url.URL { } // CookieURL indicates an expected call of CookieURL. -func (mr *MockConnectionMockRecorder) CookieURL() *gomock.Call { +func (mr *MockConnectionMockRecorder) CookieURL() *MockConnectionCookieURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieURL", reflect.TypeOf((*MockConnection)(nil).CookieURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CookieURL", reflect.TypeOf((*MockConnection)(nil).CookieURL)) + return &MockConnectionCookieURLCall{Call: call} +} + +// MockConnectionCookieURLCall wrap *gomock.Call +type MockConnectionCookieURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionCookieURLCall) Return(arg0 *url.URL) *MockConnectionCookieURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionCookieURLCall) Do(f func() *url.URL) *MockConnectionCookieURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionCookieURLCall) DoAndReturn(f func() *url.URL) *MockConnectionCookieURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -242,9 +554,33 @@ func (m *MockConnection) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockConnectionMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockConnectionMockRecorder) HTTPClient() *MockConnectionHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockConnection)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockConnection)(nil).HTTPClient)) + return &MockConnectionHTTPClientCall{Call: call} +} + +// MockConnectionHTTPClientCall wrap *gomock.Call +type MockConnectionHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockConnectionHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockConnectionHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockConnectionHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IPAddr mocks base method. @@ -256,9 +592,33 @@ func (m *MockConnection) IPAddr() string { } // IPAddr indicates an expected call of IPAddr. -func (mr *MockConnectionMockRecorder) IPAddr() *gomock.Call { +func (mr *MockConnectionMockRecorder) IPAddr() *MockConnectionIPAddrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPAddr", reflect.TypeOf((*MockConnection)(nil).IPAddr)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPAddr", reflect.TypeOf((*MockConnection)(nil).IPAddr)) + return &MockConnectionIPAddrCall{Call: call} +} + +// MockConnectionIPAddrCall wrap *gomock.Call +type MockConnectionIPAddrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionIPAddrCall) Return(arg0 string) *MockConnectionIPAddrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionIPAddrCall) Do(f func() string) *MockConnectionIPAddrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionIPAddrCall) DoAndReturn(f func() string) *MockConnectionIPAddrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsBroken mocks base method. @@ -270,9 +630,33 @@ func (m *MockConnection) IsBroken(arg0 context.Context) bool { } // IsBroken indicates an expected call of IsBroken. -func (mr *MockConnectionMockRecorder) IsBroken(arg0 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) IsBroken(arg0 any) *MockConnectionIsBrokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsBroken", reflect.TypeOf((*MockConnection)(nil).IsBroken), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsBroken", reflect.TypeOf((*MockConnection)(nil).IsBroken), arg0) + return &MockConnectionIsBrokenCall{Call: call} +} + +// MockConnectionIsBrokenCall wrap *gomock.Call +type MockConnectionIsBrokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionIsBrokenCall) Return(arg0 bool) *MockConnectionIsBrokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionIsBrokenCall) Do(f func(context.Context) bool) *MockConnectionIsBrokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionIsBrokenCall) DoAndReturn(f func(context.Context) bool) *MockConnectionIsBrokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsProxied mocks base method. @@ -284,9 +668,33 @@ func (m *MockConnection) IsProxied() bool { } // IsProxied indicates an expected call of IsProxied. -func (mr *MockConnectionMockRecorder) IsProxied() *gomock.Call { +func (mr *MockConnectionMockRecorder) IsProxied() *MockConnectionIsProxiedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsProxied", reflect.TypeOf((*MockConnection)(nil).IsProxied)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsProxied", reflect.TypeOf((*MockConnection)(nil).IsProxied)) + return &MockConnectionIsProxiedCall{Call: call} +} + +// MockConnectionIsProxiedCall wrap *gomock.Call +type MockConnectionIsProxiedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionIsProxiedCall) Return(arg0 bool) *MockConnectionIsProxiedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionIsProxiedCall) Do(f func() bool) *MockConnectionIsProxiedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionIsProxiedCall) DoAndReturn(f func() bool) *MockConnectionIsProxiedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Login mocks base method. @@ -298,9 +706,33 @@ func (m *MockConnection) Login(arg0 context.Context, arg1 names.Tag, arg2, arg3 } // Login indicates an expected call of Login. -func (mr *MockConnectionMockRecorder) Login(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) Login(arg0, arg1, arg2, arg3, arg4 any) *MockConnectionLoginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockConnection)(nil).Login), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockConnection)(nil).Login), arg0, arg1, arg2, arg3, arg4) + return &MockConnectionLoginCall{Call: call} +} + +// MockConnectionLoginCall wrap *gomock.Call +type MockConnectionLoginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionLoginCall) Return(arg0 error) *MockConnectionLoginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionLoginCall) Do(f func(context.Context, names.Tag, string, string, []macaroon.Slice) error) *MockConnectionLoginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionLoginCall) DoAndReturn(f func(context.Context, names.Tag, string, string, []macaroon.Slice) error) *MockConnectionLoginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -313,9 +745,33 @@ func (m *MockConnection) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockConnectionMockRecorder) ModelTag() *gomock.Call { +func (mr *MockConnectionMockRecorder) ModelTag() *MockConnectionModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockConnection)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockConnection)(nil).ModelTag)) + return &MockConnectionModelTagCall{Call: call} +} + +// MockConnectionModelTagCall wrap *gomock.Call +type MockConnectionModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockConnectionModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionModelTagCall) Do(f func() (names.ModelTag, bool)) *MockConnectionModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockConnectionModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Proxy mocks base method. @@ -327,9 +783,33 @@ func (m *MockConnection) Proxy() proxy.Proxier { } // Proxy indicates an expected call of Proxy. -func (mr *MockConnectionMockRecorder) Proxy() *gomock.Call { +func (mr *MockConnectionMockRecorder) Proxy() *MockConnectionProxyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proxy", reflect.TypeOf((*MockConnection)(nil).Proxy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proxy", reflect.TypeOf((*MockConnection)(nil).Proxy)) + return &MockConnectionProxyCall{Call: call} +} + +// MockConnectionProxyCall wrap *gomock.Call +type MockConnectionProxyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionProxyCall) Return(arg0 proxy.Proxier) *MockConnectionProxyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionProxyCall) Do(f func() proxy.Proxier) *MockConnectionProxyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionProxyCall) DoAndReturn(f func() proxy.Proxier) *MockConnectionProxyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PublicDNSName mocks base method. @@ -341,9 +821,33 @@ func (m *MockConnection) PublicDNSName() string { } // PublicDNSName indicates an expected call of PublicDNSName. -func (mr *MockConnectionMockRecorder) PublicDNSName() *gomock.Call { +func (mr *MockConnectionMockRecorder) PublicDNSName() *MockConnectionPublicDNSNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicDNSName", reflect.TypeOf((*MockConnection)(nil).PublicDNSName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublicDNSName", reflect.TypeOf((*MockConnection)(nil).PublicDNSName)) + return &MockConnectionPublicDNSNameCall{Call: call} +} + +// MockConnectionPublicDNSNameCall wrap *gomock.Call +type MockConnectionPublicDNSNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionPublicDNSNameCall) Return(arg0 string) *MockConnectionPublicDNSNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionPublicDNSNameCall) Do(f func() string) *MockConnectionPublicDNSNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionPublicDNSNameCall) DoAndReturn(f func() string) *MockConnectionPublicDNSNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -356,9 +860,33 @@ func (m *MockConnection) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockConnectionMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockConnectionMockRecorder) RootHTTPClient() *MockConnectionRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockConnection)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockConnection)(nil).RootHTTPClient)) + return &MockConnectionRootHTTPClientCall{Call: call} +} + +// MockConnectionRootHTTPClientCall wrap *gomock.Call +type MockConnectionRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockConnectionRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockConnectionRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockConnectionRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ServerVersion mocks base method. @@ -371,7 +899,31 @@ func (m *MockConnection) ServerVersion() (version.Number, bool) { } // ServerVersion indicates an expected call of ServerVersion. -func (mr *MockConnectionMockRecorder) ServerVersion() *gomock.Call { +func (mr *MockConnectionMockRecorder) ServerVersion() *MockConnectionServerVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockConnection)(nil).ServerVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockConnection)(nil).ServerVersion)) + return &MockConnectionServerVersionCall{Call: call} +} + +// MockConnectionServerVersionCall wrap *gomock.Call +type MockConnectionServerVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConnectionServerVersionCall) Return(arg0 version.Number, arg1 bool) *MockConnectionServerVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConnectionServerVersionCall) Do(f func() (version.Number, bool)) *MockConnectionServerVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConnectionServerVersionCall) DoAndReturn(f func() (version.Number, bool)) *MockConnectionServerVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/units3caller/package_mock_test.go b/internal/worker/units3caller/package_mock_test.go index 4dd5d390071..0294f597ad1 100644 --- a/internal/worker/units3caller/package_mock_test.go +++ b/internal/worker/units3caller/package_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package units3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Session +// mockgen -typed -package units3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Session // // Package units3caller is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSession) CreateBucket(arg0 context.Context, arg1 string) error { } // CreateBucket indicates an expected call of CreateBucket. -func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) CreateBucket(arg0, arg1 any) *MockSessionCreateBucketCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockSession)(nil).CreateBucket), arg0, arg1) + return &MockSessionCreateBucketCall{Call: call} +} + +// MockSessionCreateBucketCall wrap *gomock.Call +type MockSessionCreateBucketCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionCreateBucketCall) Return(arg0 error) *MockSessionCreateBucketCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionCreateBucketCall) Do(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionCreateBucketCall) DoAndReturn(f func(context.Context, string) error) *MockSessionCreateBucketCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DeleteObject mocks base method. @@ -63,9 +87,33 @@ func (m *MockSession) DeleteObject(arg0 context.Context, arg1, arg2 string) erro } // DeleteObject indicates an expected call of DeleteObject. -func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) DeleteObject(arg0, arg1, arg2 any) *MockSessionDeleteObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObject", reflect.TypeOf((*MockSession)(nil).DeleteObject), arg0, arg1, arg2) + return &MockSessionDeleteObjectCall{Call: call} +} + +// MockSessionDeleteObjectCall wrap *gomock.Call +type MockSessionDeleteObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionDeleteObjectCall) Return(arg0 error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionDeleteObjectCall) Do(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionDeleteObjectCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionDeleteObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetObject mocks base method. @@ -80,9 +128,33 @@ func (m *MockSession) GetObject(arg0 context.Context, arg1, arg2 string) (io.Rea } // GetObject indicates an expected call of GetObject. -func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) GetObject(arg0, arg1, arg2 any) *MockSessionGetObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockSession)(nil).GetObject), arg0, arg1, arg2) + return &MockSessionGetObjectCall{Call: call} +} + +// MockSessionGetObjectCall wrap *gomock.Call +type MockSessionGetObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionGetObjectCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 string, arg3 error) *MockSessionGetObjectCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionGetObjectCall) Do(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionGetObjectCall) DoAndReturn(f func(context.Context, string, string) (io.ReadCloser, int64, string, error)) *MockSessionGetObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListObjects mocks base method. @@ -95,9 +167,33 @@ func (m *MockSession) ListObjects(arg0 context.Context, arg1 string) ([]string, } // ListObjects indicates an expected call of ListObjects. -func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ListObjects(arg0, arg1 any) *MockSessionListObjectsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjects", reflect.TypeOf((*MockSession)(nil).ListObjects), arg0, arg1) + return &MockSessionListObjectsCall{Call: call} +} + +// MockSessionListObjectsCall wrap *gomock.Call +type MockSessionListObjectsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionListObjectsCall) Return(arg0 []string, arg1 error) *MockSessionListObjectsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionListObjectsCall) Do(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionListObjectsCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockSessionListObjectsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectExists mocks base method. @@ -109,9 +205,33 @@ func (m *MockSession) ObjectExists(arg0 context.Context, arg1, arg2 string) erro } // ObjectExists indicates an expected call of ObjectExists. -func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSessionMockRecorder) ObjectExists(arg0, arg1, arg2 any) *MockSessionObjectExistsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectExists", reflect.TypeOf((*MockSession)(nil).ObjectExists), arg0, arg1, arg2) + return &MockSessionObjectExistsCall{Call: call} +} + +// MockSessionObjectExistsCall wrap *gomock.Call +type MockSessionObjectExistsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionObjectExistsCall) Return(arg0 error) *MockSessionObjectExistsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionObjectExistsCall) Do(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionObjectExistsCall) DoAndReturn(f func(context.Context, string, string) error) *MockSessionObjectExistsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PutObject mocks base method. @@ -123,7 +243,31 @@ func (m *MockSession) PutObject(arg0 context.Context, arg1, arg2 string, arg3 io } // PutObject indicates an expected call of PutObject. -func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockSessionMockRecorder) PutObject(arg0, arg1, arg2, arg3, arg4 any) *MockSessionPutObjectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockSession)(nil).PutObject), arg0, arg1, arg2, arg3, arg4) + return &MockSessionPutObjectCall{Call: call} +} + +// MockSessionPutObjectCall wrap *gomock.Call +type MockSessionPutObjectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionPutObjectCall) Return(arg0 error) *MockSessionPutObjectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionPutObjectCall) Do(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionPutObjectCall) DoAndReturn(f func(context.Context, string, string, io.Reader, string) error) *MockSessionPutObjectCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/units3caller/package_test.go b/internal/worker/units3caller/package_test.go index 85ac132b52a..49c608dffe9 100644 --- a/internal/worker/units3caller/package_test.go +++ b/internal/worker/units3caller/package_test.go @@ -13,8 +13,8 @@ import ( coretesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package units3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Session -//go:generate go run go.uber.org/mock/mockgen -package units3caller -destination api_mocks_test.go github.com/juju/juju/api Connection +//go:generate go run go.uber.org/mock/mockgen -typed -package units3caller -destination package_mock_test.go github.com/juju/juju/core/objectstore Session +//go:generate go run go.uber.org/mock/mockgen -typed -package units3caller -destination api_mocks_test.go github.com/juju/juju/api Connection func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/upgradedatabase/agent_mock_test.go b/internal/worker/upgradedatabase/agent_mock_test.go index e7895b2cf32..75660ac4537 100644 --- a/internal/worker/upgradedatabase/agent_mock_test.go +++ b/internal/worker/upgradedatabase/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +// mockgen -typed -package upgradedatabase -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter // // Package upgradedatabase is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -72,9 +96,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -110,9 +158,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -125,9 +197,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -139,9 +235,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -153,9 +273,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -167,9 +311,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -181,9 +349,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -195,9 +387,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -209,9 +425,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -224,9 +464,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -238,9 +502,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -252,9 +540,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -266,9 +578,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -280,9 +616,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -294,9 +654,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -308,9 +692,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -323,9 +731,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -337,9 +769,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -351,9 +807,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -365,9 +845,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -379,9 +883,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -393,9 +921,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -407,9 +959,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -421,9 +997,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -435,9 +1035,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -449,9 +1073,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -463,9 +1111,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -477,9 +1149,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -492,9 +1188,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -506,9 +1226,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -520,9 +1264,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -534,9 +1302,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -548,9 +1340,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -562,9 +1378,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -577,9 +1417,33 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSetter is a mock of ConfigSetter interface. @@ -615,9 +1479,33 @@ func (m *MockConfigSetter) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigSetterMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIAddresses() *MockConfigSetterAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + return &MockConfigSetterAPIAddressesCall{Call: call} +} + +// MockConfigSetterAPIAddressesCall wrap *gomock.Call +type MockConfigSetterAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -630,9 +1518,33 @@ func (m *MockConfigSetter) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigSetterMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIInfo() *MockConfigSetterAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + return &MockConfigSetterAPIInfoCall{Call: call} +} + +// MockConfigSetterAPIInfoCall wrap *gomock.Call +type MockConfigSetterAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -644,9 +1556,33 @@ func (m *MockConfigSetter) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *MockConfigSetterAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + return &MockConfigSetterAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -658,9 +1594,33 @@ func (m *MockConfigSetter) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *MockConfigSetterAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigSetterAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -672,9 +1632,33 @@ func (m *MockConfigSetter) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigSetterMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) CACert() *MockConfigSetterCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + return &MockConfigSetterCACertCall{Call: call} +} + +// MockConfigSetterCACertCall wrap *gomock.Call +type MockConfigSetterCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCACertCall) Return(arg0 string) *MockConfigSetterCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCACertCall) Do(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCACertCall) DoAndReturn(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clone mocks base method. @@ -686,9 +1670,33 @@ func (m *MockConfigSetter) Clone() agent.Config { } // Clone indicates an expected call of Clone. -func (mr *MockConfigSetterMockRecorder) Clone() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Clone() *MockConfigSetterCloneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + return &MockConfigSetterCloneCall{Call: call} +} + +// MockConfigSetterCloneCall wrap *gomock.Call +type MockConfigSetterCloneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCloneCall) Return(arg0 agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCloneCall) Do(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCloneCall) DoAndReturn(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -700,9 +1708,33 @@ func (m *MockConfigSetter) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigSetterMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Controller() *MockConfigSetterControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + return &MockConfigSetterControllerCall{Call: call} +} + +// MockConfigSetterControllerCall wrap *gomock.Call +type MockConfigSetterControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterControllerCall) Return(arg0 names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterControllerCall) Do(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -714,9 +1746,33 @@ func (m *MockConfigSetter) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigSetterMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DataDir() *MockConfigSetterDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + return &MockConfigSetterDataDirCall{Call: call} +} + +// MockConfigSetterDataDirCall wrap *gomock.Call +type MockConfigSetterDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDataDirCall) Return(arg0 string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDataDirCall) Do(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDataDirCall) DoAndReturn(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -728,9 +1784,33 @@ func (m *MockConfigSetter) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigSetterMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Dir() *MockConfigSetterDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + return &MockConfigSetterDirCall{Call: call} +} + +// MockConfigSetterDirCall wrap *gomock.Call +type MockConfigSetterDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDirCall) Return(arg0 string) *MockConfigSetterDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDirCall) Do(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDirCall) DoAndReturn(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -743,9 +1823,33 @@ func (m *MockConfigSetter) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigSetterMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DqlitePort() *MockConfigSetterDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + return &MockConfigSetterDqlitePortCall{Call: call} +} + +// MockConfigSetterDqlitePortCall wrap *gomock.Call +type MockConfigSetterDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDqlitePortCall) Do(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -757,9 +1861,33 @@ func (m *MockConfigSetter) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigSetterMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Jobs() *MockConfigSetterJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + return &MockConfigSetterJobsCall{Call: call} +} + +// MockConfigSetterJobsCall wrap *gomock.Call +type MockConfigSetterJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJobsCall) Return(arg0 []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJobsCall) Do(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -771,9 +1899,33 @@ func (m *MockConfigSetter) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *MockConfigSetterJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + return &MockConfigSetterJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJujuDBSnapChannelCall) Return(arg0 string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJujuDBSnapChannelCall) Do(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -785,9 +1937,33 @@ func (m *MockConfigSetter) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigSetterMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LogDir() *MockConfigSetterLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + return &MockConfigSetterLogDirCall{Call: call} +} + +// MockConfigSetterLogDirCall wrap *gomock.Call +type MockConfigSetterLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLogDirCall) Return(arg0 string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLogDirCall) Do(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLogDirCall) DoAndReturn(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -799,9 +1975,33 @@ func (m *MockConfigSetter) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigSetterMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LoggingConfig() *MockConfigSetterLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + return &MockConfigSetterLoggingConfigCall{Call: call} +} + +// MockConfigSetterLoggingConfigCall wrap *gomock.Call +type MockConfigSetterLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLoggingConfigCall) Return(arg0 string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLoggingConfigCall) Do(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLoggingConfigCall) DoAndReturn(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -813,9 +2013,33 @@ func (m *MockConfigSetter) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *MockConfigSetterMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + return &MockConfigSetterMetricsSpoolDirCall{Call: call} +} + +// MockConfigSetterMetricsSpoolDirCall wrap *gomock.Call +type MockConfigSetterMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMetricsSpoolDirCall) Return(arg0 string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMetricsSpoolDirCall) Do(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -827,9 +2051,33 @@ func (m *MockConfigSetter) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigSetterMockRecorder) Model() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Model() *MockConfigSetterModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + return &MockConfigSetterModelCall{Call: call} +} + +// MockConfigSetterModelCall wrap *gomock.Call +type MockConfigSetterModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterModelCall) Return(arg0 names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterModelCall) Do(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -842,9 +2090,33 @@ func (m *MockConfigSetter) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigSetterMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoInfo() *MockConfigSetterMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + return &MockConfigSetterMongoInfoCall{Call: call} +} + +// MockConfigSetterMongoInfoCall wrap *gomock.Call +type MockConfigSetterMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -856,9 +2128,33 @@ func (m *MockConfigSetter) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *MockConfigSetterMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + return &MockConfigSetterMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -870,9 +2166,33 @@ func (m *MockConfigSetter) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigSetterMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Nonce() *MockConfigSetterNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + return &MockConfigSetterNonceCall{Call: call} +} + +// MockConfigSetterNonceCall wrap *gomock.Call +type MockConfigSetterNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterNonceCall) Return(arg0 string) *MockConfigSetterNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterNonceCall) Do(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterNonceCall) DoAndReturn(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -884,9 +2204,33 @@ func (m *MockConfigSetter) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *MockConfigSetterObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + return &MockConfigSetterObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -898,9 +2242,33 @@ func (m *MockConfigSetter) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigSetterMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OldPassword() *MockConfigSetterOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + return &MockConfigSetterOldPasswordCall{Call: call} +} + +// MockConfigSetterOldPasswordCall wrap *gomock.Call +type MockConfigSetterOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOldPasswordCall) Return(arg0 string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOldPasswordCall) Do(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOldPasswordCall) DoAndReturn(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -912,9 +2280,33 @@ func (m *MockConfigSetter) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *MockConfigSetterOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + return &MockConfigSetterOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -926,9 +2318,33 @@ func (m *MockConfigSetter) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *MockConfigSetterOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + return &MockConfigSetterOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEndpointCall) Do(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -940,9 +2356,33 @@ func (m *MockConfigSetter) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *MockConfigSetterOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + return &MockConfigSetterOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -954,9 +2394,33 @@ func (m *MockConfigSetter) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *MockConfigSetterOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + return &MockConfigSetterOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -968,9 +2432,33 @@ func (m *MockConfigSetter) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *MockConfigSetterOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + return &MockConfigSetterOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -982,9 +2470,33 @@ func (m *MockConfigSetter) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *MockConfigSetterQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + return &MockConfigSetterQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingEnabledCall) Return(arg0 bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingEnabledCall) Do(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -996,9 +2508,33 @@ func (m *MockConfigSetter) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *MockConfigSetterQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + return &MockConfigSetterQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAPIHostPorts mocks base method. @@ -1010,9 +2546,33 @@ func (m *MockConfigSetter) SetAPIHostPorts(arg0 []network.HostPorts) error { } // SetAPIHostPorts indicates an expected call of SetAPIHostPorts. -func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *MockConfigSetterSetAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + return &MockConfigSetterSetAPIHostPortsCall{Call: call} +} + +// MockConfigSetterSetAPIHostPortsCall wrap *gomock.Call +type MockConfigSetterSetAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetAPIHostPortsCall) Return(arg0 error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetAPIHostPortsCall) Do(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetAPIHostPortsCall) DoAndReturn(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCACert mocks base method. @@ -1022,9 +2582,33 @@ func (m *MockConfigSetter) SetCACert(arg0 string) { } // SetCACert indicates an expected call of SetCACert. -func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *MockConfigSetterSetCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + return &MockConfigSetterSetCACertCall{Call: call} +} + +// MockConfigSetterSetCACertCall wrap *gomock.Call +type MockConfigSetterSetCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetCACertCall) Return() *MockConfigSetterSetCACertCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetCACertCall) Do(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetCACertCall) DoAndReturn(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerAPIPort mocks base method. @@ -1034,9 +2618,33 @@ func (m *MockConfigSetter) SetControllerAPIPort(arg0 int) { } // SetControllerAPIPort indicates an expected call of SetControllerAPIPort. -func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *MockConfigSetterSetControllerAPIPortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + return &MockConfigSetterSetControllerAPIPortCall{Call: call} +} + +// MockConfigSetterSetControllerAPIPortCall wrap *gomock.Call +type MockConfigSetterSetControllerAPIPortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetControllerAPIPortCall) Return() *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetControllerAPIPortCall) Do(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetControllerAPIPortCall) DoAndReturn(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetJujuDBSnapChannel mocks base method. @@ -1046,9 +2654,33 @@ func (m *MockConfigSetter) SetJujuDBSnapChannel(arg0 string) { } // SetJujuDBSnapChannel indicates an expected call of SetJujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *MockConfigSetterSetJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + return &MockConfigSetterSetJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterSetJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterSetJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Return() *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Do(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetJujuDBSnapChannelCall) DoAndReturn(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLoggingConfig mocks base method. @@ -1058,9 +2690,33 @@ func (m *MockConfigSetter) SetLoggingConfig(arg0 string) { } // SetLoggingConfig indicates an expected call of SetLoggingConfig. -func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *MockConfigSetterSetLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + return &MockConfigSetterSetLoggingConfigCall{Call: call} +} + +// MockConfigSetterSetLoggingConfigCall wrap *gomock.Call +type MockConfigSetterSetLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetLoggingConfigCall) Return() *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetLoggingConfigCall) Do(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetLoggingConfigCall) DoAndReturn(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMongoMemoryProfile mocks base method. @@ -1070,9 +2726,33 @@ func (m *MockConfigSetter) SetMongoMemoryProfile(arg0 mongo.MemoryProfile) { } // SetMongoMemoryProfile indicates an expected call of SetMongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *MockConfigSetterSetMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + return &MockConfigSetterSetMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterSetMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterSetMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetMongoMemoryProfileCall) Return() *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetMongoMemoryProfileCall) Do(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetMongoMemoryProfileCall) DoAndReturn(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetObjectStoreType mocks base method. @@ -1082,9 +2762,33 @@ func (m *MockConfigSetter) SetObjectStoreType(arg0 objectstore.BackendType) { } // SetObjectStoreType indicates an expected call of SetObjectStoreType. -func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *MockConfigSetterSetObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + return &MockConfigSetterSetObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterSetObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterSetObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetObjectStoreTypeCall) Return() *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetObjectStoreTypeCall) Do(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetObjectStoreTypeCall) DoAndReturn(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOldPassword mocks base method. @@ -1094,9 +2798,33 @@ func (m *MockConfigSetter) SetOldPassword(arg0 string) { } // SetOldPassword indicates an expected call of SetOldPassword. -func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *MockConfigSetterSetOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + return &MockConfigSetterSetOldPasswordCall{Call: call} +} + +// MockConfigSetterSetOldPasswordCall wrap *gomock.Call +type MockConfigSetterSetOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOldPasswordCall) Return() *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOldPasswordCall) Do(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOldPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEnabled mocks base method. @@ -1106,9 +2834,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEnabled(arg0 bool) { } // SetOpenTelemetryEnabled indicates an expected call of SetOpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *MockConfigSetterSetOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + return &MockConfigSetterSetOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Return() *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEndpoint mocks base method. @@ -1118,9 +2870,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEndpoint(arg0 string) { } // SetOpenTelemetryEndpoint indicates an expected call of SetOpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *MockConfigSetterSetOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + return &MockConfigSetterSetOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Return() *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Do(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) DoAndReturn(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryInsecure mocks base method. @@ -1130,9 +2906,33 @@ func (m *MockConfigSetter) SetOpenTelemetryInsecure(arg0 bool) { } // SetOpenTelemetryInsecure indicates an expected call of SetOpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *MockConfigSetterSetOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + return &MockConfigSetterSetOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Return() *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetrySampleRatio mocks base method. @@ -1142,9 +2942,33 @@ func (m *MockConfigSetter) SetOpenTelemetrySampleRatio(arg0 float64) { } // SetOpenTelemetrySampleRatio indicates an expected call of SetOpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *MockConfigSetterSetOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + return &MockConfigSetterSetOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Return() *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Do(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) DoAndReturn(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryStackTraces mocks base method. @@ -1154,9 +2978,33 @@ func (m *MockConfigSetter) SetOpenTelemetryStackTraces(arg0 bool) { } // SetOpenTelemetryStackTraces indicates an expected call of SetOpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *MockConfigSetterSetOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + return &MockConfigSetterSetOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Return() *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -1166,9 +3014,33 @@ func (m *MockConfigSetter) SetPassword(arg0 string) { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *MockConfigSetterSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + return &MockConfigSetterSetPasswordCall{Call: call} +} + +// MockConfigSetterSetPasswordCall wrap *gomock.Call +type MockConfigSetterSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetPasswordCall) Return() *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetPasswordCall) Do(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingEnabled mocks base method. @@ -1178,9 +3050,33 @@ func (m *MockConfigSetter) SetQueryTracingEnabled(arg0 bool) { } // SetQueryTracingEnabled indicates an expected call of SetQueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *MockConfigSetterSetQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + return &MockConfigSetterSetQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterSetQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingEnabledCall) Return() *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingEnabledCall) Do(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingThreshold mocks base method. @@ -1190,9 +3086,33 @@ func (m *MockConfigSetter) SetQueryTracingThreshold(arg0 time.Duration) { } // SetQueryTracingThreshold indicates an expected call of SetQueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *MockConfigSetterSetQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + return &MockConfigSetterSetQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterSetQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingThresholdCall) Return() *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingThresholdCall) Do(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingThresholdCall) DoAndReturn(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStateServingInfo mocks base method. @@ -1202,9 +3122,33 @@ func (m *MockConfigSetter) SetStateServingInfo(arg0 controller.StateServingInfo) } // SetStateServingInfo indicates an expected call of SetStateServingInfo. -func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *MockConfigSetterSetStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + return &MockConfigSetterSetStateServingInfoCall{Call: call} +} + +// MockConfigSetterSetStateServingInfoCall wrap *gomock.Call +type MockConfigSetterSetStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetStateServingInfoCall) Return() *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetStateServingInfoCall) Do(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetStateServingInfoCall) DoAndReturn(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradedToVersion mocks base method. @@ -1214,9 +3158,33 @@ func (m *MockConfigSetter) SetUpgradedToVersion(arg0 version.Number) { } // SetUpgradedToVersion indicates an expected call of SetUpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *MockConfigSetterSetUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + return &MockConfigSetterSetUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterSetUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterSetUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetUpgradedToVersionCall) Return() *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetUpgradedToVersionCall) Do(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetUpgradedToVersionCall) DoAndReturn(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetValue mocks base method. @@ -1226,9 +3194,33 @@ func (m *MockConfigSetter) SetValue(arg0, arg1 string) { } // SetValue indicates an expected call of SetValue. -func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *MockConfigSetterSetValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + return &MockConfigSetterSetValueCall{Call: call} +} + +// MockConfigSetterSetValueCall wrap *gomock.Call +type MockConfigSetterSetValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetValueCall) Return() *MockConfigSetterSetValueCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetValueCall) Do(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetValueCall) DoAndReturn(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -1241,9 +3233,33 @@ func (m *MockConfigSetter) StateServingInfo() (controller.StateServingInfo, bool } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigSetterMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) StateServingInfo() *MockConfigSetterStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + return &MockConfigSetterStateServingInfoCall{Call: call} +} + +// MockConfigSetterStateServingInfoCall wrap *gomock.Call +type MockConfigSetterStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -1255,9 +3271,33 @@ func (m *MockConfigSetter) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *MockConfigSetterSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + return &MockConfigSetterSystemIdentityPathCall{Call: call} +} + +// MockConfigSetterSystemIdentityPathCall wrap *gomock.Call +type MockConfigSetterSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSystemIdentityPathCall) Return(arg0 string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSystemIdentityPathCall) Do(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1269,9 +3309,33 @@ func (m *MockConfigSetter) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigSetterMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Tag() *MockConfigSetterTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + return &MockConfigSetterTagCall{Call: call} +} + +// MockConfigSetterTagCall wrap *gomock.Call +type MockConfigSetterTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTagCall) Return(arg0 names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTagCall) Do(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTagCall) DoAndReturn(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -1283,9 +3347,33 @@ func (m *MockConfigSetter) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigSetterMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) TransientDataDir() *MockConfigSetterTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + return &MockConfigSetterTransientDataDirCall{Call: call} +} + +// MockConfigSetterTransientDataDirCall wrap *gomock.Call +type MockConfigSetterTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTransientDataDirCall) Return(arg0 string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTransientDataDirCall) Do(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTransientDataDirCall) DoAndReturn(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -1297,9 +3385,33 @@ func (m *MockConfigSetter) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *MockConfigSetterUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + return &MockConfigSetterUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterUpgradedToVersionCall) Do(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -1311,9 +3423,33 @@ func (m *MockConfigSetter) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *MockConfigSetterValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + return &MockConfigSetterValueCall{Call: call} +} + +// MockConfigSetterValueCall wrap *gomock.Call +type MockConfigSetterValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterValueCall) Return(arg0 string) *MockConfigSetterValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterValueCall) Do(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterValueCall) DoAndReturn(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -1326,7 +3462,31 @@ func (m *MockConfigSetter) WriteCommands(arg0 shell.Renderer) ([]string, error) } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *MockConfigSetterWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + return &MockConfigSetterWriteCommandsCall{Call: call} +} + +// MockConfigSetterWriteCommandsCall wrap *gomock.Call +type MockConfigSetterWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/database_mock_test.go b/internal/worker/upgradedatabase/database_mock_test.go index 9fce1a361e5..95c5626b8b7 100644 --- a/internal/worker/upgradedatabase/database_mock_test.go +++ b/internal/worker/upgradedatabase/database_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination database_mock_test.go github.com/juju/juju/core/database DBGetter +// mockgen -typed -package upgradedatabase -destination database_mock_test.go github.com/juju/juju/core/database DBGetter // // Package upgradedatabase is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockDBGetter) GetDB(arg0 string) (database.TxnRunner, error) { } // GetDB indicates an expected call of GetDB. -func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *gomock.Call { +func (mr *MockDBGetterMockRecorder) GetDB(arg0 any) *MockDBGetterGetDBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockDBGetter)(nil).GetDB), arg0) + return &MockDBGetterGetDBCall{Call: call} +} + +// MockDBGetterGetDBCall wrap *gomock.Call +type MockDBGetterGetDBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDBGetterGetDBCall) Return(arg0 database.TxnRunner, arg1 error) *MockDBGetterGetDBCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDBGetterGetDBCall) Do(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDBGetterGetDBCall) DoAndReturn(f func(string) (database.TxnRunner, error)) *MockDBGetterGetDBCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/lock_mock_test.go b/internal/worker/upgradedatabase/lock_mock_test.go index be870d1511b..393ce779899 100644 --- a/internal/worker/upgradedatabase/lock_mock_test.go +++ b/internal/worker/upgradedatabase/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +// mockgen -typed -package upgradedatabase -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock // // Package upgradedatabase is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLock) IsUnlocked() bool { } // IsUnlocked indicates an expected call of IsUnlocked. -func (mr *MockLockMockRecorder) IsUnlocked() *gomock.Call { +func (mr *MockLockMockRecorder) IsUnlocked() *MockLockIsUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + return &MockLockIsUnlockedCall{Call: call} +} + +// MockLockIsUnlockedCall wrap *gomock.Call +type MockLockIsUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockIsUnlockedCall) Return(arg0 bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockIsUnlockedCall) Do(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockIsUnlockedCall) DoAndReturn(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -59,9 +83,33 @@ func (m *MockLock) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockLockMockRecorder) Unlock() *gomock.Call { +func (mr *MockLockMockRecorder) Unlock() *MockLockUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + return &MockLockUnlockCall{Call: call} +} + +// MockLockUnlockCall wrap *gomock.Call +type MockLockUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockCall) Return() *MockLockUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockCall) Do(f func()) *MockLockUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockCall) DoAndReturn(f func()) *MockLockUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlocked mocks base method. @@ -73,7 +121,31 @@ func (m *MockLock) Unlocked() <-chan struct{} { } // Unlocked indicates an expected call of Unlocked. -func (mr *MockLockMockRecorder) Unlocked() *gomock.Call { +func (mr *MockLockMockRecorder) Unlocked() *MockLockUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + return &MockLockUnlockedCall{Call: call} +} + +// MockLockUnlockedCall wrap *gomock.Call +type MockLockUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockedCall) Return(arg0 <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockedCall) Do(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockedCall) DoAndReturn(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/package_test.go b/internal/worker/upgradedatabase/package_test.go index 4612339e096..259caaefaa7 100644 --- a/internal/worker/upgradedatabase/package_test.go +++ b/internal/worker/upgradedatabase/package_test.go @@ -13,12 +13,12 @@ import ( jujujujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination database_mock_test.go github.com/juju/juju/core/database DBGetter -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination service_mock_test.go github.com/juju/juju/internal/worker/upgradedatabase UpgradeService,ModelService -//go:generate go run go.uber.org/mock/mockgen -package upgradedatabase -destination worker_mock_test.go github.com/juju/worker/v4 Worker +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination database_mock_test.go github.com/juju/juju/core/database DBGetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination service_mock_test.go github.com/juju/juju/internal/worker/upgradedatabase UpgradeService,ModelService +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradedatabase -destination worker_mock_test.go github.com/juju/worker/v4 Worker func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/internal/worker/upgradedatabase/service_mock_test.go b/internal/worker/upgradedatabase/service_mock_test.go index c4376672216..24d8c383cfd 100644 --- a/internal/worker/upgradedatabase/service_mock_test.go +++ b/internal/worker/upgradedatabase/service_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination service_mock_test.go github.com/juju/juju/internal/worker/upgradedatabase UpgradeService,ModelService +// mockgen -typed -package upgradedatabase -destination service_mock_test.go github.com/juju/juju/internal/worker/upgradedatabase UpgradeService,ModelService // // Package upgradedatabase is a generated GoMock package. @@ -54,9 +54,33 @@ func (m *MockUpgradeService) ActiveUpgrade(arg0 context.Context) (upgrade0.UUID, } // ActiveUpgrade indicates an expected call of ActiveUpgrade. -func (mr *MockUpgradeServiceMockRecorder) ActiveUpgrade(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) ActiveUpgrade(arg0 any) *MockUpgradeServiceActiveUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).ActiveUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).ActiveUpgrade), arg0) + return &MockUpgradeServiceActiveUpgradeCall{Call: call} +} + +// MockUpgradeServiceActiveUpgradeCall wrap *gomock.Call +type MockUpgradeServiceActiveUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceActiveUpgradeCall) Return(arg0 upgrade0.UUID, arg1 error) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceActiveUpgradeCall) Do(f func(context.Context) (upgrade0.UUID, error)) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceActiveUpgradeCall) DoAndReturn(f func(context.Context) (upgrade0.UUID, error)) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CreateUpgrade mocks base method. @@ -69,9 +93,33 @@ func (m *MockUpgradeService) CreateUpgrade(arg0 context.Context, arg1, arg2 vers } // CreateUpgrade indicates an expected call of CreateUpgrade. -func (mr *MockUpgradeServiceMockRecorder) CreateUpgrade(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) CreateUpgrade(arg0, arg1, arg2 any) *MockUpgradeServiceCreateUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).CreateUpgrade), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).CreateUpgrade), arg0, arg1, arg2) + return &MockUpgradeServiceCreateUpgradeCall{Call: call} +} + +// MockUpgradeServiceCreateUpgradeCall wrap *gomock.Call +type MockUpgradeServiceCreateUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceCreateUpgradeCall) Return(arg0 upgrade0.UUID, arg1 error) *MockUpgradeServiceCreateUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceCreateUpgradeCall) Do(f func(context.Context, version.Number, version.Number) (upgrade0.UUID, error)) *MockUpgradeServiceCreateUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceCreateUpgradeCall) DoAndReturn(f func(context.Context, version.Number, version.Number) (upgrade0.UUID, error)) *MockUpgradeServiceCreateUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerReady mocks base method. @@ -83,9 +131,33 @@ func (m *MockUpgradeService) SetControllerReady(arg0 context.Context, arg1 upgra } // SetControllerReady indicates an expected call of SetControllerReady. -func (mr *MockUpgradeServiceMockRecorder) SetControllerReady(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) SetControllerReady(arg0, arg1, arg2 any) *MockUpgradeServiceSetControllerReadyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerReady", reflect.TypeOf((*MockUpgradeService)(nil).SetControllerReady), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerReady", reflect.TypeOf((*MockUpgradeService)(nil).SetControllerReady), arg0, arg1, arg2) + return &MockUpgradeServiceSetControllerReadyCall{Call: call} +} + +// MockUpgradeServiceSetControllerReadyCall wrap *gomock.Call +type MockUpgradeServiceSetControllerReadyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceSetControllerReadyCall) Return(arg0 error) *MockUpgradeServiceSetControllerReadyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceSetControllerReadyCall) Do(f func(context.Context, upgrade0.UUID, string) error) *MockUpgradeServiceSetControllerReadyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceSetControllerReadyCall) DoAndReturn(f func(context.Context, upgrade0.UUID, string) error) *MockUpgradeServiceSetControllerReadyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDBUpgradeCompleted mocks base method. @@ -97,9 +169,33 @@ func (m *MockUpgradeService) SetDBUpgradeCompleted(arg0 context.Context, arg1 up } // SetDBUpgradeCompleted indicates an expected call of SetDBUpgradeCompleted. -func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeCompleted(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeCompleted(arg0, arg1 any) *MockUpgradeServiceSetDBUpgradeCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeCompleted", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeCompleted), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeCompleted", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeCompleted), arg0, arg1) + return &MockUpgradeServiceSetDBUpgradeCompletedCall{Call: call} +} + +// MockUpgradeServiceSetDBUpgradeCompletedCall wrap *gomock.Call +type MockUpgradeServiceSetDBUpgradeCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceSetDBUpgradeCompletedCall) Return(arg0 error) *MockUpgradeServiceSetDBUpgradeCompletedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceSetDBUpgradeCompletedCall) Do(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceSetDBUpgradeCompletedCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDBUpgradeFailed mocks base method. @@ -111,9 +207,33 @@ func (m *MockUpgradeService) SetDBUpgradeFailed(arg0 context.Context, arg1 upgra } // SetDBUpgradeFailed indicates an expected call of SetDBUpgradeFailed. -func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *MockUpgradeServiceSetDBUpgradeFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeFailed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeFailed), arg0, arg1) + return &MockUpgradeServiceSetDBUpgradeFailedCall{Call: call} +} + +// MockUpgradeServiceSetDBUpgradeFailedCall wrap *gomock.Call +type MockUpgradeServiceSetDBUpgradeFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) Return(arg0 error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) Do(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartUpgrade mocks base method. @@ -125,9 +245,33 @@ func (m *MockUpgradeService) StartUpgrade(arg0 context.Context, arg1 upgrade0.UU } // StartUpgrade indicates an expected call of StartUpgrade. -func (mr *MockUpgradeServiceMockRecorder) StartUpgrade(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) StartUpgrade(arg0, arg1 any) *MockUpgradeServiceStartUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).StartUpgrade), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).StartUpgrade), arg0, arg1) + return &MockUpgradeServiceStartUpgradeCall{Call: call} +} + +// MockUpgradeServiceStartUpgradeCall wrap *gomock.Call +type MockUpgradeServiceStartUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceStartUpgradeCall) Return(arg0 error) *MockUpgradeServiceStartUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceStartUpgradeCall) Do(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceStartUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceStartUpgradeCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceStartUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeInfo mocks base method. @@ -140,9 +284,33 @@ func (m *MockUpgradeService) UpgradeInfo(arg0 context.Context, arg1 upgrade0.UUI } // UpgradeInfo indicates an expected call of UpgradeInfo. -func (mr *MockUpgradeServiceMockRecorder) UpgradeInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) UpgradeInfo(arg0, arg1 any) *MockUpgradeServiceUpgradeInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockUpgradeService)(nil).UpgradeInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockUpgradeService)(nil).UpgradeInfo), arg0, arg1) + return &MockUpgradeServiceUpgradeInfoCall{Call: call} +} + +// MockUpgradeServiceUpgradeInfoCall wrap *gomock.Call +type MockUpgradeServiceUpgradeInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceUpgradeInfoCall) Return(arg0 upgrade.Info, arg1 error) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceUpgradeInfoCall) Do(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceUpgradeInfoCall) DoAndReturn(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForUpgradeReady mocks base method. @@ -155,9 +323,33 @@ func (m *MockUpgradeService) WatchForUpgradeReady(arg0 context.Context, arg1 upg } // WatchForUpgradeReady indicates an expected call of WatchForUpgradeReady. -func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeReady(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeReady(arg0, arg1 any) *MockUpgradeServiceWatchForUpgradeReadyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeReady", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeReady), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeReady", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeReady), arg0, arg1) + return &MockUpgradeServiceWatchForUpgradeReadyCall{Call: call} +} + +// MockUpgradeServiceWatchForUpgradeReadyCall wrap *gomock.Call +type MockUpgradeServiceWatchForUpgradeReadyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceWatchForUpgradeReadyCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUpgradeServiceWatchForUpgradeReadyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceWatchForUpgradeReadyCall) Do(f func(context.Context, upgrade0.UUID) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeReadyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceWatchForUpgradeReadyCall) DoAndReturn(f func(context.Context, upgrade0.UUID) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeReadyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForUpgradeState mocks base method. @@ -170,9 +362,33 @@ func (m *MockUpgradeService) WatchForUpgradeState(arg0 context.Context, arg1 upg } // WatchForUpgradeState indicates an expected call of WatchForUpgradeState. -func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeState(arg0, arg1, arg2 any) *MockUpgradeServiceWatchForUpgradeStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeState", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeState), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeState", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeState), arg0, arg1, arg2) + return &MockUpgradeServiceWatchForUpgradeStateCall{Call: call} +} + +// MockUpgradeServiceWatchForUpgradeStateCall wrap *gomock.Call +type MockUpgradeServiceWatchForUpgradeStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceWatchForUpgradeStateCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceWatchForUpgradeStateCall) Do(f func(context.Context, upgrade0.UUID, upgrade.State) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceWatchForUpgradeStateCall) DoAndReturn(f func(context.Context, upgrade0.UUID, upgrade.State) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockModelService is a mock of ModelService interface. @@ -208,7 +424,31 @@ func (m *MockModelService) ListModelIDs(arg0 context.Context) ([]model.UUID, err } // ListModelIDs indicates an expected call of ListModelIDs. -func (mr *MockModelServiceMockRecorder) ListModelIDs(arg0 any) *gomock.Call { +func (mr *MockModelServiceMockRecorder) ListModelIDs(arg0 any) *MockModelServiceListModelIDsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListModelIDs", reflect.TypeOf((*MockModelService)(nil).ListModelIDs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListModelIDs", reflect.TypeOf((*MockModelService)(nil).ListModelIDs), arg0) + return &MockModelServiceListModelIDsCall{Call: call} +} + +// MockModelServiceListModelIDsCall wrap *gomock.Call +type MockModelServiceListModelIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelServiceListModelIDsCall) Return(arg0 []model.UUID, arg1 error) *MockModelServiceListModelIDsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelServiceListModelIDsCall) Do(f func(context.Context) ([]model.UUID, error)) *MockModelServiceListModelIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelServiceListModelIDsCall) DoAndReturn(f func(context.Context) ([]model.UUID, error)) *MockModelServiceListModelIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/servicefactory_mock_test.go b/internal/worker/upgradedatabase/servicefactory_mock_test.go index aa1535ecb58..b8be15a8689 100644 --- a/internal/worker/upgradedatabase/servicefactory_mock_test.go +++ b/internal/worker/upgradedatabase/servicefactory_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory +// mockgen -typed -package upgradedatabase -destination servicefactory_mock_test.go github.com/juju/juju/internal/servicefactory ControllerServiceFactory // // Package upgradedatabase is a generated GoMock package. @@ -60,9 +60,33 @@ func (m *MockControllerServiceFactory) Access() *service.Service { } // Access indicates an expected call of Access. -func (mr *MockControllerServiceFactoryMockRecorder) Access() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Access() *MockControllerServiceFactoryAccessCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Access", reflect.TypeOf((*MockControllerServiceFactory)(nil).Access)) + return &MockControllerServiceFactoryAccessCall{Call: call} +} + +// MockControllerServiceFactoryAccessCall wrap *gomock.Call +type MockControllerServiceFactoryAccessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAccessCall) Return(arg0 *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAccessCall) Do(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAccessCall) DoAndReturn(f func() *service.Service) *MockControllerServiceFactoryAccessCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentObjectStore mocks base method. @@ -74,9 +98,33 @@ func (m *MockControllerServiceFactory) AgentObjectStore() *service9.WatchableSer } // AgentObjectStore indicates an expected call of AgentObjectStore. -func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AgentObjectStore() *MockControllerServiceFactoryAgentObjectStoreCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentObjectStore", reflect.TypeOf((*MockControllerServiceFactory)(nil).AgentObjectStore)) + return &MockControllerServiceFactoryAgentObjectStoreCall{Call: call} +} + +// MockControllerServiceFactoryAgentObjectStoreCall wrap *gomock.Call +type MockControllerServiceFactoryAgentObjectStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Return(arg0 *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAgentObjectStoreCall) Do(f func() *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAgentObjectStoreCall) DoAndReturn(f func() *service9.WatchableService) *MockControllerServiceFactoryAgentObjectStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AutocertCache mocks base method. @@ -88,9 +136,33 @@ func (m *MockControllerServiceFactory) AutocertCache() *service0.Service { } // AutocertCache indicates an expected call of AutocertCache. -func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) AutocertCache() *MockControllerServiceFactoryAutocertCacheCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AutocertCache", reflect.TypeOf((*MockControllerServiceFactory)(nil).AutocertCache)) + return &MockControllerServiceFactoryAutocertCacheCall{Call: call} +} + +// MockControllerServiceFactoryAutocertCacheCall wrap *gomock.Call +type MockControllerServiceFactoryAutocertCacheCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryAutocertCacheCall) Return(arg0 *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryAutocertCacheCall) Do(f func() *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryAutocertCacheCall) DoAndReturn(f func() *service0.Service) *MockControllerServiceFactoryAutocertCacheCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Cloud mocks base method. @@ -102,9 +174,33 @@ func (m *MockControllerServiceFactory) Cloud() *service1.WatchableService { } // Cloud indicates an expected call of Cloud. -func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Cloud() *MockControllerServiceFactoryCloudCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockControllerServiceFactory)(nil).Cloud)) + return &MockControllerServiceFactoryCloudCall{Call: call} +} + +// MockControllerServiceFactoryCloudCall wrap *gomock.Call +type MockControllerServiceFactoryCloudCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCloudCall) Return(arg0 *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCloudCall) Do(f func() *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCloudCall) DoAndReturn(f func() *service1.WatchableService) *MockControllerServiceFactoryCloudCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerConfig mocks base method. @@ -116,9 +212,33 @@ func (m *MockControllerServiceFactory) ControllerConfig() *service2.WatchableSer } // ControllerConfig indicates an expected call of ControllerConfig. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerConfig() *MockControllerServiceFactoryControllerConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerConfig)) + return &MockControllerServiceFactoryControllerConfigCall{Call: call} +} + +// MockControllerServiceFactoryControllerConfigCall wrap *gomock.Call +type MockControllerServiceFactoryControllerConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerConfigCall) Return(arg0 *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerConfigCall) Do(f func() *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerConfigCall) DoAndReturn(f func() *service2.WatchableService) *MockControllerServiceFactoryControllerConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ControllerNode mocks base method. @@ -130,9 +250,33 @@ func (m *MockControllerServiceFactory) ControllerNode() *service3.Service { } // ControllerNode indicates an expected call of ControllerNode. -func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ControllerNode() *MockControllerServiceFactoryControllerNodeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerNode", reflect.TypeOf((*MockControllerServiceFactory)(nil).ControllerNode)) + return &MockControllerServiceFactoryControllerNodeCall{Call: call} +} + +// MockControllerServiceFactoryControllerNodeCall wrap *gomock.Call +type MockControllerServiceFactoryControllerNodeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryControllerNodeCall) Return(arg0 *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryControllerNodeCall) Do(f func() *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryControllerNodeCall) DoAndReturn(f func() *service3.Service) *MockControllerServiceFactoryControllerNodeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Credential mocks base method. @@ -144,9 +288,33 @@ func (m *MockControllerServiceFactory) Credential() *service4.WatchableService { } // Credential indicates an expected call of Credential. -func (mr *MockControllerServiceFactoryMockRecorder) Credential() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Credential() *MockControllerServiceFactoryCredentialCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Credential", reflect.TypeOf((*MockControllerServiceFactory)(nil).Credential)) + return &MockControllerServiceFactoryCredentialCall{Call: call} +} + +// MockControllerServiceFactoryCredentialCall wrap *gomock.Call +type MockControllerServiceFactoryCredentialCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryCredentialCall) Return(arg0 *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryCredentialCall) Do(f func() *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryCredentialCall) DoAndReturn(f func() *service4.WatchableService) *MockControllerServiceFactoryCredentialCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExternalController mocks base method. @@ -158,9 +326,33 @@ func (m *MockControllerServiceFactory) ExternalController() *service5.WatchableS } // ExternalController indicates an expected call of ExternalController. -func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ExternalController() *MockControllerServiceFactoryExternalControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalController", reflect.TypeOf((*MockControllerServiceFactory)(nil).ExternalController)) + return &MockControllerServiceFactoryExternalControllerCall{Call: call} +} + +// MockControllerServiceFactoryExternalControllerCall wrap *gomock.Call +type MockControllerServiceFactoryExternalControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryExternalControllerCall) Return(arg0 *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryExternalControllerCall) Do(f func() *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryExternalControllerCall) DoAndReturn(f func() *service5.WatchableService) *MockControllerServiceFactoryExternalControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Flag mocks base method. @@ -172,9 +364,33 @@ func (m *MockControllerServiceFactory) Flag() *service6.Service { } // Flag indicates an expected call of Flag. -func (mr *MockControllerServiceFactoryMockRecorder) Flag() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Flag() *MockControllerServiceFactoryFlagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flag", reflect.TypeOf((*MockControllerServiceFactory)(nil).Flag)) + return &MockControllerServiceFactoryFlagCall{Call: call} +} + +// MockControllerServiceFactoryFlagCall wrap *gomock.Call +type MockControllerServiceFactoryFlagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryFlagCall) Return(arg0 *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryFlagCall) Do(f func() *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryFlagCall) DoAndReturn(f func() *service6.Service) *MockControllerServiceFactoryFlagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -186,9 +402,33 @@ func (m *MockControllerServiceFactory) Model() *service7.Service { } // Model indicates an expected call of Model. -func (mr *MockControllerServiceFactoryMockRecorder) Model() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Model() *MockControllerServiceFactoryModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockControllerServiceFactory)(nil).Model)) + return &MockControllerServiceFactoryModelCall{Call: call} +} + +// MockControllerServiceFactoryModelCall wrap *gomock.Call +type MockControllerServiceFactoryModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelCall) Return(arg0 *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelCall) Do(f func() *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelCall) DoAndReturn(f func() *service7.Service) *MockControllerServiceFactoryModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelDefaults mocks base method. @@ -200,9 +440,33 @@ func (m *MockControllerServiceFactory) ModelDefaults() *service8.Service { } // ModelDefaults indicates an expected call of ModelDefaults. -func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) ModelDefaults() *MockControllerServiceFactoryModelDefaultsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelDefaults", reflect.TypeOf((*MockControllerServiceFactory)(nil).ModelDefaults)) + return &MockControllerServiceFactoryModelDefaultsCall{Call: call} +} + +// MockControllerServiceFactoryModelDefaultsCall wrap *gomock.Call +type MockControllerServiceFactoryModelDefaultsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryModelDefaultsCall) Return(arg0 *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryModelDefaultsCall) Do(f func() *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryModelDefaultsCall) DoAndReturn(f func() *service8.Service) *MockControllerServiceFactoryModelDefaultsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SecretBackend mocks base method. @@ -214,9 +478,33 @@ func (m *MockControllerServiceFactory) SecretBackend() *service10.WatchableServi } // SecretBackend indicates an expected call of SecretBackend. -func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) SecretBackend() *MockControllerServiceFactorySecretBackendCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretBackend", reflect.TypeOf((*MockControllerServiceFactory)(nil).SecretBackend)) + return &MockControllerServiceFactorySecretBackendCall{Call: call} +} + +// MockControllerServiceFactorySecretBackendCall wrap *gomock.Call +type MockControllerServiceFactorySecretBackendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactorySecretBackendCall) Return(arg0 *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactorySecretBackendCall) Do(f func() *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactorySecretBackendCall) DoAndReturn(f func() *service10.WatchableService) *MockControllerServiceFactorySecretBackendCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Upgrade mocks base method. @@ -228,7 +516,31 @@ func (m *MockControllerServiceFactory) Upgrade() *service11.WatchableService { } // Upgrade indicates an expected call of Upgrade. -func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *gomock.Call { +func (mr *MockControllerServiceFactoryMockRecorder) Upgrade() *MockControllerServiceFactoryUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockControllerServiceFactory)(nil).Upgrade)) + return &MockControllerServiceFactoryUpgradeCall{Call: call} +} + +// MockControllerServiceFactoryUpgradeCall wrap *gomock.Call +type MockControllerServiceFactoryUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockControllerServiceFactoryUpgradeCall) Return(arg0 *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockControllerServiceFactoryUpgradeCall) Do(f func() *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockControllerServiceFactoryUpgradeCall) DoAndReturn(f func() *service11.WatchableService) *MockControllerServiceFactoryUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/worker_mock_test.go b/internal/worker/upgradedatabase/worker_mock_test.go index 1fa518b3b74..f8957497c7e 100644 --- a/internal/worker/upgradedatabase/worker_mock_test.go +++ b/internal/worker/upgradedatabase/worker_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradedatabase -destination worker_mock_test.go github.com/juju/worker/v4 Worker +// mockgen -typed -package upgradedatabase -destination worker_mock_test.go github.com/juju/worker/v4 Worker // // Package upgradedatabase is a generated GoMock package. @@ -45,9 +45,33 @@ func (m *MockWorker) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockWorkerMockRecorder) Kill() *gomock.Call { +func (mr *MockWorkerMockRecorder) Kill() *MockWorkerKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockWorker)(nil).Kill)) + return &MockWorkerKillCall{Call: call} +} + +// MockWorkerKillCall wrap *gomock.Call +type MockWorkerKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerKillCall) Return() *MockWorkerKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerKillCall) Do(f func()) *MockWorkerKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerKillCall) DoAndReturn(f func()) *MockWorkerKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -59,7 +83,31 @@ func (m *MockWorker) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockWorkerMockRecorder) Wait() *gomock.Call { +func (mr *MockWorkerMockRecorder) Wait() *MockWorkerWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockWorker)(nil).Wait)) + return &MockWorkerWaitCall{Call: call} +} + +// MockWorkerWaitCall wrap *gomock.Call +type MockWorkerWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockWorkerWaitCall) Return(arg0 error) *MockWorkerWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockWorkerWaitCall) Do(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockWorkerWaitCall) DoAndReturn(f func() error) *MockWorkerWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradedatabase/worker_test.go b/internal/worker/upgradedatabase/worker_test.go index 717a6dfe0af..38f59b61e30 100644 --- a/internal/worker/upgradedatabase/worker_test.go +++ b/internal/worker/upgradedatabase/worker_test.go @@ -721,7 +721,7 @@ func (s *workerSuite) setupMocks(c *gc.C) *gomock.Controller { return ctrl } -func (s *workerSuite) expectStartUpgrade(from, to version.Number, watcher worker.Worker) { +func (s *workerSuite) expectStartUpgrade(from, to version.Number, watcher watcher.NotifyWatcher) { srv := s.upgradeService.EXPECT() srv.CreateUpgrade(gomock.Any(), from, to).Return(s.upgradeUUID, nil) srv.SetControllerReady(gomock.Any(), s.upgradeUUID, "0").Return(nil) diff --git a/internal/worker/upgrader/mocks/upgrader_mocks.go b/internal/worker/upgrader/mocks/upgrader_mocks.go index 106f8101256..28ddff20a91 100644 --- a/internal/worker/upgrader/mocks/upgrader_mocks.go +++ b/internal/worker/upgrader/mocks/upgrader_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/upgrader_mocks.go github.com/juju/juju/internal/worker/upgrader UpgraderClient +// mockgen -typed -package mocks -destination mocks/upgrader_mocks.go github.com/juju/juju/internal/worker/upgrader UpgraderClient // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockUpgraderClient) DesiredVersion(arg0 string) (version.Number, error) } // DesiredVersion indicates an expected call of DesiredVersion. -func (mr *MockUpgraderClientMockRecorder) DesiredVersion(arg0 any) *gomock.Call { +func (mr *MockUpgraderClientMockRecorder) DesiredVersion(arg0 any) *MockUpgraderClientDesiredVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DesiredVersion", reflect.TypeOf((*MockUpgraderClient)(nil).DesiredVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DesiredVersion", reflect.TypeOf((*MockUpgraderClient)(nil).DesiredVersion), arg0) + return &MockUpgraderClientDesiredVersionCall{Call: call} +} + +// MockUpgraderClientDesiredVersionCall wrap *gomock.Call +type MockUpgraderClientDesiredVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderClientDesiredVersionCall) Return(arg0 version.Number, arg1 error) *MockUpgraderClientDesiredVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderClientDesiredVersionCall) Do(f func(string) (version.Number, error)) *MockUpgraderClientDesiredVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderClientDesiredVersionCall) DoAndReturn(f func(string) (version.Number, error)) *MockUpgraderClientDesiredVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetVersion mocks base method. @@ -65,9 +89,33 @@ func (m *MockUpgraderClient) SetVersion(arg0 string, arg1 version.Binary) error } // SetVersion indicates an expected call of SetVersion. -func (mr *MockUpgraderClientMockRecorder) SetVersion(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgraderClientMockRecorder) SetVersion(arg0, arg1 any) *MockUpgraderClientSetVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVersion", reflect.TypeOf((*MockUpgraderClient)(nil).SetVersion), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVersion", reflect.TypeOf((*MockUpgraderClient)(nil).SetVersion), arg0, arg1) + return &MockUpgraderClientSetVersionCall{Call: call} +} + +// MockUpgraderClientSetVersionCall wrap *gomock.Call +type MockUpgraderClientSetVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderClientSetVersionCall) Return(arg0 error) *MockUpgraderClientSetVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderClientSetVersionCall) Do(f func(string, version.Binary) error) *MockUpgraderClientSetVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderClientSetVersionCall) DoAndReturn(f func(string, version.Binary) error) *MockUpgraderClientSetVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tools mocks base method. @@ -80,9 +128,33 @@ func (m *MockUpgraderClient) Tools(arg0 string) (tools.List, error) { } // Tools indicates an expected call of Tools. -func (mr *MockUpgraderClientMockRecorder) Tools(arg0 any) *gomock.Call { +func (mr *MockUpgraderClientMockRecorder) Tools(arg0 any) *MockUpgraderClientToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockUpgraderClient)(nil).Tools), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockUpgraderClient)(nil).Tools), arg0) + return &MockUpgraderClientToolsCall{Call: call} +} + +// MockUpgraderClientToolsCall wrap *gomock.Call +type MockUpgraderClientToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderClientToolsCall) Return(arg0 tools.List, arg1 error) *MockUpgraderClientToolsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderClientToolsCall) Do(f func(string) (tools.List, error)) *MockUpgraderClientToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderClientToolsCall) DoAndReturn(f func(string) (tools.List, error)) *MockUpgraderClientToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchAPIVersion mocks base method. @@ -95,7 +167,31 @@ func (m *MockUpgraderClient) WatchAPIVersion(arg0 string) (watcher.Watcher[struc } // WatchAPIVersion indicates an expected call of WatchAPIVersion. -func (mr *MockUpgraderClientMockRecorder) WatchAPIVersion(arg0 any) *gomock.Call { +func (mr *MockUpgraderClientMockRecorder) WatchAPIVersion(arg0 any) *MockUpgraderClientWatchAPIVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAPIVersion", reflect.TypeOf((*MockUpgraderClient)(nil).WatchAPIVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchAPIVersion", reflect.TypeOf((*MockUpgraderClient)(nil).WatchAPIVersion), arg0) + return &MockUpgraderClientWatchAPIVersionCall{Call: call} +} + +// MockUpgraderClientWatchAPIVersionCall wrap *gomock.Call +type MockUpgraderClientWatchAPIVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderClientWatchAPIVersionCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUpgraderClientWatchAPIVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderClientWatchAPIVersionCall) Do(f func(string) (watcher.Watcher[struct{}], error)) *MockUpgraderClientWatchAPIVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderClientWatchAPIVersionCall) DoAndReturn(f func(string) (watcher.Watcher[struct{}], error)) *MockUpgraderClientWatchAPIVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgrader/upgrader_test.go b/internal/worker/upgrader/upgrader_test.go index c8df7a5501b..a4d08b91d3c 100644 --- a/internal/worker/upgrader/upgrader_test.go +++ b/internal/worker/upgrader/upgrader_test.go @@ -39,7 +39,7 @@ import ( jujuversion "github.com/juju/juju/version" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/upgrader_mocks.go github.com/juju/juju/internal/worker/upgrader UpgraderClient +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/upgrader_mocks.go github.com/juju/juju/internal/worker/upgrader UpgraderClient func TestPackage(t *stdtesting.T) { gc.TestingT(t) } diff --git a/internal/worker/upgradeseries/mocks/package_mock.go b/internal/worker/upgradeseries/mocks/package_mock.go index eaecdbee5e7..2d5e40f552c 100644 --- a/internal/worker/upgradeseries/mocks/package_mock.go +++ b/internal/worker/upgradeseries/mocks/package_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/internal/worker/upgradeseries Facade,UnitDiscovery,Upgrader +// mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/internal/worker/upgradeseries Facade,UnitDiscovery,Upgrader // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockFacade) FinishUpgradeSeries(arg0 base.Base) error { } // FinishUpgradeSeries indicates an expected call of FinishUpgradeSeries. -func (mr *MockFacadeMockRecorder) FinishUpgradeSeries(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) FinishUpgradeSeries(arg0 any) *MockFacadeFinishUpgradeSeriesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishUpgradeSeries", reflect.TypeOf((*MockFacade)(nil).FinishUpgradeSeries), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishUpgradeSeries", reflect.TypeOf((*MockFacade)(nil).FinishUpgradeSeries), arg0) + return &MockFacadeFinishUpgradeSeriesCall{Call: call} +} + +// MockFacadeFinishUpgradeSeriesCall wrap *gomock.Call +type MockFacadeFinishUpgradeSeriesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeFinishUpgradeSeriesCall) Return(arg0 error) *MockFacadeFinishUpgradeSeriesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeFinishUpgradeSeriesCall) Do(f func(base.Base) error) *MockFacadeFinishUpgradeSeriesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeFinishUpgradeSeriesCall) DoAndReturn(f func(base.Base) error) *MockFacadeFinishUpgradeSeriesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineStatus mocks base method. @@ -66,9 +90,33 @@ func (m *MockFacade) MachineStatus() (model.UpgradeSeriesStatus, error) { } // MachineStatus indicates an expected call of MachineStatus. -func (mr *MockFacadeMockRecorder) MachineStatus() *gomock.Call { +func (mr *MockFacadeMockRecorder) MachineStatus() *MockFacadeMachineStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineStatus", reflect.TypeOf((*MockFacade)(nil).MachineStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineStatus", reflect.TypeOf((*MockFacade)(nil).MachineStatus)) + return &MockFacadeMachineStatusCall{Call: call} +} + +// MockFacadeMachineStatusCall wrap *gomock.Call +type MockFacadeMachineStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeMachineStatusCall) Return(arg0 model.UpgradeSeriesStatus, arg1 error) *MockFacadeMachineStatusCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeMachineStatusCall) Do(f func() (model.UpgradeSeriesStatus, error)) *MockFacadeMachineStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeMachineStatusCall) DoAndReturn(f func() (model.UpgradeSeriesStatus, error)) *MockFacadeMachineStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PinMachineApplications mocks base method. @@ -81,9 +129,33 @@ func (m *MockFacade) PinMachineApplications() (map[string]error, error) { } // PinMachineApplications indicates an expected call of PinMachineApplications. -func (mr *MockFacadeMockRecorder) PinMachineApplications() *gomock.Call { +func (mr *MockFacadeMockRecorder) PinMachineApplications() *MockFacadePinMachineApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinMachineApplications", reflect.TypeOf((*MockFacade)(nil).PinMachineApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PinMachineApplications", reflect.TypeOf((*MockFacade)(nil).PinMachineApplications)) + return &MockFacadePinMachineApplicationsCall{Call: call} +} + +// MockFacadePinMachineApplicationsCall wrap *gomock.Call +type MockFacadePinMachineApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadePinMachineApplicationsCall) Return(arg0 map[string]error, arg1 error) *MockFacadePinMachineApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadePinMachineApplicationsCall) Do(f func() (map[string]error, error)) *MockFacadePinMachineApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadePinMachineApplicationsCall) DoAndReturn(f func() (map[string]error, error)) *MockFacadePinMachineApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstanceStatus mocks base method. @@ -95,9 +167,33 @@ func (m *MockFacade) SetInstanceStatus(arg0 model.UpgradeSeriesStatus, arg1 stri } // SetInstanceStatus indicates an expected call of SetInstanceStatus. -func (mr *MockFacadeMockRecorder) SetInstanceStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) SetInstanceStatus(arg0, arg1 any) *MockFacadeSetInstanceStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockFacade)(nil).SetInstanceStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceStatus", reflect.TypeOf((*MockFacade)(nil).SetInstanceStatus), arg0, arg1) + return &MockFacadeSetInstanceStatusCall{Call: call} +} + +// MockFacadeSetInstanceStatusCall wrap *gomock.Call +type MockFacadeSetInstanceStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeSetInstanceStatusCall) Return(arg0 error) *MockFacadeSetInstanceStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeSetInstanceStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockFacadeSetInstanceStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeSetInstanceStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockFacadeSetInstanceStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMachineStatus mocks base method. @@ -109,9 +205,33 @@ func (m *MockFacade) SetMachineStatus(arg0 model.UpgradeSeriesStatus, arg1 strin } // SetMachineStatus indicates an expected call of SetMachineStatus. -func (mr *MockFacadeMockRecorder) SetMachineStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) SetMachineStatus(arg0, arg1 any) *MockFacadeSetMachineStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMachineStatus", reflect.TypeOf((*MockFacade)(nil).SetMachineStatus), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMachineStatus", reflect.TypeOf((*MockFacade)(nil).SetMachineStatus), arg0, arg1) + return &MockFacadeSetMachineStatusCall{Call: call} +} + +// MockFacadeSetMachineStatusCall wrap *gomock.Call +type MockFacadeSetMachineStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeSetMachineStatusCall) Return(arg0 error) *MockFacadeSetMachineStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeSetMachineStatusCall) Do(f func(model.UpgradeSeriesStatus, string) error) *MockFacadeSetMachineStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeSetMachineStatusCall) DoAndReturn(f func(model.UpgradeSeriesStatus, string) error) *MockFacadeSetMachineStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StartUnitCompletion mocks base method. @@ -123,9 +243,33 @@ func (m *MockFacade) StartUnitCompletion(arg0 string) error { } // StartUnitCompletion indicates an expected call of StartUnitCompletion. -func (mr *MockFacadeMockRecorder) StartUnitCompletion(arg0 any) *gomock.Call { +func (mr *MockFacadeMockRecorder) StartUnitCompletion(arg0 any) *MockFacadeStartUnitCompletionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUnitCompletion", reflect.TypeOf((*MockFacade)(nil).StartUnitCompletion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUnitCompletion", reflect.TypeOf((*MockFacade)(nil).StartUnitCompletion), arg0) + return &MockFacadeStartUnitCompletionCall{Call: call} +} + +// MockFacadeStartUnitCompletionCall wrap *gomock.Call +type MockFacadeStartUnitCompletionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeStartUnitCompletionCall) Return(arg0 error) *MockFacadeStartUnitCompletionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeStartUnitCompletionCall) Do(f func(string) error) *MockFacadeStartUnitCompletionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeStartUnitCompletionCall) DoAndReturn(f func(string) error) *MockFacadeStartUnitCompletionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitsCompleted mocks base method. @@ -138,9 +282,33 @@ func (m *MockFacade) UnitsCompleted() ([]names.UnitTag, error) { } // UnitsCompleted indicates an expected call of UnitsCompleted. -func (mr *MockFacadeMockRecorder) UnitsCompleted() *gomock.Call { +func (mr *MockFacadeMockRecorder) UnitsCompleted() *MockFacadeUnitsCompletedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsCompleted", reflect.TypeOf((*MockFacade)(nil).UnitsCompleted)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsCompleted", reflect.TypeOf((*MockFacade)(nil).UnitsCompleted)) + return &MockFacadeUnitsCompletedCall{Call: call} +} + +// MockFacadeUnitsCompletedCall wrap *gomock.Call +type MockFacadeUnitsCompletedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeUnitsCompletedCall) Return(arg0 []names.UnitTag, arg1 error) *MockFacadeUnitsCompletedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeUnitsCompletedCall) Do(f func() ([]names.UnitTag, error)) *MockFacadeUnitsCompletedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeUnitsCompletedCall) DoAndReturn(f func() ([]names.UnitTag, error)) *MockFacadeUnitsCompletedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnitsPrepared mocks base method. @@ -153,9 +321,33 @@ func (m *MockFacade) UnitsPrepared() ([]names.UnitTag, error) { } // UnitsPrepared indicates an expected call of UnitsPrepared. -func (mr *MockFacadeMockRecorder) UnitsPrepared() *gomock.Call { +func (mr *MockFacadeMockRecorder) UnitsPrepared() *MockFacadeUnitsPreparedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsPrepared", reflect.TypeOf((*MockFacade)(nil).UnitsPrepared)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnitsPrepared", reflect.TypeOf((*MockFacade)(nil).UnitsPrepared)) + return &MockFacadeUnitsPreparedCall{Call: call} +} + +// MockFacadeUnitsPreparedCall wrap *gomock.Call +type MockFacadeUnitsPreparedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeUnitsPreparedCall) Return(arg0 []names.UnitTag, arg1 error) *MockFacadeUnitsPreparedCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeUnitsPreparedCall) Do(f func() ([]names.UnitTag, error)) *MockFacadeUnitsPreparedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeUnitsPreparedCall) DoAndReturn(f func() ([]names.UnitTag, error)) *MockFacadeUnitsPreparedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnpinMachineApplications mocks base method. @@ -168,9 +360,33 @@ func (m *MockFacade) UnpinMachineApplications() (map[string]error, error) { } // UnpinMachineApplications indicates an expected call of UnpinMachineApplications. -func (mr *MockFacadeMockRecorder) UnpinMachineApplications() *gomock.Call { +func (mr *MockFacadeMockRecorder) UnpinMachineApplications() *MockFacadeUnpinMachineApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinMachineApplications", reflect.TypeOf((*MockFacade)(nil).UnpinMachineApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpinMachineApplications", reflect.TypeOf((*MockFacade)(nil).UnpinMachineApplications)) + return &MockFacadeUnpinMachineApplicationsCall{Call: call} +} + +// MockFacadeUnpinMachineApplicationsCall wrap *gomock.Call +type MockFacadeUnpinMachineApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeUnpinMachineApplicationsCall) Return(arg0 map[string]error, arg1 error) *MockFacadeUnpinMachineApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeUnpinMachineApplicationsCall) Do(f func() (map[string]error, error)) *MockFacadeUnpinMachineApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeUnpinMachineApplicationsCall) DoAndReturn(f func() (map[string]error, error)) *MockFacadeUnpinMachineApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchUpgradeSeriesNotifications mocks base method. @@ -183,9 +399,33 @@ func (m *MockFacade) WatchUpgradeSeriesNotifications() (watcher.Watcher[struct{} } // WatchUpgradeSeriesNotifications indicates an expected call of WatchUpgradeSeriesNotifications. -func (mr *MockFacadeMockRecorder) WatchUpgradeSeriesNotifications() *gomock.Call { +func (mr *MockFacadeMockRecorder) WatchUpgradeSeriesNotifications() *MockFacadeWatchUpgradeSeriesNotificationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockFacade)(nil).WatchUpgradeSeriesNotifications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchUpgradeSeriesNotifications", reflect.TypeOf((*MockFacade)(nil).WatchUpgradeSeriesNotifications)) + return &MockFacadeWatchUpgradeSeriesNotificationsCall{Call: call} +} + +// MockFacadeWatchUpgradeSeriesNotificationsCall wrap *gomock.Call +type MockFacadeWatchUpgradeSeriesNotificationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFacadeWatchUpgradeSeriesNotificationsCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockFacadeWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFacadeWatchUpgradeSeriesNotificationsCall) Do(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFacadeWatchUpgradeSeriesNotificationsCall) DoAndReturn(f func() (watcher.Watcher[struct{}], error)) *MockFacadeWatchUpgradeSeriesNotificationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnitDiscovery is a mock of UnitDiscovery interface. @@ -221,9 +461,33 @@ func (m *MockUnitDiscovery) Units() ([]names.UnitTag, error) { } // Units indicates an expected call of Units. -func (mr *MockUnitDiscoveryMockRecorder) Units() *gomock.Call { +func (mr *MockUnitDiscoveryMockRecorder) Units() *MockUnitDiscoveryUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockUnitDiscovery)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockUnitDiscovery)(nil).Units)) + return &MockUnitDiscoveryUnitsCall{Call: call} +} + +// MockUnitDiscoveryUnitsCall wrap *gomock.Call +type MockUnitDiscoveryUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitDiscoveryUnitsCall) Return(arg0 []names.UnitTag, arg1 error) *MockUnitDiscoveryUnitsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitDiscoveryUnitsCall) Do(f func() ([]names.UnitTag, error)) *MockUnitDiscoveryUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitDiscoveryUnitsCall) DoAndReturn(f func() ([]names.UnitTag, error)) *MockUnitDiscoveryUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUpgrader is a mock of Upgrader interface. @@ -258,7 +522,31 @@ func (m *MockUpgrader) PerformUpgrade() error { } // PerformUpgrade indicates an expected call of PerformUpgrade. -func (mr *MockUpgraderMockRecorder) PerformUpgrade() *gomock.Call { +func (mr *MockUpgraderMockRecorder) PerformUpgrade() *MockUpgraderPerformUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PerformUpgrade", reflect.TypeOf((*MockUpgrader)(nil).PerformUpgrade)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PerformUpgrade", reflect.TypeOf((*MockUpgrader)(nil).PerformUpgrade)) + return &MockUpgraderPerformUpgradeCall{Call: call} +} + +// MockUpgraderPerformUpgradeCall wrap *gomock.Call +type MockUpgraderPerformUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderPerformUpgradeCall) Return(arg0 error) *MockUpgraderPerformUpgradeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderPerformUpgradeCall) Do(f func() error) *MockUpgraderPerformUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderPerformUpgradeCall) DoAndReturn(f func() error) *MockUpgraderPerformUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradeseries/mocks/servicemanager_mock.go b/internal/worker/upgradeseries/mocks/servicemanager_mock.go index b9987ff2032..5d5952cf5f8 100644 --- a/internal/worker/upgradeseries/mocks/servicemanager_mock.go +++ b/internal/worker/upgradeseries/mocks/servicemanager_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/servicemanager_mock.go github.com/juju/juju/internal/service SystemdServiceManager +// mockgen -typed -package mocks -destination mocks/servicemanager_mock.go github.com/juju/juju/internal/service SystemdServiceManager // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockSystemdServiceManager) CreateAgentConf(arg0, arg1 string) (common.C } // CreateAgentConf indicates an expected call of CreateAgentConf. -func (mr *MockSystemdServiceManagerMockRecorder) CreateAgentConf(arg0, arg1 any) *gomock.Call { +func (mr *MockSystemdServiceManagerMockRecorder) CreateAgentConf(arg0, arg1 any) *MockSystemdServiceManagerCreateAgentConfCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAgentConf", reflect.TypeOf((*MockSystemdServiceManager)(nil).CreateAgentConf), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAgentConf", reflect.TypeOf((*MockSystemdServiceManager)(nil).CreateAgentConf), arg0, arg1) + return &MockSystemdServiceManagerCreateAgentConfCall{Call: call} +} + +// MockSystemdServiceManagerCreateAgentConfCall wrap *gomock.Call +type MockSystemdServiceManagerCreateAgentConfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemdServiceManagerCreateAgentConfCall) Return(arg0 common.Conf, arg1 error) *MockSystemdServiceManagerCreateAgentConfCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemdServiceManagerCreateAgentConfCall) Do(f func(string, string) (common.Conf, error)) *MockSystemdServiceManagerCreateAgentConfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemdServiceManagerCreateAgentConfCall) DoAndReturn(f func(string, string) (common.Conf, error)) *MockSystemdServiceManagerCreateAgentConfCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindAgents mocks base method. @@ -66,9 +90,33 @@ func (m *MockSystemdServiceManager) FindAgents(arg0 string) (string, []string, [ } // FindAgents indicates an expected call of FindAgents. -func (mr *MockSystemdServiceManagerMockRecorder) FindAgents(arg0 any) *gomock.Call { +func (mr *MockSystemdServiceManagerMockRecorder) FindAgents(arg0 any) *MockSystemdServiceManagerFindAgentsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockSystemdServiceManager)(nil).FindAgents), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAgents", reflect.TypeOf((*MockSystemdServiceManager)(nil).FindAgents), arg0) + return &MockSystemdServiceManagerFindAgentsCall{Call: call} +} + +// MockSystemdServiceManagerFindAgentsCall wrap *gomock.Call +type MockSystemdServiceManagerFindAgentsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemdServiceManagerFindAgentsCall) Return(arg0 string, arg1, arg2 []string, arg3 error) *MockSystemdServiceManagerFindAgentsCall { + c.Call = c.Call.Return(arg0, arg1, arg2, arg3) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemdServiceManagerFindAgentsCall) Do(f func(string) (string, []string, []string, error)) *MockSystemdServiceManagerFindAgentsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemdServiceManagerFindAgentsCall) DoAndReturn(f func(string) (string, []string, []string, error)) *MockSystemdServiceManagerFindAgentsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteServiceFile mocks base method. @@ -80,9 +128,33 @@ func (m *MockSystemdServiceManager) WriteServiceFile() error { } // WriteServiceFile indicates an expected call of WriteServiceFile. -func (mr *MockSystemdServiceManagerMockRecorder) WriteServiceFile() *gomock.Call { +func (mr *MockSystemdServiceManagerMockRecorder) WriteServiceFile() *MockSystemdServiceManagerWriteServiceFileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteServiceFile", reflect.TypeOf((*MockSystemdServiceManager)(nil).WriteServiceFile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteServiceFile", reflect.TypeOf((*MockSystemdServiceManager)(nil).WriteServiceFile)) + return &MockSystemdServiceManagerWriteServiceFileCall{Call: call} +} + +// MockSystemdServiceManagerWriteServiceFileCall wrap *gomock.Call +type MockSystemdServiceManagerWriteServiceFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemdServiceManagerWriteServiceFileCall) Return(arg0 error) *MockSystemdServiceManagerWriteServiceFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemdServiceManagerWriteServiceFileCall) Do(f func() error) *MockSystemdServiceManagerWriteServiceFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemdServiceManagerWriteServiceFileCall) DoAndReturn(f func() error) *MockSystemdServiceManagerWriteServiceFileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteSystemdAgent mocks base method. @@ -94,7 +166,31 @@ func (m *MockSystemdServiceManager) WriteSystemdAgent(arg0, arg1, arg2 string) e } // WriteSystemdAgent indicates an expected call of WriteSystemdAgent. -func (mr *MockSystemdServiceManagerMockRecorder) WriteSystemdAgent(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSystemdServiceManagerMockRecorder) WriteSystemdAgent(arg0, arg1, arg2 any) *MockSystemdServiceManagerWriteSystemdAgentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSystemdAgent", reflect.TypeOf((*MockSystemdServiceManager)(nil).WriteSystemdAgent), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSystemdAgent", reflect.TypeOf((*MockSystemdServiceManager)(nil).WriteSystemdAgent), arg0, arg1, arg2) + return &MockSystemdServiceManagerWriteSystemdAgentCall{Call: call} +} + +// MockSystemdServiceManagerWriteSystemdAgentCall wrap *gomock.Call +type MockSystemdServiceManagerWriteSystemdAgentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSystemdServiceManagerWriteSystemdAgentCall) Return(arg0 error) *MockSystemdServiceManagerWriteSystemdAgentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSystemdServiceManagerWriteSystemdAgentCall) Do(f func(string, string, string) error) *MockSystemdServiceManagerWriteSystemdAgentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSystemdServiceManagerWriteSystemdAgentCall) DoAndReturn(f func(string, string, string) error) *MockSystemdServiceManagerWriteSystemdAgentCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradeseries/upgrader.go b/internal/worker/upgradeseries/upgrader.go index eef2a44524f..b80b7e930a4 100644 --- a/internal/worker/upgradeseries/upgrader.go +++ b/internal/worker/upgradeseries/upgrader.go @@ -12,7 +12,7 @@ import ( "github.com/juju/juju/internal/service" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/servicemanager_mock.go github.com/juju/juju/internal/service SystemdServiceManager +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/servicemanager_mock.go github.com/juju/juju/internal/service SystemdServiceManager // Upgrader describes methods required to perform file-system manipulation in // preparation for upgrading the host Ubuntu version. diff --git a/internal/worker/upgradeseries/worker.go b/internal/worker/upgradeseries/worker.go index 239cd0450d3..462d5946ad5 100644 --- a/internal/worker/upgradeseries/worker.go +++ b/internal/worker/upgradeseries/worker.go @@ -17,7 +17,7 @@ import ( "github.com/juju/juju/rpc/params" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/package_mock.go github.com/juju/juju/internal/worker/upgradeseries Facade,UnitDiscovery,Upgrader +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/package_mock.go github.com/juju/juju/internal/worker/upgradeseries Facade,UnitDiscovery,Upgrader var hostBase = os.HostBase diff --git a/internal/worker/upgradesteps/agent_mock_test.go b/internal/worker/upgradesteps/agent_mock_test.go index f270687a724..df593f6cb90 100644 --- a/internal/worker/upgradesteps/agent_mock_test.go +++ b/internal/worker/upgradesteps/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +// mockgen -typed -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter // // Package upgradesteps is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -72,9 +96,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -110,9 +158,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -125,9 +197,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -139,9 +235,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -153,9 +273,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -167,9 +311,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -181,9 +349,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -195,9 +387,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -209,9 +425,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -224,9 +464,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -238,9 +502,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -252,9 +540,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -266,9 +578,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -280,9 +616,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -294,9 +654,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -308,9 +692,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -323,9 +731,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -337,9 +769,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -351,9 +807,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -365,9 +845,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -379,9 +883,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -393,9 +921,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -407,9 +959,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -421,9 +997,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -435,9 +1035,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -449,9 +1073,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -463,9 +1111,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -477,9 +1149,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -492,9 +1188,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -506,9 +1226,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -520,9 +1264,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -534,9 +1302,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -548,9 +1340,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -562,9 +1378,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -577,9 +1417,33 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSetter is a mock of ConfigSetter interface. @@ -615,9 +1479,33 @@ func (m *MockConfigSetter) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigSetterMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIAddresses() *MockConfigSetterAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + return &MockConfigSetterAPIAddressesCall{Call: call} +} + +// MockConfigSetterAPIAddressesCall wrap *gomock.Call +type MockConfigSetterAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -630,9 +1518,33 @@ func (m *MockConfigSetter) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigSetterMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIInfo() *MockConfigSetterAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + return &MockConfigSetterAPIInfoCall{Call: call} +} + +// MockConfigSetterAPIInfoCall wrap *gomock.Call +type MockConfigSetterAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -644,9 +1556,33 @@ func (m *MockConfigSetter) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *MockConfigSetterAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + return &MockConfigSetterAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -658,9 +1594,33 @@ func (m *MockConfigSetter) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *MockConfigSetterAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigSetterAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -672,9 +1632,33 @@ func (m *MockConfigSetter) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigSetterMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) CACert() *MockConfigSetterCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + return &MockConfigSetterCACertCall{Call: call} +} + +// MockConfigSetterCACertCall wrap *gomock.Call +type MockConfigSetterCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCACertCall) Return(arg0 string) *MockConfigSetterCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCACertCall) Do(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCACertCall) DoAndReturn(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clone mocks base method. @@ -686,9 +1670,33 @@ func (m *MockConfigSetter) Clone() agent.Config { } // Clone indicates an expected call of Clone. -func (mr *MockConfigSetterMockRecorder) Clone() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Clone() *MockConfigSetterCloneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + return &MockConfigSetterCloneCall{Call: call} +} + +// MockConfigSetterCloneCall wrap *gomock.Call +type MockConfigSetterCloneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCloneCall) Return(arg0 agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCloneCall) Do(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCloneCall) DoAndReturn(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -700,9 +1708,33 @@ func (m *MockConfigSetter) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigSetterMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Controller() *MockConfigSetterControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + return &MockConfigSetterControllerCall{Call: call} +} + +// MockConfigSetterControllerCall wrap *gomock.Call +type MockConfigSetterControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterControllerCall) Return(arg0 names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterControllerCall) Do(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -714,9 +1746,33 @@ func (m *MockConfigSetter) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigSetterMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DataDir() *MockConfigSetterDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + return &MockConfigSetterDataDirCall{Call: call} +} + +// MockConfigSetterDataDirCall wrap *gomock.Call +type MockConfigSetterDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDataDirCall) Return(arg0 string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDataDirCall) Do(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDataDirCall) DoAndReturn(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -728,9 +1784,33 @@ func (m *MockConfigSetter) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigSetterMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Dir() *MockConfigSetterDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + return &MockConfigSetterDirCall{Call: call} +} + +// MockConfigSetterDirCall wrap *gomock.Call +type MockConfigSetterDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDirCall) Return(arg0 string) *MockConfigSetterDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDirCall) Do(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDirCall) DoAndReturn(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -743,9 +1823,33 @@ func (m *MockConfigSetter) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigSetterMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DqlitePort() *MockConfigSetterDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + return &MockConfigSetterDqlitePortCall{Call: call} +} + +// MockConfigSetterDqlitePortCall wrap *gomock.Call +type MockConfigSetterDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDqlitePortCall) Do(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -757,9 +1861,33 @@ func (m *MockConfigSetter) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigSetterMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Jobs() *MockConfigSetterJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + return &MockConfigSetterJobsCall{Call: call} +} + +// MockConfigSetterJobsCall wrap *gomock.Call +type MockConfigSetterJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJobsCall) Return(arg0 []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJobsCall) Do(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -771,9 +1899,33 @@ func (m *MockConfigSetter) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *MockConfigSetterJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + return &MockConfigSetterJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJujuDBSnapChannelCall) Return(arg0 string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJujuDBSnapChannelCall) Do(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -785,9 +1937,33 @@ func (m *MockConfigSetter) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigSetterMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LogDir() *MockConfigSetterLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + return &MockConfigSetterLogDirCall{Call: call} +} + +// MockConfigSetterLogDirCall wrap *gomock.Call +type MockConfigSetterLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLogDirCall) Return(arg0 string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLogDirCall) Do(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLogDirCall) DoAndReturn(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -799,9 +1975,33 @@ func (m *MockConfigSetter) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigSetterMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LoggingConfig() *MockConfigSetterLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + return &MockConfigSetterLoggingConfigCall{Call: call} +} + +// MockConfigSetterLoggingConfigCall wrap *gomock.Call +type MockConfigSetterLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLoggingConfigCall) Return(arg0 string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLoggingConfigCall) Do(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLoggingConfigCall) DoAndReturn(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -813,9 +2013,33 @@ func (m *MockConfigSetter) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *MockConfigSetterMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + return &MockConfigSetterMetricsSpoolDirCall{Call: call} +} + +// MockConfigSetterMetricsSpoolDirCall wrap *gomock.Call +type MockConfigSetterMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMetricsSpoolDirCall) Return(arg0 string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMetricsSpoolDirCall) Do(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -827,9 +2051,33 @@ func (m *MockConfigSetter) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigSetterMockRecorder) Model() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Model() *MockConfigSetterModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + return &MockConfigSetterModelCall{Call: call} +} + +// MockConfigSetterModelCall wrap *gomock.Call +type MockConfigSetterModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterModelCall) Return(arg0 names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterModelCall) Do(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -842,9 +2090,33 @@ func (m *MockConfigSetter) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigSetterMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoInfo() *MockConfigSetterMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + return &MockConfigSetterMongoInfoCall{Call: call} +} + +// MockConfigSetterMongoInfoCall wrap *gomock.Call +type MockConfigSetterMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -856,9 +2128,33 @@ func (m *MockConfigSetter) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *MockConfigSetterMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + return &MockConfigSetterMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -870,9 +2166,33 @@ func (m *MockConfigSetter) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigSetterMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Nonce() *MockConfigSetterNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + return &MockConfigSetterNonceCall{Call: call} +} + +// MockConfigSetterNonceCall wrap *gomock.Call +type MockConfigSetterNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterNonceCall) Return(arg0 string) *MockConfigSetterNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterNonceCall) Do(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterNonceCall) DoAndReturn(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -884,9 +2204,33 @@ func (m *MockConfigSetter) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *MockConfigSetterObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + return &MockConfigSetterObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -898,9 +2242,33 @@ func (m *MockConfigSetter) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigSetterMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OldPassword() *MockConfigSetterOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + return &MockConfigSetterOldPasswordCall{Call: call} +} + +// MockConfigSetterOldPasswordCall wrap *gomock.Call +type MockConfigSetterOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOldPasswordCall) Return(arg0 string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOldPasswordCall) Do(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOldPasswordCall) DoAndReturn(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -912,9 +2280,33 @@ func (m *MockConfigSetter) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *MockConfigSetterOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + return &MockConfigSetterOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -926,9 +2318,33 @@ func (m *MockConfigSetter) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *MockConfigSetterOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + return &MockConfigSetterOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEndpointCall) Do(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -940,9 +2356,33 @@ func (m *MockConfigSetter) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *MockConfigSetterOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + return &MockConfigSetterOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -954,9 +2394,33 @@ func (m *MockConfigSetter) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *MockConfigSetterOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + return &MockConfigSetterOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -968,9 +2432,33 @@ func (m *MockConfigSetter) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *MockConfigSetterOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + return &MockConfigSetterOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -982,9 +2470,33 @@ func (m *MockConfigSetter) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *MockConfigSetterQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + return &MockConfigSetterQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingEnabledCall) Return(arg0 bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingEnabledCall) Do(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -996,9 +2508,33 @@ func (m *MockConfigSetter) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *MockConfigSetterQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + return &MockConfigSetterQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAPIHostPorts mocks base method. @@ -1010,9 +2546,33 @@ func (m *MockConfigSetter) SetAPIHostPorts(arg0 []network.HostPorts) error { } // SetAPIHostPorts indicates an expected call of SetAPIHostPorts. -func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *MockConfigSetterSetAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + return &MockConfigSetterSetAPIHostPortsCall{Call: call} +} + +// MockConfigSetterSetAPIHostPortsCall wrap *gomock.Call +type MockConfigSetterSetAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetAPIHostPortsCall) Return(arg0 error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetAPIHostPortsCall) Do(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetAPIHostPortsCall) DoAndReturn(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCACert mocks base method. @@ -1022,9 +2582,33 @@ func (m *MockConfigSetter) SetCACert(arg0 string) { } // SetCACert indicates an expected call of SetCACert. -func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *MockConfigSetterSetCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + return &MockConfigSetterSetCACertCall{Call: call} +} + +// MockConfigSetterSetCACertCall wrap *gomock.Call +type MockConfigSetterSetCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetCACertCall) Return() *MockConfigSetterSetCACertCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetCACertCall) Do(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetCACertCall) DoAndReturn(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerAPIPort mocks base method. @@ -1034,9 +2618,33 @@ func (m *MockConfigSetter) SetControllerAPIPort(arg0 int) { } // SetControllerAPIPort indicates an expected call of SetControllerAPIPort. -func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *MockConfigSetterSetControllerAPIPortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + return &MockConfigSetterSetControllerAPIPortCall{Call: call} +} + +// MockConfigSetterSetControllerAPIPortCall wrap *gomock.Call +type MockConfigSetterSetControllerAPIPortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetControllerAPIPortCall) Return() *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetControllerAPIPortCall) Do(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetControllerAPIPortCall) DoAndReturn(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetJujuDBSnapChannel mocks base method. @@ -1046,9 +2654,33 @@ func (m *MockConfigSetter) SetJujuDBSnapChannel(arg0 string) { } // SetJujuDBSnapChannel indicates an expected call of SetJujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *MockConfigSetterSetJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + return &MockConfigSetterSetJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterSetJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterSetJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Return() *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Do(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetJujuDBSnapChannelCall) DoAndReturn(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLoggingConfig mocks base method. @@ -1058,9 +2690,33 @@ func (m *MockConfigSetter) SetLoggingConfig(arg0 string) { } // SetLoggingConfig indicates an expected call of SetLoggingConfig. -func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *MockConfigSetterSetLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + return &MockConfigSetterSetLoggingConfigCall{Call: call} +} + +// MockConfigSetterSetLoggingConfigCall wrap *gomock.Call +type MockConfigSetterSetLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetLoggingConfigCall) Return() *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetLoggingConfigCall) Do(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetLoggingConfigCall) DoAndReturn(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMongoMemoryProfile mocks base method. @@ -1070,9 +2726,33 @@ func (m *MockConfigSetter) SetMongoMemoryProfile(arg0 mongo.MemoryProfile) { } // SetMongoMemoryProfile indicates an expected call of SetMongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *MockConfigSetterSetMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + return &MockConfigSetterSetMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterSetMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterSetMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetMongoMemoryProfileCall) Return() *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetMongoMemoryProfileCall) Do(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetMongoMemoryProfileCall) DoAndReturn(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetObjectStoreType mocks base method. @@ -1082,9 +2762,33 @@ func (m *MockConfigSetter) SetObjectStoreType(arg0 objectstore.BackendType) { } // SetObjectStoreType indicates an expected call of SetObjectStoreType. -func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *MockConfigSetterSetObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + return &MockConfigSetterSetObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterSetObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterSetObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetObjectStoreTypeCall) Return() *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetObjectStoreTypeCall) Do(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetObjectStoreTypeCall) DoAndReturn(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOldPassword mocks base method. @@ -1094,9 +2798,33 @@ func (m *MockConfigSetter) SetOldPassword(arg0 string) { } // SetOldPassword indicates an expected call of SetOldPassword. -func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *MockConfigSetterSetOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + return &MockConfigSetterSetOldPasswordCall{Call: call} +} + +// MockConfigSetterSetOldPasswordCall wrap *gomock.Call +type MockConfigSetterSetOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOldPasswordCall) Return() *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOldPasswordCall) Do(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOldPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEnabled mocks base method. @@ -1106,9 +2834,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEnabled(arg0 bool) { } // SetOpenTelemetryEnabled indicates an expected call of SetOpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *MockConfigSetterSetOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + return &MockConfigSetterSetOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Return() *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEndpoint mocks base method. @@ -1118,9 +2870,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEndpoint(arg0 string) { } // SetOpenTelemetryEndpoint indicates an expected call of SetOpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *MockConfigSetterSetOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + return &MockConfigSetterSetOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Return() *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Do(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) DoAndReturn(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryInsecure mocks base method. @@ -1130,9 +2906,33 @@ func (m *MockConfigSetter) SetOpenTelemetryInsecure(arg0 bool) { } // SetOpenTelemetryInsecure indicates an expected call of SetOpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *MockConfigSetterSetOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + return &MockConfigSetterSetOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Return() *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetrySampleRatio mocks base method. @@ -1142,9 +2942,33 @@ func (m *MockConfigSetter) SetOpenTelemetrySampleRatio(arg0 float64) { } // SetOpenTelemetrySampleRatio indicates an expected call of SetOpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *MockConfigSetterSetOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + return &MockConfigSetterSetOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Return() *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Do(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) DoAndReturn(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryStackTraces mocks base method. @@ -1154,9 +2978,33 @@ func (m *MockConfigSetter) SetOpenTelemetryStackTraces(arg0 bool) { } // SetOpenTelemetryStackTraces indicates an expected call of SetOpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *MockConfigSetterSetOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + return &MockConfigSetterSetOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Return() *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -1166,9 +3014,33 @@ func (m *MockConfigSetter) SetPassword(arg0 string) { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *MockConfigSetterSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + return &MockConfigSetterSetPasswordCall{Call: call} +} + +// MockConfigSetterSetPasswordCall wrap *gomock.Call +type MockConfigSetterSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetPasswordCall) Return() *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetPasswordCall) Do(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingEnabled mocks base method. @@ -1178,9 +3050,33 @@ func (m *MockConfigSetter) SetQueryTracingEnabled(arg0 bool) { } // SetQueryTracingEnabled indicates an expected call of SetQueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *MockConfigSetterSetQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + return &MockConfigSetterSetQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterSetQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingEnabledCall) Return() *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingEnabledCall) Do(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingThreshold mocks base method. @@ -1190,9 +3086,33 @@ func (m *MockConfigSetter) SetQueryTracingThreshold(arg0 time.Duration) { } // SetQueryTracingThreshold indicates an expected call of SetQueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *MockConfigSetterSetQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + return &MockConfigSetterSetQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterSetQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingThresholdCall) Return() *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingThresholdCall) Do(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingThresholdCall) DoAndReturn(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStateServingInfo mocks base method. @@ -1202,9 +3122,33 @@ func (m *MockConfigSetter) SetStateServingInfo(arg0 controller.StateServingInfo) } // SetStateServingInfo indicates an expected call of SetStateServingInfo. -func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *MockConfigSetterSetStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + return &MockConfigSetterSetStateServingInfoCall{Call: call} +} + +// MockConfigSetterSetStateServingInfoCall wrap *gomock.Call +type MockConfigSetterSetStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetStateServingInfoCall) Return() *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetStateServingInfoCall) Do(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetStateServingInfoCall) DoAndReturn(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradedToVersion mocks base method. @@ -1214,9 +3158,33 @@ func (m *MockConfigSetter) SetUpgradedToVersion(arg0 version.Number) { } // SetUpgradedToVersion indicates an expected call of SetUpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *MockConfigSetterSetUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + return &MockConfigSetterSetUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterSetUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterSetUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetUpgradedToVersionCall) Return() *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetUpgradedToVersionCall) Do(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetUpgradedToVersionCall) DoAndReturn(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetValue mocks base method. @@ -1226,9 +3194,33 @@ func (m *MockConfigSetter) SetValue(arg0, arg1 string) { } // SetValue indicates an expected call of SetValue. -func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *MockConfigSetterSetValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + return &MockConfigSetterSetValueCall{Call: call} +} + +// MockConfigSetterSetValueCall wrap *gomock.Call +type MockConfigSetterSetValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetValueCall) Return() *MockConfigSetterSetValueCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetValueCall) Do(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetValueCall) DoAndReturn(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -1241,9 +3233,33 @@ func (m *MockConfigSetter) StateServingInfo() (controller.StateServingInfo, bool } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigSetterMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) StateServingInfo() *MockConfigSetterStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + return &MockConfigSetterStateServingInfoCall{Call: call} +} + +// MockConfigSetterStateServingInfoCall wrap *gomock.Call +type MockConfigSetterStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -1255,9 +3271,33 @@ func (m *MockConfigSetter) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *MockConfigSetterSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + return &MockConfigSetterSystemIdentityPathCall{Call: call} +} + +// MockConfigSetterSystemIdentityPathCall wrap *gomock.Call +type MockConfigSetterSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSystemIdentityPathCall) Return(arg0 string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSystemIdentityPathCall) Do(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1269,9 +3309,33 @@ func (m *MockConfigSetter) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigSetterMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Tag() *MockConfigSetterTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + return &MockConfigSetterTagCall{Call: call} +} + +// MockConfigSetterTagCall wrap *gomock.Call +type MockConfigSetterTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTagCall) Return(arg0 names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTagCall) Do(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTagCall) DoAndReturn(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -1283,9 +3347,33 @@ func (m *MockConfigSetter) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigSetterMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) TransientDataDir() *MockConfigSetterTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + return &MockConfigSetterTransientDataDirCall{Call: call} +} + +// MockConfigSetterTransientDataDirCall wrap *gomock.Call +type MockConfigSetterTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTransientDataDirCall) Return(arg0 string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTransientDataDirCall) Do(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTransientDataDirCall) DoAndReturn(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -1297,9 +3385,33 @@ func (m *MockConfigSetter) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *MockConfigSetterUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + return &MockConfigSetterUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterUpgradedToVersionCall) Do(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -1311,9 +3423,33 @@ func (m *MockConfigSetter) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *MockConfigSetterValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + return &MockConfigSetterValueCall{Call: call} +} + +// MockConfigSetterValueCall wrap *gomock.Call +type MockConfigSetterValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterValueCall) Return(arg0 string) *MockConfigSetterValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterValueCall) Do(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterValueCall) DoAndReturn(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -1326,7 +3462,31 @@ func (m *MockConfigSetter) WriteCommands(arg0 shell.Renderer) ([]string, error) } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *MockConfigSetterWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + return &MockConfigSetterWriteCommandsCall{Call: call} +} + +// MockConfigSetterWriteCommandsCall wrap *gomock.Call +type MockConfigSetterWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradesteps/api_mock_test.go b/internal/worker/upgradesteps/api_mock_test.go index 52c400b8a1c..73d657a2198 100644 --- a/internal/worker/upgradesteps/api_mock_test.go +++ b/internal/worker/upgradesteps/api_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller // // Package upgradesteps is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradesteps/clock_mock_test.go b/internal/worker/upgradesteps/clock_mock_test.go index 0db2c8a4817..b22202afc76 100644 --- a/internal/worker/upgradesteps/clock_mock_test.go +++ b/internal/worker/upgradesteps/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock // // Package upgradesteps is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradesteps/lock_mock_test.go b/internal/worker/upgradesteps/lock_mock_test.go index cebf5e89935..28a5aad29e8 100644 --- a/internal/worker/upgradesteps/lock_mock_test.go +++ b/internal/worker/upgradesteps/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +// mockgen -typed -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock // // Package upgradesteps is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLock) IsUnlocked() bool { } // IsUnlocked indicates an expected call of IsUnlocked. -func (mr *MockLockMockRecorder) IsUnlocked() *gomock.Call { +func (mr *MockLockMockRecorder) IsUnlocked() *MockLockIsUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + return &MockLockIsUnlockedCall{Call: call} +} + +// MockLockIsUnlockedCall wrap *gomock.Call +type MockLockIsUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockIsUnlockedCall) Return(arg0 bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockIsUnlockedCall) Do(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockIsUnlockedCall) DoAndReturn(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -59,9 +83,33 @@ func (m *MockLock) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockLockMockRecorder) Unlock() *gomock.Call { +func (mr *MockLockMockRecorder) Unlock() *MockLockUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + return &MockLockUnlockCall{Call: call} +} + +// MockLockUnlockCall wrap *gomock.Call +type MockLockUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockCall) Return() *MockLockUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockCall) Do(f func()) *MockLockUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockCall) DoAndReturn(f func()) *MockLockUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlocked mocks base method. @@ -73,7 +121,31 @@ func (m *MockLock) Unlocked() <-chan struct{} { } // Unlocked indicates an expected call of Unlocked. -func (mr *MockLockMockRecorder) Unlocked() *gomock.Call { +func (mr *MockLockMockRecorder) Unlocked() *MockLockUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + return &MockLockUnlockedCall{Call: call} +} + +// MockLockUnlockedCall wrap *gomock.Call +type MockLockUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockedCall) Return(arg0 <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockedCall) Do(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockedCall) DoAndReturn(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradesteps/package_test.go b/internal/worker/upgradesteps/package_test.go index 378681d1921..8d200778f11 100644 --- a/internal/worker/upgradesteps/package_test.go +++ b/internal/worker/upgradesteps/package_test.go @@ -19,12 +19,12 @@ import ( jujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination upgradeservice_mock_test.go github.com/juju/juju/internal/worker/upgradesteps UpgradeService -//go:generate go run go.uber.org/mock/mockgen -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination api_mock_test.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination upgradeservice_mock_test.go github.com/juju/juju/internal/worker/upgradesteps UpgradeService +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/upgradesteps/status_mock_test.go b/internal/worker/upgradesteps/status_mock_test.go index f4dcb5eaee5..8ac7ce7bafb 100644 --- a/internal/worker/upgradesteps/status_mock_test.go +++ b/internal/worker/upgradesteps/status_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter +// mockgen -typed -package upgradesteps -destination status_mock_test.go github.com/juju/juju/internal/upgradesteps StatusSetter // // Package upgradesteps is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockStatusSetter) SetStatus(arg0 status.Status, arg1 string, arg2 map[s } // SetStatus indicates an expected call of SetStatus. -func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockStatusSetterSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + return &MockStatusSetterSetStatusCall{Call: call} +} + +// MockStatusSetterSetStatusCall wrap *gomock.Call +type MockStatusSetterSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusSetterSetStatusCall) Return(arg0 error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusSetterSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusSetterSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradesteps/upgradeservice_mock_test.go b/internal/worker/upgradesteps/upgradeservice_mock_test.go index d2080f9fa70..a459fda3035 100644 --- a/internal/worker/upgradesteps/upgradeservice_mock_test.go +++ b/internal/worker/upgradesteps/upgradeservice_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradesteps -destination upgradeservice_mock_test.go github.com/juju/juju/internal/worker/upgradesteps UpgradeService +// mockgen -typed -package upgradesteps -destination upgradeservice_mock_test.go github.com/juju/juju/internal/worker/upgradesteps UpgradeService // // Package upgradesteps is a generated GoMock package. @@ -52,9 +52,33 @@ func (m *MockUpgradeService) ActiveUpgrade(arg0 context.Context) (upgrade0.UUID, } // ActiveUpgrade indicates an expected call of ActiveUpgrade. -func (mr *MockUpgradeServiceMockRecorder) ActiveUpgrade(arg0 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) ActiveUpgrade(arg0 any) *MockUpgradeServiceActiveUpgradeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).ActiveUpgrade), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveUpgrade", reflect.TypeOf((*MockUpgradeService)(nil).ActiveUpgrade), arg0) + return &MockUpgradeServiceActiveUpgradeCall{Call: call} +} + +// MockUpgradeServiceActiveUpgradeCall wrap *gomock.Call +type MockUpgradeServiceActiveUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceActiveUpgradeCall) Return(arg0 upgrade0.UUID, arg1 error) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceActiveUpgradeCall) Do(f func(context.Context) (upgrade0.UUID, error)) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceActiveUpgradeCall) DoAndReturn(f func(context.Context) (upgrade0.UUID, error)) *MockUpgradeServiceActiveUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerDone mocks base method. @@ -66,9 +90,33 @@ func (m *MockUpgradeService) SetControllerDone(arg0 context.Context, arg1 upgrad } // SetControllerDone indicates an expected call of SetControllerDone. -func (mr *MockUpgradeServiceMockRecorder) SetControllerDone(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) SetControllerDone(arg0, arg1, arg2 any) *MockUpgradeServiceSetControllerDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerDone", reflect.TypeOf((*MockUpgradeService)(nil).SetControllerDone), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerDone", reflect.TypeOf((*MockUpgradeService)(nil).SetControllerDone), arg0, arg1, arg2) + return &MockUpgradeServiceSetControllerDoneCall{Call: call} +} + +// MockUpgradeServiceSetControllerDoneCall wrap *gomock.Call +type MockUpgradeServiceSetControllerDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceSetControllerDoneCall) Return(arg0 error) *MockUpgradeServiceSetControllerDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceSetControllerDoneCall) Do(f func(context.Context, upgrade0.UUID, string) error) *MockUpgradeServiceSetControllerDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceSetControllerDoneCall) DoAndReturn(f func(context.Context, upgrade0.UUID, string) error) *MockUpgradeServiceSetControllerDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetDBUpgradeFailed mocks base method. @@ -80,9 +128,33 @@ func (m *MockUpgradeService) SetDBUpgradeFailed(arg0 context.Context, arg1 upgra } // SetDBUpgradeFailed indicates an expected call of SetDBUpgradeFailed. -func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) SetDBUpgradeFailed(arg0, arg1 any) *MockUpgradeServiceSetDBUpgradeFailedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeFailed), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDBUpgradeFailed", reflect.TypeOf((*MockUpgradeService)(nil).SetDBUpgradeFailed), arg0, arg1) + return &MockUpgradeServiceSetDBUpgradeFailedCall{Call: call} +} + +// MockUpgradeServiceSetDBUpgradeFailedCall wrap *gomock.Call +type MockUpgradeServiceSetDBUpgradeFailedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) Return(arg0 error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) Do(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceSetDBUpgradeFailedCall) DoAndReturn(f func(context.Context, upgrade0.UUID) error) *MockUpgradeServiceSetDBUpgradeFailedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradeInfo mocks base method. @@ -95,9 +167,33 @@ func (m *MockUpgradeService) UpgradeInfo(arg0 context.Context, arg1 upgrade0.UUI } // UpgradeInfo indicates an expected call of UpgradeInfo. -func (mr *MockUpgradeServiceMockRecorder) UpgradeInfo(arg0, arg1 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) UpgradeInfo(arg0, arg1 any) *MockUpgradeServiceUpgradeInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockUpgradeService)(nil).UpgradeInfo), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeInfo", reflect.TypeOf((*MockUpgradeService)(nil).UpgradeInfo), arg0, arg1) + return &MockUpgradeServiceUpgradeInfoCall{Call: call} +} + +// MockUpgradeServiceUpgradeInfoCall wrap *gomock.Call +type MockUpgradeServiceUpgradeInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceUpgradeInfoCall) Return(arg0 upgrade.Info, arg1 error) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceUpgradeInfoCall) Do(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceUpgradeInfoCall) DoAndReturn(f func(context.Context, upgrade0.UUID) (upgrade.Info, error)) *MockUpgradeServiceUpgradeInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchForUpgradeState mocks base method. @@ -110,7 +206,31 @@ func (m *MockUpgradeService) WatchForUpgradeState(arg0 context.Context, arg1 upg } // WatchForUpgradeState indicates an expected call of WatchForUpgradeState. -func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockUpgradeServiceMockRecorder) WatchForUpgradeState(arg0, arg1, arg2 any) *MockUpgradeServiceWatchForUpgradeStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeState", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeState), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchForUpgradeState", reflect.TypeOf((*MockUpgradeService)(nil).WatchForUpgradeState), arg0, arg1, arg2) + return &MockUpgradeServiceWatchForUpgradeStateCall{Call: call} +} + +// MockUpgradeServiceWatchForUpgradeStateCall wrap *gomock.Call +type MockUpgradeServiceWatchForUpgradeStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgradeServiceWatchForUpgradeStateCall) Return(arg0 watcher.Watcher[struct{}], arg1 error) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgradeServiceWatchForUpgradeStateCall) Do(f func(context.Context, upgrade0.UUID, upgrade.State) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgradeServiceWatchForUpgradeStateCall) DoAndReturn(f func(context.Context, upgrade0.UUID, upgrade.State) (watcher.Watcher[struct{}], error)) *MockUpgradeServiceWatchForUpgradeStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradestepsmachine/agent_mock_test.go b/internal/worker/upgradestepsmachine/agent_mock_test.go index 64aaf700302..c6d921879d9 100644 --- a/internal/worker/upgradestepsmachine/agent_mock_test.go +++ b/internal/worker/upgradestepsmachine/agent_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradestepsmachine -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +// mockgen -typed -package upgradestepsmachine -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter // // Package upgradestepsmachine is a generated GoMock package. @@ -58,9 +58,33 @@ func (m *MockAgent) ChangeConfig(arg0 agent.ConfigMutator) error { } // ChangeConfig indicates an expected call of ChangeConfig. -func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *gomock.Call { +func (mr *MockAgentMockRecorder) ChangeConfig(arg0 any) *MockAgentChangeConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConfig", reflect.TypeOf((*MockAgent)(nil).ChangeConfig), arg0) + return &MockAgentChangeConfigCall{Call: call} +} + +// MockAgentChangeConfigCall wrap *gomock.Call +type MockAgentChangeConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentChangeConfigCall) Return(arg0 error) *MockAgentChangeConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentChangeConfigCall) Do(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentChangeConfigCall) DoAndReturn(f func(agent.ConfigMutator) error) *MockAgentChangeConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CurrentConfig mocks base method. @@ -72,9 +96,33 @@ func (m *MockAgent) CurrentConfig() agent.Config { } // CurrentConfig indicates an expected call of CurrentConfig. -func (mr *MockAgentMockRecorder) CurrentConfig() *gomock.Call { +func (mr *MockAgentMockRecorder) CurrentConfig() *MockAgentCurrentConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentConfig", reflect.TypeOf((*MockAgent)(nil).CurrentConfig)) + return &MockAgentCurrentConfigCall{Call: call} +} + +// MockAgentCurrentConfigCall wrap *gomock.Call +type MockAgentCurrentConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAgentCurrentConfigCall) Return(arg0 agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAgentCurrentConfigCall) Do(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAgentCurrentConfigCall) DoAndReturn(f func() agent.Config) *MockAgentCurrentConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfig is a mock of Config interface. @@ -110,9 +158,33 @@ func (m *MockConfig) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigMockRecorder) APIAddresses() *MockConfigAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfig)(nil).APIAddresses)) + return &MockConfigAPIAddressesCall{Call: call} +} + +// MockConfigAPIAddressesCall wrap *gomock.Call +type MockConfigAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -125,9 +197,33 @@ func (m *MockConfig) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) APIInfo() *MockConfigAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfig)(nil).APIInfo)) + return &MockConfigAPIInfoCall{Call: call} +} + +// MockConfigAPIInfoCall wrap *gomock.Call +type MockConfigAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -139,9 +235,33 @@ func (m *MockConfig) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxBackups() *MockConfigAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxBackups)) + return &MockConfigAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -153,9 +273,33 @@ func (m *MockConfig) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigMockRecorder) AgentLogfileMaxSizeMB() *MockConfigAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfig)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -167,9 +311,33 @@ func (m *MockConfig) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigMockRecorder) CACert() *MockConfigCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfig)(nil).CACert)) + return &MockConfigCACertCall{Call: call} +} + +// MockConfigCACertCall wrap *gomock.Call +type MockConfigCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigCACertCall) Return(arg0 string) *MockConfigCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigCACertCall) Do(f func() string) *MockConfigCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigCACertCall) DoAndReturn(f func() string) *MockConfigCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -181,9 +349,33 @@ func (m *MockConfig) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigMockRecorder) Controller() *MockConfigControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfig)(nil).Controller)) + return &MockConfigControllerCall{Call: call} +} + +// MockConfigControllerCall wrap *gomock.Call +type MockConfigControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigControllerCall) Return(arg0 names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigControllerCall) Do(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -195,9 +387,33 @@ func (m *MockConfig) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) DataDir() *MockConfigDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfig)(nil).DataDir)) + return &MockConfigDataDirCall{Call: call} +} + +// MockConfigDataDirCall wrap *gomock.Call +type MockConfigDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDataDirCall) Return(arg0 string) *MockConfigDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDataDirCall) Do(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDataDirCall) DoAndReturn(f func() string) *MockConfigDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -209,9 +425,33 @@ func (m *MockConfig) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigMockRecorder) Dir() *MockConfigDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfig)(nil).Dir)) + return &MockConfigDirCall{Call: call} +} + +// MockConfigDirCall wrap *gomock.Call +type MockConfigDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDirCall) Return(arg0 string) *MockConfigDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDirCall) Do(f func() string) *MockConfigDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDirCall) DoAndReturn(f func() string) *MockConfigDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -224,9 +464,33 @@ func (m *MockConfig) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigMockRecorder) DqlitePort() *MockConfigDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfig)(nil).DqlitePort)) + return &MockConfigDqlitePortCall{Call: call} +} + +// MockConfigDqlitePortCall wrap *gomock.Call +type MockConfigDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigDqlitePortCall) Do(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -238,9 +502,33 @@ func (m *MockConfig) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigMockRecorder) Jobs() *MockConfigJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfig)(nil).Jobs)) + return &MockConfigJobsCall{Call: call} +} + +// MockConfigJobsCall wrap *gomock.Call +type MockConfigJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJobsCall) Return(arg0 []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJobsCall) Do(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -252,9 +540,33 @@ func (m *MockConfig) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigMockRecorder) JujuDBSnapChannel() *MockConfigJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfig)(nil).JujuDBSnapChannel)) + return &MockConfigJujuDBSnapChannelCall{Call: call} +} + +// MockConfigJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigJujuDBSnapChannelCall) Return(arg0 string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigJujuDBSnapChannelCall) Do(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -266,9 +578,33 @@ func (m *MockConfig) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigMockRecorder) LogDir() *MockConfigLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfig)(nil).LogDir)) + return &MockConfigLogDirCall{Call: call} +} + +// MockConfigLogDirCall wrap *gomock.Call +type MockConfigLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLogDirCall) Return(arg0 string) *MockConfigLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLogDirCall) Do(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLogDirCall) DoAndReturn(f func() string) *MockConfigLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -280,9 +616,33 @@ func (m *MockConfig) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigMockRecorder) LoggingConfig() *MockConfigLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfig)(nil).LoggingConfig)) + return &MockConfigLoggingConfigCall{Call: call} +} + +// MockConfigLoggingConfigCall wrap *gomock.Call +type MockConfigLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigLoggingConfigCall) Return(arg0 string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigLoggingConfigCall) Do(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigLoggingConfigCall) DoAndReturn(f func() string) *MockConfigLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -294,9 +654,33 @@ func (m *MockConfig) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigMockRecorder) MetricsSpoolDir() *MockConfigMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfig)(nil).MetricsSpoolDir)) + return &MockConfigMetricsSpoolDirCall{Call: call} +} + +// MockConfigMetricsSpoolDirCall wrap *gomock.Call +type MockConfigMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMetricsSpoolDirCall) Return(arg0 string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMetricsSpoolDirCall) Do(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -308,9 +692,33 @@ func (m *MockConfig) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigMockRecorder) Model() *gomock.Call { +func (mr *MockConfigMockRecorder) Model() *MockConfigModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfig)(nil).Model)) + return &MockConfigModelCall{Call: call} +} + +// MockConfigModelCall wrap *gomock.Call +type MockConfigModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigModelCall) Return(arg0 names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigModelCall) Do(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -323,9 +731,33 @@ func (m *MockConfig) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoInfo() *MockConfigMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfig)(nil).MongoInfo)) + return &MockConfigMongoInfoCall{Call: call} +} + +// MockConfigMongoInfoCall wrap *gomock.Call +type MockConfigMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -337,9 +769,33 @@ func (m *MockConfig) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigMockRecorder) MongoMemoryProfile() *MockConfigMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfig)(nil).MongoMemoryProfile)) + return &MockConfigMongoMemoryProfileCall{Call: call} +} + +// MockConfigMongoMemoryProfileCall wrap *gomock.Call +type MockConfigMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -351,9 +807,33 @@ func (m *MockConfig) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigMockRecorder) Nonce() *MockConfigNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfig)(nil).Nonce)) + return &MockConfigNonceCall{Call: call} +} + +// MockConfigNonceCall wrap *gomock.Call +type MockConfigNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigNonceCall) Return(arg0 string) *MockConfigNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigNonceCall) Do(f func() string) *MockConfigNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigNonceCall) DoAndReturn(f func() string) *MockConfigNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -365,9 +845,33 @@ func (m *MockConfig) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigMockRecorder) ObjectStoreType() *MockConfigObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfig)(nil).ObjectStoreType)) + return &MockConfigObjectStoreTypeCall{Call: call} +} + +// MockConfigObjectStoreTypeCall wrap *gomock.Call +type MockConfigObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -379,9 +883,33 @@ func (m *MockConfig) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigMockRecorder) OldPassword() *MockConfigOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfig)(nil).OldPassword)) + return &MockConfigOldPasswordCall{Call: call} +} + +// MockConfigOldPasswordCall wrap *gomock.Call +type MockConfigOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOldPasswordCall) Return(arg0 string) *MockConfigOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOldPasswordCall) Do(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOldPasswordCall) DoAndReturn(f func() string) *MockConfigOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -393,9 +921,33 @@ func (m *MockConfig) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEnabled() *MockConfigOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEnabled)) + return &MockConfigOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -407,9 +959,33 @@ func (m *MockConfig) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryEndpoint() *MockConfigOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryEndpoint)) + return &MockConfigOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryEndpointCall) Do(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -421,9 +997,33 @@ func (m *MockConfig) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryInsecure() *MockConfigOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryInsecure)) + return &MockConfigOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -435,9 +1035,33 @@ func (m *MockConfig) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetrySampleRatio() *MockConfigOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfig)(nil).OpenTelemetrySampleRatio)) + return &MockConfigOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -449,9 +1073,33 @@ func (m *MockConfig) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigMockRecorder) OpenTelemetryStackTraces() *MockConfigOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfig)(nil).OpenTelemetryStackTraces)) + return &MockConfigOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -463,9 +1111,33 @@ func (m *MockConfig) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingEnabled() *MockConfigQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfig)(nil).QueryTracingEnabled)) + return &MockConfigQueryTracingEnabledCall{Call: call} +} + +// MockConfigQueryTracingEnabledCall wrap *gomock.Call +type MockConfigQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingEnabledCall) Return(arg0 bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingEnabledCall) Do(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -477,9 +1149,33 @@ func (m *MockConfig) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigMockRecorder) QueryTracingThreshold() *MockConfigQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfig)(nil).QueryTracingThreshold)) + return &MockConfigQueryTracingThresholdCall{Call: call} +} + +// MockConfigQueryTracingThresholdCall wrap *gomock.Call +type MockConfigQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -492,9 +1188,33 @@ func (m *MockConfig) StateServingInfo() (controller.StateServingInfo, bool) { } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigMockRecorder) StateServingInfo() *MockConfigStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfig)(nil).StateServingInfo)) + return &MockConfigStateServingInfoCall{Call: call} +} + +// MockConfigStateServingInfoCall wrap *gomock.Call +type MockConfigStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -506,9 +1226,33 @@ func (m *MockConfig) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigMockRecorder) SystemIdentityPath() *MockConfigSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfig)(nil).SystemIdentityPath)) + return &MockConfigSystemIdentityPathCall{Call: call} +} + +// MockConfigSystemIdentityPathCall wrap *gomock.Call +type MockConfigSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSystemIdentityPathCall) Return(arg0 string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSystemIdentityPathCall) Do(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -520,9 +1264,33 @@ func (m *MockConfig) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigMockRecorder) Tag() *MockConfigTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfig)(nil).Tag)) + return &MockConfigTagCall{Call: call} +} + +// MockConfigTagCall wrap *gomock.Call +type MockConfigTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTagCall) Return(arg0 names.Tag) *MockConfigTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTagCall) Do(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTagCall) DoAndReturn(f func() names.Tag) *MockConfigTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -534,9 +1302,33 @@ func (m *MockConfig) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigMockRecorder) TransientDataDir() *MockConfigTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfig)(nil).TransientDataDir)) + return &MockConfigTransientDataDirCall{Call: call} +} + +// MockConfigTransientDataDirCall wrap *gomock.Call +type MockConfigTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigTransientDataDirCall) Return(arg0 string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigTransientDataDirCall) Do(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigTransientDataDirCall) DoAndReturn(f func() string) *MockConfigTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -548,9 +1340,33 @@ func (m *MockConfig) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigMockRecorder) UpgradedToVersion() *MockConfigUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfig)(nil).UpgradedToVersion)) + return &MockConfigUpgradedToVersionCall{Call: call} +} + +// MockConfigUpgradedToVersionCall wrap *gomock.Call +type MockConfigUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigUpgradedToVersionCall) Do(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -562,9 +1378,33 @@ func (m *MockConfig) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) Value(arg0 any) *MockConfigValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfig)(nil).Value), arg0) + return &MockConfigValueCall{Call: call} +} + +// MockConfigValueCall wrap *gomock.Call +type MockConfigValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigValueCall) Return(arg0 string) *MockConfigValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigValueCall) Do(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigValueCall) DoAndReturn(f func(string) string) *MockConfigValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -577,9 +1417,33 @@ func (m *MockConfig) WriteCommands(arg0 shell.Renderer) ([]string, error) { } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigMockRecorder) WriteCommands(arg0 any) *MockConfigWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfig)(nil).WriteCommands), arg0) + return &MockConfigWriteCommandsCall{Call: call} +} + +// MockConfigWriteCommandsCall wrap *gomock.Call +type MockConfigWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockConfigSetter is a mock of ConfigSetter interface. @@ -615,9 +1479,33 @@ func (m *MockConfigSetter) APIAddresses() ([]string, error) { } // APIAddresses indicates an expected call of APIAddresses. -func (mr *MockConfigSetterMockRecorder) APIAddresses() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIAddresses() *MockConfigSetterAPIAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIAddresses", reflect.TypeOf((*MockConfigSetter)(nil).APIAddresses)) + return &MockConfigSetterAPIAddressesCall{Call: call} +} + +// MockConfigSetterAPIAddressesCall wrap *gomock.Call +type MockConfigSetterAPIAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIAddressesCall) Return(arg0 []string, arg1 error) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIAddressesCall) Do(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIAddressesCall) DoAndReturn(f func() ([]string, error)) *MockConfigSetterAPIAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // APIInfo mocks base method. @@ -630,9 +1518,33 @@ func (m *MockConfigSetter) APIInfo() (*api.Info, bool) { } // APIInfo indicates an expected call of APIInfo. -func (mr *MockConfigSetterMockRecorder) APIInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) APIInfo() *MockConfigSetterAPIInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIInfo", reflect.TypeOf((*MockConfigSetter)(nil).APIInfo)) + return &MockConfigSetterAPIInfoCall{Call: call} +} + +// MockConfigSetterAPIInfoCall wrap *gomock.Call +type MockConfigSetterAPIInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAPIInfoCall) Return(arg0 *api.Info, arg1 bool) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAPIInfoCall) Do(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAPIInfoCall) DoAndReturn(f func() (*api.Info, bool)) *MockConfigSetterAPIInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxBackups mocks base method. @@ -644,9 +1556,33 @@ func (m *MockConfigSetter) AgentLogfileMaxBackups() int { } // AgentLogfileMaxBackups indicates an expected call of AgentLogfileMaxBackups. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxBackups() *MockConfigSetterAgentLogfileMaxBackupsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxBackups", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxBackups)) + return &MockConfigSetterAgentLogfileMaxBackupsCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxBackupsCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxBackupsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxBackupsCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxBackupsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AgentLogfileMaxSizeMB mocks base method. @@ -658,9 +1594,33 @@ func (m *MockConfigSetter) AgentLogfileMaxSizeMB() int { } // AgentLogfileMaxSizeMB indicates an expected call of AgentLogfileMaxSizeMB. -func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) AgentLogfileMaxSizeMB() *MockConfigSetterAgentLogfileMaxSizeMBCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLogfileMaxSizeMB", reflect.TypeOf((*MockConfigSetter)(nil).AgentLogfileMaxSizeMB)) + return &MockConfigSetterAgentLogfileMaxSizeMBCall{Call: call} +} + +// MockConfigSetterAgentLogfileMaxSizeMBCall wrap *gomock.Call +type MockConfigSetterAgentLogfileMaxSizeMBCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Return(arg0 int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) Do(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterAgentLogfileMaxSizeMBCall) DoAndReturn(f func() int) *MockConfigSetterAgentLogfileMaxSizeMBCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CACert mocks base method. @@ -672,9 +1632,33 @@ func (m *MockConfigSetter) CACert() string { } // CACert indicates an expected call of CACert. -func (mr *MockConfigSetterMockRecorder) CACert() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) CACert() *MockConfigSetterCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CACert", reflect.TypeOf((*MockConfigSetter)(nil).CACert)) + return &MockConfigSetterCACertCall{Call: call} +} + +// MockConfigSetterCACertCall wrap *gomock.Call +type MockConfigSetterCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCACertCall) Return(arg0 string) *MockConfigSetterCACertCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCACertCall) Do(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCACertCall) DoAndReturn(f func() string) *MockConfigSetterCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Clone mocks base method. @@ -686,9 +1670,33 @@ func (m *MockConfigSetter) Clone() agent.Config { } // Clone indicates an expected call of Clone. -func (mr *MockConfigSetterMockRecorder) Clone() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Clone() *MockConfigSetterCloneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockConfigSetter)(nil).Clone)) + return &MockConfigSetterCloneCall{Call: call} +} + +// MockConfigSetterCloneCall wrap *gomock.Call +type MockConfigSetterCloneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterCloneCall) Return(arg0 agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterCloneCall) Do(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterCloneCall) DoAndReturn(f func() agent.Config) *MockConfigSetterCloneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Controller mocks base method. @@ -700,9 +1708,33 @@ func (m *MockConfigSetter) Controller() names.ControllerTag { } // Controller indicates an expected call of Controller. -func (mr *MockConfigSetterMockRecorder) Controller() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Controller() *MockConfigSetterControllerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Controller", reflect.TypeOf((*MockConfigSetter)(nil).Controller)) + return &MockConfigSetterControllerCall{Call: call} +} + +// MockConfigSetterControllerCall wrap *gomock.Call +type MockConfigSetterControllerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterControllerCall) Return(arg0 names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterControllerCall) Do(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterControllerCall) DoAndReturn(f func() names.ControllerTag) *MockConfigSetterControllerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DataDir mocks base method. @@ -714,9 +1746,33 @@ func (m *MockConfigSetter) DataDir() string { } // DataDir indicates an expected call of DataDir. -func (mr *MockConfigSetterMockRecorder) DataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DataDir() *MockConfigSetterDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MockConfigSetter)(nil).DataDir)) + return &MockConfigSetterDataDirCall{Call: call} +} + +// MockConfigSetterDataDirCall wrap *gomock.Call +type MockConfigSetterDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDataDirCall) Return(arg0 string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDataDirCall) Do(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDataDirCall) DoAndReturn(f func() string) *MockConfigSetterDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Dir mocks base method. @@ -728,9 +1784,33 @@ func (m *MockConfigSetter) Dir() string { } // Dir indicates an expected call of Dir. -func (mr *MockConfigSetterMockRecorder) Dir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Dir() *MockConfigSetterDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dir", reflect.TypeOf((*MockConfigSetter)(nil).Dir)) + return &MockConfigSetterDirCall{Call: call} +} + +// MockConfigSetterDirCall wrap *gomock.Call +type MockConfigSetterDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDirCall) Return(arg0 string) *MockConfigSetterDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDirCall) Do(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDirCall) DoAndReturn(f func() string) *MockConfigSetterDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DqlitePort mocks base method. @@ -743,9 +1823,33 @@ func (m *MockConfigSetter) DqlitePort() (int, bool) { } // DqlitePort indicates an expected call of DqlitePort. -func (mr *MockConfigSetterMockRecorder) DqlitePort() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) DqlitePort() *MockConfigSetterDqlitePortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DqlitePort", reflect.TypeOf((*MockConfigSetter)(nil).DqlitePort)) + return &MockConfigSetterDqlitePortCall{Call: call} +} + +// MockConfigSetterDqlitePortCall wrap *gomock.Call +type MockConfigSetterDqlitePortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterDqlitePortCall) Return(arg0 int, arg1 bool) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterDqlitePortCall) Do(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterDqlitePortCall) DoAndReturn(f func() (int, bool)) *MockConfigSetterDqlitePortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -757,9 +1861,33 @@ func (m *MockConfigSetter) Jobs() []model.MachineJob { } // Jobs indicates an expected call of Jobs. -func (mr *MockConfigSetterMockRecorder) Jobs() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Jobs() *MockConfigSetterJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockConfigSetter)(nil).Jobs)) + return &MockConfigSetterJobsCall{Call: call} +} + +// MockConfigSetterJobsCall wrap *gomock.Call +type MockConfigSetterJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJobsCall) Return(arg0 []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJobsCall) Do(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJobsCall) DoAndReturn(f func() []model.MachineJob) *MockConfigSetterJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // JujuDBSnapChannel mocks base method. @@ -771,9 +1899,33 @@ func (m *MockConfigSetter) JujuDBSnapChannel() string { } // JujuDBSnapChannel indicates an expected call of JujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) JujuDBSnapChannel() *MockConfigSetterJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).JujuDBSnapChannel)) + return &MockConfigSetterJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterJujuDBSnapChannelCall) Return(arg0 string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterJujuDBSnapChannelCall) Do(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterJujuDBSnapChannelCall) DoAndReturn(f func() string) *MockConfigSetterJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogDir mocks base method. @@ -785,9 +1937,33 @@ func (m *MockConfigSetter) LogDir() string { } // LogDir indicates an expected call of LogDir. -func (mr *MockConfigSetterMockRecorder) LogDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LogDir() *MockConfigSetterLogDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogDir", reflect.TypeOf((*MockConfigSetter)(nil).LogDir)) + return &MockConfigSetterLogDirCall{Call: call} +} + +// MockConfigSetterLogDirCall wrap *gomock.Call +type MockConfigSetterLogDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLogDirCall) Return(arg0 string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLogDirCall) Do(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLogDirCall) DoAndReturn(f func() string) *MockConfigSetterLogDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LoggingConfig mocks base method. @@ -799,9 +1975,33 @@ func (m *MockConfigSetter) LoggingConfig() string { } // LoggingConfig indicates an expected call of LoggingConfig. -func (mr *MockConfigSetterMockRecorder) LoggingConfig() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) LoggingConfig() *MockConfigSetterLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).LoggingConfig)) + return &MockConfigSetterLoggingConfigCall{Call: call} +} + +// MockConfigSetterLoggingConfigCall wrap *gomock.Call +type MockConfigSetterLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterLoggingConfigCall) Return(arg0 string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterLoggingConfigCall) Do(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterLoggingConfigCall) DoAndReturn(f func() string) *MockConfigSetterLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsSpoolDir mocks base method. @@ -813,9 +2013,33 @@ func (m *MockConfigSetter) MetricsSpoolDir() string { } // MetricsSpoolDir indicates an expected call of MetricsSpoolDir. -func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MetricsSpoolDir() *MockConfigSetterMetricsSpoolDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsSpoolDir", reflect.TypeOf((*MockConfigSetter)(nil).MetricsSpoolDir)) + return &MockConfigSetterMetricsSpoolDirCall{Call: call} +} + +// MockConfigSetterMetricsSpoolDirCall wrap *gomock.Call +type MockConfigSetterMetricsSpoolDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMetricsSpoolDirCall) Return(arg0 string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMetricsSpoolDirCall) Do(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMetricsSpoolDirCall) DoAndReturn(f func() string) *MockConfigSetterMetricsSpoolDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Model mocks base method. @@ -827,9 +2051,33 @@ func (m *MockConfigSetter) Model() names.ModelTag { } // Model indicates an expected call of Model. -func (mr *MockConfigSetterMockRecorder) Model() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Model() *MockConfigSetterModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockConfigSetter)(nil).Model)) + return &MockConfigSetterModelCall{Call: call} +} + +// MockConfigSetterModelCall wrap *gomock.Call +type MockConfigSetterModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterModelCall) Return(arg0 names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterModelCall) Do(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterModelCall) DoAndReturn(f func() names.ModelTag) *MockConfigSetterModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoInfo mocks base method. @@ -842,9 +2090,33 @@ func (m *MockConfigSetter) MongoInfo() (*mongo.MongoInfo, bool) { } // MongoInfo indicates an expected call of MongoInfo. -func (mr *MockConfigSetterMockRecorder) MongoInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoInfo() *MockConfigSetterMongoInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoInfo", reflect.TypeOf((*MockConfigSetter)(nil).MongoInfo)) + return &MockConfigSetterMongoInfoCall{Call: call} +} + +// MockConfigSetterMongoInfoCall wrap *gomock.Call +type MockConfigSetterMongoInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoInfoCall) Return(arg0 *mongo.MongoInfo, arg1 bool) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoInfoCall) Do(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoInfoCall) DoAndReturn(f func() (*mongo.MongoInfo, bool)) *MockConfigSetterMongoInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MongoMemoryProfile mocks base method. @@ -856,9 +2128,33 @@ func (m *MockConfigSetter) MongoMemoryProfile() mongo.MemoryProfile { } // MongoMemoryProfile indicates an expected call of MongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) MongoMemoryProfile() *MockConfigSetterMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).MongoMemoryProfile)) + return &MockConfigSetterMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterMongoMemoryProfileCall) Return(arg0 mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterMongoMemoryProfileCall) Do(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterMongoMemoryProfileCall) DoAndReturn(f func() mongo.MemoryProfile) *MockConfigSetterMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -870,9 +2166,33 @@ func (m *MockConfigSetter) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockConfigSetterMockRecorder) Nonce() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Nonce() *MockConfigSetterNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockConfigSetter)(nil).Nonce)) + return &MockConfigSetterNonceCall{Call: call} +} + +// MockConfigSetterNonceCall wrap *gomock.Call +type MockConfigSetterNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterNonceCall) Return(arg0 string) *MockConfigSetterNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterNonceCall) Do(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterNonceCall) DoAndReturn(f func() string) *MockConfigSetterNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ObjectStoreType mocks base method. @@ -884,9 +2204,33 @@ func (m *MockConfigSetter) ObjectStoreType() objectstore.BackendType { } // ObjectStoreType indicates an expected call of ObjectStoreType. -func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) ObjectStoreType() *MockConfigSetterObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).ObjectStoreType)) + return &MockConfigSetterObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterObjectStoreTypeCall) Return(arg0 objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterObjectStoreTypeCall) Do(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterObjectStoreTypeCall) DoAndReturn(f func() objectstore.BackendType) *MockConfigSetterObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OldPassword mocks base method. @@ -898,9 +2242,33 @@ func (m *MockConfigSetter) OldPassword() string { } // OldPassword indicates an expected call of OldPassword. -func (mr *MockConfigSetterMockRecorder) OldPassword() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OldPassword() *MockConfigSetterOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OldPassword", reflect.TypeOf((*MockConfigSetter)(nil).OldPassword)) + return &MockConfigSetterOldPasswordCall{Call: call} +} + +// MockConfigSetterOldPasswordCall wrap *gomock.Call +type MockConfigSetterOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOldPasswordCall) Return(arg0 string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOldPasswordCall) Do(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOldPasswordCall) DoAndReturn(f func() string) *MockConfigSetterOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEnabled mocks base method. @@ -912,9 +2280,33 @@ func (m *MockConfigSetter) OpenTelemetryEnabled() bool { } // OpenTelemetryEnabled indicates an expected call of OpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEnabled() *MockConfigSetterOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEnabled)) + return &MockConfigSetterOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEnabledCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEnabledCall) Do(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryEndpoint mocks base method. @@ -926,9 +2318,33 @@ func (m *MockConfigSetter) OpenTelemetryEndpoint() string { } // OpenTelemetryEndpoint indicates an expected call of OpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryEndpoint() *MockConfigSetterOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryEndpoint)) + return &MockConfigSetterOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryEndpointCall) Return(arg0 string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryEndpointCall) Do(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryEndpointCall) DoAndReturn(f func() string) *MockConfigSetterOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryInsecure mocks base method. @@ -940,9 +2356,33 @@ func (m *MockConfigSetter) OpenTelemetryInsecure() bool { } // OpenTelemetryInsecure indicates an expected call of OpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryInsecure() *MockConfigSetterOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryInsecure)) + return &MockConfigSetterOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryInsecureCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryInsecureCall) Do(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryInsecureCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetrySampleRatio mocks base method. @@ -954,9 +2394,33 @@ func (m *MockConfigSetter) OpenTelemetrySampleRatio() float64 { } // OpenTelemetrySampleRatio indicates an expected call of OpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetrySampleRatio() *MockConfigSetterOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetrySampleRatio)) + return &MockConfigSetterOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Return(arg0 float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) Do(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetrySampleRatioCall) DoAndReturn(f func() float64) *MockConfigSetterOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenTelemetryStackTraces mocks base method. @@ -968,9 +2432,33 @@ func (m *MockConfigSetter) OpenTelemetryStackTraces() bool { } // OpenTelemetryStackTraces indicates an expected call of OpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) OpenTelemetryStackTraces() *MockConfigSetterOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).OpenTelemetryStackTraces)) + return &MockConfigSetterOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Return(arg0 bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterOpenTelemetryStackTracesCall) Do(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterOpenTelemetryStackTracesCall) DoAndReturn(f func() bool) *MockConfigSetterOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingEnabled mocks base method. @@ -982,9 +2470,33 @@ func (m *MockConfigSetter) QueryTracingEnabled() bool { } // QueryTracingEnabled indicates an expected call of QueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingEnabled() *MockConfigSetterQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingEnabled)) + return &MockConfigSetterQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingEnabledCall) Return(arg0 bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingEnabledCall) Do(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingEnabledCall) DoAndReturn(f func() bool) *MockConfigSetterQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // QueryTracingThreshold mocks base method. @@ -996,9 +2508,33 @@ func (m *MockConfigSetter) QueryTracingThreshold() time.Duration { } // QueryTracingThreshold indicates an expected call of QueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) QueryTracingThreshold() *MockConfigSetterQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).QueryTracingThreshold)) + return &MockConfigSetterQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterQueryTracingThresholdCall) Return(arg0 time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterQueryTracingThresholdCall) Do(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterQueryTracingThresholdCall) DoAndReturn(f func() time.Duration) *MockConfigSetterQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAPIHostPorts mocks base method. @@ -1010,9 +2546,33 @@ func (m *MockConfigSetter) SetAPIHostPorts(arg0 []network.HostPorts) error { } // SetAPIHostPorts indicates an expected call of SetAPIHostPorts. -func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetAPIHostPorts(arg0 any) *MockConfigSetterSetAPIHostPortsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAPIHostPorts", reflect.TypeOf((*MockConfigSetter)(nil).SetAPIHostPorts), arg0) + return &MockConfigSetterSetAPIHostPortsCall{Call: call} +} + +// MockConfigSetterSetAPIHostPortsCall wrap *gomock.Call +type MockConfigSetterSetAPIHostPortsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetAPIHostPortsCall) Return(arg0 error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetAPIHostPortsCall) Do(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetAPIHostPortsCall) DoAndReturn(f func([]network.HostPorts) error) *MockConfigSetterSetAPIHostPortsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCACert mocks base method. @@ -1022,9 +2582,33 @@ func (m *MockConfigSetter) SetCACert(arg0 string) { } // SetCACert indicates an expected call of SetCACert. -func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetCACert(arg0 any) *MockConfigSetterSetCACertCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCACert", reflect.TypeOf((*MockConfigSetter)(nil).SetCACert), arg0) + return &MockConfigSetterSetCACertCall{Call: call} +} + +// MockConfigSetterSetCACertCall wrap *gomock.Call +type MockConfigSetterSetCACertCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetCACertCall) Return() *MockConfigSetterSetCACertCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetCACertCall) Do(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetCACertCall) DoAndReturn(f func(string)) *MockConfigSetterSetCACertCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetControllerAPIPort mocks base method. @@ -1034,9 +2618,33 @@ func (m *MockConfigSetter) SetControllerAPIPort(arg0 int) { } // SetControllerAPIPort indicates an expected call of SetControllerAPIPort. -func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetControllerAPIPort(arg0 any) *MockConfigSetterSetControllerAPIPortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetControllerAPIPort", reflect.TypeOf((*MockConfigSetter)(nil).SetControllerAPIPort), arg0) + return &MockConfigSetterSetControllerAPIPortCall{Call: call} +} + +// MockConfigSetterSetControllerAPIPortCall wrap *gomock.Call +type MockConfigSetterSetControllerAPIPortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetControllerAPIPortCall) Return() *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetControllerAPIPortCall) Do(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetControllerAPIPortCall) DoAndReturn(f func(int)) *MockConfigSetterSetControllerAPIPortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetJujuDBSnapChannel mocks base method. @@ -1046,9 +2654,33 @@ func (m *MockConfigSetter) SetJujuDBSnapChannel(arg0 string) { } // SetJujuDBSnapChannel indicates an expected call of SetJujuDBSnapChannel. -func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetJujuDBSnapChannel(arg0 any) *MockConfigSetterSetJujuDBSnapChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetJujuDBSnapChannel", reflect.TypeOf((*MockConfigSetter)(nil).SetJujuDBSnapChannel), arg0) + return &MockConfigSetterSetJujuDBSnapChannelCall{Call: call} +} + +// MockConfigSetterSetJujuDBSnapChannelCall wrap *gomock.Call +type MockConfigSetterSetJujuDBSnapChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Return() *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetJujuDBSnapChannelCall) Do(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetJujuDBSnapChannelCall) DoAndReturn(f func(string)) *MockConfigSetterSetJujuDBSnapChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetLoggingConfig mocks base method. @@ -1058,9 +2690,33 @@ func (m *MockConfigSetter) SetLoggingConfig(arg0 string) { } // SetLoggingConfig indicates an expected call of SetLoggingConfig. -func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetLoggingConfig(arg0 any) *MockConfigSetterSetLoggingConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLoggingConfig", reflect.TypeOf((*MockConfigSetter)(nil).SetLoggingConfig), arg0) + return &MockConfigSetterSetLoggingConfigCall{Call: call} +} + +// MockConfigSetterSetLoggingConfigCall wrap *gomock.Call +type MockConfigSetterSetLoggingConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetLoggingConfigCall) Return() *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetLoggingConfigCall) Do(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetLoggingConfigCall) DoAndReturn(f func(string)) *MockConfigSetterSetLoggingConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMongoMemoryProfile mocks base method. @@ -1070,9 +2726,33 @@ func (m *MockConfigSetter) SetMongoMemoryProfile(arg0 mongo.MemoryProfile) { } // SetMongoMemoryProfile indicates an expected call of SetMongoMemoryProfile. -func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetMongoMemoryProfile(arg0 any) *MockConfigSetterSetMongoMemoryProfileCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMongoMemoryProfile", reflect.TypeOf((*MockConfigSetter)(nil).SetMongoMemoryProfile), arg0) + return &MockConfigSetterSetMongoMemoryProfileCall{Call: call} +} + +// MockConfigSetterSetMongoMemoryProfileCall wrap *gomock.Call +type MockConfigSetterSetMongoMemoryProfileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetMongoMemoryProfileCall) Return() *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetMongoMemoryProfileCall) Do(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetMongoMemoryProfileCall) DoAndReturn(f func(mongo.MemoryProfile)) *MockConfigSetterSetMongoMemoryProfileCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetObjectStoreType mocks base method. @@ -1082,9 +2762,33 @@ func (m *MockConfigSetter) SetObjectStoreType(arg0 objectstore.BackendType) { } // SetObjectStoreType indicates an expected call of SetObjectStoreType. -func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetObjectStoreType(arg0 any) *MockConfigSetterSetObjectStoreTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObjectStoreType", reflect.TypeOf((*MockConfigSetter)(nil).SetObjectStoreType), arg0) + return &MockConfigSetterSetObjectStoreTypeCall{Call: call} +} + +// MockConfigSetterSetObjectStoreTypeCall wrap *gomock.Call +type MockConfigSetterSetObjectStoreTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetObjectStoreTypeCall) Return() *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetObjectStoreTypeCall) Do(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetObjectStoreTypeCall) DoAndReturn(f func(objectstore.BackendType)) *MockConfigSetterSetObjectStoreTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOldPassword mocks base method. @@ -1094,9 +2798,33 @@ func (m *MockConfigSetter) SetOldPassword(arg0 string) { } // SetOldPassword indicates an expected call of SetOldPassword. -func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOldPassword(arg0 any) *MockConfigSetterSetOldPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOldPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetOldPassword), arg0) + return &MockConfigSetterSetOldPasswordCall{Call: call} +} + +// MockConfigSetterSetOldPasswordCall wrap *gomock.Call +type MockConfigSetterSetOldPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOldPasswordCall) Return() *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOldPasswordCall) Do(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOldPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetOldPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEnabled mocks base method. @@ -1106,9 +2834,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEnabled(arg0 bool) { } // SetOpenTelemetryEnabled indicates an expected call of SetOpenTelemetryEnabled. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEnabled(arg0 any) *MockConfigSetterSetOpenTelemetryEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEnabled), arg0) + return &MockConfigSetterSetOpenTelemetryEnabledCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEnabledCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Return() *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryEndpoint mocks base method. @@ -1118,9 +2870,33 @@ func (m *MockConfigSetter) SetOpenTelemetryEndpoint(arg0 string) { } // SetOpenTelemetryEndpoint indicates an expected call of SetOpenTelemetryEndpoint. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryEndpoint(arg0 any) *MockConfigSetterSetOpenTelemetryEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryEndpoint", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryEndpoint), arg0) + return &MockConfigSetterSetOpenTelemetryEndpointCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryEndpointCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Return() *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) Do(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryEndpointCall) DoAndReturn(f func(string)) *MockConfigSetterSetOpenTelemetryEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryInsecure mocks base method. @@ -1130,9 +2906,33 @@ func (m *MockConfigSetter) SetOpenTelemetryInsecure(arg0 bool) { } // SetOpenTelemetryInsecure indicates an expected call of SetOpenTelemetryInsecure. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryInsecure(arg0 any) *MockConfigSetterSetOpenTelemetryInsecureCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryInsecure", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryInsecure), arg0) + return &MockConfigSetterSetOpenTelemetryInsecureCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryInsecureCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryInsecureCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Return() *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryInsecureCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryInsecureCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetrySampleRatio mocks base method. @@ -1142,9 +2942,33 @@ func (m *MockConfigSetter) SetOpenTelemetrySampleRatio(arg0 float64) { } // SetOpenTelemetrySampleRatio indicates an expected call of SetOpenTelemetrySampleRatio. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetrySampleRatio(arg0 any) *MockConfigSetterSetOpenTelemetrySampleRatioCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetrySampleRatio", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetrySampleRatio), arg0) + return &MockConfigSetterSetOpenTelemetrySampleRatioCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetrySampleRatioCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetrySampleRatioCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Return() *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) Do(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetrySampleRatioCall) DoAndReturn(f func(float64)) *MockConfigSetterSetOpenTelemetrySampleRatioCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOpenTelemetryStackTraces mocks base method. @@ -1154,9 +2978,33 @@ func (m *MockConfigSetter) SetOpenTelemetryStackTraces(arg0 bool) { } // SetOpenTelemetryStackTraces indicates an expected call of SetOpenTelemetryStackTraces. -func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetOpenTelemetryStackTraces(arg0 any) *MockConfigSetterSetOpenTelemetryStackTracesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOpenTelemetryStackTraces", reflect.TypeOf((*MockConfigSetter)(nil).SetOpenTelemetryStackTraces), arg0) + return &MockConfigSetterSetOpenTelemetryStackTracesCall{Call: call} +} + +// MockConfigSetterSetOpenTelemetryStackTracesCall wrap *gomock.Call +type MockConfigSetterSetOpenTelemetryStackTracesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Return() *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) Do(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetOpenTelemetryStackTracesCall) DoAndReturn(f func(bool)) *MockConfigSetterSetOpenTelemetryStackTracesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPassword mocks base method. @@ -1166,9 +3014,33 @@ func (m *MockConfigSetter) SetPassword(arg0 string) { } // SetPassword indicates an expected call of SetPassword. -func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetPassword(arg0 any) *MockConfigSetterSetPasswordCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPassword", reflect.TypeOf((*MockConfigSetter)(nil).SetPassword), arg0) + return &MockConfigSetterSetPasswordCall{Call: call} +} + +// MockConfigSetterSetPasswordCall wrap *gomock.Call +type MockConfigSetterSetPasswordCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetPasswordCall) Return() *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetPasswordCall) Do(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetPasswordCall) DoAndReturn(f func(string)) *MockConfigSetterSetPasswordCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingEnabled mocks base method. @@ -1178,9 +3050,33 @@ func (m *MockConfigSetter) SetQueryTracingEnabled(arg0 bool) { } // SetQueryTracingEnabled indicates an expected call of SetQueryTracingEnabled. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingEnabled(arg0 any) *MockConfigSetterSetQueryTracingEnabledCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingEnabled", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingEnabled), arg0) + return &MockConfigSetterSetQueryTracingEnabledCall{Call: call} +} + +// MockConfigSetterSetQueryTracingEnabledCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingEnabledCall) Return() *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingEnabledCall) Do(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingEnabledCall) DoAndReturn(f func(bool)) *MockConfigSetterSetQueryTracingEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetQueryTracingThreshold mocks base method. @@ -1190,9 +3086,33 @@ func (m *MockConfigSetter) SetQueryTracingThreshold(arg0 time.Duration) { } // SetQueryTracingThreshold indicates an expected call of SetQueryTracingThreshold. -func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetQueryTracingThreshold(arg0 any) *MockConfigSetterSetQueryTracingThresholdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryTracingThreshold", reflect.TypeOf((*MockConfigSetter)(nil).SetQueryTracingThreshold), arg0) + return &MockConfigSetterSetQueryTracingThresholdCall{Call: call} +} + +// MockConfigSetterSetQueryTracingThresholdCall wrap *gomock.Call +type MockConfigSetterSetQueryTracingThresholdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetQueryTracingThresholdCall) Return() *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetQueryTracingThresholdCall) Do(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetQueryTracingThresholdCall) DoAndReturn(f func(time.Duration)) *MockConfigSetterSetQueryTracingThresholdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStateServingInfo mocks base method. @@ -1202,9 +3122,33 @@ func (m *MockConfigSetter) SetStateServingInfo(arg0 controller.StateServingInfo) } // SetStateServingInfo indicates an expected call of SetStateServingInfo. -func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetStateServingInfo(arg0 any) *MockConfigSetterSetStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).SetStateServingInfo), arg0) + return &MockConfigSetterSetStateServingInfoCall{Call: call} +} + +// MockConfigSetterSetStateServingInfoCall wrap *gomock.Call +type MockConfigSetterSetStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetStateServingInfoCall) Return() *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetStateServingInfoCall) Do(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetStateServingInfoCall) DoAndReturn(f func(controller.StateServingInfo)) *MockConfigSetterSetStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUpgradedToVersion mocks base method. @@ -1214,9 +3158,33 @@ func (m *MockConfigSetter) SetUpgradedToVersion(arg0 version.Number) { } // SetUpgradedToVersion indicates an expected call of SetUpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetUpgradedToVersion(arg0 any) *MockConfigSetterSetUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).SetUpgradedToVersion), arg0) + return &MockConfigSetterSetUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterSetUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterSetUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetUpgradedToVersionCall) Return() *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetUpgradedToVersionCall) Do(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetUpgradedToVersionCall) DoAndReturn(f func(version.Number)) *MockConfigSetterSetUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetValue mocks base method. @@ -1226,9 +3194,33 @@ func (m *MockConfigSetter) SetValue(arg0, arg1 string) { } // SetValue indicates an expected call of SetValue. -func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SetValue(arg0, arg1 any) *MockConfigSetterSetValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValue", reflect.TypeOf((*MockConfigSetter)(nil).SetValue), arg0, arg1) + return &MockConfigSetterSetValueCall{Call: call} +} + +// MockConfigSetterSetValueCall wrap *gomock.Call +type MockConfigSetterSetValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSetValueCall) Return() *MockConfigSetterSetValueCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSetValueCall) Do(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSetValueCall) DoAndReturn(f func(string, string)) *MockConfigSetterSetValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StateServingInfo mocks base method. @@ -1241,9 +3233,33 @@ func (m *MockConfigSetter) StateServingInfo() (controller.StateServingInfo, bool } // StateServingInfo indicates an expected call of StateServingInfo. -func (mr *MockConfigSetterMockRecorder) StateServingInfo() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) StateServingInfo() *MockConfigSetterStateServingInfoCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateServingInfo", reflect.TypeOf((*MockConfigSetter)(nil).StateServingInfo)) + return &MockConfigSetterStateServingInfoCall{Call: call} +} + +// MockConfigSetterStateServingInfoCall wrap *gomock.Call +type MockConfigSetterStateServingInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterStateServingInfoCall) Return(arg0 controller.StateServingInfo, arg1 bool) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterStateServingInfoCall) Do(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterStateServingInfoCall) DoAndReturn(f func() (controller.StateServingInfo, bool)) *MockConfigSetterStateServingInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SystemIdentityPath mocks base method. @@ -1255,9 +3271,33 @@ func (m *MockConfigSetter) SystemIdentityPath() string { } // SystemIdentityPath indicates an expected call of SystemIdentityPath. -func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) SystemIdentityPath() *MockConfigSetterSystemIdentityPathCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SystemIdentityPath", reflect.TypeOf((*MockConfigSetter)(nil).SystemIdentityPath)) + return &MockConfigSetterSystemIdentityPathCall{Call: call} +} + +// MockConfigSetterSystemIdentityPathCall wrap *gomock.Call +type MockConfigSetterSystemIdentityPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterSystemIdentityPathCall) Return(arg0 string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterSystemIdentityPathCall) Do(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterSystemIdentityPathCall) DoAndReturn(f func() string) *MockConfigSetterSystemIdentityPathCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1269,9 +3309,33 @@ func (m *MockConfigSetter) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockConfigSetterMockRecorder) Tag() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Tag() *MockConfigSetterTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockConfigSetter)(nil).Tag)) + return &MockConfigSetterTagCall{Call: call} +} + +// MockConfigSetterTagCall wrap *gomock.Call +type MockConfigSetterTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTagCall) Return(arg0 names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTagCall) Do(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTagCall) DoAndReturn(f func() names.Tag) *MockConfigSetterTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransientDataDir mocks base method. @@ -1283,9 +3347,33 @@ func (m *MockConfigSetter) TransientDataDir() string { } // TransientDataDir indicates an expected call of TransientDataDir. -func (mr *MockConfigSetterMockRecorder) TransientDataDir() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) TransientDataDir() *MockConfigSetterTransientDataDirCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransientDataDir", reflect.TypeOf((*MockConfigSetter)(nil).TransientDataDir)) + return &MockConfigSetterTransientDataDirCall{Call: call} +} + +// MockConfigSetterTransientDataDirCall wrap *gomock.Call +type MockConfigSetterTransientDataDirCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterTransientDataDirCall) Return(arg0 string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterTransientDataDirCall) Do(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterTransientDataDirCall) DoAndReturn(f func() string) *MockConfigSetterTransientDataDirCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpgradedToVersion mocks base method. @@ -1297,9 +3385,33 @@ func (m *MockConfigSetter) UpgradedToVersion() version.Number { } // UpgradedToVersion indicates an expected call of UpgradedToVersion. -func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *gomock.Call { +func (mr *MockConfigSetterMockRecorder) UpgradedToVersion() *MockConfigSetterUpgradedToVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradedToVersion", reflect.TypeOf((*MockConfigSetter)(nil).UpgradedToVersion)) + return &MockConfigSetterUpgradedToVersionCall{Call: call} +} + +// MockConfigSetterUpgradedToVersionCall wrap *gomock.Call +type MockConfigSetterUpgradedToVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterUpgradedToVersionCall) Return(arg0 version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterUpgradedToVersionCall) Do(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterUpgradedToVersionCall) DoAndReturn(f func() version.Number) *MockConfigSetterUpgradedToVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -1311,9 +3423,33 @@ func (m *MockConfigSetter) Value(arg0 string) string { } // Value indicates an expected call of Value. -func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) Value(arg0 any) *MockConfigSetterValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockConfigSetter)(nil).Value), arg0) + return &MockConfigSetterValueCall{Call: call} +} + +// MockConfigSetterValueCall wrap *gomock.Call +type MockConfigSetterValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterValueCall) Return(arg0 string) *MockConfigSetterValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterValueCall) Do(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterValueCall) DoAndReturn(f func(string) string) *MockConfigSetterValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WriteCommands mocks base method. @@ -1326,7 +3462,31 @@ func (m *MockConfigSetter) WriteCommands(arg0 shell.Renderer) ([]string, error) } // WriteCommands indicates an expected call of WriteCommands. -func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *gomock.Call { +func (mr *MockConfigSetterMockRecorder) WriteCommands(arg0 any) *MockConfigSetterWriteCommandsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteCommands", reflect.TypeOf((*MockConfigSetter)(nil).WriteCommands), arg0) + return &MockConfigSetterWriteCommandsCall{Call: call} +} + +// MockConfigSetterWriteCommandsCall wrap *gomock.Call +type MockConfigSetterWriteCommandsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockConfigSetterWriteCommandsCall) Return(arg0 []string, arg1 error) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockConfigSetterWriteCommandsCall) Do(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockConfigSetterWriteCommandsCall) DoAndReturn(f func(shell.Renderer) ([]string, error)) *MockConfigSetterWriteCommandsCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradestepsmachine/api_mock_test.go b/internal/worker/upgradestepsmachine/api_mock_test.go index 59273531ecb..a2751571f40 100644 --- a/internal/worker/upgradestepsmachine/api_mock_test.go +++ b/internal/worker/upgradestepsmachine/api_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradestepsmachine -destination api_mock_test.go github.com/juju/juju/api/base APICaller +// mockgen -typed -package upgradestepsmachine -destination api_mock_test.go github.com/juju/juju/api/base APICaller // // Package upgradestepsmachine is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockAPICaller) APICall(arg0 context.Context, arg1 string, arg2 int, arg } // APICall indicates an expected call of APICall. -func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockAPICallerAPICallCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return &MockAPICallerAPICallCall{Call: call} +} + +// MockAPICallerAPICallCall wrap *gomock.Call +type MockAPICallerAPICallCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerAPICallCall) Return(arg0 error) *MockAPICallerAPICallCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerAPICallCall) Do(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerAPICallCall) DoAndReturn(f func(context.Context, string, int, string, string, any, any) error) *MockAPICallerAPICallCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BakeryClient mocks base method. @@ -67,9 +91,33 @@ func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger { } // BakeryClient indicates an expected call of BakeryClient. -func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) BakeryClient() *MockAPICallerBakeryClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient)) + return &MockAPICallerBakeryClientCall{Call: call} +} + +// MockAPICallerBakeryClientCall wrap *gomock.Call +type MockAPICallerBakeryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBakeryClientCall) Return(arg0 base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBakeryClientCall) Do(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBakeryClientCall) DoAndReturn(f func() base.MacaroonDischarger) *MockAPICallerBakeryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BestFacadeVersion mocks base method. @@ -81,9 +129,33 @@ func (m *MockAPICaller) BestFacadeVersion(arg0 string) int { } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *MockAPICallerBestFacadeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0) + return &MockAPICallerBestFacadeVersionCall{Call: call} +} + +// MockAPICallerBestFacadeVersionCall wrap *gomock.Call +type MockAPICallerBestFacadeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerBestFacadeVersionCall) Return(arg0 int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerBestFacadeVersionCall) Do(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerBestFacadeVersionCall) DoAndReturn(f func(string) int) *MockAPICallerBestFacadeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectControllerStream mocks base method. @@ -96,9 +168,33 @@ func (m *MockAPICaller) ConnectControllerStream(arg0 context.Context, arg1 strin } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2, arg3 any) *MockAPICallerConnectControllerStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2, arg3) + return &MockAPICallerConnectControllerStreamCall{Call: call} +} + +// MockAPICallerConnectControllerStreamCall wrap *gomock.Call +type MockAPICallerConnectControllerStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectControllerStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectControllerStreamCall) Do(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectControllerStreamCall) DoAndReturn(f func(context.Context, string, url.Values, http.Header) (base.Stream, error)) *MockAPICallerConnectControllerStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConnectStream mocks base method. @@ -111,9 +207,33 @@ func (m *MockAPICaller) ConnectStream(arg0 context.Context, arg1 string, arg2 ur } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1, arg2 any) *MockAPICallerConnectStreamCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1, arg2) + return &MockAPICallerConnectStreamCall{Call: call} +} + +// MockAPICallerConnectStreamCall wrap *gomock.Call +type MockAPICallerConnectStreamCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerConnectStreamCall) Return(arg0 base.Stream, arg1 error) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerConnectStreamCall) Do(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerConnectStreamCall) DoAndReturn(f func(context.Context, string, url.Values) (base.Stream, error)) *MockAPICallerConnectStreamCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HTTPClient mocks base method. @@ -126,9 +246,33 @@ func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) { } // HTTPClient indicates an expected call of HTTPClient. -func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) HTTPClient() *MockAPICallerHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient)) + return &MockAPICallerHTTPClientCall{Call: call} +} + +// MockAPICallerHTTPClientCall wrap *gomock.Call +type MockAPICallerHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ModelTag mocks base method. @@ -141,9 +285,33 @@ func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) { } // ModelTag indicates an expected call of ModelTag. -func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call { +func (mr *MockAPICallerMockRecorder) ModelTag() *MockAPICallerModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag)) + return &MockAPICallerModelTagCall{Call: call} +} + +// MockAPICallerModelTagCall wrap *gomock.Call +type MockAPICallerModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerModelTagCall) Return(arg0 names.ModelTag, arg1 bool) *MockAPICallerModelTagCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerModelTagCall) Do(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerModelTagCall) DoAndReturn(f func() (names.ModelTag, bool)) *MockAPICallerModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RootHTTPClient mocks base method. @@ -156,7 +324,31 @@ func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) { } // RootHTTPClient indicates an expected call of RootHTTPClient. -func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call { +func (mr *MockAPICallerMockRecorder) RootHTTPClient() *MockAPICallerRootHTTPClientCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient)) + return &MockAPICallerRootHTTPClientCall{Call: call} +} + +// MockAPICallerRootHTTPClientCall wrap *gomock.Call +type MockAPICallerRootHTTPClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAPICallerRootHTTPClientCall) Return(arg0 *httprequest.Client, arg1 error) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAPICallerRootHTTPClientCall) Do(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAPICallerRootHTTPClientCall) DoAndReturn(f func() (*httprequest.Client, error)) *MockAPICallerRootHTTPClientCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradestepsmachine/clock_mock_test.go b/internal/worker/upgradestepsmachine/clock_mock_test.go index dcace0e674a..5a5449a25a7 100644 --- a/internal/worker/upgradestepsmachine/clock_mock_test.go +++ b/internal/worker/upgradestepsmachine/clock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradestepsmachine -destination clock_mock_test.go github.com/juju/clock Clock +// mockgen -typed -package upgradestepsmachine -destination clock_mock_test.go github.com/juju/clock Clock // // Package upgradestepsmachine is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradestepsmachine/lock_mock_test.go b/internal/worker/upgradestepsmachine/lock_mock_test.go index d2992826a84..dcb058af101 100644 --- a/internal/worker/upgradestepsmachine/lock_mock_test.go +++ b/internal/worker/upgradestepsmachine/lock_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradestepsmachine -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +// mockgen -typed -package upgradestepsmachine -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock // // Package upgradestepsmachine is a generated GoMock package. @@ -47,9 +47,33 @@ func (m *MockLock) IsUnlocked() bool { } // IsUnlocked indicates an expected call of IsUnlocked. -func (mr *MockLockMockRecorder) IsUnlocked() *gomock.Call { +func (mr *MockLockMockRecorder) IsUnlocked() *MockLockIsUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnlocked", reflect.TypeOf((*MockLock)(nil).IsUnlocked)) + return &MockLockIsUnlockedCall{Call: call} +} + +// MockLockIsUnlockedCall wrap *gomock.Call +type MockLockIsUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockIsUnlockedCall) Return(arg0 bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockIsUnlockedCall) Do(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockIsUnlockedCall) DoAndReturn(f func() bool) *MockLockIsUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlock mocks base method. @@ -59,9 +83,33 @@ func (m *MockLock) Unlock() { } // Unlock indicates an expected call of Unlock. -func (mr *MockLockMockRecorder) Unlock() *gomock.Call { +func (mr *MockLockMockRecorder) Unlock() *MockLockUnlockCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockLock)(nil).Unlock)) + return &MockLockUnlockCall{Call: call} +} + +// MockLockUnlockCall wrap *gomock.Call +type MockLockUnlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockCall) Return() *MockLockUnlockCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockCall) Do(f func()) *MockLockUnlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockCall) DoAndReturn(f func()) *MockLockUnlockCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unlocked mocks base method. @@ -73,7 +121,31 @@ func (m *MockLock) Unlocked() <-chan struct{} { } // Unlocked indicates an expected call of Unlocked. -func (mr *MockLockMockRecorder) Unlocked() *gomock.Call { +func (mr *MockLockMockRecorder) Unlocked() *MockLockUnlockedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlocked", reflect.TypeOf((*MockLock)(nil).Unlocked)) + return &MockLockUnlockedCall{Call: call} +} + +// MockLockUnlockedCall wrap *gomock.Call +type MockLockUnlockedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockLockUnlockedCall) Return(arg0 <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockLockUnlockedCall) Do(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockLockUnlockedCall) DoAndReturn(f func() <-chan struct{}) *MockLockUnlockedCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/internal/worker/upgradestepsmachine/package_test.go b/internal/worker/upgradestepsmachine/package_test.go index 0f89493f27e..a60f4968d0e 100644 --- a/internal/worker/upgradestepsmachine/package_test.go +++ b/internal/worker/upgradestepsmachine/package_test.go @@ -20,11 +20,11 @@ import ( jujutesting "github.com/juju/juju/testing" ) -//go:generate go run go.uber.org/mock/mockgen -package upgradestepsmachine -destination clock_mock_test.go github.com/juju/clock Clock -//go:generate go run go.uber.org/mock/mockgen -package upgradestepsmachine -destination api_mock_test.go github.com/juju/juju/api/base APICaller -//go:generate go run go.uber.org/mock/mockgen -package upgradestepsmachine -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock -//go:generate go run go.uber.org/mock/mockgen -package upgradestepsmachine -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter -//go:generate go run go.uber.org/mock/mockgen -package upgradestepsmachine -destination status_mock_test.go github.com/juju/juju/internal/worker/upgradestepsmachine StatusSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradestepsmachine -destination clock_mock_test.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradestepsmachine -destination api_mock_test.go github.com/juju/juju/api/base APICaller +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradestepsmachine -destination lock_mock_test.go github.com/juju/juju/internal/worker/gate Lock +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradestepsmachine -destination agent_mock_test.go github.com/juju/juju/agent Agent,Config,ConfigSetter +//go:generate go run go.uber.org/mock/mockgen -typed -package upgradestepsmachine -destination status_mock_test.go github.com/juju/juju/internal/worker/upgradestepsmachine StatusSetter func TestAll(t *stdtesting.T) { gc.TestingT(t) diff --git a/internal/worker/upgradestepsmachine/status_mock_test.go b/internal/worker/upgradestepsmachine/status_mock_test.go index 6b7fd67723c..c1371caec85 100644 --- a/internal/worker/upgradestepsmachine/status_mock_test.go +++ b/internal/worker/upgradestepsmachine/status_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package upgradestepsmachine -destination status_mock_test.go github.com/juju/juju/internal/worker/upgradestepsmachine StatusSetter +// mockgen -typed -package upgradestepsmachine -destination status_mock_test.go github.com/juju/juju/internal/worker/upgradestepsmachine StatusSetter // // Package upgradestepsmachine is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockStatusSetter) SetStatus(arg0 status.Status, arg1 string, arg2 map[s } // SetStatus indicates an expected call of SetStatus. -func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatusSetterMockRecorder) SetStatus(arg0, arg1, arg2 any) *MockStatusSetterSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockStatusSetter)(nil).SetStatus), arg0, arg1, arg2) + return &MockStatusSetterSetStatusCall{Call: call} +} + +// MockStatusSetterSetStatusCall wrap *gomock.Call +type MockStatusSetterSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusSetterSetStatusCall) Return(arg0 error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusSetterSetStatusCall) Do(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusSetterSetStatusCall) DoAndReturn(f func(status.Status, string, map[string]any) error) *MockStatusSetterSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/jujuclient/package_test.go b/jujuclient/package_test.go index 78a831b66d9..7b2f8fbd0b1 100644 --- a/jujuclient/package_test.go +++ b/jujuclient/package_test.go @@ -9,7 +9,7 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package jujuclient_test -destination proxy_mock_test.go github.com/juju/juju/jujuclient ProxyFactory +//go:generate go run go.uber.org/mock/mockgen -typed -package jujuclient_test -destination proxy_mock_test.go github.com/juju/juju/jujuclient ProxyFactory func TestPackage(t *stdtesting.T) { gc.TestingT(t) diff --git a/jujuclient/proxy_mock_test.go b/jujuclient/proxy_mock_test.go index 0601b224d96..af14eda8c56 100644 --- a/jujuclient/proxy_mock_test.go +++ b/jujuclient/proxy_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package jujuclient_test -destination proxy_mock_test.go github.com/juju/juju/jujuclient ProxyFactory +// mockgen -typed -package jujuclient_test -destination proxy_mock_test.go github.com/juju/juju/jujuclient ProxyFactory // // Package jujuclient_test is a generated GoMock package. @@ -49,7 +49,31 @@ func (m *MockProxyFactory) ProxierFromConfig(arg0 string, arg1 map[string]any) ( } // ProxierFromConfig indicates an expected call of ProxierFromConfig. -func (mr *MockProxyFactoryMockRecorder) ProxierFromConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockProxyFactoryMockRecorder) ProxierFromConfig(arg0, arg1 any) *MockProxyFactoryProxierFromConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxierFromConfig", reflect.TypeOf((*MockProxyFactory)(nil).ProxierFromConfig), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProxierFromConfig", reflect.TypeOf((*MockProxyFactory)(nil).ProxierFromConfig), arg0, arg1) + return &MockProxyFactoryProxierFromConfigCall{Call: call} +} + +// MockProxyFactoryProxierFromConfigCall wrap *gomock.Call +type MockProxyFactoryProxierFromConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProxyFactoryProxierFromConfigCall) Return(arg0 proxy.Proxier, arg1 error) *MockProxyFactoryProxierFromConfigCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProxyFactoryProxierFromConfigCall) Do(f func(string, map[string]any) (proxy.Proxier, error)) *MockProxyFactoryProxierFromConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProxyFactoryProxierFromConfigCall) DoAndReturn(f func(string, map[string]any) (proxy.Proxier, error)) *MockProxyFactoryProxierFromConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/backend.go b/state/backend.go index e25d774464f..cbb76c877e9 100644 --- a/state/backend.go +++ b/state/backend.go @@ -12,7 +12,7 @@ import ( "github.com/juju/juju/state/watcher" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state/watcher BaseWatcher +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state/watcher BaseWatcher // modelBackend collects together some useful internal state methods for // accessing mongo and mapping local and global ids to one another. diff --git a/state/database.go b/state/database.go index ba78cdcc421..b68fb12bb17 100644 --- a/state/database.go +++ b/state/database.go @@ -28,10 +28,10 @@ type SessionCloser func() func dontCloseAnything() {} -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/database_mock.go github.com/juju/juju/state Database -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/mongo_mock.go github.com/juju/juju/internal/mongo Collection,Query -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/txn_mock.go github.com/juju/txn/v3 Runner -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/database_mock.go github.com/juju/juju/state Database +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/mongo_mock.go github.com/juju/juju/internal/mongo Collection,Query +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/txn_mock.go github.com/juju/txn/v3 Runner +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock // Database exposes the mongodb capabilities that most of state should see. type Database interface { diff --git a/state/migration_description_mock_test.go b/state/migration_description_mock_test.go index aa1c3df608e..4f3930b7eaf 100644 --- a/state/migration_description_mock_test.go +++ b/state/migration_description_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package state -destination migration_description_mock_test.go github.com/juju/description/v6 ApplicationOffer,FirewallRule,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status +// mockgen -typed -package state -destination migration_description_mock_test.go github.com/juju/description/v6 ApplicationOffer,FirewallRule,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status // // Package state is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockApplicationOffer) ACL() map[string]string { } // ACL indicates an expected call of ACL. -func (mr *MockApplicationOfferMockRecorder) ACL() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) ACL() *MockApplicationOfferACLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACL", reflect.TypeOf((*MockApplicationOffer)(nil).ACL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACL", reflect.TypeOf((*MockApplicationOffer)(nil).ACL)) + return &MockApplicationOfferACLCall{Call: call} +} + +// MockApplicationOfferACLCall wrap *gomock.Call +type MockApplicationOfferACLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferACLCall) Return(arg0 map[string]string) *MockApplicationOfferACLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferACLCall) Do(f func() map[string]string) *MockApplicationOfferACLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferACLCall) DoAndReturn(f func() map[string]string) *MockApplicationOfferACLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationDescription mocks base method. @@ -64,9 +88,33 @@ func (m *MockApplicationOffer) ApplicationDescription() string { } // ApplicationDescription indicates an expected call of ApplicationDescription. -func (mr *MockApplicationOfferMockRecorder) ApplicationDescription() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) ApplicationDescription() *MockApplicationOfferApplicationDescriptionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationDescription", reflect.TypeOf((*MockApplicationOffer)(nil).ApplicationDescription)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationDescription", reflect.TypeOf((*MockApplicationOffer)(nil).ApplicationDescription)) + return &MockApplicationOfferApplicationDescriptionCall{Call: call} +} + +// MockApplicationOfferApplicationDescriptionCall wrap *gomock.Call +type MockApplicationOfferApplicationDescriptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferApplicationDescriptionCall) Return(arg0 string) *MockApplicationOfferApplicationDescriptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferApplicationDescriptionCall) Do(f func() string) *MockApplicationOfferApplicationDescriptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferApplicationDescriptionCall) DoAndReturn(f func() string) *MockApplicationOfferApplicationDescriptionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationName mocks base method. @@ -78,9 +126,33 @@ func (m *MockApplicationOffer) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockApplicationOfferMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) ApplicationName() *MockApplicationOfferApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockApplicationOffer)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockApplicationOffer)(nil).ApplicationName)) + return &MockApplicationOfferApplicationNameCall{Call: call} +} + +// MockApplicationOfferApplicationNameCall wrap *gomock.Call +type MockApplicationOfferApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferApplicationNameCall) Return(arg0 string) *MockApplicationOfferApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferApplicationNameCall) Do(f func() string) *MockApplicationOfferApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferApplicationNameCall) DoAndReturn(f func() string) *MockApplicationOfferApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -92,9 +164,33 @@ func (m *MockApplicationOffer) Endpoints() map[string]string { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockApplicationOfferMockRecorder) Endpoints() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) Endpoints() *MockApplicationOfferEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplicationOffer)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockApplicationOffer)(nil).Endpoints)) + return &MockApplicationOfferEndpointsCall{Call: call} +} + +// MockApplicationOfferEndpointsCall wrap *gomock.Call +type MockApplicationOfferEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferEndpointsCall) Return(arg0 map[string]string) *MockApplicationOfferEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferEndpointsCall) Do(f func() map[string]string) *MockApplicationOfferEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferEndpointsCall) DoAndReturn(f func() map[string]string) *MockApplicationOfferEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferName mocks base method. @@ -106,9 +202,33 @@ func (m *MockApplicationOffer) OfferName() string { } // OfferName indicates an expected call of OfferName. -func (mr *MockApplicationOfferMockRecorder) OfferName() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) OfferName() *MockApplicationOfferOfferNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferName", reflect.TypeOf((*MockApplicationOffer)(nil).OfferName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferName", reflect.TypeOf((*MockApplicationOffer)(nil).OfferName)) + return &MockApplicationOfferOfferNameCall{Call: call} +} + +// MockApplicationOfferOfferNameCall wrap *gomock.Call +type MockApplicationOfferOfferNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferOfferNameCall) Return(arg0 string) *MockApplicationOfferOfferNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferOfferNameCall) Do(f func() string) *MockApplicationOfferOfferNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferOfferNameCall) DoAndReturn(f func() string) *MockApplicationOfferOfferNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUID mocks base method. @@ -120,9 +240,33 @@ func (m *MockApplicationOffer) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockApplicationOfferMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockApplicationOfferMockRecorder) OfferUUID() *MockApplicationOfferOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockApplicationOffer)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockApplicationOffer)(nil).OfferUUID)) + return &MockApplicationOfferOfferUUIDCall{Call: call} +} + +// MockApplicationOfferOfferUUIDCall wrap *gomock.Call +type MockApplicationOfferOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferOfferUUIDCall) Return(arg0 string) *MockApplicationOfferOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferOfferUUIDCall) Do(f func() string) *MockApplicationOfferOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferOfferUUIDCall) DoAndReturn(f func() string) *MockApplicationOfferOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewallRule is a mock of FirewallRule interface. @@ -157,9 +301,33 @@ func (m *MockFirewallRule) ID() string { } // ID indicates an expected call of ID. -func (mr *MockFirewallRuleMockRecorder) ID() *gomock.Call { +func (mr *MockFirewallRuleMockRecorder) ID() *MockFirewallRuleIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFirewallRule)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFirewallRule)(nil).ID)) + return &MockFirewallRuleIDCall{Call: call} +} + +// MockFirewallRuleIDCall wrap *gomock.Call +type MockFirewallRuleIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRuleIDCall) Return(arg0 string) *MockFirewallRuleIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRuleIDCall) Do(f func() string) *MockFirewallRuleIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRuleIDCall) DoAndReturn(f func() string) *MockFirewallRuleIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WellKnownService mocks base method. @@ -171,9 +339,33 @@ func (m *MockFirewallRule) WellKnownService() string { } // WellKnownService indicates an expected call of WellKnownService. -func (mr *MockFirewallRuleMockRecorder) WellKnownService() *gomock.Call { +func (mr *MockFirewallRuleMockRecorder) WellKnownService() *MockFirewallRuleWellKnownServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WellKnownService", reflect.TypeOf((*MockFirewallRule)(nil).WellKnownService)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WellKnownService", reflect.TypeOf((*MockFirewallRule)(nil).WellKnownService)) + return &MockFirewallRuleWellKnownServiceCall{Call: call} +} + +// MockFirewallRuleWellKnownServiceCall wrap *gomock.Call +type MockFirewallRuleWellKnownServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRuleWellKnownServiceCall) Return(arg0 string) *MockFirewallRuleWellKnownServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRuleWellKnownServiceCall) Do(f func() string) *MockFirewallRuleWellKnownServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRuleWellKnownServiceCall) DoAndReturn(f func() string) *MockFirewallRuleWellKnownServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WhitelistCIDRs mocks base method. @@ -185,9 +377,33 @@ func (m *MockFirewallRule) WhitelistCIDRs() []string { } // WhitelistCIDRs indicates an expected call of WhitelistCIDRs. -func (mr *MockFirewallRuleMockRecorder) WhitelistCIDRs() *gomock.Call { +func (mr *MockFirewallRuleMockRecorder) WhitelistCIDRs() *MockFirewallRuleWhitelistCIDRsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WhitelistCIDRs", reflect.TypeOf((*MockFirewallRule)(nil).WhitelistCIDRs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WhitelistCIDRs", reflect.TypeOf((*MockFirewallRule)(nil).WhitelistCIDRs)) + return &MockFirewallRuleWhitelistCIDRsCall{Call: call} +} + +// MockFirewallRuleWhitelistCIDRsCall wrap *gomock.Call +type MockFirewallRuleWhitelistCIDRsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRuleWhitelistCIDRsCall) Return(arg0 []string) *MockFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRuleWhitelistCIDRsCall) Do(f func() []string) *MockFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRuleWhitelistCIDRsCall) DoAndReturn(f func() []string) *MockFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteEntity is a mock of RemoteEntity interface. @@ -222,9 +438,33 @@ func (m *MockRemoteEntity) ID() string { } // ID indicates an expected call of ID. -func (mr *MockRemoteEntityMockRecorder) ID() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) ID() *MockRemoteEntityIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRemoteEntity)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRemoteEntity)(nil).ID)) + return &MockRemoteEntityIDCall{Call: call} +} + +// MockRemoteEntityIDCall wrap *gomock.Call +type MockRemoteEntityIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityIDCall) Return(arg0 string) *MockRemoteEntityIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityIDCall) Do(f func() string) *MockRemoteEntityIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityIDCall) DoAndReturn(f func() string) *MockRemoteEntityIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -236,9 +476,33 @@ func (m *MockRemoteEntity) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockRemoteEntityMockRecorder) Macaroon() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) Macaroon() *MockRemoteEntityMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteEntity)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteEntity)(nil).Macaroon)) + return &MockRemoteEntityMacaroonCall{Call: call} +} + +// MockRemoteEntityMacaroonCall wrap *gomock.Call +type MockRemoteEntityMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityMacaroonCall) Return(arg0 string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityMacaroonCall) Do(f func() string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityMacaroonCall) DoAndReturn(f func() string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Token mocks base method. @@ -250,9 +514,33 @@ func (m *MockRemoteEntity) Token() string { } // Token indicates an expected call of Token. -func (mr *MockRemoteEntityMockRecorder) Token() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) Token() *MockRemoteEntityTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockRemoteEntity)(nil).Token)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockRemoteEntity)(nil).Token)) + return &MockRemoteEntityTokenCall{Call: call} +} + +// MockRemoteEntityTokenCall wrap *gomock.Call +type MockRemoteEntityTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityTokenCall) Return(arg0 string) *MockRemoteEntityTokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityTokenCall) Do(f func() string) *MockRemoteEntityTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityTokenCall) DoAndReturn(f func() string) *MockRemoteEntityTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationNetwork is a mock of RelationNetwork interface. @@ -287,9 +575,33 @@ func (m *MockRelationNetwork) CIDRS() []string { } // CIDRS indicates an expected call of CIDRS. -func (mr *MockRelationNetworkMockRecorder) CIDRS() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) CIDRS() *MockRelationNetworkCIDRSCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockRelationNetwork)(nil).CIDRS)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockRelationNetwork)(nil).CIDRS)) + return &MockRelationNetworkCIDRSCall{Call: call} +} + +// MockRelationNetworkCIDRSCall wrap *gomock.Call +type MockRelationNetworkCIDRSCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkCIDRSCall) Return(arg0 []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkCIDRSCall) Do(f func() []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkCIDRSCall) DoAndReturn(f func() []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ID mocks base method. @@ -301,9 +613,33 @@ func (m *MockRelationNetwork) ID() string { } // ID indicates an expected call of ID. -func (mr *MockRelationNetworkMockRecorder) ID() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) ID() *MockRelationNetworkIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRelationNetwork)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRelationNetwork)(nil).ID)) + return &MockRelationNetworkIDCall{Call: call} +} + +// MockRelationNetworkIDCall wrap *gomock.Call +type MockRelationNetworkIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkIDCall) Return(arg0 string) *MockRelationNetworkIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkIDCall) Do(f func() string) *MockRelationNetworkIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkIDCall) DoAndReturn(f func() string) *MockRelationNetworkIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationKey mocks base method. @@ -315,9 +651,33 @@ func (m *MockRelationNetwork) RelationKey() string { } // RelationKey indicates an expected call of RelationKey. -func (mr *MockRelationNetworkMockRecorder) RelationKey() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) RelationKey() *MockRelationNetworkRelationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockRelationNetwork)(nil).RelationKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockRelationNetwork)(nil).RelationKey)) + return &MockRelationNetworkRelationKeyCall{Call: call} +} + +// MockRelationNetworkRelationKeyCall wrap *gomock.Call +type MockRelationNetworkRelationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkRelationKeyCall) Return(arg0 string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkRelationKeyCall) Do(f func() string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkRelationKeyCall) DoAndReturn(f func() string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplication is a mock of RemoteApplication interface. @@ -352,9 +712,33 @@ func (m *MockRemoteApplication) AddEndpoint(arg0 description.RemoteEndpointArgs) } // AddEndpoint indicates an expected call of AddEndpoint. -func (mr *MockRemoteApplicationMockRecorder) AddEndpoint(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) AddEndpoint(arg0 any) *MockRemoteApplicationAddEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoint", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoint", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoint), arg0) + return &MockRemoteApplicationAddEndpointCall{Call: call} +} + +// MockRemoteApplicationAddEndpointCall wrap *gomock.Call +type MockRemoteApplicationAddEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationAddEndpointCall) Return(arg0 description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationAddEndpointCall) Do(f func(description.RemoteEndpointArgs) description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationAddEndpointCall) DoAndReturn(f func(description.RemoteEndpointArgs) description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSpace mocks base method. @@ -366,9 +750,33 @@ func (m *MockRemoteApplication) AddSpace(arg0 description.RemoteSpaceArgs) descr } // AddSpace indicates an expected call of AddSpace. -func (mr *MockRemoteApplicationMockRecorder) AddSpace(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) AddSpace(arg0 any) *MockRemoteApplicationAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockRemoteApplication)(nil).AddSpace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockRemoteApplication)(nil).AddSpace), arg0) + return &MockRemoteApplicationAddSpaceCall{Call: call} +} + +// MockRemoteApplicationAddSpaceCall wrap *gomock.Call +type MockRemoteApplicationAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationAddSpaceCall) Return(arg0 description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationAddSpaceCall) Do(f func(description.RemoteSpaceArgs) description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationAddSpaceCall) DoAndReturn(f func(description.RemoteSpaceArgs) description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bindings mocks base method. @@ -380,9 +788,33 @@ func (m *MockRemoteApplication) Bindings() map[string]string { } // Bindings indicates an expected call of Bindings. -func (mr *MockRemoteApplicationMockRecorder) Bindings() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Bindings() *MockRemoteApplicationBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bindings", reflect.TypeOf((*MockRemoteApplication)(nil).Bindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bindings", reflect.TypeOf((*MockRemoteApplication)(nil).Bindings)) + return &MockRemoteApplicationBindingsCall{Call: call} +} + +// MockRemoteApplicationBindingsCall wrap *gomock.Call +type MockRemoteApplicationBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationBindingsCall) Return(arg0 map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationBindingsCall) Do(f func() map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationBindingsCall) DoAndReturn(f func() map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConsumeVersion mocks base method. @@ -394,9 +826,33 @@ func (m *MockRemoteApplication) ConsumeVersion() int { } // ConsumeVersion indicates an expected call of ConsumeVersion. -func (mr *MockRemoteApplicationMockRecorder) ConsumeVersion() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) ConsumeVersion() *MockRemoteApplicationConsumeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockRemoteApplication)(nil).ConsumeVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockRemoteApplication)(nil).ConsumeVersion)) + return &MockRemoteApplicationConsumeVersionCall{Call: call} +} + +// MockRemoteApplicationConsumeVersionCall wrap *gomock.Call +type MockRemoteApplicationConsumeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationConsumeVersionCall) Return(arg0 int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationConsumeVersionCall) Do(f func() int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationConsumeVersionCall) DoAndReturn(f func() int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -408,9 +864,33 @@ func (m *MockRemoteApplication) Endpoints() []description.RemoteEndpoint { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockRemoteApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Endpoints() *MockRemoteApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + return &MockRemoteApplicationEndpointsCall{Call: call} +} + +// MockRemoteApplicationEndpointsCall wrap *gomock.Call +type MockRemoteApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationEndpointsCall) Return(arg0 []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationEndpointsCall) Do(f func() []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationEndpointsCall) DoAndReturn(f func() []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsConsumerProxy mocks base method. @@ -422,9 +902,33 @@ func (m *MockRemoteApplication) IsConsumerProxy() bool { } // IsConsumerProxy indicates an expected call of IsConsumerProxy. -func (mr *MockRemoteApplicationMockRecorder) IsConsumerProxy() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) IsConsumerProxy() *MockRemoteApplicationIsConsumerProxyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockRemoteApplication)(nil).IsConsumerProxy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockRemoteApplication)(nil).IsConsumerProxy)) + return &MockRemoteApplicationIsConsumerProxyCall{Call: call} +} + +// MockRemoteApplicationIsConsumerProxyCall wrap *gomock.Call +type MockRemoteApplicationIsConsumerProxyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationIsConsumerProxyCall) Return(arg0 bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationIsConsumerProxyCall) Do(f func() bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationIsConsumerProxyCall) DoAndReturn(f func() bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -436,9 +940,33 @@ func (m *MockRemoteApplication) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockRemoteApplicationMockRecorder) Macaroon() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Macaroon() *MockRemoteApplicationMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteApplication)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteApplication)(nil).Macaroon)) + return &MockRemoteApplicationMacaroonCall{Call: call} +} + +// MockRemoteApplicationMacaroonCall wrap *gomock.Call +type MockRemoteApplicationMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationMacaroonCall) Return(arg0 string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationMacaroonCall) Do(f func() string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationMacaroonCall) DoAndReturn(f func() string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -450,9 +978,33 @@ func (m *MockRemoteApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockRemoteApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Name() *MockRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + return &MockRemoteApplicationNameCall{Call: call} +} + +// MockRemoteApplicationNameCall wrap *gomock.Call +type MockRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationNameCall) Return(arg0 string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationNameCall) Do(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationNameCall) DoAndReturn(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUID mocks base method. @@ -464,9 +1016,33 @@ func (m *MockRemoteApplication) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockRemoteApplicationMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) OfferUUID() *MockRemoteApplicationOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteApplication)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteApplication)(nil).OfferUUID)) + return &MockRemoteApplicationOfferUUIDCall{Call: call} +} + +// MockRemoteApplicationOfferUUIDCall wrap *gomock.Call +type MockRemoteApplicationOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationOfferUUIDCall) Return(arg0 string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationOfferUUIDCall) Do(f func() string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationOfferUUIDCall) DoAndReturn(f func() string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -476,9 +1052,33 @@ func (m *MockRemoteApplication) SetStatus(arg0 description.StatusArgs) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockRemoteApplicationMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) SetStatus(arg0 any) *MockRemoteApplicationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRemoteApplication)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRemoteApplication)(nil).SetStatus), arg0) + return &MockRemoteApplicationSetStatusCall{Call: call} +} + +// MockRemoteApplicationSetStatusCall wrap *gomock.Call +type MockRemoteApplicationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSetStatusCall) Return() *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSetStatusCall) Do(f func(description.StatusArgs)) *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSetStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModelTag mocks base method. @@ -490,9 +1090,33 @@ func (m *MockRemoteApplication) SourceModelTag() names.ModelTag { } // SourceModelTag indicates an expected call of SourceModelTag. -func (mr *MockRemoteApplicationMockRecorder) SourceModelTag() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) SourceModelTag() *MockRemoteApplicationSourceModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelTag", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelTag", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModelTag)) + return &MockRemoteApplicationSourceModelTagCall{Call: call} +} + +// MockRemoteApplicationSourceModelTagCall wrap *gomock.Call +type MockRemoteApplicationSourceModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSourceModelTagCall) Return(arg0 names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSourceModelTagCall) Do(f func() names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSourceModelTagCall) DoAndReturn(f func() names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -504,9 +1128,33 @@ func (m *MockRemoteApplication) Spaces() []description.RemoteSpace { } // Spaces indicates an expected call of Spaces. -func (mr *MockRemoteApplicationMockRecorder) Spaces() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Spaces() *MockRemoteApplicationSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockRemoteApplication)(nil).Spaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockRemoteApplication)(nil).Spaces)) + return &MockRemoteApplicationSpacesCall{Call: call} +} + +// MockRemoteApplicationSpacesCall wrap *gomock.Call +type MockRemoteApplicationSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSpacesCall) Return(arg0 []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSpacesCall) Do(f func() []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSpacesCall) DoAndReturn(f func() []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -518,9 +1166,33 @@ func (m *MockRemoteApplication) Status() description.Status { } // Status indicates an expected call of Status. -func (mr *MockRemoteApplicationMockRecorder) Status() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Status() *MockRemoteApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + return &MockRemoteApplicationStatusCall{Call: call} +} + +// MockRemoteApplicationStatusCall wrap *gomock.Call +type MockRemoteApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationStatusCall) Return(arg0 description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationStatusCall) Do(f func() description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationStatusCall) DoAndReturn(f func() description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -532,9 +1204,33 @@ func (m *MockRemoteApplication) Tag() names.ApplicationTag { } // Tag indicates an expected call of Tag. -func (mr *MockRemoteApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Tag() *MockRemoteApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRemoteApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRemoteApplication)(nil).Tag)) + return &MockRemoteApplicationTagCall{Call: call} +} + +// MockRemoteApplicationTagCall wrap *gomock.Call +type MockRemoteApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationTagCall) Return(arg0 names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationTagCall) Do(f func() names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -546,9 +1242,33 @@ func (m *MockRemoteApplication) URL() string { } // URL indicates an expected call of URL. -func (mr *MockRemoteApplicationMockRecorder) URL() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) URL() *MockRemoteApplicationURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockRemoteApplication)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockRemoteApplication)(nil).URL)) + return &MockRemoteApplicationURLCall{Call: call} +} + +// MockRemoteApplicationURLCall wrap *gomock.Call +type MockRemoteApplicationURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationURLCall) Return(arg0 string) *MockRemoteApplicationURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationURLCall) Do(f func() string) *MockRemoteApplicationURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationURLCall) DoAndReturn(f func() string) *MockRemoteApplicationURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteSpace is a mock of RemoteSpace interface. @@ -583,9 +1303,33 @@ func (m *MockRemoteSpace) AddSubnet(arg0 description.SubnetArgs) description.Sub } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockRemoteSpaceMockRecorder) AddSubnet(arg0 any) *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) AddSubnet(arg0 any) *MockRemoteSpaceAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockRemoteSpace)(nil).AddSubnet), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockRemoteSpace)(nil).AddSubnet), arg0) + return &MockRemoteSpaceAddSubnetCall{Call: call} +} + +// MockRemoteSpaceAddSubnetCall wrap *gomock.Call +type MockRemoteSpaceAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceAddSubnetCall) Return(arg0 description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceAddSubnetCall) Do(f func(description.SubnetArgs) description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceAddSubnetCall) DoAndReturn(f func(description.SubnetArgs) description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudType mocks base method. @@ -597,9 +1341,33 @@ func (m *MockRemoteSpace) CloudType() string { } // CloudType indicates an expected call of CloudType. -func (mr *MockRemoteSpaceMockRecorder) CloudType() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) CloudType() *MockRemoteSpaceCloudTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudType", reflect.TypeOf((*MockRemoteSpace)(nil).CloudType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudType", reflect.TypeOf((*MockRemoteSpace)(nil).CloudType)) + return &MockRemoteSpaceCloudTypeCall{Call: call} +} + +// MockRemoteSpaceCloudTypeCall wrap *gomock.Call +type MockRemoteSpaceCloudTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceCloudTypeCall) Return(arg0 string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceCloudTypeCall) Do(f func() string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceCloudTypeCall) DoAndReturn(f func() string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -611,9 +1379,33 @@ func (m *MockRemoteSpace) Name() string { } // Name indicates an expected call of Name. -func (mr *MockRemoteSpaceMockRecorder) Name() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) Name() *MockRemoteSpaceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteSpace)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteSpace)(nil).Name)) + return &MockRemoteSpaceNameCall{Call: call} +} + +// MockRemoteSpaceNameCall wrap *gomock.Call +type MockRemoteSpaceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceNameCall) Return(arg0 string) *MockRemoteSpaceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceNameCall) Do(f func() string) *MockRemoteSpaceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceNameCall) DoAndReturn(f func() string) *MockRemoteSpaceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderAttributes mocks base method. @@ -625,9 +1417,33 @@ func (m *MockRemoteSpace) ProviderAttributes() map[string]any { } // ProviderAttributes indicates an expected call of ProviderAttributes. -func (mr *MockRemoteSpaceMockRecorder) ProviderAttributes() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) ProviderAttributes() *MockRemoteSpaceProviderAttributesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAttributes", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderAttributes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAttributes", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderAttributes)) + return &MockRemoteSpaceProviderAttributesCall{Call: call} +} + +// MockRemoteSpaceProviderAttributesCall wrap *gomock.Call +type MockRemoteSpaceProviderAttributesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceProviderAttributesCall) Return(arg0 map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceProviderAttributesCall) Do(f func() map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceProviderAttributesCall) DoAndReturn(f func() map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderId mocks base method. @@ -639,9 +1455,33 @@ func (m *MockRemoteSpace) ProviderId() string { } // ProviderId indicates an expected call of ProviderId. -func (mr *MockRemoteSpaceMockRecorder) ProviderId() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) ProviderId() *MockRemoteSpaceProviderIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderId)) + return &MockRemoteSpaceProviderIdCall{Call: call} +} + +// MockRemoteSpaceProviderIdCall wrap *gomock.Call +type MockRemoteSpaceProviderIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceProviderIdCall) Return(arg0 string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceProviderIdCall) Do(f func() string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceProviderIdCall) DoAndReturn(f func() string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -653,9 +1493,33 @@ func (m *MockRemoteSpace) Subnets() []description.Subnet { } // Subnets indicates an expected call of Subnets. -func (mr *MockRemoteSpaceMockRecorder) Subnets() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) Subnets() *MockRemoteSpaceSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockRemoteSpace)(nil).Subnets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockRemoteSpace)(nil).Subnets)) + return &MockRemoteSpaceSubnetsCall{Call: call} +} + +// MockRemoteSpaceSubnetsCall wrap *gomock.Call +type MockRemoteSpaceSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceSubnetsCall) Return(arg0 []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceSubnetsCall) Do(f func() []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceSubnetsCall) DoAndReturn(f func() []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStatus is a mock of Status interface. @@ -690,9 +1554,33 @@ func (m *MockStatus) Data() map[string]any { } // Data indicates an expected call of Data. -func (mr *MockStatusMockRecorder) Data() *gomock.Call { +func (mr *MockStatusMockRecorder) Data() *MockStatusDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockStatus)(nil).Data)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockStatus)(nil).Data)) + return &MockStatusDataCall{Call: call} +} + +// MockStatusDataCall wrap *gomock.Call +type MockStatusDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusDataCall) Return(arg0 map[string]any) *MockStatusDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusDataCall) Do(f func() map[string]any) *MockStatusDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusDataCall) DoAndReturn(f func() map[string]any) *MockStatusDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Message mocks base method. @@ -704,9 +1592,33 @@ func (m *MockStatus) Message() string { } // Message indicates an expected call of Message. -func (mr *MockStatusMockRecorder) Message() *gomock.Call { +func (mr *MockStatusMockRecorder) Message() *MockStatusMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockStatus)(nil).Message)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockStatus)(nil).Message)) + return &MockStatusMessageCall{Call: call} +} + +// MockStatusMessageCall wrap *gomock.Call +type MockStatusMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusMessageCall) Return(arg0 string) *MockStatusMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusMessageCall) Do(f func() string) *MockStatusMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusMessageCall) DoAndReturn(f func() string) *MockStatusMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NeverSet mocks base method. @@ -718,9 +1630,33 @@ func (m *MockStatus) NeverSet() bool { } // NeverSet indicates an expected call of NeverSet. -func (mr *MockStatusMockRecorder) NeverSet() *gomock.Call { +func (mr *MockStatusMockRecorder) NeverSet() *MockStatusNeverSetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeverSet", reflect.TypeOf((*MockStatus)(nil).NeverSet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeverSet", reflect.TypeOf((*MockStatus)(nil).NeverSet)) + return &MockStatusNeverSetCall{Call: call} +} + +// MockStatusNeverSetCall wrap *gomock.Call +type MockStatusNeverSetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusNeverSetCall) Return(arg0 bool) *MockStatusNeverSetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusNeverSetCall) Do(f func() bool) *MockStatusNeverSetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusNeverSetCall) DoAndReturn(f func() bool) *MockStatusNeverSetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Updated mocks base method. @@ -732,9 +1668,33 @@ func (m *MockStatus) Updated() time.Time { } // Updated indicates an expected call of Updated. -func (mr *MockStatusMockRecorder) Updated() *gomock.Call { +func (mr *MockStatusMockRecorder) Updated() *MockStatusUpdatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updated", reflect.TypeOf((*MockStatus)(nil).Updated)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updated", reflect.TypeOf((*MockStatus)(nil).Updated)) + return &MockStatusUpdatedCall{Call: call} +} + +// MockStatusUpdatedCall wrap *gomock.Call +type MockStatusUpdatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusUpdatedCall) Return(arg0 time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusUpdatedCall) Do(f func() time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusUpdatedCall) DoAndReturn(f func() time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -746,7 +1706,31 @@ func (m *MockStatus) Value() string { } // Value indicates an expected call of Value. -func (mr *MockStatusMockRecorder) Value() *gomock.Call { +func (mr *MockStatusMockRecorder) Value() *MockStatusValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockStatus)(nil).Value)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockStatus)(nil).Value)) + return &MockStatusValueCall{Call: call} +} + +// MockStatusValueCall wrap *gomock.Call +type MockStatusValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusValueCall) Return(arg0 string) *MockStatusValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusValueCall) Do(f func() string) *MockStatusValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusValueCall) DoAndReturn(f func() string) *MockStatusValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migration_import_input_mock_test.go b/state/migration_import_input_mock_test.go index e993dad2352..9dd52f804c5 100644 --- a/state/migration_import_input_mock_test.go +++ b/state/migration_import_input_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package state -destination migration_import_input_mock_test.go github.com/juju/juju/state RemoteEntitiesInput,RelationNetworksInput,RemoteApplicationsInput,ApplicationOfferStateDocumentFactory,ApplicationOfferInput,FirewallRulesInput,FirewallRulesOutput +// mockgen -typed -package state -destination migration_import_input_mock_test.go github.com/juju/juju/state RemoteEntitiesInput,RelationNetworksInput,RemoteApplicationsInput,ApplicationOfferStateDocumentFactory,ApplicationOfferInput,FirewallRulesInput,FirewallRulesOutput // // Package state is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockRemoteEntitiesInput) DocID(arg0 string) string { } // DocID indicates an expected call of DocID. -func (mr *MockRemoteEntitiesInputMockRecorder) DocID(arg0 any) *gomock.Call { +func (mr *MockRemoteEntitiesInputMockRecorder) DocID(arg0 any) *MockRemoteEntitiesInputDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).DocID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).DocID), arg0) + return &MockRemoteEntitiesInputDocIDCall{Call: call} +} + +// MockRemoteEntitiesInputDocIDCall wrap *gomock.Call +type MockRemoteEntitiesInputDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesInputDocIDCall) Return(arg0 string) *MockRemoteEntitiesInputDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesInputDocIDCall) Do(f func(string) string) *MockRemoteEntitiesInputDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesInputDocIDCall) DoAndReturn(f func(string) string) *MockRemoteEntitiesInputDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUID mocks base method. @@ -65,9 +89,33 @@ func (m *MockRemoteEntitiesInput) OfferUUID(arg0 string) (string, bool) { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockRemoteEntitiesInputMockRecorder) OfferUUID(arg0 any) *gomock.Call { +func (mr *MockRemoteEntitiesInputMockRecorder) OfferUUID(arg0 any) *MockRemoteEntitiesInputOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).OfferUUID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).OfferUUID), arg0) + return &MockRemoteEntitiesInputOfferUUIDCall{Call: call} +} + +// MockRemoteEntitiesInputOfferUUIDCall wrap *gomock.Call +type MockRemoteEntitiesInputOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesInputOfferUUIDCall) Return(arg0 string, arg1 bool) *MockRemoteEntitiesInputOfferUUIDCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesInputOfferUUIDCall) Do(f func(string) (string, bool)) *MockRemoteEntitiesInputOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesInputOfferUUIDCall) DoAndReturn(f func(string) (string, bool)) *MockRemoteEntitiesInputOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUIDForApp mocks base method. @@ -80,9 +128,33 @@ func (m *MockRemoteEntitiesInput) OfferUUIDForApp(arg0 string) (string, error) { } // OfferUUIDForApp indicates an expected call of OfferUUIDForApp. -func (mr *MockRemoteEntitiesInputMockRecorder) OfferUUIDForApp(arg0 any) *gomock.Call { +func (mr *MockRemoteEntitiesInputMockRecorder) OfferUUIDForApp(arg0 any) *MockRemoteEntitiesInputOfferUUIDForAppCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForApp", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).OfferUUIDForApp), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUIDForApp", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).OfferUUIDForApp), arg0) + return &MockRemoteEntitiesInputOfferUUIDForAppCall{Call: call} +} + +// MockRemoteEntitiesInputOfferUUIDForAppCall wrap *gomock.Call +type MockRemoteEntitiesInputOfferUUIDForAppCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesInputOfferUUIDForAppCall) Return(arg0 string, arg1 error) *MockRemoteEntitiesInputOfferUUIDForAppCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesInputOfferUUIDForAppCall) Do(f func(string) (string, error)) *MockRemoteEntitiesInputOfferUUIDForAppCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesInputOfferUUIDForAppCall) DoAndReturn(f func(string) (string, error)) *MockRemoteEntitiesInputOfferUUIDForAppCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteEntities mocks base method. @@ -94,9 +166,33 @@ func (m *MockRemoteEntitiesInput) RemoteEntities() []description.RemoteEntity { } // RemoteEntities indicates an expected call of RemoteEntities. -func (mr *MockRemoteEntitiesInputMockRecorder) RemoteEntities() *gomock.Call { +func (mr *MockRemoteEntitiesInputMockRecorder) RemoteEntities() *MockRemoteEntitiesInputRemoteEntitiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteEntities", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).RemoteEntities)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteEntities", reflect.TypeOf((*MockRemoteEntitiesInput)(nil).RemoteEntities)) + return &MockRemoteEntitiesInputRemoteEntitiesCall{Call: call} +} + +// MockRemoteEntitiesInputRemoteEntitiesCall wrap *gomock.Call +type MockRemoteEntitiesInputRemoteEntitiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesInputRemoteEntitiesCall) Return(arg0 []description.RemoteEntity) *MockRemoteEntitiesInputRemoteEntitiesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesInputRemoteEntitiesCall) Do(f func() []description.RemoteEntity) *MockRemoteEntitiesInputRemoteEntitiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesInputRemoteEntitiesCall) DoAndReturn(f func() []description.RemoteEntity) *MockRemoteEntitiesInputRemoteEntitiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationNetworksInput is a mock of RelationNetworksInput interface. @@ -131,9 +227,33 @@ func (m *MockRelationNetworksInput) DocID(arg0 string) string { } // DocID indicates an expected call of DocID. -func (mr *MockRelationNetworksInputMockRecorder) DocID(arg0 any) *gomock.Call { +func (mr *MockRelationNetworksInputMockRecorder) DocID(arg0 any) *MockRelationNetworksInputDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRelationNetworksInput)(nil).DocID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRelationNetworksInput)(nil).DocID), arg0) + return &MockRelationNetworksInputDocIDCall{Call: call} +} + +// MockRelationNetworksInputDocIDCall wrap *gomock.Call +type MockRelationNetworksInputDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworksInputDocIDCall) Return(arg0 string) *MockRelationNetworksInputDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworksInputDocIDCall) Do(f func(string) string) *MockRelationNetworksInputDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworksInputDocIDCall) DoAndReturn(f func(string) string) *MockRelationNetworksInputDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationNetworks mocks base method. @@ -145,9 +265,33 @@ func (m *MockRelationNetworksInput) RelationNetworks() []description.RelationNet } // RelationNetworks indicates an expected call of RelationNetworks. -func (mr *MockRelationNetworksInputMockRecorder) RelationNetworks() *gomock.Call { +func (mr *MockRelationNetworksInputMockRecorder) RelationNetworks() *MockRelationNetworksInputRelationNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationNetworks", reflect.TypeOf((*MockRelationNetworksInput)(nil).RelationNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationNetworks", reflect.TypeOf((*MockRelationNetworksInput)(nil).RelationNetworks)) + return &MockRelationNetworksInputRelationNetworksCall{Call: call} +} + +// MockRelationNetworksInputRelationNetworksCall wrap *gomock.Call +type MockRelationNetworksInputRelationNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworksInputRelationNetworksCall) Return(arg0 []description.RelationNetwork) *MockRelationNetworksInputRelationNetworksCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworksInputRelationNetworksCall) Do(f func() []description.RelationNetwork) *MockRelationNetworksInputRelationNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworksInputRelationNetworksCall) DoAndReturn(f func() []description.RelationNetwork) *MockRelationNetworksInputRelationNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplicationsInput is a mock of RemoteApplicationsInput interface. @@ -182,9 +326,33 @@ func (m *MockRemoteApplicationsInput) DocID(arg0 string) string { } // DocID indicates an expected call of DocID. -func (mr *MockRemoteApplicationsInputMockRecorder) DocID(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) DocID(arg0 any) *MockRemoteApplicationsInputDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).DocID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).DocID), arg0) + return &MockRemoteApplicationsInputDocIDCall{Call: call} +} + +// MockRemoteApplicationsInputDocIDCall wrap *gomock.Call +type MockRemoteApplicationsInputDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputDocIDCall) Return(arg0 string) *MockRemoteApplicationsInputDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputDocIDCall) Do(f func(string) string) *MockRemoteApplicationsInputDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputDocIDCall) DoAndReturn(f func(string) string) *MockRemoteApplicationsInputDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeRemoteApplicationDoc mocks base method. @@ -196,9 +364,33 @@ func (m *MockRemoteApplicationsInput) MakeRemoteApplicationDoc(arg0 description. } // MakeRemoteApplicationDoc indicates an expected call of MakeRemoteApplicationDoc. -func (mr *MockRemoteApplicationsInputMockRecorder) MakeRemoteApplicationDoc(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) MakeRemoteApplicationDoc(arg0 any) *MockRemoteApplicationsInputMakeRemoteApplicationDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeRemoteApplicationDoc", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeRemoteApplicationDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeRemoteApplicationDoc", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeRemoteApplicationDoc), arg0) + return &MockRemoteApplicationsInputMakeRemoteApplicationDocCall{Call: call} +} + +// MockRemoteApplicationsInputMakeRemoteApplicationDocCall wrap *gomock.Call +type MockRemoteApplicationsInputMakeRemoteApplicationDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputMakeRemoteApplicationDocCall) Return(arg0 *remoteApplicationDoc) *MockRemoteApplicationsInputMakeRemoteApplicationDocCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputMakeRemoteApplicationDocCall) Do(f func(description.RemoteApplication) *remoteApplicationDoc) *MockRemoteApplicationsInputMakeRemoteApplicationDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputMakeRemoteApplicationDocCall) DoAndReturn(f func(description.RemoteApplication) *remoteApplicationDoc) *MockRemoteApplicationsInputMakeRemoteApplicationDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeStatusDoc mocks base method. @@ -210,9 +402,33 @@ func (m *MockRemoteApplicationsInput) MakeStatusDoc(arg0 description.Status) sta } // MakeStatusDoc indicates an expected call of MakeStatusDoc. -func (mr *MockRemoteApplicationsInputMockRecorder) MakeStatusDoc(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) MakeStatusDoc(arg0 any) *MockRemoteApplicationsInputMakeStatusDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusDoc", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeStatusDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusDoc", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeStatusDoc), arg0) + return &MockRemoteApplicationsInputMakeStatusDocCall{Call: call} +} + +// MockRemoteApplicationsInputMakeStatusDocCall wrap *gomock.Call +type MockRemoteApplicationsInputMakeStatusDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputMakeStatusDocCall) Return(arg0 statusDoc) *MockRemoteApplicationsInputMakeStatusDocCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputMakeStatusDocCall) Do(f func(description.Status) statusDoc) *MockRemoteApplicationsInputMakeStatusDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputMakeStatusDocCall) DoAndReturn(f func(description.Status) statusDoc) *MockRemoteApplicationsInputMakeStatusDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeStatusOp mocks base method. @@ -224,9 +440,33 @@ func (m *MockRemoteApplicationsInput) MakeStatusOp(arg0 string, arg1 statusDoc) } // MakeStatusOp indicates an expected call of MakeStatusOp. -func (mr *MockRemoteApplicationsInputMockRecorder) MakeStatusOp(arg0, arg1 any) *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) MakeStatusOp(arg0, arg1 any) *MockRemoteApplicationsInputMakeStatusOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusOp", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeStatusOp), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusOp", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).MakeStatusOp), arg0, arg1) + return &MockRemoteApplicationsInputMakeStatusOpCall{Call: call} +} + +// MockRemoteApplicationsInputMakeStatusOpCall wrap *gomock.Call +type MockRemoteApplicationsInputMakeStatusOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputMakeStatusOpCall) Return(arg0 txn.Op) *MockRemoteApplicationsInputMakeStatusOpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputMakeStatusOpCall) Do(f func(string, statusDoc) txn.Op) *MockRemoteApplicationsInputMakeStatusOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputMakeStatusOpCall) DoAndReturn(f func(string, statusDoc) txn.Op) *MockRemoteApplicationsInputMakeStatusOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewRemoteApplication mocks base method. @@ -238,9 +478,33 @@ func (m *MockRemoteApplicationsInput) NewRemoteApplication(arg0 *remoteApplicati } // NewRemoteApplication indicates an expected call of NewRemoteApplication. -func (mr *MockRemoteApplicationsInputMockRecorder) NewRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) NewRemoteApplication(arg0 any) *MockRemoteApplicationsInputNewRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteApplication", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).NewRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteApplication", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).NewRemoteApplication), arg0) + return &MockRemoteApplicationsInputNewRemoteApplicationCall{Call: call} +} + +// MockRemoteApplicationsInputNewRemoteApplicationCall wrap *gomock.Call +type MockRemoteApplicationsInputNewRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputNewRemoteApplicationCall) Return(arg0 *RemoteApplication) *MockRemoteApplicationsInputNewRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputNewRemoteApplicationCall) Do(f func(*remoteApplicationDoc) *RemoteApplication) *MockRemoteApplicationsInputNewRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputNewRemoteApplicationCall) DoAndReturn(f func(*remoteApplicationDoc) *RemoteApplication) *MockRemoteApplicationsInputNewRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemoteApplications mocks base method. @@ -252,9 +516,33 @@ func (m *MockRemoteApplicationsInput) RemoteApplications() []description.RemoteA } // RemoteApplications indicates an expected call of RemoteApplications. -func (mr *MockRemoteApplicationsInputMockRecorder) RemoteApplications() *gomock.Call { +func (mr *MockRemoteApplicationsInputMockRecorder) RemoteApplications() *MockRemoteApplicationsInputRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).RemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteApplications", reflect.TypeOf((*MockRemoteApplicationsInput)(nil).RemoteApplications)) + return &MockRemoteApplicationsInputRemoteApplicationsCall{Call: call} +} + +// MockRemoteApplicationsInputRemoteApplicationsCall wrap *gomock.Call +type MockRemoteApplicationsInputRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationsInputRemoteApplicationsCall) Return(arg0 []description.RemoteApplication) *MockRemoteApplicationsInputRemoteApplicationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationsInputRemoteApplicationsCall) Do(f func() []description.RemoteApplication) *MockRemoteApplicationsInputRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationsInputRemoteApplicationsCall) DoAndReturn(f func() []description.RemoteApplication) *MockRemoteApplicationsInputRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationOfferStateDocumentFactory is a mock of ApplicationOfferStateDocumentFactory interface. @@ -290,9 +578,33 @@ func (m *MockApplicationOfferStateDocumentFactory) MakeApplicationOfferDoc(arg0 } // MakeApplicationOfferDoc indicates an expected call of MakeApplicationOfferDoc. -func (mr *MockApplicationOfferStateDocumentFactoryMockRecorder) MakeApplicationOfferDoc(arg0 any) *gomock.Call { +func (mr *MockApplicationOfferStateDocumentFactoryMockRecorder) MakeApplicationOfferDoc(arg0 any) *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOfferDoc", reflect.TypeOf((*MockApplicationOfferStateDocumentFactory)(nil).MakeApplicationOfferDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOfferDoc", reflect.TypeOf((*MockApplicationOfferStateDocumentFactory)(nil).MakeApplicationOfferDoc), arg0) + return &MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall{Call: call} +} + +// MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall wrap *gomock.Call +type MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall) Return(arg0 applicationOfferDoc, arg1 error) *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall) Do(f func(description.ApplicationOffer) (applicationOfferDoc, error)) *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall) DoAndReturn(f func(description.ApplicationOffer) (applicationOfferDoc, error)) *MockApplicationOfferStateDocumentFactoryMakeApplicationOfferDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeApplicationOffersRefOp mocks base method. @@ -305,9 +617,33 @@ func (m *MockApplicationOfferStateDocumentFactory) MakeApplicationOffersRefOp(ar } // MakeApplicationOffersRefOp indicates an expected call of MakeApplicationOffersRefOp. -func (mr *MockApplicationOfferStateDocumentFactoryMockRecorder) MakeApplicationOffersRefOp(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationOfferStateDocumentFactoryMockRecorder) MakeApplicationOffersRefOp(arg0, arg1 any) *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOffersRefOp", reflect.TypeOf((*MockApplicationOfferStateDocumentFactory)(nil).MakeApplicationOffersRefOp), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOffersRefOp", reflect.TypeOf((*MockApplicationOfferStateDocumentFactory)(nil).MakeApplicationOffersRefOp), arg0, arg1) + return &MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall{Call: call} +} + +// MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall wrap *gomock.Call +type MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall) Return(arg0 txn.Op, arg1 error) *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall) Do(f func(string, int) (txn.Op, error)) *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall) DoAndReturn(f func(string, int) (txn.Op, error)) *MockApplicationOfferStateDocumentFactoryMakeApplicationOffersRefOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockApplicationOfferInput is a mock of ApplicationOfferInput interface. @@ -342,9 +678,33 @@ func (m *MockApplicationOfferInput) DocID(arg0 string) string { } // DocID indicates an expected call of DocID. -func (mr *MockApplicationOfferInputMockRecorder) DocID(arg0 any) *gomock.Call { +func (mr *MockApplicationOfferInputMockRecorder) DocID(arg0 any) *MockApplicationOfferInputDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockApplicationOfferInput)(nil).DocID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockApplicationOfferInput)(nil).DocID), arg0) + return &MockApplicationOfferInputDocIDCall{Call: call} +} + +// MockApplicationOfferInputDocIDCall wrap *gomock.Call +type MockApplicationOfferInputDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferInputDocIDCall) Return(arg0 string) *MockApplicationOfferInputDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferInputDocIDCall) Do(f func(string) string) *MockApplicationOfferInputDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferInputDocIDCall) DoAndReturn(f func(string) string) *MockApplicationOfferInputDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeApplicationOfferDoc mocks base method. @@ -357,9 +717,33 @@ func (m *MockApplicationOfferInput) MakeApplicationOfferDoc(arg0 description.App } // MakeApplicationOfferDoc indicates an expected call of MakeApplicationOfferDoc. -func (mr *MockApplicationOfferInputMockRecorder) MakeApplicationOfferDoc(arg0 any) *gomock.Call { +func (mr *MockApplicationOfferInputMockRecorder) MakeApplicationOfferDoc(arg0 any) *MockApplicationOfferInputMakeApplicationOfferDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOfferDoc", reflect.TypeOf((*MockApplicationOfferInput)(nil).MakeApplicationOfferDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOfferDoc", reflect.TypeOf((*MockApplicationOfferInput)(nil).MakeApplicationOfferDoc), arg0) + return &MockApplicationOfferInputMakeApplicationOfferDocCall{Call: call} +} + +// MockApplicationOfferInputMakeApplicationOfferDocCall wrap *gomock.Call +type MockApplicationOfferInputMakeApplicationOfferDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferInputMakeApplicationOfferDocCall) Return(arg0 applicationOfferDoc, arg1 error) *MockApplicationOfferInputMakeApplicationOfferDocCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferInputMakeApplicationOfferDocCall) Do(f func(description.ApplicationOffer) (applicationOfferDoc, error)) *MockApplicationOfferInputMakeApplicationOfferDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferInputMakeApplicationOfferDocCall) DoAndReturn(f func(description.ApplicationOffer) (applicationOfferDoc, error)) *MockApplicationOfferInputMakeApplicationOfferDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeApplicationOffersRefOp mocks base method. @@ -372,9 +756,33 @@ func (m *MockApplicationOfferInput) MakeApplicationOffersRefOp(arg0 string, arg1 } // MakeApplicationOffersRefOp indicates an expected call of MakeApplicationOffersRefOp. -func (mr *MockApplicationOfferInputMockRecorder) MakeApplicationOffersRefOp(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationOfferInputMockRecorder) MakeApplicationOffersRefOp(arg0, arg1 any) *MockApplicationOfferInputMakeApplicationOffersRefOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOffersRefOp", reflect.TypeOf((*MockApplicationOfferInput)(nil).MakeApplicationOffersRefOp), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeApplicationOffersRefOp", reflect.TypeOf((*MockApplicationOfferInput)(nil).MakeApplicationOffersRefOp), arg0, arg1) + return &MockApplicationOfferInputMakeApplicationOffersRefOpCall{Call: call} +} + +// MockApplicationOfferInputMakeApplicationOffersRefOpCall wrap *gomock.Call +type MockApplicationOfferInputMakeApplicationOffersRefOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferInputMakeApplicationOffersRefOpCall) Return(arg0 txn.Op, arg1 error) *MockApplicationOfferInputMakeApplicationOffersRefOpCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferInputMakeApplicationOffersRefOpCall) Do(f func(string, int) (txn.Op, error)) *MockApplicationOfferInputMakeApplicationOffersRefOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferInputMakeApplicationOffersRefOpCall) DoAndReturn(f func(string, int) (txn.Op, error)) *MockApplicationOfferInputMakeApplicationOffersRefOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Offers mocks base method. @@ -386,9 +794,33 @@ func (m *MockApplicationOfferInput) Offers() []description.ApplicationOffer { } // Offers indicates an expected call of Offers. -func (mr *MockApplicationOfferInputMockRecorder) Offers() *gomock.Call { +func (mr *MockApplicationOfferInputMockRecorder) Offers() *MockApplicationOfferInputOffersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offers", reflect.TypeOf((*MockApplicationOfferInput)(nil).Offers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offers", reflect.TypeOf((*MockApplicationOfferInput)(nil).Offers)) + return &MockApplicationOfferInputOffersCall{Call: call} +} + +// MockApplicationOfferInputOffersCall wrap *gomock.Call +type MockApplicationOfferInputOffersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOfferInputOffersCall) Return(arg0 []description.ApplicationOffer) *MockApplicationOfferInputOffersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOfferInputOffersCall) Do(f func() []description.ApplicationOffer) *MockApplicationOfferInputOffersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOfferInputOffersCall) DoAndReturn(f func() []description.ApplicationOffer) *MockApplicationOfferInputOffersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewallRulesInput is a mock of FirewallRulesInput interface. @@ -423,9 +855,33 @@ func (m *MockFirewallRulesInput) ConfigSchemaSourceGetter() config.ConfigSchemaS } // ConfigSchemaSourceGetter indicates an expected call of ConfigSchemaSourceGetter. -func (mr *MockFirewallRulesInputMockRecorder) ConfigSchemaSourceGetter() *gomock.Call { +func (mr *MockFirewallRulesInputMockRecorder) ConfigSchemaSourceGetter() *MockFirewallRulesInputConfigSchemaSourceGetterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSchemaSourceGetter", reflect.TypeOf((*MockFirewallRulesInput)(nil).ConfigSchemaSourceGetter)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSchemaSourceGetter", reflect.TypeOf((*MockFirewallRulesInput)(nil).ConfigSchemaSourceGetter)) + return &MockFirewallRulesInputConfigSchemaSourceGetterCall{Call: call} +} + +// MockFirewallRulesInputConfigSchemaSourceGetterCall wrap *gomock.Call +type MockFirewallRulesInputConfigSchemaSourceGetterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRulesInputConfigSchemaSourceGetterCall) Return(arg0 config.ConfigSchemaSourceGetter) *MockFirewallRulesInputConfigSchemaSourceGetterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRulesInputConfigSchemaSourceGetterCall) Do(f func() config.ConfigSchemaSourceGetter) *MockFirewallRulesInputConfigSchemaSourceGetterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRulesInputConfigSchemaSourceGetterCall) DoAndReturn(f func() config.ConfigSchemaSourceGetter) *MockFirewallRulesInputConfigSchemaSourceGetterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FirewallRules mocks base method. @@ -437,9 +893,33 @@ func (m *MockFirewallRulesInput) FirewallRules() []description.FirewallRule { } // FirewallRules indicates an expected call of FirewallRules. -func (mr *MockFirewallRulesInputMockRecorder) FirewallRules() *gomock.Call { +func (mr *MockFirewallRulesInputMockRecorder) FirewallRules() *MockFirewallRulesInputFirewallRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirewallRules", reflect.TypeOf((*MockFirewallRulesInput)(nil).FirewallRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirewallRules", reflect.TypeOf((*MockFirewallRulesInput)(nil).FirewallRules)) + return &MockFirewallRulesInputFirewallRulesCall{Call: call} +} + +// MockFirewallRulesInputFirewallRulesCall wrap *gomock.Call +type MockFirewallRulesInputFirewallRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRulesInputFirewallRulesCall) Return(arg0 []description.FirewallRule) *MockFirewallRulesInputFirewallRulesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRulesInputFirewallRulesCall) Do(f func() []description.FirewallRule) *MockFirewallRulesInputFirewallRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRulesInputFirewallRulesCall) DoAndReturn(f func() []description.FirewallRule) *MockFirewallRulesInputFirewallRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewallRulesOutput is a mock of FirewallRulesOutput interface. @@ -478,8 +958,32 @@ func (m *MockFirewallRulesOutput) UpdateModelConfig(arg0 config.ConfigSchemaSour } // UpdateModelConfig indicates an expected call of UpdateModelConfig. -func (mr *MockFirewallRulesOutputMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockFirewallRulesOutputMockRecorder) UpdateModelConfig(arg0, arg1, arg2 any, arg3 ...any) *MockFirewallRulesOutputUpdateModelConfigCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2}, arg3...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockFirewallRulesOutput)(nil).UpdateModelConfig), varargs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateModelConfig", reflect.TypeOf((*MockFirewallRulesOutput)(nil).UpdateModelConfig), varargs...) + return &MockFirewallRulesOutputUpdateModelConfigCall{Call: call} +} + +// MockFirewallRulesOutputUpdateModelConfigCall wrap *gomock.Call +type MockFirewallRulesOutputUpdateModelConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRulesOutputUpdateModelConfigCall) Return(arg0 error) *MockFirewallRulesOutputUpdateModelConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRulesOutputUpdateModelConfigCall) Do(f func(config.ConfigSchemaSourceGetter, map[string]any, []string, ...ValidateConfigFunc) error) *MockFirewallRulesOutputUpdateModelConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRulesOutputUpdateModelConfigCall) DoAndReturn(f func(config.ConfigSchemaSourceGetter, map[string]any, []string, ...ValidateConfigFunc) error) *MockFirewallRulesOutputUpdateModelConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migration_import_mock_test.go b/state/migration_import_mock_test.go index 25ff8c1e51b..bdb8636a957 100644 --- a/state/migration_import_mock_test.go +++ b/state/migration_import_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package state -destination migration_import_mock_test.go github.com/juju/juju/state TransactionRunner,StateDocumentFactory,DocModelNamespace +// mockgen -typed -package state -destination migration_import_mock_test.go github.com/juju/juju/state TransactionRunner,StateDocumentFactory,DocModelNamespace // // Package state is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockTransactionRunner) RunTransaction(arg0 []txn.Op) error { } // RunTransaction indicates an expected call of RunTransaction. -func (mr *MockTransactionRunnerMockRecorder) RunTransaction(arg0 any) *gomock.Call { +func (mr *MockTransactionRunnerMockRecorder) RunTransaction(arg0 any) *MockTransactionRunnerRunTransactionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockTransactionRunner)(nil).RunTransaction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockTransactionRunner)(nil).RunTransaction), arg0) + return &MockTransactionRunnerRunTransactionCall{Call: call} +} + +// MockTransactionRunnerRunTransactionCall wrap *gomock.Call +type MockTransactionRunnerRunTransactionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTransactionRunnerRunTransactionCall) Return(arg0 error) *MockTransactionRunnerRunTransactionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTransactionRunnerRunTransactionCall) Do(f func([]txn.Op) error) *MockTransactionRunnerRunTransactionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTransactionRunnerRunTransactionCall) DoAndReturn(f func([]txn.Op) error) *MockTransactionRunnerRunTransactionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStateDocumentFactory is a mock of StateDocumentFactory interface. @@ -86,9 +110,33 @@ func (m *MockStateDocumentFactory) MakeRemoteApplicationDoc(arg0 description.Rem } // MakeRemoteApplicationDoc indicates an expected call of MakeRemoteApplicationDoc. -func (mr *MockStateDocumentFactoryMockRecorder) MakeRemoteApplicationDoc(arg0 any) *gomock.Call { +func (mr *MockStateDocumentFactoryMockRecorder) MakeRemoteApplicationDoc(arg0 any) *MockStateDocumentFactoryMakeRemoteApplicationDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeRemoteApplicationDoc", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeRemoteApplicationDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeRemoteApplicationDoc", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeRemoteApplicationDoc), arg0) + return &MockStateDocumentFactoryMakeRemoteApplicationDocCall{Call: call} +} + +// MockStateDocumentFactoryMakeRemoteApplicationDocCall wrap *gomock.Call +type MockStateDocumentFactoryMakeRemoteApplicationDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDocumentFactoryMakeRemoteApplicationDocCall) Return(arg0 *remoteApplicationDoc) *MockStateDocumentFactoryMakeRemoteApplicationDocCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDocumentFactoryMakeRemoteApplicationDocCall) Do(f func(description.RemoteApplication) *remoteApplicationDoc) *MockStateDocumentFactoryMakeRemoteApplicationDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDocumentFactoryMakeRemoteApplicationDocCall) DoAndReturn(f func(description.RemoteApplication) *remoteApplicationDoc) *MockStateDocumentFactoryMakeRemoteApplicationDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeStatusDoc mocks base method. @@ -100,9 +148,33 @@ func (m *MockStateDocumentFactory) MakeStatusDoc(arg0 description.Status) status } // MakeStatusDoc indicates an expected call of MakeStatusDoc. -func (mr *MockStateDocumentFactoryMockRecorder) MakeStatusDoc(arg0 any) *gomock.Call { +func (mr *MockStateDocumentFactoryMockRecorder) MakeStatusDoc(arg0 any) *MockStateDocumentFactoryMakeStatusDocCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusDoc", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeStatusDoc), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusDoc", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeStatusDoc), arg0) + return &MockStateDocumentFactoryMakeStatusDocCall{Call: call} +} + +// MockStateDocumentFactoryMakeStatusDocCall wrap *gomock.Call +type MockStateDocumentFactoryMakeStatusDocCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDocumentFactoryMakeStatusDocCall) Return(arg0 statusDoc) *MockStateDocumentFactoryMakeStatusDocCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDocumentFactoryMakeStatusDocCall) Do(f func(description.Status) statusDoc) *MockStateDocumentFactoryMakeStatusDocCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDocumentFactoryMakeStatusDocCall) DoAndReturn(f func(description.Status) statusDoc) *MockStateDocumentFactoryMakeStatusDocCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MakeStatusOp mocks base method. @@ -114,9 +186,33 @@ func (m *MockStateDocumentFactory) MakeStatusOp(arg0 string, arg1 statusDoc) txn } // MakeStatusOp indicates an expected call of MakeStatusOp. -func (mr *MockStateDocumentFactoryMockRecorder) MakeStatusOp(arg0, arg1 any) *gomock.Call { +func (mr *MockStateDocumentFactoryMockRecorder) MakeStatusOp(arg0, arg1 any) *MockStateDocumentFactoryMakeStatusOpCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusOp", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeStatusOp), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeStatusOp", reflect.TypeOf((*MockStateDocumentFactory)(nil).MakeStatusOp), arg0, arg1) + return &MockStateDocumentFactoryMakeStatusOpCall{Call: call} +} + +// MockStateDocumentFactoryMakeStatusOpCall wrap *gomock.Call +type MockStateDocumentFactoryMakeStatusOpCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDocumentFactoryMakeStatusOpCall) Return(arg0 txn.Op) *MockStateDocumentFactoryMakeStatusOpCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDocumentFactoryMakeStatusOpCall) Do(f func(string, statusDoc) txn.Op) *MockStateDocumentFactoryMakeStatusOpCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDocumentFactoryMakeStatusOpCall) DoAndReturn(f func(string, statusDoc) txn.Op) *MockStateDocumentFactoryMakeStatusOpCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewRemoteApplication mocks base method. @@ -128,9 +224,33 @@ func (m *MockStateDocumentFactory) NewRemoteApplication(arg0 *remoteApplicationD } // NewRemoteApplication indicates an expected call of NewRemoteApplication. -func (mr *MockStateDocumentFactoryMockRecorder) NewRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockStateDocumentFactoryMockRecorder) NewRemoteApplication(arg0 any) *MockStateDocumentFactoryNewRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteApplication", reflect.TypeOf((*MockStateDocumentFactory)(nil).NewRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRemoteApplication", reflect.TypeOf((*MockStateDocumentFactory)(nil).NewRemoteApplication), arg0) + return &MockStateDocumentFactoryNewRemoteApplicationCall{Call: call} +} + +// MockStateDocumentFactoryNewRemoteApplicationCall wrap *gomock.Call +type MockStateDocumentFactoryNewRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStateDocumentFactoryNewRemoteApplicationCall) Return(arg0 *RemoteApplication) *MockStateDocumentFactoryNewRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStateDocumentFactoryNewRemoteApplicationCall) Do(f func(*remoteApplicationDoc) *RemoteApplication) *MockStateDocumentFactoryNewRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStateDocumentFactoryNewRemoteApplicationCall) DoAndReturn(f func(*remoteApplicationDoc) *RemoteApplication) *MockStateDocumentFactoryNewRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockDocModelNamespace is a mock of DocModelNamespace interface. @@ -165,7 +285,31 @@ func (m *MockDocModelNamespace) DocID(arg0 string) string { } // DocID indicates an expected call of DocID. -func (mr *MockDocModelNamespaceMockRecorder) DocID(arg0 any) *gomock.Call { +func (mr *MockDocModelNamespaceMockRecorder) DocID(arg0 any) *MockDocModelNamespaceDocIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockDocModelNamespace)(nil).DocID), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DocID", reflect.TypeOf((*MockDocModelNamespace)(nil).DocID), arg0) + return &MockDocModelNamespaceDocIDCall{Call: call} +} + +// MockDocModelNamespaceDocIDCall wrap *gomock.Call +type MockDocModelNamespaceDocIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDocModelNamespaceDocIDCall) Return(arg0 string) *MockDocModelNamespaceDocIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDocModelNamespaceDocIDCall) Do(f func(string) string) *MockDocModelNamespaceDocIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDocModelNamespaceDocIDCall) DoAndReturn(f func(string) string) *MockDocModelNamespaceDocIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migration_import_test.go b/state/migration_import_test.go index 2635dd6d158..76f9ced9565 100644 --- a/state/migration_import_test.go +++ b/state/migration_import_test.go @@ -404,7 +404,7 @@ func (s *MigrationImportSuite) ApplicationPortOps(c *gc.C) { c.Assert(ops[0].Id, gc.Equals, "gitlab") } -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/description_mock.go github.com/juju/description/v6 Application,Machine,PortRanges,UnitPortRanges +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/description_mock.go github.com/juju/description/v6 Application,Machine,PortRanges,UnitPortRanges func setupMockOpenedPortRanges(c *gc.C, mID string) (*gomock.Controller, *mocks.MockMachine) { ctrl := gomock.NewController(c) mockMachine := mocks.NewMockMachine(ctrl) diff --git a/state/migrations/description_mock_test.go b/state/migrations/description_mock_test.go index 7f25296a9c7..87c73637083 100644 --- a/state/migrations/description_mock_test.go +++ b/state/migrations/description_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination description_mock_test.go github.com/juju/description/v6 OfferConnection,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status +// mockgen -typed -package migrations -destination description_mock_test.go github.com/juju/description/v6 OfferConnection,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status // // Package migrations is a generated GoMock package. @@ -50,9 +50,33 @@ func (m *MockOfferConnection) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockOfferConnectionMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) OfferUUID() *MockOfferConnectionOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockOfferConnection)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockOfferConnection)(nil).OfferUUID)) + return &MockOfferConnectionOfferUUIDCall{Call: call} +} + +// MockOfferConnectionOfferUUIDCall wrap *gomock.Call +type MockOfferConnectionOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionOfferUUIDCall) Return(arg0 string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionOfferUUIDCall) Do(f func() string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionOfferUUIDCall) DoAndReturn(f func() string) *MockOfferConnectionOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationID mocks base method. @@ -64,9 +88,33 @@ func (m *MockOfferConnection) RelationID() int { } // RelationID indicates an expected call of RelationID. -func (mr *MockOfferConnectionMockRecorder) RelationID() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) RelationID() *MockOfferConnectionRelationIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationID", reflect.TypeOf((*MockOfferConnection)(nil).RelationID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationID", reflect.TypeOf((*MockOfferConnection)(nil).RelationID)) + return &MockOfferConnectionRelationIDCall{Call: call} +} + +// MockOfferConnectionRelationIDCall wrap *gomock.Call +type MockOfferConnectionRelationIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionRelationIDCall) Return(arg0 int) *MockOfferConnectionRelationIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionRelationIDCall) Do(f func() int) *MockOfferConnectionRelationIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionRelationIDCall) DoAndReturn(f func() int) *MockOfferConnectionRelationIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationKey mocks base method. @@ -78,9 +126,33 @@ func (m *MockOfferConnection) RelationKey() string { } // RelationKey indicates an expected call of RelationKey. -func (mr *MockOfferConnectionMockRecorder) RelationKey() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) RelationKey() *MockOfferConnectionRelationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockOfferConnection)(nil).RelationKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockOfferConnection)(nil).RelationKey)) + return &MockOfferConnectionRelationKeyCall{Call: call} +} + +// MockOfferConnectionRelationKeyCall wrap *gomock.Call +type MockOfferConnectionRelationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionRelationKeyCall) Return(arg0 string) *MockOfferConnectionRelationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionRelationKeyCall) Do(f func() string) *MockOfferConnectionRelationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionRelationKeyCall) DoAndReturn(f func() string) *MockOfferConnectionRelationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModelUUID mocks base method. @@ -92,9 +164,33 @@ func (m *MockOfferConnection) SourceModelUUID() string { } // SourceModelUUID indicates an expected call of SourceModelUUID. -func (mr *MockOfferConnectionMockRecorder) SourceModelUUID() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) SourceModelUUID() *MockOfferConnectionSourceModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelUUID", reflect.TypeOf((*MockOfferConnection)(nil).SourceModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelUUID", reflect.TypeOf((*MockOfferConnection)(nil).SourceModelUUID)) + return &MockOfferConnectionSourceModelUUIDCall{Call: call} +} + +// MockOfferConnectionSourceModelUUIDCall wrap *gomock.Call +type MockOfferConnectionSourceModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionSourceModelUUIDCall) Return(arg0 string) *MockOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionSourceModelUUIDCall) Do(f func() string) *MockOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionSourceModelUUIDCall) DoAndReturn(f func() string) *MockOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserName mocks base method. @@ -106,9 +202,33 @@ func (m *MockOfferConnection) UserName() string { } // UserName indicates an expected call of UserName. -func (mr *MockOfferConnectionMockRecorder) UserName() *gomock.Call { +func (mr *MockOfferConnectionMockRecorder) UserName() *MockOfferConnectionUserNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockOfferConnection)(nil).UserName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockOfferConnection)(nil).UserName)) + return &MockOfferConnectionUserNameCall{Call: call} +} + +// MockOfferConnectionUserNameCall wrap *gomock.Call +type MockOfferConnectionUserNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionUserNameCall) Return(arg0 string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionUserNameCall) Do(f func() string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionUserNameCall) DoAndReturn(f func() string) *MockOfferConnectionUserNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteEntity is a mock of RemoteEntity interface. @@ -143,9 +263,33 @@ func (m *MockRemoteEntity) ID() string { } // ID indicates an expected call of ID. -func (mr *MockRemoteEntityMockRecorder) ID() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) ID() *MockRemoteEntityIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRemoteEntity)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRemoteEntity)(nil).ID)) + return &MockRemoteEntityIDCall{Call: call} +} + +// MockRemoteEntityIDCall wrap *gomock.Call +type MockRemoteEntityIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityIDCall) Return(arg0 string) *MockRemoteEntityIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityIDCall) Do(f func() string) *MockRemoteEntityIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityIDCall) DoAndReturn(f func() string) *MockRemoteEntityIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -157,9 +301,33 @@ func (m *MockRemoteEntity) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockRemoteEntityMockRecorder) Macaroon() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) Macaroon() *MockRemoteEntityMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteEntity)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteEntity)(nil).Macaroon)) + return &MockRemoteEntityMacaroonCall{Call: call} +} + +// MockRemoteEntityMacaroonCall wrap *gomock.Call +type MockRemoteEntityMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityMacaroonCall) Return(arg0 string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityMacaroonCall) Do(f func() string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityMacaroonCall) DoAndReturn(f func() string) *MockRemoteEntityMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Token mocks base method. @@ -171,9 +339,33 @@ func (m *MockRemoteEntity) Token() string { } // Token indicates an expected call of Token. -func (mr *MockRemoteEntityMockRecorder) Token() *gomock.Call { +func (mr *MockRemoteEntityMockRecorder) Token() *MockRemoteEntityTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockRemoteEntity)(nil).Token)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockRemoteEntity)(nil).Token)) + return &MockRemoteEntityTokenCall{Call: call} +} + +// MockRemoteEntityTokenCall wrap *gomock.Call +type MockRemoteEntityTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntityTokenCall) Return(arg0 string) *MockRemoteEntityTokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntityTokenCall) Do(f func() string) *MockRemoteEntityTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntityTokenCall) DoAndReturn(f func() string) *MockRemoteEntityTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationNetwork is a mock of RelationNetwork interface. @@ -208,9 +400,33 @@ func (m *MockRelationNetwork) CIDRS() []string { } // CIDRS indicates an expected call of CIDRS. -func (mr *MockRelationNetworkMockRecorder) CIDRS() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) CIDRS() *MockRelationNetworkCIDRSCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockRelationNetwork)(nil).CIDRS)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockRelationNetwork)(nil).CIDRS)) + return &MockRelationNetworkCIDRSCall{Call: call} +} + +// MockRelationNetworkCIDRSCall wrap *gomock.Call +type MockRelationNetworkCIDRSCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkCIDRSCall) Return(arg0 []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkCIDRSCall) Do(f func() []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkCIDRSCall) DoAndReturn(f func() []string) *MockRelationNetworkCIDRSCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ID mocks base method. @@ -222,9 +438,33 @@ func (m *MockRelationNetwork) ID() string { } // ID indicates an expected call of ID. -func (mr *MockRelationNetworkMockRecorder) ID() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) ID() *MockRelationNetworkIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRelationNetwork)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockRelationNetwork)(nil).ID)) + return &MockRelationNetworkIDCall{Call: call} +} + +// MockRelationNetworkIDCall wrap *gomock.Call +type MockRelationNetworkIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkIDCall) Return(arg0 string) *MockRelationNetworkIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkIDCall) Do(f func() string) *MockRelationNetworkIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkIDCall) DoAndReturn(f func() string) *MockRelationNetworkIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationKey mocks base method. @@ -236,9 +476,33 @@ func (m *MockRelationNetwork) RelationKey() string { } // RelationKey indicates an expected call of RelationKey. -func (mr *MockRelationNetworkMockRecorder) RelationKey() *gomock.Call { +func (mr *MockRelationNetworkMockRecorder) RelationKey() *MockRelationNetworkRelationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockRelationNetwork)(nil).RelationKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockRelationNetwork)(nil).RelationKey)) + return &MockRelationNetworkRelationKeyCall{Call: call} +} + +// MockRelationNetworkRelationKeyCall wrap *gomock.Call +type MockRelationNetworkRelationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworkRelationKeyCall) Return(arg0 string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworkRelationKeyCall) Do(f func() string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworkRelationKeyCall) DoAndReturn(f func() string) *MockRelationNetworkRelationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplication is a mock of RemoteApplication interface. @@ -273,9 +537,33 @@ func (m *MockRemoteApplication) AddEndpoint(arg0 description.RemoteEndpointArgs) } // AddEndpoint indicates an expected call of AddEndpoint. -func (mr *MockRemoteApplicationMockRecorder) AddEndpoint(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) AddEndpoint(arg0 any) *MockRemoteApplicationAddEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoint", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoint), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoint", reflect.TypeOf((*MockRemoteApplication)(nil).AddEndpoint), arg0) + return &MockRemoteApplicationAddEndpointCall{Call: call} +} + +// MockRemoteApplicationAddEndpointCall wrap *gomock.Call +type MockRemoteApplicationAddEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationAddEndpointCall) Return(arg0 description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationAddEndpointCall) Do(f func(description.RemoteEndpointArgs) description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationAddEndpointCall) DoAndReturn(f func(description.RemoteEndpointArgs) description.RemoteEndpoint) *MockRemoteApplicationAddEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddSpace mocks base method. @@ -287,9 +575,33 @@ func (m *MockRemoteApplication) AddSpace(arg0 description.RemoteSpaceArgs) descr } // AddSpace indicates an expected call of AddSpace. -func (mr *MockRemoteApplicationMockRecorder) AddSpace(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) AddSpace(arg0 any) *MockRemoteApplicationAddSpaceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockRemoteApplication)(nil).AddSpace), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSpace", reflect.TypeOf((*MockRemoteApplication)(nil).AddSpace), arg0) + return &MockRemoteApplicationAddSpaceCall{Call: call} +} + +// MockRemoteApplicationAddSpaceCall wrap *gomock.Call +type MockRemoteApplicationAddSpaceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationAddSpaceCall) Return(arg0 description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationAddSpaceCall) Do(f func(description.RemoteSpaceArgs) description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationAddSpaceCall) DoAndReturn(f func(description.RemoteSpaceArgs) description.RemoteSpace) *MockRemoteApplicationAddSpaceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Bindings mocks base method. @@ -301,9 +613,33 @@ func (m *MockRemoteApplication) Bindings() map[string]string { } // Bindings indicates an expected call of Bindings. -func (mr *MockRemoteApplicationMockRecorder) Bindings() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Bindings() *MockRemoteApplicationBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bindings", reflect.TypeOf((*MockRemoteApplication)(nil).Bindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bindings", reflect.TypeOf((*MockRemoteApplication)(nil).Bindings)) + return &MockRemoteApplicationBindingsCall{Call: call} +} + +// MockRemoteApplicationBindingsCall wrap *gomock.Call +type MockRemoteApplicationBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationBindingsCall) Return(arg0 map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationBindingsCall) Do(f func() map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationBindingsCall) DoAndReturn(f func() map[string]string) *MockRemoteApplicationBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ConsumeVersion mocks base method. @@ -315,9 +651,33 @@ func (m *MockRemoteApplication) ConsumeVersion() int { } // ConsumeVersion indicates an expected call of ConsumeVersion. -func (mr *MockRemoteApplicationMockRecorder) ConsumeVersion() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) ConsumeVersion() *MockRemoteApplicationConsumeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockRemoteApplication)(nil).ConsumeVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockRemoteApplication)(nil).ConsumeVersion)) + return &MockRemoteApplicationConsumeVersionCall{Call: call} +} + +// MockRemoteApplicationConsumeVersionCall wrap *gomock.Call +type MockRemoteApplicationConsumeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationConsumeVersionCall) Return(arg0 int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationConsumeVersionCall) Do(f func() int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationConsumeVersionCall) DoAndReturn(f func() int) *MockRemoteApplicationConsumeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -329,9 +689,33 @@ func (m *MockRemoteApplication) Endpoints() []description.RemoteEndpoint { } // Endpoints indicates an expected call of Endpoints. -func (mr *MockRemoteApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Endpoints() *MockRemoteApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockRemoteApplication)(nil).Endpoints)) + return &MockRemoteApplicationEndpointsCall{Call: call} +} + +// MockRemoteApplicationEndpointsCall wrap *gomock.Call +type MockRemoteApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationEndpointsCall) Return(arg0 []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationEndpointsCall) Do(f func() []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationEndpointsCall) DoAndReturn(f func() []description.RemoteEndpoint) *MockRemoteApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsConsumerProxy mocks base method. @@ -343,9 +727,33 @@ func (m *MockRemoteApplication) IsConsumerProxy() bool { } // IsConsumerProxy indicates an expected call of IsConsumerProxy. -func (mr *MockRemoteApplicationMockRecorder) IsConsumerProxy() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) IsConsumerProxy() *MockRemoteApplicationIsConsumerProxyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockRemoteApplication)(nil).IsConsumerProxy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockRemoteApplication)(nil).IsConsumerProxy)) + return &MockRemoteApplicationIsConsumerProxyCall{Call: call} +} + +// MockRemoteApplicationIsConsumerProxyCall wrap *gomock.Call +type MockRemoteApplicationIsConsumerProxyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationIsConsumerProxyCall) Return(arg0 bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationIsConsumerProxyCall) Do(f func() bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationIsConsumerProxyCall) DoAndReturn(f func() bool) *MockRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -357,9 +765,33 @@ func (m *MockRemoteApplication) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockRemoteApplicationMockRecorder) Macaroon() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Macaroon() *MockRemoteApplicationMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteApplication)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockRemoteApplication)(nil).Macaroon)) + return &MockRemoteApplicationMacaroonCall{Call: call} +} + +// MockRemoteApplicationMacaroonCall wrap *gomock.Call +type MockRemoteApplicationMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationMacaroonCall) Return(arg0 string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationMacaroonCall) Do(f func() string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationMacaroonCall) DoAndReturn(f func() string) *MockRemoteApplicationMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -371,9 +803,33 @@ func (m *MockRemoteApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockRemoteApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Name() *MockRemoteApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteApplication)(nil).Name)) + return &MockRemoteApplicationNameCall{Call: call} +} + +// MockRemoteApplicationNameCall wrap *gomock.Call +type MockRemoteApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationNameCall) Return(arg0 string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationNameCall) Do(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationNameCall) DoAndReturn(f func() string) *MockRemoteApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUID mocks base method. @@ -385,9 +841,33 @@ func (m *MockRemoteApplication) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockRemoteApplicationMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) OfferUUID() *MockRemoteApplicationOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteApplication)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockRemoteApplication)(nil).OfferUUID)) + return &MockRemoteApplicationOfferUUIDCall{Call: call} +} + +// MockRemoteApplicationOfferUUIDCall wrap *gomock.Call +type MockRemoteApplicationOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationOfferUUIDCall) Return(arg0 string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationOfferUUIDCall) Do(f func() string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationOfferUUIDCall) DoAndReturn(f func() string) *MockRemoteApplicationOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -397,9 +877,33 @@ func (m *MockRemoteApplication) SetStatus(arg0 description.StatusArgs) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockRemoteApplicationMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) SetStatus(arg0 any) *MockRemoteApplicationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRemoteApplication)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockRemoteApplication)(nil).SetStatus), arg0) + return &MockRemoteApplicationSetStatusCall{Call: call} +} + +// MockRemoteApplicationSetStatusCall wrap *gomock.Call +type MockRemoteApplicationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSetStatusCall) Return() *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSetStatusCall) Do(f func(description.StatusArgs)) *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSetStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockRemoteApplicationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModelTag mocks base method. @@ -411,9 +915,33 @@ func (m *MockRemoteApplication) SourceModelTag() names.ModelTag { } // SourceModelTag indicates an expected call of SourceModelTag. -func (mr *MockRemoteApplicationMockRecorder) SourceModelTag() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) SourceModelTag() *MockRemoteApplicationSourceModelTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelTag", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModelTag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelTag", reflect.TypeOf((*MockRemoteApplication)(nil).SourceModelTag)) + return &MockRemoteApplicationSourceModelTagCall{Call: call} +} + +// MockRemoteApplicationSourceModelTagCall wrap *gomock.Call +type MockRemoteApplicationSourceModelTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSourceModelTagCall) Return(arg0 names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSourceModelTagCall) Do(f func() names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSourceModelTagCall) DoAndReturn(f func() names.ModelTag) *MockRemoteApplicationSourceModelTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Spaces mocks base method. @@ -425,9 +953,33 @@ func (m *MockRemoteApplication) Spaces() []description.RemoteSpace { } // Spaces indicates an expected call of Spaces. -func (mr *MockRemoteApplicationMockRecorder) Spaces() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Spaces() *MockRemoteApplicationSpacesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockRemoteApplication)(nil).Spaces)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Spaces", reflect.TypeOf((*MockRemoteApplication)(nil).Spaces)) + return &MockRemoteApplicationSpacesCall{Call: call} +} + +// MockRemoteApplicationSpacesCall wrap *gomock.Call +type MockRemoteApplicationSpacesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSpacesCall) Return(arg0 []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSpacesCall) Do(f func() []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSpacesCall) DoAndReturn(f func() []description.RemoteSpace) *MockRemoteApplicationSpacesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -439,9 +991,33 @@ func (m *MockRemoteApplication) Status() description.Status { } // Status indicates an expected call of Status. -func (mr *MockRemoteApplicationMockRecorder) Status() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Status() *MockRemoteApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRemoteApplication)(nil).Status)) + return &MockRemoteApplicationStatusCall{Call: call} +} + +// MockRemoteApplicationStatusCall wrap *gomock.Call +type MockRemoteApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationStatusCall) Return(arg0 description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationStatusCall) Do(f func() description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationStatusCall) DoAndReturn(f func() description.Status) *MockRemoteApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -453,9 +1029,33 @@ func (m *MockRemoteApplication) Tag() names.ApplicationTag { } // Tag indicates an expected call of Tag. -func (mr *MockRemoteApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) Tag() *MockRemoteApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRemoteApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockRemoteApplication)(nil).Tag)) + return &MockRemoteApplicationTagCall{Call: call} +} + +// MockRemoteApplicationTagCall wrap *gomock.Call +type MockRemoteApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationTagCall) Return(arg0 names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationTagCall) Do(f func() names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockRemoteApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -467,9 +1067,33 @@ func (m *MockRemoteApplication) URL() string { } // URL indicates an expected call of URL. -func (mr *MockRemoteApplicationMockRecorder) URL() *gomock.Call { +func (mr *MockRemoteApplicationMockRecorder) URL() *MockRemoteApplicationURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockRemoteApplication)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockRemoteApplication)(nil).URL)) + return &MockRemoteApplicationURLCall{Call: call} +} + +// MockRemoteApplicationURLCall wrap *gomock.Call +type MockRemoteApplicationURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationURLCall) Return(arg0 string) *MockRemoteApplicationURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationURLCall) Do(f func() string) *MockRemoteApplicationURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationURLCall) DoAndReturn(f func() string) *MockRemoteApplicationURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteSpace is a mock of RemoteSpace interface. @@ -504,9 +1128,33 @@ func (m *MockRemoteSpace) AddSubnet(arg0 description.SubnetArgs) description.Sub } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockRemoteSpaceMockRecorder) AddSubnet(arg0 any) *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) AddSubnet(arg0 any) *MockRemoteSpaceAddSubnetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockRemoteSpace)(nil).AddSubnet), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockRemoteSpace)(nil).AddSubnet), arg0) + return &MockRemoteSpaceAddSubnetCall{Call: call} +} + +// MockRemoteSpaceAddSubnetCall wrap *gomock.Call +type MockRemoteSpaceAddSubnetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceAddSubnetCall) Return(arg0 description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceAddSubnetCall) Do(f func(description.SubnetArgs) description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceAddSubnetCall) DoAndReturn(f func(description.SubnetArgs) description.Subnet) *MockRemoteSpaceAddSubnetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudType mocks base method. @@ -518,9 +1166,33 @@ func (m *MockRemoteSpace) CloudType() string { } // CloudType indicates an expected call of CloudType. -func (mr *MockRemoteSpaceMockRecorder) CloudType() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) CloudType() *MockRemoteSpaceCloudTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudType", reflect.TypeOf((*MockRemoteSpace)(nil).CloudType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudType", reflect.TypeOf((*MockRemoteSpace)(nil).CloudType)) + return &MockRemoteSpaceCloudTypeCall{Call: call} +} + +// MockRemoteSpaceCloudTypeCall wrap *gomock.Call +type MockRemoteSpaceCloudTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceCloudTypeCall) Return(arg0 string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceCloudTypeCall) Do(f func() string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceCloudTypeCall) DoAndReturn(f func() string) *MockRemoteSpaceCloudTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -532,9 +1204,33 @@ func (m *MockRemoteSpace) Name() string { } // Name indicates an expected call of Name. -func (mr *MockRemoteSpaceMockRecorder) Name() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) Name() *MockRemoteSpaceNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteSpace)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRemoteSpace)(nil).Name)) + return &MockRemoteSpaceNameCall{Call: call} +} + +// MockRemoteSpaceNameCall wrap *gomock.Call +type MockRemoteSpaceNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceNameCall) Return(arg0 string) *MockRemoteSpaceNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceNameCall) Do(f func() string) *MockRemoteSpaceNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceNameCall) DoAndReturn(f func() string) *MockRemoteSpaceNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderAttributes mocks base method. @@ -546,9 +1242,33 @@ func (m *MockRemoteSpace) ProviderAttributes() map[string]any { } // ProviderAttributes indicates an expected call of ProviderAttributes. -func (mr *MockRemoteSpaceMockRecorder) ProviderAttributes() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) ProviderAttributes() *MockRemoteSpaceProviderAttributesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAttributes", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderAttributes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAttributes", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderAttributes)) + return &MockRemoteSpaceProviderAttributesCall{Call: call} +} + +// MockRemoteSpaceProviderAttributesCall wrap *gomock.Call +type MockRemoteSpaceProviderAttributesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceProviderAttributesCall) Return(arg0 map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceProviderAttributesCall) Do(f func() map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceProviderAttributesCall) DoAndReturn(f func() map[string]any) *MockRemoteSpaceProviderAttributesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderId mocks base method. @@ -560,9 +1280,33 @@ func (m *MockRemoteSpace) ProviderId() string { } // ProviderId indicates an expected call of ProviderId. -func (mr *MockRemoteSpaceMockRecorder) ProviderId() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) ProviderId() *MockRemoteSpaceProviderIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderId", reflect.TypeOf((*MockRemoteSpace)(nil).ProviderId)) + return &MockRemoteSpaceProviderIdCall{Call: call} +} + +// MockRemoteSpaceProviderIdCall wrap *gomock.Call +type MockRemoteSpaceProviderIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceProviderIdCall) Return(arg0 string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceProviderIdCall) Do(f func() string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceProviderIdCall) DoAndReturn(f func() string) *MockRemoteSpaceProviderIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subnets mocks base method. @@ -574,9 +1318,33 @@ func (m *MockRemoteSpace) Subnets() []description.Subnet { } // Subnets indicates an expected call of Subnets. -func (mr *MockRemoteSpaceMockRecorder) Subnets() *gomock.Call { +func (mr *MockRemoteSpaceMockRecorder) Subnets() *MockRemoteSpaceSubnetsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockRemoteSpace)(nil).Subnets)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subnets", reflect.TypeOf((*MockRemoteSpace)(nil).Subnets)) + return &MockRemoteSpaceSubnetsCall{Call: call} +} + +// MockRemoteSpaceSubnetsCall wrap *gomock.Call +type MockRemoteSpaceSubnetsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteSpaceSubnetsCall) Return(arg0 []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteSpaceSubnetsCall) Do(f func() []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteSpaceSubnetsCall) DoAndReturn(f func() []description.Subnet) *MockRemoteSpaceSubnetsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStatus is a mock of Status interface. @@ -611,9 +1379,33 @@ func (m *MockStatus) Data() map[string]any { } // Data indicates an expected call of Data. -func (mr *MockStatusMockRecorder) Data() *gomock.Call { +func (mr *MockStatusMockRecorder) Data() *MockStatusDataCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockStatus)(nil).Data)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Data", reflect.TypeOf((*MockStatus)(nil).Data)) + return &MockStatusDataCall{Call: call} +} + +// MockStatusDataCall wrap *gomock.Call +type MockStatusDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusDataCall) Return(arg0 map[string]any) *MockStatusDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusDataCall) Do(f func() map[string]any) *MockStatusDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusDataCall) DoAndReturn(f func() map[string]any) *MockStatusDataCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Message mocks base method. @@ -625,9 +1417,33 @@ func (m *MockStatus) Message() string { } // Message indicates an expected call of Message. -func (mr *MockStatusMockRecorder) Message() *gomock.Call { +func (mr *MockStatusMockRecorder) Message() *MockStatusMessageCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockStatus)(nil).Message)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockStatus)(nil).Message)) + return &MockStatusMessageCall{Call: call} +} + +// MockStatusMessageCall wrap *gomock.Call +type MockStatusMessageCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusMessageCall) Return(arg0 string) *MockStatusMessageCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusMessageCall) Do(f func() string) *MockStatusMessageCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusMessageCall) DoAndReturn(f func() string) *MockStatusMessageCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NeverSet mocks base method. @@ -639,9 +1455,33 @@ func (m *MockStatus) NeverSet() bool { } // NeverSet indicates an expected call of NeverSet. -func (mr *MockStatusMockRecorder) NeverSet() *gomock.Call { +func (mr *MockStatusMockRecorder) NeverSet() *MockStatusNeverSetCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeverSet", reflect.TypeOf((*MockStatus)(nil).NeverSet)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeverSet", reflect.TypeOf((*MockStatus)(nil).NeverSet)) + return &MockStatusNeverSetCall{Call: call} +} + +// MockStatusNeverSetCall wrap *gomock.Call +type MockStatusNeverSetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusNeverSetCall) Return(arg0 bool) *MockStatusNeverSetCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusNeverSetCall) Do(f func() bool) *MockStatusNeverSetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusNeverSetCall) DoAndReturn(f func() bool) *MockStatusNeverSetCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Updated mocks base method. @@ -653,9 +1493,33 @@ func (m *MockStatus) Updated() time.Time { } // Updated indicates an expected call of Updated. -func (mr *MockStatusMockRecorder) Updated() *gomock.Call { +func (mr *MockStatusMockRecorder) Updated() *MockStatusUpdatedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updated", reflect.TypeOf((*MockStatus)(nil).Updated)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updated", reflect.TypeOf((*MockStatus)(nil).Updated)) + return &MockStatusUpdatedCall{Call: call} +} + +// MockStatusUpdatedCall wrap *gomock.Call +type MockStatusUpdatedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusUpdatedCall) Return(arg0 time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusUpdatedCall) Do(f func() time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusUpdatedCall) DoAndReturn(f func() time.Time) *MockStatusUpdatedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Value mocks base method. @@ -667,7 +1531,31 @@ func (m *MockStatus) Value() string { } // Value indicates an expected call of Value. -func (mr *MockStatusMockRecorder) Value() *gomock.Call { +func (mr *MockStatusMockRecorder) Value() *MockStatusValueCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockStatus)(nil).Value)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockStatus)(nil).Value)) + return &MockStatusValueCall{Call: call} +} + +// MockStatusValueCall wrap *gomock.Call +type MockStatusValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusValueCall) Return(arg0 string) *MockStatusValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusValueCall) Do(f func() string) *MockStatusValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusValueCall) DoAndReturn(f func() string) *MockStatusValueCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migrations/firewallrules_mock_test.go b/state/migrations/firewallrules_mock_test.go index ee5b68c72f8..2dd8b4454dd 100644 --- a/state/migrations/firewallrules_mock_test.go +++ b/state/migrations/firewallrules_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination firewallrules_mock_test.go github.com/juju/juju/state/migrations MigrationFirewallRule,FirewallRuleSource,FirewallRulesModel +// mockgen -typed -package migrations -destination firewallrules_mock_test.go github.com/juju/juju/state/migrations MigrationFirewallRule,FirewallRuleSource,FirewallRulesModel // // Package migrations is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockMigrationFirewallRule) ID() string { } // ID indicates an expected call of ID. -func (mr *MockMigrationFirewallRuleMockRecorder) ID() *gomock.Call { +func (mr *MockMigrationFirewallRuleMockRecorder) ID() *MockMigrationFirewallRuleIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockMigrationFirewallRule)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockMigrationFirewallRule)(nil).ID)) + return &MockMigrationFirewallRuleIDCall{Call: call} +} + +// MockMigrationFirewallRuleIDCall wrap *gomock.Call +type MockMigrationFirewallRuleIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationFirewallRuleIDCall) Return(arg0 string) *MockMigrationFirewallRuleIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationFirewallRuleIDCall) Do(f func() string) *MockMigrationFirewallRuleIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationFirewallRuleIDCall) DoAndReturn(f func() string) *MockMigrationFirewallRuleIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WellKnownService mocks base method. @@ -63,9 +87,33 @@ func (m *MockMigrationFirewallRule) WellKnownService() firewall.WellKnownService } // WellKnownService indicates an expected call of WellKnownService. -func (mr *MockMigrationFirewallRuleMockRecorder) WellKnownService() *gomock.Call { +func (mr *MockMigrationFirewallRuleMockRecorder) WellKnownService() *MockMigrationFirewallRuleWellKnownServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WellKnownService", reflect.TypeOf((*MockMigrationFirewallRule)(nil).WellKnownService)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WellKnownService", reflect.TypeOf((*MockMigrationFirewallRule)(nil).WellKnownService)) + return &MockMigrationFirewallRuleWellKnownServiceCall{Call: call} +} + +// MockMigrationFirewallRuleWellKnownServiceCall wrap *gomock.Call +type MockMigrationFirewallRuleWellKnownServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationFirewallRuleWellKnownServiceCall) Return(arg0 firewall.WellKnownServiceType) *MockMigrationFirewallRuleWellKnownServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationFirewallRuleWellKnownServiceCall) Do(f func() firewall.WellKnownServiceType) *MockMigrationFirewallRuleWellKnownServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationFirewallRuleWellKnownServiceCall) DoAndReturn(f func() firewall.WellKnownServiceType) *MockMigrationFirewallRuleWellKnownServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WhitelistCIDRs mocks base method. @@ -77,9 +125,33 @@ func (m *MockMigrationFirewallRule) WhitelistCIDRs() []string { } // WhitelistCIDRs indicates an expected call of WhitelistCIDRs. -func (mr *MockMigrationFirewallRuleMockRecorder) WhitelistCIDRs() *gomock.Call { +func (mr *MockMigrationFirewallRuleMockRecorder) WhitelistCIDRs() *MockMigrationFirewallRuleWhitelistCIDRsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WhitelistCIDRs", reflect.TypeOf((*MockMigrationFirewallRule)(nil).WhitelistCIDRs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WhitelistCIDRs", reflect.TypeOf((*MockMigrationFirewallRule)(nil).WhitelistCIDRs)) + return &MockMigrationFirewallRuleWhitelistCIDRsCall{Call: call} +} + +// MockMigrationFirewallRuleWhitelistCIDRsCall wrap *gomock.Call +type MockMigrationFirewallRuleWhitelistCIDRsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationFirewallRuleWhitelistCIDRsCall) Return(arg0 []string) *MockMigrationFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationFirewallRuleWhitelistCIDRsCall) Do(f func() []string) *MockMigrationFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationFirewallRuleWhitelistCIDRsCall) DoAndReturn(f func() []string) *MockMigrationFirewallRuleWhitelistCIDRsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewallRuleSource is a mock of FirewallRuleSource interface. @@ -115,9 +187,33 @@ func (m *MockFirewallRuleSource) AllFirewallRules() ([]MigrationFirewallRule, er } // AllFirewallRules indicates an expected call of AllFirewallRules. -func (mr *MockFirewallRuleSourceMockRecorder) AllFirewallRules() *gomock.Call { +func (mr *MockFirewallRuleSourceMockRecorder) AllFirewallRules() *MockFirewallRuleSourceAllFirewallRulesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllFirewallRules", reflect.TypeOf((*MockFirewallRuleSource)(nil).AllFirewallRules)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllFirewallRules", reflect.TypeOf((*MockFirewallRuleSource)(nil).AllFirewallRules)) + return &MockFirewallRuleSourceAllFirewallRulesCall{Call: call} +} + +// MockFirewallRuleSourceAllFirewallRulesCall wrap *gomock.Call +type MockFirewallRuleSourceAllFirewallRulesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRuleSourceAllFirewallRulesCall) Return(arg0 []MigrationFirewallRule, arg1 error) *MockFirewallRuleSourceAllFirewallRulesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRuleSourceAllFirewallRulesCall) Do(f func() ([]MigrationFirewallRule, error)) *MockFirewallRuleSourceAllFirewallRulesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRuleSourceAllFirewallRulesCall) DoAndReturn(f func() ([]MigrationFirewallRule, error)) *MockFirewallRuleSourceAllFirewallRulesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockFirewallRulesModel is a mock of FirewallRulesModel interface. @@ -152,7 +248,31 @@ func (m *MockFirewallRulesModel) AddFirewallRule(arg0 description.FirewallRuleAr } // AddFirewallRule indicates an expected call of AddFirewallRule. -func (mr *MockFirewallRulesModelMockRecorder) AddFirewallRule(arg0 any) *gomock.Call { +func (mr *MockFirewallRulesModelMockRecorder) AddFirewallRule(arg0 any) *MockFirewallRulesModelAddFirewallRuleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFirewallRule", reflect.TypeOf((*MockFirewallRulesModel)(nil).AddFirewallRule), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddFirewallRule", reflect.TypeOf((*MockFirewallRulesModel)(nil).AddFirewallRule), arg0) + return &MockFirewallRulesModelAddFirewallRuleCall{Call: call} +} + +// MockFirewallRulesModelAddFirewallRuleCall wrap *gomock.Call +type MockFirewallRulesModelAddFirewallRuleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFirewallRulesModelAddFirewallRuleCall) Return(arg0 description.FirewallRule) *MockFirewallRulesModelAddFirewallRuleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFirewallRulesModelAddFirewallRuleCall) Do(f func(description.FirewallRuleArgs) description.FirewallRule) *MockFirewallRulesModelAddFirewallRuleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFirewallRulesModelAddFirewallRuleCall) DoAndReturn(f func(description.FirewallRuleArgs) description.FirewallRule) *MockFirewallRulesModelAddFirewallRuleCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migrations/offerconntections_mock_test.go b/state/migrations/offerconntections_mock_test.go index c3107694c20..382156e6180 100644 --- a/state/migrations/offerconntections_mock_test.go +++ b/state/migrations/offerconntections_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination offerconntections_mock_test.go github.com/juju/juju/state/migrations MigrationOfferConnection,AllOfferConnectionSource,OfferConnectionSource,OfferConnectionModel +// mockgen -typed -package migrations -destination offerconntections_mock_test.go github.com/juju/juju/state/migrations MigrationOfferConnection,AllOfferConnectionSource,OfferConnectionSource,OfferConnectionModel // // Package migrations is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockMigrationOfferConnection) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockMigrationOfferConnectionMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockMigrationOfferConnectionMockRecorder) OfferUUID() *MockMigrationOfferConnectionOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockMigrationOfferConnection)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockMigrationOfferConnection)(nil).OfferUUID)) + return &MockMigrationOfferConnectionOfferUUIDCall{Call: call} +} + +// MockMigrationOfferConnectionOfferUUIDCall wrap *gomock.Call +type MockMigrationOfferConnectionOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationOfferConnectionOfferUUIDCall) Return(arg0 string) *MockMigrationOfferConnectionOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationOfferConnectionOfferUUIDCall) Do(f func() string) *MockMigrationOfferConnectionOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationOfferConnectionOfferUUIDCall) DoAndReturn(f func() string) *MockMigrationOfferConnectionOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationId mocks base method. @@ -62,9 +86,33 @@ func (m *MockMigrationOfferConnection) RelationId() int { } // RelationId indicates an expected call of RelationId. -func (mr *MockMigrationOfferConnectionMockRecorder) RelationId() *gomock.Call { +func (mr *MockMigrationOfferConnectionMockRecorder) RelationId() *MockMigrationOfferConnectionRelationIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationId", reflect.TypeOf((*MockMigrationOfferConnection)(nil).RelationId)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationId", reflect.TypeOf((*MockMigrationOfferConnection)(nil).RelationId)) + return &MockMigrationOfferConnectionRelationIdCall{Call: call} +} + +// MockMigrationOfferConnectionRelationIdCall wrap *gomock.Call +type MockMigrationOfferConnectionRelationIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationOfferConnectionRelationIdCall) Return(arg0 int) *MockMigrationOfferConnectionRelationIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationOfferConnectionRelationIdCall) Do(f func() int) *MockMigrationOfferConnectionRelationIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationOfferConnectionRelationIdCall) DoAndReturn(f func() int) *MockMigrationOfferConnectionRelationIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationKey mocks base method. @@ -76,9 +124,33 @@ func (m *MockMigrationOfferConnection) RelationKey() string { } // RelationKey indicates an expected call of RelationKey. -func (mr *MockMigrationOfferConnectionMockRecorder) RelationKey() *gomock.Call { +func (mr *MockMigrationOfferConnectionMockRecorder) RelationKey() *MockMigrationOfferConnectionRelationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockMigrationOfferConnection)(nil).RelationKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockMigrationOfferConnection)(nil).RelationKey)) + return &MockMigrationOfferConnectionRelationKeyCall{Call: call} +} + +// MockMigrationOfferConnectionRelationKeyCall wrap *gomock.Call +type MockMigrationOfferConnectionRelationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationOfferConnectionRelationKeyCall) Return(arg0 string) *MockMigrationOfferConnectionRelationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationOfferConnectionRelationKeyCall) Do(f func() string) *MockMigrationOfferConnectionRelationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationOfferConnectionRelationKeyCall) DoAndReturn(f func() string) *MockMigrationOfferConnectionRelationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModelUUID mocks base method. @@ -90,9 +162,33 @@ func (m *MockMigrationOfferConnection) SourceModelUUID() string { } // SourceModelUUID indicates an expected call of SourceModelUUID. -func (mr *MockMigrationOfferConnectionMockRecorder) SourceModelUUID() *gomock.Call { +func (mr *MockMigrationOfferConnectionMockRecorder) SourceModelUUID() *MockMigrationOfferConnectionSourceModelUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelUUID", reflect.TypeOf((*MockMigrationOfferConnection)(nil).SourceModelUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModelUUID", reflect.TypeOf((*MockMigrationOfferConnection)(nil).SourceModelUUID)) + return &MockMigrationOfferConnectionSourceModelUUIDCall{Call: call} +} + +// MockMigrationOfferConnectionSourceModelUUIDCall wrap *gomock.Call +type MockMigrationOfferConnectionSourceModelUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationOfferConnectionSourceModelUUIDCall) Return(arg0 string) *MockMigrationOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationOfferConnectionSourceModelUUIDCall) Do(f func() string) *MockMigrationOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationOfferConnectionSourceModelUUIDCall) DoAndReturn(f func() string) *MockMigrationOfferConnectionSourceModelUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UserName mocks base method. @@ -104,9 +200,33 @@ func (m *MockMigrationOfferConnection) UserName() string { } // UserName indicates an expected call of UserName. -func (mr *MockMigrationOfferConnectionMockRecorder) UserName() *gomock.Call { +func (mr *MockMigrationOfferConnectionMockRecorder) UserName() *MockMigrationOfferConnectionUserNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockMigrationOfferConnection)(nil).UserName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserName", reflect.TypeOf((*MockMigrationOfferConnection)(nil).UserName)) + return &MockMigrationOfferConnectionUserNameCall{Call: call} +} + +// MockMigrationOfferConnectionUserNameCall wrap *gomock.Call +type MockMigrationOfferConnectionUserNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationOfferConnectionUserNameCall) Return(arg0 string) *MockMigrationOfferConnectionUserNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationOfferConnectionUserNameCall) Do(f func() string) *MockMigrationOfferConnectionUserNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationOfferConnectionUserNameCall) DoAndReturn(f func() string) *MockMigrationOfferConnectionUserNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAllOfferConnectionSource is a mock of AllOfferConnectionSource interface. @@ -142,9 +262,33 @@ func (m *MockAllOfferConnectionSource) AllOfferConnections() ([]MigrationOfferCo } // AllOfferConnections indicates an expected call of AllOfferConnections. -func (mr *MockAllOfferConnectionSourceMockRecorder) AllOfferConnections() *gomock.Call { +func (mr *MockAllOfferConnectionSourceMockRecorder) AllOfferConnections() *MockAllOfferConnectionSourceAllOfferConnectionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllOfferConnections", reflect.TypeOf((*MockAllOfferConnectionSource)(nil).AllOfferConnections)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllOfferConnections", reflect.TypeOf((*MockAllOfferConnectionSource)(nil).AllOfferConnections)) + return &MockAllOfferConnectionSourceAllOfferConnectionsCall{Call: call} +} + +// MockAllOfferConnectionSourceAllOfferConnectionsCall wrap *gomock.Call +type MockAllOfferConnectionSourceAllOfferConnectionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllOfferConnectionSourceAllOfferConnectionsCall) Return(arg0 []MigrationOfferConnection, arg1 error) *MockAllOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllOfferConnectionSourceAllOfferConnectionsCall) Do(f func() ([]MigrationOfferConnection, error)) *MockAllOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllOfferConnectionSourceAllOfferConnectionsCall) DoAndReturn(f func() ([]MigrationOfferConnection, error)) *MockAllOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockOfferConnectionSource is a mock of OfferConnectionSource interface. @@ -180,9 +324,33 @@ func (m *MockOfferConnectionSource) AllOfferConnections() ([]MigrationOfferConne } // AllOfferConnections indicates an expected call of AllOfferConnections. -func (mr *MockOfferConnectionSourceMockRecorder) AllOfferConnections() *gomock.Call { +func (mr *MockOfferConnectionSourceMockRecorder) AllOfferConnections() *MockOfferConnectionSourceAllOfferConnectionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllOfferConnections", reflect.TypeOf((*MockOfferConnectionSource)(nil).AllOfferConnections)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllOfferConnections", reflect.TypeOf((*MockOfferConnectionSource)(nil).AllOfferConnections)) + return &MockOfferConnectionSourceAllOfferConnectionsCall{Call: call} +} + +// MockOfferConnectionSourceAllOfferConnectionsCall wrap *gomock.Call +type MockOfferConnectionSourceAllOfferConnectionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionSourceAllOfferConnectionsCall) Return(arg0 []MigrationOfferConnection, arg1 error) *MockOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionSourceAllOfferConnectionsCall) Do(f func() ([]MigrationOfferConnection, error)) *MockOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionSourceAllOfferConnectionsCall) DoAndReturn(f func() ([]MigrationOfferConnection, error)) *MockOfferConnectionSourceAllOfferConnectionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockOfferConnectionModel is a mock of OfferConnectionModel interface. @@ -217,7 +385,31 @@ func (m *MockOfferConnectionModel) AddOfferConnection(arg0 description.OfferConn } // AddOfferConnection indicates an expected call of AddOfferConnection. -func (mr *MockOfferConnectionModelMockRecorder) AddOfferConnection(arg0 any) *gomock.Call { +func (mr *MockOfferConnectionModelMockRecorder) AddOfferConnection(arg0 any) *MockOfferConnectionModelAddOfferConnectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOfferConnection", reflect.TypeOf((*MockOfferConnectionModel)(nil).AddOfferConnection), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOfferConnection", reflect.TypeOf((*MockOfferConnectionModel)(nil).AddOfferConnection), arg0) + return &MockOfferConnectionModelAddOfferConnectionCall{Call: call} +} + +// MockOfferConnectionModelAddOfferConnectionCall wrap *gomock.Call +type MockOfferConnectionModelAddOfferConnectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOfferConnectionModelAddOfferConnectionCall) Return(arg0 description.OfferConnection) *MockOfferConnectionModelAddOfferConnectionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOfferConnectionModelAddOfferConnectionCall) Do(f func(description.OfferConnectionArgs) description.OfferConnection) *MockOfferConnectionModelAddOfferConnectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOfferConnectionModelAddOfferConnectionCall) DoAndReturn(f func(description.OfferConnectionArgs) description.OfferConnection) *MockOfferConnectionModelAddOfferConnectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migrations/package_test.go b/state/migrations/package_test.go index 8c0b92a3fd9..75fc5bc6e28 100644 --- a/state/migrations/package_test.go +++ b/state/migrations/package_test.go @@ -9,12 +9,12 @@ import ( gc "gopkg.in/check.v1" ) -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination offerconntections_mock_test.go github.com/juju/juju/state/migrations MigrationOfferConnection,AllOfferConnectionSource,OfferConnectionSource,OfferConnectionModel -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination relationetworks_mock_test.go github.com/juju/juju/state/migrations MigrationRelationNetworks,RelationNetworksSource,RelationNetworksModel -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination remoteapplications_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteApplication,AllRemoteApplicationSource,StatusSource,RemoteApplicationSource,RemoteApplicationModel -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination remoteentities_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteEntity,RemoteEntitiesSource,RemoteEntitiesModel -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination description_mock_test.go github.com/juju/description/v6 OfferConnection,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status -//go:generate go run go.uber.org/mock/mockgen -package migrations -destination firewallrules_mock_test.go github.com/juju/juju/state/migrations MigrationFirewallRule,FirewallRuleSource,FirewallRulesModel +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination offerconntections_mock_test.go github.com/juju/juju/state/migrations MigrationOfferConnection,AllOfferConnectionSource,OfferConnectionSource,OfferConnectionModel +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination relationetworks_mock_test.go github.com/juju/juju/state/migrations MigrationRelationNetworks,RelationNetworksSource,RelationNetworksModel +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination remoteapplications_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteApplication,AllRemoteApplicationSource,StatusSource,RemoteApplicationSource,RemoteApplicationModel +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination remoteentities_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteEntity,RemoteEntitiesSource,RemoteEntitiesModel +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination description_mock_test.go github.com/juju/description/v6 OfferConnection,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status +//go:generate go run go.uber.org/mock/mockgen -typed -package migrations -destination firewallrules_mock_test.go github.com/juju/juju/state/migrations MigrationFirewallRule,FirewallRuleSource,FirewallRulesModel func TestPackage(t *testing.T) { gc.TestingT(t) diff --git a/state/migrations/relationetworks_mock_test.go b/state/migrations/relationetworks_mock_test.go index 2bdd53f7234..05fc520191c 100644 --- a/state/migrations/relationetworks_mock_test.go +++ b/state/migrations/relationetworks_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination relationetworks_mock_test.go github.com/juju/juju/state/migrations MigrationRelationNetworks,RelationNetworksSource,RelationNetworksModel +// mockgen -typed -package migrations -destination relationetworks_mock_test.go github.com/juju/juju/state/migrations MigrationRelationNetworks,RelationNetworksSource,RelationNetworksModel // // Package migrations is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockMigrationRelationNetworks) CIDRS() []string { } // CIDRS indicates an expected call of CIDRS. -func (mr *MockMigrationRelationNetworksMockRecorder) CIDRS() *gomock.Call { +func (mr *MockMigrationRelationNetworksMockRecorder) CIDRS() *MockMigrationRelationNetworksCIDRSCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).CIDRS)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CIDRS", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).CIDRS)) + return &MockMigrationRelationNetworksCIDRSCall{Call: call} +} + +// MockMigrationRelationNetworksCIDRSCall wrap *gomock.Call +type MockMigrationRelationNetworksCIDRSCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRelationNetworksCIDRSCall) Return(arg0 []string) *MockMigrationRelationNetworksCIDRSCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRelationNetworksCIDRSCall) Do(f func() []string) *MockMigrationRelationNetworksCIDRSCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRelationNetworksCIDRSCall) DoAndReturn(f func() []string) *MockMigrationRelationNetworksCIDRSCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -62,9 +86,33 @@ func (m *MockMigrationRelationNetworks) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMigrationRelationNetworksMockRecorder) Id() *gomock.Call { +func (mr *MockMigrationRelationNetworksMockRecorder) Id() *MockMigrationRelationNetworksIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).Id)) + return &MockMigrationRelationNetworksIdCall{Call: call} +} + +// MockMigrationRelationNetworksIdCall wrap *gomock.Call +type MockMigrationRelationNetworksIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRelationNetworksIdCall) Return(arg0 string) *MockMigrationRelationNetworksIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRelationNetworksIdCall) Do(f func() string) *MockMigrationRelationNetworksIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRelationNetworksIdCall) DoAndReturn(f func() string) *MockMigrationRelationNetworksIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RelationKey mocks base method. @@ -76,9 +124,33 @@ func (m *MockMigrationRelationNetworks) RelationKey() string { } // RelationKey indicates an expected call of RelationKey. -func (mr *MockMigrationRelationNetworksMockRecorder) RelationKey() *gomock.Call { +func (mr *MockMigrationRelationNetworksMockRecorder) RelationKey() *MockMigrationRelationNetworksRelationKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).RelationKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RelationKey", reflect.TypeOf((*MockMigrationRelationNetworks)(nil).RelationKey)) + return &MockMigrationRelationNetworksRelationKeyCall{Call: call} +} + +// MockMigrationRelationNetworksRelationKeyCall wrap *gomock.Call +type MockMigrationRelationNetworksRelationKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRelationNetworksRelationKeyCall) Return(arg0 string) *MockMigrationRelationNetworksRelationKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRelationNetworksRelationKeyCall) Do(f func() string) *MockMigrationRelationNetworksRelationKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRelationNetworksRelationKeyCall) DoAndReturn(f func() string) *MockMigrationRelationNetworksRelationKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationNetworksSource is a mock of RelationNetworksSource interface. @@ -114,9 +186,33 @@ func (m *MockRelationNetworksSource) AllRelationNetworks() ([]MigrationRelationN } // AllRelationNetworks indicates an expected call of AllRelationNetworks. -func (mr *MockRelationNetworksSourceMockRecorder) AllRelationNetworks() *gomock.Call { +func (mr *MockRelationNetworksSourceMockRecorder) AllRelationNetworks() *MockRelationNetworksSourceAllRelationNetworksCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelationNetworks", reflect.TypeOf((*MockRelationNetworksSource)(nil).AllRelationNetworks)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRelationNetworks", reflect.TypeOf((*MockRelationNetworksSource)(nil).AllRelationNetworks)) + return &MockRelationNetworksSourceAllRelationNetworksCall{Call: call} +} + +// MockRelationNetworksSourceAllRelationNetworksCall wrap *gomock.Call +type MockRelationNetworksSourceAllRelationNetworksCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworksSourceAllRelationNetworksCall) Return(arg0 []MigrationRelationNetworks, arg1 error) *MockRelationNetworksSourceAllRelationNetworksCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworksSourceAllRelationNetworksCall) Do(f func() ([]MigrationRelationNetworks, error)) *MockRelationNetworksSourceAllRelationNetworksCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworksSourceAllRelationNetworksCall) DoAndReturn(f func() ([]MigrationRelationNetworks, error)) *MockRelationNetworksSourceAllRelationNetworksCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRelationNetworksModel is a mock of RelationNetworksModel interface. @@ -151,7 +247,31 @@ func (m *MockRelationNetworksModel) AddRelationNetwork(arg0 description.Relation } // AddRelationNetwork indicates an expected call of AddRelationNetwork. -func (mr *MockRelationNetworksModelMockRecorder) AddRelationNetwork(arg0 any) *gomock.Call { +func (mr *MockRelationNetworksModelMockRecorder) AddRelationNetwork(arg0 any) *MockRelationNetworksModelAddRelationNetworkCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelationNetwork", reflect.TypeOf((*MockRelationNetworksModel)(nil).AddRelationNetwork), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelationNetwork", reflect.TypeOf((*MockRelationNetworksModel)(nil).AddRelationNetwork), arg0) + return &MockRelationNetworksModelAddRelationNetworkCall{Call: call} +} + +// MockRelationNetworksModelAddRelationNetworkCall wrap *gomock.Call +type MockRelationNetworksModelAddRelationNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRelationNetworksModelAddRelationNetworkCall) Return(arg0 description.RelationNetwork) *MockRelationNetworksModelAddRelationNetworkCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRelationNetworksModelAddRelationNetworkCall) Do(f func(description.RelationNetworkArgs) description.RelationNetwork) *MockRelationNetworksModelAddRelationNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRelationNetworksModelAddRelationNetworkCall) DoAndReturn(f func(description.RelationNetworkArgs) description.RelationNetwork) *MockRelationNetworksModelAddRelationNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migrations/remoteapplications_mock_test.go b/state/migrations/remoteapplications_mock_test.go index 15ece37271e..d899a70109f 100644 --- a/state/migrations/remoteapplications_mock_test.go +++ b/state/migrations/remoteapplications_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination remoteapplications_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteApplication,AllRemoteApplicationSource,StatusSource,RemoteApplicationSource,RemoteApplicationModel +// mockgen -typed -package migrations -destination remoteapplications_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteApplication,AllRemoteApplicationSource,StatusSource,RemoteApplicationSource,RemoteApplicationModel // // Package migrations is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockMigrationRemoteApplication) ConsumeVersion() int { } // ConsumeVersion indicates an expected call of ConsumeVersion. -func (mr *MockMigrationRemoteApplicationMockRecorder) ConsumeVersion() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) ConsumeVersion() *MockMigrationRemoteApplicationConsumeVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).ConsumeVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumeVersion", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).ConsumeVersion)) + return &MockMigrationRemoteApplicationConsumeVersionCall{Call: call} +} + +// MockMigrationRemoteApplicationConsumeVersionCall wrap *gomock.Call +type MockMigrationRemoteApplicationConsumeVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationConsumeVersionCall) Return(arg0 int) *MockMigrationRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationConsumeVersionCall) Do(f func() int) *MockMigrationRemoteApplicationConsumeVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationConsumeVersionCall) DoAndReturn(f func() int) *MockMigrationRemoteApplicationConsumeVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Endpoints mocks base method. @@ -64,9 +88,33 @@ func (m *MockMigrationRemoteApplication) Endpoints() ([]MigrationRemoteEndpoint, } // Endpoints indicates an expected call of Endpoints. -func (mr *MockMigrationRemoteApplicationMockRecorder) Endpoints() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) Endpoints() *MockMigrationRemoteApplicationEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Endpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoints", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Endpoints)) + return &MockMigrationRemoteApplicationEndpointsCall{Call: call} +} + +// MockMigrationRemoteApplicationEndpointsCall wrap *gomock.Call +type MockMigrationRemoteApplicationEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationEndpointsCall) Return(arg0 []MigrationRemoteEndpoint, arg1 error) *MockMigrationRemoteApplicationEndpointsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationEndpointsCall) Do(f func() ([]MigrationRemoteEndpoint, error)) *MockMigrationRemoteApplicationEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationEndpointsCall) DoAndReturn(f func() ([]MigrationRemoteEndpoint, error)) *MockMigrationRemoteApplicationEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GlobalKey mocks base method. @@ -78,9 +126,33 @@ func (m *MockMigrationRemoteApplication) GlobalKey() string { } // GlobalKey indicates an expected call of GlobalKey. -func (mr *MockMigrationRemoteApplicationMockRecorder) GlobalKey() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) GlobalKey() *MockMigrationRemoteApplicationGlobalKeyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GlobalKey", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).GlobalKey)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GlobalKey", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).GlobalKey)) + return &MockMigrationRemoteApplicationGlobalKeyCall{Call: call} +} + +// MockMigrationRemoteApplicationGlobalKeyCall wrap *gomock.Call +type MockMigrationRemoteApplicationGlobalKeyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationGlobalKeyCall) Return(arg0 string) *MockMigrationRemoteApplicationGlobalKeyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationGlobalKeyCall) Do(f func() string) *MockMigrationRemoteApplicationGlobalKeyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationGlobalKeyCall) DoAndReturn(f func() string) *MockMigrationRemoteApplicationGlobalKeyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // IsConsumerProxy mocks base method. @@ -92,9 +164,33 @@ func (m *MockMigrationRemoteApplication) IsConsumerProxy() bool { } // IsConsumerProxy indicates an expected call of IsConsumerProxy. -func (mr *MockMigrationRemoteApplicationMockRecorder) IsConsumerProxy() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) IsConsumerProxy() *MockMigrationRemoteApplicationIsConsumerProxyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).IsConsumerProxy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsConsumerProxy", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).IsConsumerProxy)) + return &MockMigrationRemoteApplicationIsConsumerProxyCall{Call: call} +} + +// MockMigrationRemoteApplicationIsConsumerProxyCall wrap *gomock.Call +type MockMigrationRemoteApplicationIsConsumerProxyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationIsConsumerProxyCall) Return(arg0 bool) *MockMigrationRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationIsConsumerProxyCall) Do(f func() bool) *MockMigrationRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationIsConsumerProxyCall) DoAndReturn(f func() bool) *MockMigrationRemoteApplicationIsConsumerProxyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -106,9 +202,33 @@ func (m *MockMigrationRemoteApplication) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockMigrationRemoteApplicationMockRecorder) Macaroon() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) Macaroon() *MockMigrationRemoteApplicationMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Macaroon)) + return &MockMigrationRemoteApplicationMacaroonCall{Call: call} +} + +// MockMigrationRemoteApplicationMacaroonCall wrap *gomock.Call +type MockMigrationRemoteApplicationMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationMacaroonCall) Return(arg0 string) *MockMigrationRemoteApplicationMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationMacaroonCall) Do(f func() string) *MockMigrationRemoteApplicationMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationMacaroonCall) DoAndReturn(f func() string) *MockMigrationRemoteApplicationMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OfferUUID mocks base method. @@ -120,9 +240,33 @@ func (m *MockMigrationRemoteApplication) OfferUUID() string { } // OfferUUID indicates an expected call of OfferUUID. -func (mr *MockMigrationRemoteApplicationMockRecorder) OfferUUID() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) OfferUUID() *MockMigrationRemoteApplicationOfferUUIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).OfferUUID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferUUID", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).OfferUUID)) + return &MockMigrationRemoteApplicationOfferUUIDCall{Call: call} +} + +// MockMigrationRemoteApplicationOfferUUIDCall wrap *gomock.Call +type MockMigrationRemoteApplicationOfferUUIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationOfferUUIDCall) Return(arg0 string) *MockMigrationRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationOfferUUIDCall) Do(f func() string) *MockMigrationRemoteApplicationOfferUUIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationOfferUUIDCall) DoAndReturn(f func() string) *MockMigrationRemoteApplicationOfferUUIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SourceModel mocks base method. @@ -134,9 +278,33 @@ func (m *MockMigrationRemoteApplication) SourceModel() names.ModelTag { } // SourceModel indicates an expected call of SourceModel. -func (mr *MockMigrationRemoteApplicationMockRecorder) SourceModel() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) SourceModel() *MockMigrationRemoteApplicationSourceModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModel", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).SourceModel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SourceModel", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).SourceModel)) + return &MockMigrationRemoteApplicationSourceModelCall{Call: call} +} + +// MockMigrationRemoteApplicationSourceModelCall wrap *gomock.Call +type MockMigrationRemoteApplicationSourceModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationSourceModelCall) Return(arg0 names.ModelTag) *MockMigrationRemoteApplicationSourceModelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationSourceModelCall) Do(f func() names.ModelTag) *MockMigrationRemoteApplicationSourceModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationSourceModelCall) DoAndReturn(f func() names.ModelTag) *MockMigrationRemoteApplicationSourceModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -148,9 +316,33 @@ func (m *MockMigrationRemoteApplication) Tag() names.Tag { } // Tag indicates an expected call of Tag. -func (mr *MockMigrationRemoteApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) Tag() *MockMigrationRemoteApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).Tag)) + return &MockMigrationRemoteApplicationTagCall{Call: call} +} + +// MockMigrationRemoteApplicationTagCall wrap *gomock.Call +type MockMigrationRemoteApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationTagCall) Return(arg0 names.Tag) *MockMigrationRemoteApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationTagCall) Do(f func() names.Tag) *MockMigrationRemoteApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationTagCall) DoAndReturn(f func() names.Tag) *MockMigrationRemoteApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // URL mocks base method. @@ -163,9 +355,33 @@ func (m *MockMigrationRemoteApplication) URL() (string, bool) { } // URL indicates an expected call of URL. -func (mr *MockMigrationRemoteApplicationMockRecorder) URL() *gomock.Call { +func (mr *MockMigrationRemoteApplicationMockRecorder) URL() *MockMigrationRemoteApplicationURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).URL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "URL", reflect.TypeOf((*MockMigrationRemoteApplication)(nil).URL)) + return &MockMigrationRemoteApplicationURLCall{Call: call} +} + +// MockMigrationRemoteApplicationURLCall wrap *gomock.Call +type MockMigrationRemoteApplicationURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteApplicationURLCall) Return(arg0 string, arg1 bool) *MockMigrationRemoteApplicationURLCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteApplicationURLCall) Do(f func() (string, bool)) *MockMigrationRemoteApplicationURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteApplicationURLCall) DoAndReturn(f func() (string, bool)) *MockMigrationRemoteApplicationURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockAllRemoteApplicationSource is a mock of AllRemoteApplicationSource interface. @@ -201,9 +417,33 @@ func (m *MockAllRemoteApplicationSource) AllRemoteApplications() ([]MigrationRem } // AllRemoteApplications indicates an expected call of AllRemoteApplications. -func (mr *MockAllRemoteApplicationSourceMockRecorder) AllRemoteApplications() *gomock.Call { +func (mr *MockAllRemoteApplicationSourceMockRecorder) AllRemoteApplications() *MockAllRemoteApplicationSourceAllRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockAllRemoteApplicationSource)(nil).AllRemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockAllRemoteApplicationSource)(nil).AllRemoteApplications)) + return &MockAllRemoteApplicationSourceAllRemoteApplicationsCall{Call: call} +} + +// MockAllRemoteApplicationSourceAllRemoteApplicationsCall wrap *gomock.Call +type MockAllRemoteApplicationSourceAllRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllRemoteApplicationSourceAllRemoteApplicationsCall) Return(arg0 []MigrationRemoteApplication, arg1 error) *MockAllRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllRemoteApplicationSourceAllRemoteApplicationsCall) Do(f func() ([]MigrationRemoteApplication, error)) *MockAllRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllRemoteApplicationSourceAllRemoteApplicationsCall) DoAndReturn(f func() ([]MigrationRemoteApplication, error)) *MockAllRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockStatusSource is a mock of StatusSource interface. @@ -239,9 +479,33 @@ func (m *MockStatusSource) StatusArgs(arg0 string) (description.StatusArgs, erro } // StatusArgs indicates an expected call of StatusArgs. -func (mr *MockStatusSourceMockRecorder) StatusArgs(arg0 any) *gomock.Call { +func (mr *MockStatusSourceMockRecorder) StatusArgs(arg0 any) *MockStatusSourceStatusArgsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusArgs", reflect.TypeOf((*MockStatusSource)(nil).StatusArgs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusArgs", reflect.TypeOf((*MockStatusSource)(nil).StatusArgs), arg0) + return &MockStatusSourceStatusArgsCall{Call: call} +} + +// MockStatusSourceStatusArgsCall wrap *gomock.Call +type MockStatusSourceStatusArgsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockStatusSourceStatusArgsCall) Return(arg0 description.StatusArgs, arg1 error) *MockStatusSourceStatusArgsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockStatusSourceStatusArgsCall) Do(f func(string) (description.StatusArgs, error)) *MockStatusSourceStatusArgsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockStatusSourceStatusArgsCall) DoAndReturn(f func(string) (description.StatusArgs, error)) *MockStatusSourceStatusArgsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplicationSource is a mock of RemoteApplicationSource interface. @@ -277,9 +541,33 @@ func (m *MockRemoteApplicationSource) AllRemoteApplications() ([]MigrationRemote } // AllRemoteApplications indicates an expected call of AllRemoteApplications. -func (mr *MockRemoteApplicationSourceMockRecorder) AllRemoteApplications() *gomock.Call { +func (mr *MockRemoteApplicationSourceMockRecorder) AllRemoteApplications() *MockRemoteApplicationSourceAllRemoteApplicationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockRemoteApplicationSource)(nil).AllRemoteApplications)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteApplications", reflect.TypeOf((*MockRemoteApplicationSource)(nil).AllRemoteApplications)) + return &MockRemoteApplicationSourceAllRemoteApplicationsCall{Call: call} +} + +// MockRemoteApplicationSourceAllRemoteApplicationsCall wrap *gomock.Call +type MockRemoteApplicationSourceAllRemoteApplicationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSourceAllRemoteApplicationsCall) Return(arg0 []MigrationRemoteApplication, arg1 error) *MockRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSourceAllRemoteApplicationsCall) Do(f func() ([]MigrationRemoteApplication, error)) *MockRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSourceAllRemoteApplicationsCall) DoAndReturn(f func() ([]MigrationRemoteApplication, error)) *MockRemoteApplicationSourceAllRemoteApplicationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusArgs mocks base method. @@ -292,9 +580,33 @@ func (m *MockRemoteApplicationSource) StatusArgs(arg0 string) (description.Statu } // StatusArgs indicates an expected call of StatusArgs. -func (mr *MockRemoteApplicationSourceMockRecorder) StatusArgs(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationSourceMockRecorder) StatusArgs(arg0 any) *MockRemoteApplicationSourceStatusArgsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusArgs", reflect.TypeOf((*MockRemoteApplicationSource)(nil).StatusArgs), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusArgs", reflect.TypeOf((*MockRemoteApplicationSource)(nil).StatusArgs), arg0) + return &MockRemoteApplicationSourceStatusArgsCall{Call: call} +} + +// MockRemoteApplicationSourceStatusArgsCall wrap *gomock.Call +type MockRemoteApplicationSourceStatusArgsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationSourceStatusArgsCall) Return(arg0 description.StatusArgs, arg1 error) *MockRemoteApplicationSourceStatusArgsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationSourceStatusArgsCall) Do(f func(string) (description.StatusArgs, error)) *MockRemoteApplicationSourceStatusArgsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationSourceStatusArgsCall) DoAndReturn(f func(string) (description.StatusArgs, error)) *MockRemoteApplicationSourceStatusArgsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteApplicationModel is a mock of RemoteApplicationModel interface. @@ -329,7 +641,31 @@ func (m *MockRemoteApplicationModel) AddRemoteApplication(arg0 description.Remot } // AddRemoteApplication indicates an expected call of AddRemoteApplication. -func (mr *MockRemoteApplicationModelMockRecorder) AddRemoteApplication(arg0 any) *gomock.Call { +func (mr *MockRemoteApplicationModelMockRecorder) AddRemoteApplication(arg0 any) *MockRemoteApplicationModelAddRemoteApplicationCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockRemoteApplicationModel)(nil).AddRemoteApplication), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteApplication", reflect.TypeOf((*MockRemoteApplicationModel)(nil).AddRemoteApplication), arg0) + return &MockRemoteApplicationModelAddRemoteApplicationCall{Call: call} +} + +// MockRemoteApplicationModelAddRemoteApplicationCall wrap *gomock.Call +type MockRemoteApplicationModelAddRemoteApplicationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteApplicationModelAddRemoteApplicationCall) Return(arg0 description.RemoteApplication) *MockRemoteApplicationModelAddRemoteApplicationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteApplicationModelAddRemoteApplicationCall) Do(f func(description.RemoteApplicationArgs) description.RemoteApplication) *MockRemoteApplicationModelAddRemoteApplicationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteApplicationModelAddRemoteApplicationCall) DoAndReturn(f func(description.RemoteApplicationArgs) description.RemoteApplication) *MockRemoteApplicationModelAddRemoteApplicationCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/migrations/remoteentities_mock_test.go b/state/migrations/remoteentities_mock_test.go index 9ff03793866..2fb82e3e0d9 100644 --- a/state/migrations/remoteentities_mock_test.go +++ b/state/migrations/remoteentities_mock_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package migrations -destination remoteentities_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteEntity,RemoteEntitiesSource,RemoteEntitiesModel +// mockgen -typed -package migrations -destination remoteentities_mock_test.go github.com/juju/juju/state/migrations MigrationRemoteEntity,RemoteEntitiesSource,RemoteEntitiesModel // // Package migrations is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockMigrationRemoteEntity) ID() string { } // ID indicates an expected call of ID. -func (mr *MockMigrationRemoteEntityMockRecorder) ID() *gomock.Call { +func (mr *MockMigrationRemoteEntityMockRecorder) ID() *MockMigrationRemoteEntityIDCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).ID)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).ID)) + return &MockMigrationRemoteEntityIDCall{Call: call} +} + +// MockMigrationRemoteEntityIDCall wrap *gomock.Call +type MockMigrationRemoteEntityIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteEntityIDCall) Return(arg0 string) *MockMigrationRemoteEntityIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteEntityIDCall) Do(f func() string) *MockMigrationRemoteEntityIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteEntityIDCall) DoAndReturn(f func() string) *MockMigrationRemoteEntityIDCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Macaroon mocks base method. @@ -62,9 +86,33 @@ func (m *MockMigrationRemoteEntity) Macaroon() string { } // Macaroon indicates an expected call of Macaroon. -func (mr *MockMigrationRemoteEntityMockRecorder) Macaroon() *gomock.Call { +func (mr *MockMigrationRemoteEntityMockRecorder) Macaroon() *MockMigrationRemoteEntityMacaroonCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).Macaroon)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Macaroon", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).Macaroon)) + return &MockMigrationRemoteEntityMacaroonCall{Call: call} +} + +// MockMigrationRemoteEntityMacaroonCall wrap *gomock.Call +type MockMigrationRemoteEntityMacaroonCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteEntityMacaroonCall) Return(arg0 string) *MockMigrationRemoteEntityMacaroonCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteEntityMacaroonCall) Do(f func() string) *MockMigrationRemoteEntityMacaroonCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteEntityMacaroonCall) DoAndReturn(f func() string) *MockMigrationRemoteEntityMacaroonCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Token mocks base method. @@ -76,9 +124,33 @@ func (m *MockMigrationRemoteEntity) Token() string { } // Token indicates an expected call of Token. -func (mr *MockMigrationRemoteEntityMockRecorder) Token() *gomock.Call { +func (mr *MockMigrationRemoteEntityMockRecorder) Token() *MockMigrationRemoteEntityTokenCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).Token)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Token", reflect.TypeOf((*MockMigrationRemoteEntity)(nil).Token)) + return &MockMigrationRemoteEntityTokenCall{Call: call} +} + +// MockMigrationRemoteEntityTokenCall wrap *gomock.Call +type MockMigrationRemoteEntityTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMigrationRemoteEntityTokenCall) Return(arg0 string) *MockMigrationRemoteEntityTokenCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMigrationRemoteEntityTokenCall) Do(f func() string) *MockMigrationRemoteEntityTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMigrationRemoteEntityTokenCall) DoAndReturn(f func() string) *MockMigrationRemoteEntityTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteEntitiesSource is a mock of RemoteEntitiesSource interface. @@ -114,9 +186,33 @@ func (m *MockRemoteEntitiesSource) AllRemoteEntities() ([]MigrationRemoteEntity, } // AllRemoteEntities indicates an expected call of AllRemoteEntities. -func (mr *MockRemoteEntitiesSourceMockRecorder) AllRemoteEntities() *gomock.Call { +func (mr *MockRemoteEntitiesSourceMockRecorder) AllRemoteEntities() *MockRemoteEntitiesSourceAllRemoteEntitiesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteEntities", reflect.TypeOf((*MockRemoteEntitiesSource)(nil).AllRemoteEntities)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRemoteEntities", reflect.TypeOf((*MockRemoteEntitiesSource)(nil).AllRemoteEntities)) + return &MockRemoteEntitiesSourceAllRemoteEntitiesCall{Call: call} +} + +// MockRemoteEntitiesSourceAllRemoteEntitiesCall wrap *gomock.Call +type MockRemoteEntitiesSourceAllRemoteEntitiesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesSourceAllRemoteEntitiesCall) Return(arg0 []MigrationRemoteEntity, arg1 error) *MockRemoteEntitiesSourceAllRemoteEntitiesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesSourceAllRemoteEntitiesCall) Do(f func() ([]MigrationRemoteEntity, error)) *MockRemoteEntitiesSourceAllRemoteEntitiesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesSourceAllRemoteEntitiesCall) DoAndReturn(f func() ([]MigrationRemoteEntity, error)) *MockRemoteEntitiesSourceAllRemoteEntitiesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockRemoteEntitiesModel is a mock of RemoteEntitiesModel interface. @@ -151,7 +247,31 @@ func (m *MockRemoteEntitiesModel) AddRemoteEntity(arg0 description.RemoteEntityA } // AddRemoteEntity indicates an expected call of AddRemoteEntity. -func (mr *MockRemoteEntitiesModelMockRecorder) AddRemoteEntity(arg0 any) *gomock.Call { +func (mr *MockRemoteEntitiesModelMockRecorder) AddRemoteEntity(arg0 any) *MockRemoteEntitiesModelAddRemoteEntityCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteEntity", reflect.TypeOf((*MockRemoteEntitiesModel)(nil).AddRemoteEntity), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRemoteEntity", reflect.TypeOf((*MockRemoteEntitiesModel)(nil).AddRemoteEntity), arg0) + return &MockRemoteEntitiesModelAddRemoteEntityCall{Call: call} +} + +// MockRemoteEntitiesModelAddRemoteEntityCall wrap *gomock.Call +type MockRemoteEntitiesModelAddRemoteEntityCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRemoteEntitiesModelAddRemoteEntityCall) Return(arg0 description.RemoteEntity) *MockRemoteEntitiesModelAddRemoteEntityCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRemoteEntitiesModelAddRemoteEntityCall) Do(f func(description.RemoteEntityArgs) description.RemoteEntity) *MockRemoteEntitiesModelAddRemoteEntityCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRemoteEntitiesModelAddRemoteEntityCall) DoAndReturn(f func(description.RemoteEntityArgs) description.RemoteEntity) *MockRemoteEntitiesModelAddRemoteEntityCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/application_ports_mock.go b/state/mocks/application_ports_mock.go index 658964a261d..96b0f925471 100644 --- a/state/mocks/application_ports_mock.go +++ b/state/mocks/application_ports_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/application_ports_mock.go github.com/juju/juju/state ApplicationPortRanges +// mockgen -typed -package mocks -destination mocks/application_ports_mock.go github.com/juju/juju/state ApplicationPortRanges // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockApplicationPortRanges) ApplicationName() string { } // ApplicationName indicates an expected call of ApplicationName. -func (mr *MockApplicationPortRangesMockRecorder) ApplicationName() *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) ApplicationName() *MockApplicationPortRangesApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockApplicationPortRanges)(nil).ApplicationName)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockApplicationPortRanges)(nil).ApplicationName)) + return &MockApplicationPortRangesApplicationNameCall{Call: call} +} + +// MockApplicationPortRangesApplicationNameCall wrap *gomock.Call +type MockApplicationPortRangesApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesApplicationNameCall) Return(arg0 string) *MockApplicationPortRangesApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesApplicationNameCall) Do(f func() string) *MockApplicationPortRangesApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesApplicationNameCall) DoAndReturn(f func() string) *MockApplicationPortRangesApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ByEndpoint mocks base method. @@ -63,9 +87,33 @@ func (m *MockApplicationPortRanges) ByEndpoint() network.GroupedPortRanges { } // ByEndpoint indicates an expected call of ByEndpoint. -func (mr *MockApplicationPortRangesMockRecorder) ByEndpoint() *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) ByEndpoint() *MockApplicationPortRangesByEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockApplicationPortRanges)(nil).ByEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockApplicationPortRanges)(nil).ByEndpoint)) + return &MockApplicationPortRangesByEndpointCall{Call: call} +} + +// MockApplicationPortRangesByEndpointCall wrap *gomock.Call +type MockApplicationPortRangesByEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesByEndpointCall) Return(arg0 network.GroupedPortRanges) *MockApplicationPortRangesByEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesByEndpointCall) Do(f func() network.GroupedPortRanges) *MockApplicationPortRangesByEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesByEndpointCall) DoAndReturn(f func() network.GroupedPortRanges) *MockApplicationPortRangesByEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ByUnit mocks base method. @@ -77,9 +125,33 @@ func (m *MockApplicationPortRanges) ByUnit() map[string]state.UnitPortRanges { } // ByUnit indicates an expected call of ByUnit. -func (mr *MockApplicationPortRangesMockRecorder) ByUnit() *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) ByUnit() *MockApplicationPortRangesByUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockApplicationPortRanges)(nil).ByUnit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockApplicationPortRanges)(nil).ByUnit)) + return &MockApplicationPortRangesByUnitCall{Call: call} +} + +// MockApplicationPortRangesByUnitCall wrap *gomock.Call +type MockApplicationPortRangesByUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesByUnitCall) Return(arg0 map[string]state.UnitPortRanges) *MockApplicationPortRangesByUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesByUnitCall) Do(f func() map[string]state.UnitPortRanges) *MockApplicationPortRangesByUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesByUnitCall) DoAndReturn(f func() map[string]state.UnitPortRanges) *MockApplicationPortRangesByUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Changes mocks base method. @@ -91,9 +163,33 @@ func (m *MockApplicationPortRanges) Changes() state.ModelOperation { } // Changes indicates an expected call of Changes. -func (mr *MockApplicationPortRangesMockRecorder) Changes() *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) Changes() *MockApplicationPortRangesChangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockApplicationPortRanges)(nil).Changes)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Changes", reflect.TypeOf((*MockApplicationPortRanges)(nil).Changes)) + return &MockApplicationPortRangesChangesCall{Call: call} +} + +// MockApplicationPortRangesChangesCall wrap *gomock.Call +type MockApplicationPortRangesChangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesChangesCall) Return(arg0 state.ModelOperation) *MockApplicationPortRangesChangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesChangesCall) Do(f func() state.ModelOperation) *MockApplicationPortRangesChangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesChangesCall) DoAndReturn(f func() state.ModelOperation) *MockApplicationPortRangesChangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForUnit mocks base method. @@ -105,9 +201,33 @@ func (m *MockApplicationPortRanges) ForUnit(arg0 string) state.UnitPortRanges { } // ForUnit indicates an expected call of ForUnit. -func (mr *MockApplicationPortRangesMockRecorder) ForUnit(arg0 any) *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) ForUnit(arg0 any) *MockApplicationPortRangesForUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForUnit", reflect.TypeOf((*MockApplicationPortRanges)(nil).ForUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForUnit", reflect.TypeOf((*MockApplicationPortRanges)(nil).ForUnit), arg0) + return &MockApplicationPortRangesForUnitCall{Call: call} +} + +// MockApplicationPortRangesForUnitCall wrap *gomock.Call +type MockApplicationPortRangesForUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesForUnitCall) Return(arg0 state.UnitPortRanges) *MockApplicationPortRangesForUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesForUnitCall) Do(f func(string) state.UnitPortRanges) *MockApplicationPortRangesForUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesForUnitCall) DoAndReturn(f func(string) state.UnitPortRanges) *MockApplicationPortRangesForUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UniquePortRanges mocks base method. @@ -119,7 +239,31 @@ func (m *MockApplicationPortRanges) UniquePortRanges() []network.PortRange { } // UniquePortRanges indicates an expected call of UniquePortRanges. -func (mr *MockApplicationPortRangesMockRecorder) UniquePortRanges() *gomock.Call { +func (mr *MockApplicationPortRangesMockRecorder) UniquePortRanges() *MockApplicationPortRangesUniquePortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockApplicationPortRanges)(nil).UniquePortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UniquePortRanges", reflect.TypeOf((*MockApplicationPortRanges)(nil).UniquePortRanges)) + return &MockApplicationPortRangesUniquePortRangesCall{Call: call} +} + +// MockApplicationPortRangesUniquePortRangesCall wrap *gomock.Call +type MockApplicationPortRangesUniquePortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPortRangesUniquePortRangesCall) Return(arg0 []network.PortRange) *MockApplicationPortRangesUniquePortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPortRangesUniquePortRangesCall) Do(f func() []network.PortRange) *MockApplicationPortRangesUniquePortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPortRangesUniquePortRangesCall) DoAndReturn(f func() []network.PortRange) *MockApplicationPortRangesUniquePortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/clock_mock.go b/state/mocks/clock_mock.go index d7c49f0a5e2..8133ac86112 100644 --- a/state/mocks/clock_mock.go +++ b/state/mocks/clock_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock +// mockgen -typed -package mocks -destination mocks/clock_mock.go github.com/juju/clock Clock // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockClock) After(arg0 time.Duration) <-chan time.Time { } // After indicates an expected call of After. -func (mr *MockClockMockRecorder) After(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) After(arg0 any) *MockClockAfterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0) + return &MockClockAfterCall{Call: call} +} + +// MockClockAfterCall wrap *gomock.Call +type MockClockAfterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterCall) Return(arg0 <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterCall) Do(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterCall) DoAndReturn(f func(time.Duration) <-chan time.Time) *MockClockAfterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AfterFunc mocks base method. @@ -63,9 +87,33 @@ func (m *MockClock) AfterFunc(arg0 time.Duration, arg1 func()) clock.Timer { } // AfterFunc indicates an expected call of AfterFunc. -func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *gomock.Call { +func (mr *MockClockMockRecorder) AfterFunc(arg0, arg1 any) *MockClockAfterFuncCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), arg0, arg1) + return &MockClockAfterFuncCall{Call: call} +} + +// MockClockAfterFuncCall wrap *gomock.Call +type MockClockAfterFuncCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockAfterFuncCall) Return(arg0 clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockAfterFuncCall) Do(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockAfterFuncCall) DoAndReturn(f func(time.Duration, func()) clock.Timer) *MockClockAfterFuncCall { + c.Call = c.Call.DoAndReturn(f) + return c } // NewTimer mocks base method. @@ -77,9 +125,33 @@ func (m *MockClock) NewTimer(arg0 time.Duration) clock.Timer { } // NewTimer indicates an expected call of NewTimer. -func (mr *MockClockMockRecorder) NewTimer(arg0 any) *gomock.Call { +func (mr *MockClockMockRecorder) NewTimer(arg0 any) *MockClockNewTimerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), arg0) + return &MockClockNewTimerCall{Call: call} +} + +// MockClockNewTimerCall wrap *gomock.Call +type MockClockNewTimerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNewTimerCall) Return(arg0 clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNewTimerCall) Do(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNewTimerCall) DoAndReturn(f func(time.Duration) clock.Timer) *MockClockNewTimerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Now mocks base method. @@ -91,7 +163,31 @@ func (m *MockClock) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockClockMockRecorder) Now() *gomock.Call { +func (mr *MockClockMockRecorder) Now() *MockClockNowCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now)) + return &MockClockNowCall{Call: call} +} + +// MockClockNowCall wrap *gomock.Call +type MockClockNowCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClockNowCall) Return(arg0 time.Time) *MockClockNowCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClockNowCall) Do(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClockNowCall) DoAndReturn(f func() time.Time) *MockClockNowCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/database_mock.go b/state/mocks/database_mock.go index 6abf0672348..6d4ec60b277 100644 --- a/state/mocks/database_mock.go +++ b/state/mocks/database_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/database_mock.go github.com/juju/juju/state Database +// mockgen -typed -package mocks -destination mocks/database_mock.go github.com/juju/juju/state Database // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockDatabase) Copy() (state.Database, state.SessionCloser) { } // Copy indicates an expected call of Copy. -func (mr *MockDatabaseMockRecorder) Copy() *gomock.Call { +func (mr *MockDatabaseMockRecorder) Copy() *MockDatabaseCopyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockDatabase)(nil).Copy)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockDatabase)(nil).Copy)) + return &MockDatabaseCopyCall{Call: call} +} + +// MockDatabaseCopyCall wrap *gomock.Call +type MockDatabaseCopyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseCopyCall) Return(arg0 state.Database, arg1 state.SessionCloser) *MockDatabaseCopyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseCopyCall) Do(f func() (state.Database, state.SessionCloser)) *MockDatabaseCopyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseCopyCall) DoAndReturn(f func() (state.Database, state.SessionCloser)) *MockDatabaseCopyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CopyForModel mocks base method. @@ -68,9 +92,33 @@ func (m *MockDatabase) CopyForModel(arg0 string) (state.Database, state.SessionC } // CopyForModel indicates an expected call of CopyForModel. -func (mr *MockDatabaseMockRecorder) CopyForModel(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) CopyForModel(arg0 any) *MockDatabaseCopyForModelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyForModel", reflect.TypeOf((*MockDatabase)(nil).CopyForModel), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyForModel", reflect.TypeOf((*MockDatabase)(nil).CopyForModel), arg0) + return &MockDatabaseCopyForModelCall{Call: call} +} + +// MockDatabaseCopyForModelCall wrap *gomock.Call +type MockDatabaseCopyForModelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseCopyForModelCall) Return(arg0 state.Database, arg1 state.SessionCloser) *MockDatabaseCopyForModelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseCopyForModelCall) Do(f func(string) (state.Database, state.SessionCloser)) *MockDatabaseCopyForModelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseCopyForModelCall) DoAndReturn(f func(string) (state.Database, state.SessionCloser)) *MockDatabaseCopyForModelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCollection mocks base method. @@ -83,9 +131,33 @@ func (m *MockDatabase) GetCollection(arg0 string) (mongo.Collection, state.Sessi } // GetCollection indicates an expected call of GetCollection. -func (mr *MockDatabaseMockRecorder) GetCollection(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) GetCollection(arg0 any) *MockDatabaseGetCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollection", reflect.TypeOf((*MockDatabase)(nil).GetCollection), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollection", reflect.TypeOf((*MockDatabase)(nil).GetCollection), arg0) + return &MockDatabaseGetCollectionCall{Call: call} +} + +// MockDatabaseGetCollectionCall wrap *gomock.Call +type MockDatabaseGetCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseGetCollectionCall) Return(arg0 mongo.Collection, arg1 state.SessionCloser) *MockDatabaseGetCollectionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseGetCollectionCall) Do(f func(string) (mongo.Collection, state.SessionCloser)) *MockDatabaseGetCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseGetCollectionCall) DoAndReturn(f func(string) (mongo.Collection, state.SessionCloser)) *MockDatabaseGetCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetCollectionFor mocks base method. @@ -98,9 +170,33 @@ func (m *MockDatabase) GetCollectionFor(arg0, arg1 string) (mongo.Collection, st } // GetCollectionFor indicates an expected call of GetCollectionFor. -func (mr *MockDatabaseMockRecorder) GetCollectionFor(arg0, arg1 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) GetCollectionFor(arg0, arg1 any) *MockDatabaseGetCollectionForCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollectionFor", reflect.TypeOf((*MockDatabase)(nil).GetCollectionFor), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollectionFor", reflect.TypeOf((*MockDatabase)(nil).GetCollectionFor), arg0, arg1) + return &MockDatabaseGetCollectionForCall{Call: call} +} + +// MockDatabaseGetCollectionForCall wrap *gomock.Call +type MockDatabaseGetCollectionForCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseGetCollectionForCall) Return(arg0 mongo.Collection, arg1 state.SessionCloser) *MockDatabaseGetCollectionForCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseGetCollectionForCall) Do(f func(string, string) (mongo.Collection, state.SessionCloser)) *MockDatabaseGetCollectionForCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseGetCollectionForCall) DoAndReturn(f func(string, string) (mongo.Collection, state.SessionCloser)) *MockDatabaseGetCollectionForCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetRawCollection mocks base method. @@ -113,9 +209,33 @@ func (m *MockDatabase) GetRawCollection(arg0 string) (*mgo.Collection, state.Ses } // GetRawCollection indicates an expected call of GetRawCollection. -func (mr *MockDatabaseMockRecorder) GetRawCollection(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) GetRawCollection(arg0 any) *MockDatabaseGetRawCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRawCollection", reflect.TypeOf((*MockDatabase)(nil).GetRawCollection), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRawCollection", reflect.TypeOf((*MockDatabase)(nil).GetRawCollection), arg0) + return &MockDatabaseGetRawCollectionCall{Call: call} +} + +// MockDatabaseGetRawCollectionCall wrap *gomock.Call +type MockDatabaseGetRawCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseGetRawCollectionCall) Return(arg0 *mgo.Collection, arg1 state.SessionCloser) *MockDatabaseGetRawCollectionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseGetRawCollectionCall) Do(f func(string) (*mgo.Collection, state.SessionCloser)) *MockDatabaseGetRawCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseGetRawCollectionCall) DoAndReturn(f func(string) (*mgo.Collection, state.SessionCloser)) *MockDatabaseGetRawCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -127,9 +247,33 @@ func (m *MockDatabase) Run(arg0 txn0.TransactionSource) error { } // Run indicates an expected call of Run. -func (mr *MockDatabaseMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) Run(arg0 any) *MockDatabaseRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockDatabase)(nil).Run), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockDatabase)(nil).Run), arg0) + return &MockDatabaseRunCall{Call: call} +} + +// MockDatabaseRunCall wrap *gomock.Call +type MockDatabaseRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseRunCall) Return(arg0 error) *MockDatabaseRunCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseRunCall) Do(f func(txn0.TransactionSource) error) *MockDatabaseRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseRunCall) DoAndReturn(f func(txn0.TransactionSource) error) *MockDatabaseRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunRaw mocks base method. @@ -141,9 +285,33 @@ func (m *MockDatabase) RunRaw(arg0 txn0.TransactionSource) error { } // RunRaw indicates an expected call of RunRaw. -func (mr *MockDatabaseMockRecorder) RunRaw(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) RunRaw(arg0 any) *MockDatabaseRunRawCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunRaw", reflect.TypeOf((*MockDatabase)(nil).RunRaw), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunRaw", reflect.TypeOf((*MockDatabase)(nil).RunRaw), arg0) + return &MockDatabaseRunRawCall{Call: call} +} + +// MockDatabaseRunRawCall wrap *gomock.Call +type MockDatabaseRunRawCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseRunRawCall) Return(arg0 error) *MockDatabaseRunRawCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseRunRawCall) Do(f func(txn0.TransactionSource) error) *MockDatabaseRunRawCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseRunRawCall) DoAndReturn(f func(txn0.TransactionSource) error) *MockDatabaseRunRawCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunRawTransaction mocks base method. @@ -155,9 +323,33 @@ func (m *MockDatabase) RunRawTransaction(arg0 []txn.Op) error { } // RunRawTransaction indicates an expected call of RunRawTransaction. -func (mr *MockDatabaseMockRecorder) RunRawTransaction(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) RunRawTransaction(arg0 any) *MockDatabaseRunRawTransactionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunRawTransaction", reflect.TypeOf((*MockDatabase)(nil).RunRawTransaction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunRawTransaction", reflect.TypeOf((*MockDatabase)(nil).RunRawTransaction), arg0) + return &MockDatabaseRunRawTransactionCall{Call: call} +} + +// MockDatabaseRunRawTransactionCall wrap *gomock.Call +type MockDatabaseRunRawTransactionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseRunRawTransactionCall) Return(arg0 error) *MockDatabaseRunRawTransactionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseRunRawTransactionCall) Do(f func([]txn.Op) error) *MockDatabaseRunRawTransactionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseRunRawTransactionCall) DoAndReturn(f func([]txn.Op) error) *MockDatabaseRunRawTransactionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunTransaction mocks base method. @@ -169,9 +361,33 @@ func (m *MockDatabase) RunTransaction(arg0 []txn.Op) error { } // RunTransaction indicates an expected call of RunTransaction. -func (mr *MockDatabaseMockRecorder) RunTransaction(arg0 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) RunTransaction(arg0 any) *MockDatabaseRunTransactionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockDatabase)(nil).RunTransaction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockDatabase)(nil).RunTransaction), arg0) + return &MockDatabaseRunTransactionCall{Call: call} +} + +// MockDatabaseRunTransactionCall wrap *gomock.Call +type MockDatabaseRunTransactionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseRunTransactionCall) Return(arg0 error) *MockDatabaseRunTransactionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseRunTransactionCall) Do(f func([]txn.Op) error) *MockDatabaseRunTransactionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseRunTransactionCall) DoAndReturn(f func([]txn.Op) error) *MockDatabaseRunTransactionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunTransactionFor mocks base method. @@ -183,9 +399,33 @@ func (m *MockDatabase) RunTransactionFor(arg0 string, arg1 []txn.Op) error { } // RunTransactionFor indicates an expected call of RunTransactionFor. -func (mr *MockDatabaseMockRecorder) RunTransactionFor(arg0, arg1 any) *gomock.Call { +func (mr *MockDatabaseMockRecorder) RunTransactionFor(arg0, arg1 any) *MockDatabaseRunTransactionForCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransactionFor", reflect.TypeOf((*MockDatabase)(nil).RunTransactionFor), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransactionFor", reflect.TypeOf((*MockDatabase)(nil).RunTransactionFor), arg0, arg1) + return &MockDatabaseRunTransactionForCall{Call: call} +} + +// MockDatabaseRunTransactionForCall wrap *gomock.Call +type MockDatabaseRunTransactionForCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseRunTransactionForCall) Return(arg0 error) *MockDatabaseRunTransactionForCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseRunTransactionForCall) Do(f func(string, []txn.Op) error) *MockDatabaseRunTransactionForCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseRunTransactionForCall) DoAndReturn(f func(string, []txn.Op) error) *MockDatabaseRunTransactionForCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Schema mocks base method. @@ -197,9 +437,33 @@ func (m *MockDatabase) Schema() state.CollectionSchema { } // Schema indicates an expected call of Schema. -func (mr *MockDatabaseMockRecorder) Schema() *gomock.Call { +func (mr *MockDatabaseMockRecorder) Schema() *MockDatabaseSchemaCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schema", reflect.TypeOf((*MockDatabase)(nil).Schema)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schema", reflect.TypeOf((*MockDatabase)(nil).Schema)) + return &MockDatabaseSchemaCall{Call: call} +} + +// MockDatabaseSchemaCall wrap *gomock.Call +type MockDatabaseSchemaCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseSchemaCall) Return(arg0 state.CollectionSchema) *MockDatabaseSchemaCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseSchemaCall) Do(f func() state.CollectionSchema) *MockDatabaseSchemaCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseSchemaCall) DoAndReturn(f func() state.CollectionSchema) *MockDatabaseSchemaCall { + c.Call = c.Call.DoAndReturn(f) + return c } // TransactionRunner mocks base method. @@ -212,7 +476,31 @@ func (m *MockDatabase) TransactionRunner() (txn0.Runner, state.SessionCloser) { } // TransactionRunner indicates an expected call of TransactionRunner. -func (mr *MockDatabaseMockRecorder) TransactionRunner() *gomock.Call { +func (mr *MockDatabaseMockRecorder) TransactionRunner() *MockDatabaseTransactionRunnerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionRunner", reflect.TypeOf((*MockDatabase)(nil).TransactionRunner)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionRunner", reflect.TypeOf((*MockDatabase)(nil).TransactionRunner)) + return &MockDatabaseTransactionRunnerCall{Call: call} +} + +// MockDatabaseTransactionRunnerCall wrap *gomock.Call +type MockDatabaseTransactionRunnerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDatabaseTransactionRunnerCall) Return(arg0 txn0.Runner, arg1 state.SessionCloser) *MockDatabaseTransactionRunnerCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDatabaseTransactionRunnerCall) Do(f func() (txn0.Runner, state.SessionCloser)) *MockDatabaseTransactionRunnerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDatabaseTransactionRunnerCall) DoAndReturn(f func() (txn0.Runner, state.SessionCloser)) *MockDatabaseTransactionRunnerCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/description_mock.go b/state/mocks/description_mock.go index 12ad43ed23c..7b22e35376a 100644 --- a/state/mocks/description_mock.go +++ b/state/mocks/description_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/description_mock.go github.com/juju/description/v6 Application,Machine,PortRanges,UnitPortRanges +// mockgen -typed -package mocks -destination mocks/description_mock.go github.com/juju/description/v6 Application,Machine,PortRanges,UnitPortRanges // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockApplication) AddOffer(arg0 description.ApplicationOfferArgs) descri } // AddOffer indicates an expected call of AddOffer. -func (mr *MockApplicationMockRecorder) AddOffer(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddOffer(arg0 any) *MockApplicationAddOfferCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOffer", reflect.TypeOf((*MockApplication)(nil).AddOffer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOffer", reflect.TypeOf((*MockApplication)(nil).AddOffer), arg0) + return &MockApplicationAddOfferCall{Call: call} +} + +// MockApplicationAddOfferCall wrap *gomock.Call +type MockApplicationAddOfferCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddOfferCall) Return(arg0 description.ApplicationOffer) *MockApplicationAddOfferCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddOfferCall) Do(f func(description.ApplicationOfferArgs) description.ApplicationOffer) *MockApplicationAddOfferCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddOfferCall) DoAndReturn(f func(description.ApplicationOfferArgs) description.ApplicationOffer) *MockApplicationAddOfferCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddOpenedPortRange mocks base method. @@ -61,9 +85,33 @@ func (m *MockApplication) AddOpenedPortRange(arg0 description.OpenedPortRangeArg } // AddOpenedPortRange indicates an expected call of AddOpenedPortRange. -func (mr *MockApplicationMockRecorder) AddOpenedPortRange(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddOpenedPortRange(arg0 any) *MockApplicationAddOpenedPortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOpenedPortRange", reflect.TypeOf((*MockApplication)(nil).AddOpenedPortRange), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOpenedPortRange", reflect.TypeOf((*MockApplication)(nil).AddOpenedPortRange), arg0) + return &MockApplicationAddOpenedPortRangeCall{Call: call} +} + +// MockApplicationAddOpenedPortRangeCall wrap *gomock.Call +type MockApplicationAddOpenedPortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddOpenedPortRangeCall) Return() *MockApplicationAddOpenedPortRangeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddOpenedPortRangeCall) Do(f func(description.OpenedPortRangeArgs)) *MockApplicationAddOpenedPortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddOpenedPortRangeCall) DoAndReturn(f func(description.OpenedPortRangeArgs)) *MockApplicationAddOpenedPortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddResource mocks base method. @@ -75,9 +123,33 @@ func (m *MockApplication) AddResource(arg0 description.ResourceArgs) description } // AddResource indicates an expected call of AddResource. -func (mr *MockApplicationMockRecorder) AddResource(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddResource(arg0 any) *MockApplicationAddResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResource", reflect.TypeOf((*MockApplication)(nil).AddResource), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResource", reflect.TypeOf((*MockApplication)(nil).AddResource), arg0) + return &MockApplicationAddResourceCall{Call: call} +} + +// MockApplicationAddResourceCall wrap *gomock.Call +type MockApplicationAddResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddResourceCall) Return(arg0 description.Resource) *MockApplicationAddResourceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddResourceCall) Do(f func(description.ResourceArgs) description.Resource) *MockApplicationAddResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddResourceCall) DoAndReturn(f func(description.ResourceArgs) description.Resource) *MockApplicationAddResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddUnit mocks base method. @@ -89,9 +161,33 @@ func (m *MockApplication) AddUnit(arg0 description.UnitArgs) description.Unit { } // AddUnit indicates an expected call of AddUnit. -func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) AddUnit(arg0 any) *MockApplicationAddUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnit", reflect.TypeOf((*MockApplication)(nil).AddUnit), arg0) + return &MockApplicationAddUnitCall{Call: call} +} + +// MockApplicationAddUnitCall wrap *gomock.Call +type MockApplicationAddUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAddUnitCall) Return(arg0 description.Unit) *MockApplicationAddUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAddUnitCall) Do(f func(description.UnitArgs) description.Unit) *MockApplicationAddUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAddUnitCall) DoAndReturn(f func(description.UnitArgs) description.Unit) *MockApplicationAddUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotations mocks base method. @@ -103,9 +199,33 @@ func (m *MockApplication) Annotations() map[string]string { } // Annotations indicates an expected call of Annotations. -func (mr *MockApplicationMockRecorder) Annotations() *gomock.Call { +func (mr *MockApplicationMockRecorder) Annotations() *MockApplicationAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockApplication)(nil).Annotations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockApplication)(nil).Annotations)) + return &MockApplicationAnnotationsCall{Call: call} +} + +// MockApplicationAnnotationsCall wrap *gomock.Call +type MockApplicationAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationAnnotationsCall) Return(arg0 map[string]string) *MockApplicationAnnotationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationAnnotationsCall) Do(f func() map[string]string) *MockApplicationAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationAnnotationsCall) DoAndReturn(f func() map[string]string) *MockApplicationAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ApplicationConfig mocks base method. @@ -117,9 +237,33 @@ func (m *MockApplication) ApplicationConfig() map[string]any { } // ApplicationConfig indicates an expected call of ApplicationConfig. -func (mr *MockApplicationMockRecorder) ApplicationConfig() *gomock.Call { +func (mr *MockApplicationMockRecorder) ApplicationConfig() *MockApplicationApplicationConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationConfig", reflect.TypeOf((*MockApplication)(nil).ApplicationConfig)) + return &MockApplicationApplicationConfigCall{Call: call} +} + +// MockApplicationApplicationConfigCall wrap *gomock.Call +type MockApplicationApplicationConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationApplicationConfigCall) Return(arg0 map[string]any) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationApplicationConfigCall) Do(f func() map[string]any) *MockApplicationApplicationConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationApplicationConfigCall) DoAndReturn(f func() map[string]any) *MockApplicationApplicationConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Channel mocks base method. @@ -131,9 +275,33 @@ func (m *MockApplication) Channel() string { } // Channel indicates an expected call of Channel. -func (mr *MockApplicationMockRecorder) Channel() *gomock.Call { +func (mr *MockApplicationMockRecorder) Channel() *MockApplicationChannelCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Channel", reflect.TypeOf((*MockApplication)(nil).Channel)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Channel", reflect.TypeOf((*MockApplication)(nil).Channel)) + return &MockApplicationChannelCall{Call: call} +} + +// MockApplicationChannelCall wrap *gomock.Call +type MockApplicationChannelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationChannelCall) Return(arg0 string) *MockApplicationChannelCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationChannelCall) Do(f func() string) *MockApplicationChannelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationChannelCall) DoAndReturn(f func() string) *MockApplicationChannelCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmConfig mocks base method. @@ -145,9 +313,33 @@ func (m *MockApplication) CharmConfig() map[string]any { } // CharmConfig indicates an expected call of CharmConfig. -func (mr *MockApplicationMockRecorder) CharmConfig() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmConfig() *MockApplicationCharmConfigCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmConfig", reflect.TypeOf((*MockApplication)(nil).CharmConfig)) + return &MockApplicationCharmConfigCall{Call: call} +} + +// MockApplicationCharmConfigCall wrap *gomock.Call +type MockApplicationCharmConfigCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmConfigCall) Return(arg0 map[string]any) *MockApplicationCharmConfigCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmConfigCall) Do(f func() map[string]any) *MockApplicationCharmConfigCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmConfigCall) DoAndReturn(f func() map[string]any) *MockApplicationCharmConfigCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmModifiedVersion mocks base method. @@ -159,9 +351,33 @@ func (m *MockApplication) CharmModifiedVersion() int { } // CharmModifiedVersion indicates an expected call of CharmModifiedVersion. -func (mr *MockApplicationMockRecorder) CharmModifiedVersion() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmModifiedVersion() *MockApplicationCharmModifiedVersionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmModifiedVersion", reflect.TypeOf((*MockApplication)(nil).CharmModifiedVersion)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmModifiedVersion", reflect.TypeOf((*MockApplication)(nil).CharmModifiedVersion)) + return &MockApplicationCharmModifiedVersionCall{Call: call} +} + +// MockApplicationCharmModifiedVersionCall wrap *gomock.Call +type MockApplicationCharmModifiedVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmModifiedVersionCall) Return(arg0 int) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmModifiedVersionCall) Do(f func() int) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmModifiedVersionCall) DoAndReturn(f func() int) *MockApplicationCharmModifiedVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmOrigin mocks base method. @@ -173,9 +389,33 @@ func (m *MockApplication) CharmOrigin() description.CharmOrigin { } // CharmOrigin indicates an expected call of CharmOrigin. -func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmOrigin() *MockApplicationCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmOrigin", reflect.TypeOf((*MockApplication)(nil).CharmOrigin)) + return &MockApplicationCharmOriginCall{Call: call} +} + +// MockApplicationCharmOriginCall wrap *gomock.Call +type MockApplicationCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmOriginCall) Return(arg0 description.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmOriginCall) Do(f func() description.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmOriginCall) DoAndReturn(f func() description.CharmOrigin) *MockApplicationCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CharmURL mocks base method. @@ -187,9 +427,33 @@ func (m *MockApplication) CharmURL() string { } // CharmURL indicates an expected call of CharmURL. -func (mr *MockApplicationMockRecorder) CharmURL() *gomock.Call { +func (mr *MockApplicationMockRecorder) CharmURL() *MockApplicationCharmURLCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockApplication)(nil).CharmURL)) + return &MockApplicationCharmURLCall{Call: call} +} + +// MockApplicationCharmURLCall wrap *gomock.Call +type MockApplicationCharmURLCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCharmURLCall) Return(arg0 string) *MockApplicationCharmURLCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCharmURLCall) Do(f func() string) *MockApplicationCharmURLCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCharmURLCall) DoAndReturn(f func() string) *MockApplicationCharmURLCall { + c.Call = c.Call.DoAndReturn(f) + return c } // CloudService mocks base method. @@ -201,9 +465,33 @@ func (m *MockApplication) CloudService() description.CloudService { } // CloudService indicates an expected call of CloudService. -func (mr *MockApplicationMockRecorder) CloudService() *gomock.Call { +func (mr *MockApplicationMockRecorder) CloudService() *MockApplicationCloudServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockApplication)(nil).CloudService)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudService", reflect.TypeOf((*MockApplication)(nil).CloudService)) + return &MockApplicationCloudServiceCall{Call: call} +} + +// MockApplicationCloudServiceCall wrap *gomock.Call +type MockApplicationCloudServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationCloudServiceCall) Return(arg0 description.CloudService) *MockApplicationCloudServiceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationCloudServiceCall) Do(f func() description.CloudService) *MockApplicationCloudServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationCloudServiceCall) DoAndReturn(f func() description.CloudService) *MockApplicationCloudServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -215,9 +503,33 @@ func (m *MockApplication) Constraints() description.Constraints { } // Constraints indicates an expected call of Constraints. -func (mr *MockApplicationMockRecorder) Constraints() *gomock.Call { +func (mr *MockApplicationMockRecorder) Constraints() *MockApplicationConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockApplication)(nil).Constraints)) + return &MockApplicationConstraintsCall{Call: call} +} + +// MockApplicationConstraintsCall wrap *gomock.Call +type MockApplicationConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationConstraintsCall) Return(arg0 description.Constraints) *MockApplicationConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationConstraintsCall) Do(f func() description.Constraints) *MockApplicationConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationConstraintsCall) DoAndReturn(f func() description.Constraints) *MockApplicationConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // DesiredScale mocks base method. @@ -229,9 +541,33 @@ func (m *MockApplication) DesiredScale() int { } // DesiredScale indicates an expected call of DesiredScale. -func (mr *MockApplicationMockRecorder) DesiredScale() *gomock.Call { +func (mr *MockApplicationMockRecorder) DesiredScale() *MockApplicationDesiredScaleCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DesiredScale", reflect.TypeOf((*MockApplication)(nil).DesiredScale)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DesiredScale", reflect.TypeOf((*MockApplication)(nil).DesiredScale)) + return &MockApplicationDesiredScaleCall{Call: call} +} + +// MockApplicationDesiredScaleCall wrap *gomock.Call +type MockApplicationDesiredScaleCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationDesiredScaleCall) Return(arg0 int) *MockApplicationDesiredScaleCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationDesiredScaleCall) Do(f func() int) *MockApplicationDesiredScaleCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationDesiredScaleCall) DoAndReturn(f func() int) *MockApplicationDesiredScaleCall { + c.Call = c.Call.DoAndReturn(f) + return c } // EndpointBindings mocks base method. @@ -243,9 +579,33 @@ func (m *MockApplication) EndpointBindings() map[string]string { } // EndpointBindings indicates an expected call of EndpointBindings. -func (mr *MockApplicationMockRecorder) EndpointBindings() *gomock.Call { +func (mr *MockApplicationMockRecorder) EndpointBindings() *MockApplicationEndpointBindingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointBindings", reflect.TypeOf((*MockApplication)(nil).EndpointBindings)) + return &MockApplicationEndpointBindingsCall{Call: call} +} + +// MockApplicationEndpointBindingsCall wrap *gomock.Call +type MockApplicationEndpointBindingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationEndpointBindingsCall) Return(arg0 map[string]string) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationEndpointBindingsCall) Do(f func() map[string]string) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationEndpointBindingsCall) DoAndReturn(f func() map[string]string) *MockApplicationEndpointBindingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Exposed mocks base method. @@ -257,9 +617,33 @@ func (m *MockApplication) Exposed() bool { } // Exposed indicates an expected call of Exposed. -func (mr *MockApplicationMockRecorder) Exposed() *gomock.Call { +func (mr *MockApplicationMockRecorder) Exposed() *MockApplicationExposedCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exposed", reflect.TypeOf((*MockApplication)(nil).Exposed)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exposed", reflect.TypeOf((*MockApplication)(nil).Exposed)) + return &MockApplicationExposedCall{Call: call} +} + +// MockApplicationExposedCall wrap *gomock.Call +type MockApplicationExposedCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposedCall) Return(arg0 bool) *MockApplicationExposedCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposedCall) Do(f func() bool) *MockApplicationExposedCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposedCall) DoAndReturn(f func() bool) *MockApplicationExposedCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ExposedEndpoints mocks base method. @@ -271,9 +655,33 @@ func (m *MockApplication) ExposedEndpoints() map[string]description.ExposedEndpo } // ExposedEndpoints indicates an expected call of ExposedEndpoints. -func (mr *MockApplicationMockRecorder) ExposedEndpoints() *gomock.Call { +func (mr *MockApplicationMockRecorder) ExposedEndpoints() *MockApplicationExposedEndpointsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExposedEndpoints", reflect.TypeOf((*MockApplication)(nil).ExposedEndpoints)) + return &MockApplicationExposedEndpointsCall{Call: call} +} + +// MockApplicationExposedEndpointsCall wrap *gomock.Call +type MockApplicationExposedEndpointsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationExposedEndpointsCall) Return(arg0 map[string]description.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationExposedEndpointsCall) Do(f func() map[string]description.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationExposedEndpointsCall) DoAndReturn(f func() map[string]description.ExposedEndpoint) *MockApplicationExposedEndpointsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ForceCharm mocks base method. @@ -285,9 +693,33 @@ func (m *MockApplication) ForceCharm() bool { } // ForceCharm indicates an expected call of ForceCharm. -func (mr *MockApplicationMockRecorder) ForceCharm() *gomock.Call { +func (mr *MockApplicationMockRecorder) ForceCharm() *MockApplicationForceCharmCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceCharm", reflect.TypeOf((*MockApplication)(nil).ForceCharm)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceCharm", reflect.TypeOf((*MockApplication)(nil).ForceCharm)) + return &MockApplicationForceCharmCall{Call: call} +} + +// MockApplicationForceCharmCall wrap *gomock.Call +type MockApplicationForceCharmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationForceCharmCall) Return(arg0 bool) *MockApplicationForceCharmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationForceCharmCall) Do(f func() bool) *MockApplicationForceCharmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationForceCharmCall) DoAndReturn(f func() bool) *MockApplicationForceCharmCall { + c.Call = c.Call.DoAndReturn(f) + return c } // HasResources mocks base method. @@ -299,9 +731,33 @@ func (m *MockApplication) HasResources() bool { } // HasResources indicates an expected call of HasResources. -func (mr *MockApplicationMockRecorder) HasResources() *gomock.Call { +func (mr *MockApplicationMockRecorder) HasResources() *MockApplicationHasResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasResources", reflect.TypeOf((*MockApplication)(nil).HasResources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasResources", reflect.TypeOf((*MockApplication)(nil).HasResources)) + return &MockApplicationHasResourcesCall{Call: call} +} + +// MockApplicationHasResourcesCall wrap *gomock.Call +type MockApplicationHasResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationHasResourcesCall) Return(arg0 bool) *MockApplicationHasResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationHasResourcesCall) Do(f func() bool) *MockApplicationHasResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationHasResourcesCall) DoAndReturn(f func() bool) *MockApplicationHasResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Leader mocks base method. @@ -313,9 +769,33 @@ func (m *MockApplication) Leader() string { } // Leader indicates an expected call of Leader. -func (mr *MockApplicationMockRecorder) Leader() *gomock.Call { +func (mr *MockApplicationMockRecorder) Leader() *MockApplicationLeaderCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockApplication)(nil).Leader)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockApplication)(nil).Leader)) + return &MockApplicationLeaderCall{Call: call} +} + +// MockApplicationLeaderCall wrap *gomock.Call +type MockApplicationLeaderCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationLeaderCall) Return(arg0 string) *MockApplicationLeaderCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationLeaderCall) Do(f func() string) *MockApplicationLeaderCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationLeaderCall) DoAndReturn(f func() string) *MockApplicationLeaderCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LeadershipSettings mocks base method. @@ -327,9 +807,33 @@ func (m *MockApplication) LeadershipSettings() map[string]any { } // LeadershipSettings indicates an expected call of LeadershipSettings. -func (mr *MockApplicationMockRecorder) LeadershipSettings() *gomock.Call { +func (mr *MockApplicationMockRecorder) LeadershipSettings() *MockApplicationLeadershipSettingsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipSettings", reflect.TypeOf((*MockApplication)(nil).LeadershipSettings)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeadershipSettings", reflect.TypeOf((*MockApplication)(nil).LeadershipSettings)) + return &MockApplicationLeadershipSettingsCall{Call: call} +} + +// MockApplicationLeadershipSettingsCall wrap *gomock.Call +type MockApplicationLeadershipSettingsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationLeadershipSettingsCall) Return(arg0 map[string]any) *MockApplicationLeadershipSettingsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationLeadershipSettingsCall) Do(f func() map[string]any) *MockApplicationLeadershipSettingsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationLeadershipSettingsCall) DoAndReturn(f func() map[string]any) *MockApplicationLeadershipSettingsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MetricsCredentials mocks base method. @@ -341,9 +845,33 @@ func (m *MockApplication) MetricsCredentials() []byte { } // MetricsCredentials indicates an expected call of MetricsCredentials. -func (mr *MockApplicationMockRecorder) MetricsCredentials() *gomock.Call { +func (mr *MockApplicationMockRecorder) MetricsCredentials() *MockApplicationMetricsCredentialsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsCredentials", reflect.TypeOf((*MockApplication)(nil).MetricsCredentials)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MetricsCredentials", reflect.TypeOf((*MockApplication)(nil).MetricsCredentials)) + return &MockApplicationMetricsCredentialsCall{Call: call} +} + +// MockApplicationMetricsCredentialsCall wrap *gomock.Call +type MockApplicationMetricsCredentialsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMetricsCredentialsCall) Return(arg0 []byte) *MockApplicationMetricsCredentialsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMetricsCredentialsCall) Do(f func() []byte) *MockApplicationMetricsCredentialsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMetricsCredentialsCall) DoAndReturn(f func() []byte) *MockApplicationMetricsCredentialsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MinUnits mocks base method. @@ -355,9 +883,33 @@ func (m *MockApplication) MinUnits() int { } // MinUnits indicates an expected call of MinUnits. -func (mr *MockApplicationMockRecorder) MinUnits() *gomock.Call { +func (mr *MockApplicationMockRecorder) MinUnits() *MockApplicationMinUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinUnits", reflect.TypeOf((*MockApplication)(nil).MinUnits)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinUnits", reflect.TypeOf((*MockApplication)(nil).MinUnits)) + return &MockApplicationMinUnitsCall{Call: call} +} + +// MockApplicationMinUnitsCall wrap *gomock.Call +type MockApplicationMinUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationMinUnitsCall) Return(arg0 int) *MockApplicationMinUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationMinUnitsCall) Do(f func() int) *MockApplicationMinUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationMinUnitsCall) DoAndReturn(f func() int) *MockApplicationMinUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -369,9 +921,33 @@ func (m *MockApplication) Name() string { } // Name indicates an expected call of Name. -func (mr *MockApplicationMockRecorder) Name() *gomock.Call { +func (mr *MockApplicationMockRecorder) Name() *MockApplicationNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockApplication)(nil).Name)) + return &MockApplicationNameCall{Call: call} +} + +// MockApplicationNameCall wrap *gomock.Call +type MockApplicationNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationNameCall) Return(arg0 string) *MockApplicationNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationNameCall) Do(f func() string) *MockApplicationNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationNameCall) DoAndReturn(f func() string) *MockApplicationNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Offers mocks base method. @@ -383,9 +959,33 @@ func (m *MockApplication) Offers() []description.ApplicationOffer { } // Offers indicates an expected call of Offers. -func (mr *MockApplicationMockRecorder) Offers() *gomock.Call { +func (mr *MockApplicationMockRecorder) Offers() *MockApplicationOffersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offers", reflect.TypeOf((*MockApplication)(nil).Offers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Offers", reflect.TypeOf((*MockApplication)(nil).Offers)) + return &MockApplicationOffersCall{Call: call} +} + +// MockApplicationOffersCall wrap *gomock.Call +type MockApplicationOffersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOffersCall) Return(arg0 []description.ApplicationOffer) *MockApplicationOffersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOffersCall) Do(f func() []description.ApplicationOffer) *MockApplicationOffersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOffersCall) DoAndReturn(f func() []description.ApplicationOffer) *MockApplicationOffersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRanges mocks base method. @@ -397,9 +997,33 @@ func (m *MockApplication) OpenedPortRanges() description.PortRanges { } // OpenedPortRanges indicates an expected call of OpenedPortRanges. -func (mr *MockApplicationMockRecorder) OpenedPortRanges() *gomock.Call { +func (mr *MockApplicationMockRecorder) OpenedPortRanges() *MockApplicationOpenedPortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockApplication)(nil).OpenedPortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockApplication)(nil).OpenedPortRanges)) + return &MockApplicationOpenedPortRangesCall{Call: call} +} + +// MockApplicationOpenedPortRangesCall wrap *gomock.Call +type MockApplicationOpenedPortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOpenedPortRangesCall) Return(arg0 description.PortRanges) *MockApplicationOpenedPortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOpenedPortRangesCall) Do(f func() description.PortRanges) *MockApplicationOpenedPortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOpenedPortRangesCall) DoAndReturn(f func() description.PortRanges) *MockApplicationOpenedPortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OperatorStatus mocks base method. @@ -411,9 +1035,33 @@ func (m *MockApplication) OperatorStatus() description.Status { } // OperatorStatus indicates an expected call of OperatorStatus. -func (mr *MockApplicationMockRecorder) OperatorStatus() *gomock.Call { +func (mr *MockApplicationMockRecorder) OperatorStatus() *MockApplicationOperatorStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OperatorStatus", reflect.TypeOf((*MockApplication)(nil).OperatorStatus)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OperatorStatus", reflect.TypeOf((*MockApplication)(nil).OperatorStatus)) + return &MockApplicationOperatorStatusCall{Call: call} +} + +// MockApplicationOperatorStatusCall wrap *gomock.Call +type MockApplicationOperatorStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationOperatorStatusCall) Return(arg0 description.Status) *MockApplicationOperatorStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationOperatorStatusCall) Do(f func() description.Status) *MockApplicationOperatorStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationOperatorStatusCall) DoAndReturn(f func() description.Status) *MockApplicationOperatorStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PasswordHash mocks base method. @@ -425,9 +1073,33 @@ func (m *MockApplication) PasswordHash() string { } // PasswordHash indicates an expected call of PasswordHash. -func (mr *MockApplicationMockRecorder) PasswordHash() *gomock.Call { +func (mr *MockApplicationMockRecorder) PasswordHash() *MockApplicationPasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockApplication)(nil).PasswordHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockApplication)(nil).PasswordHash)) + return &MockApplicationPasswordHashCall{Call: call} +} + +// MockApplicationPasswordHashCall wrap *gomock.Call +type MockApplicationPasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPasswordHashCall) Return(arg0 string) *MockApplicationPasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPasswordHashCall) Do(f func() string) *MockApplicationPasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPasswordHashCall) DoAndReturn(f func() string) *MockApplicationPasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Placement mocks base method. @@ -439,9 +1111,33 @@ func (m *MockApplication) Placement() string { } // Placement indicates an expected call of Placement. -func (mr *MockApplicationMockRecorder) Placement() *gomock.Call { +func (mr *MockApplicationMockRecorder) Placement() *MockApplicationPlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockApplication)(nil).Placement)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockApplication)(nil).Placement)) + return &MockApplicationPlacementCall{Call: call} +} + +// MockApplicationPlacementCall wrap *gomock.Call +type MockApplicationPlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPlacementCall) Return(arg0 string) *MockApplicationPlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPlacementCall) Do(f func() string) *MockApplicationPlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPlacementCall) DoAndReturn(f func() string) *MockApplicationPlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PodSpec mocks base method. @@ -453,9 +1149,33 @@ func (m *MockApplication) PodSpec() string { } // PodSpec indicates an expected call of PodSpec. -func (mr *MockApplicationMockRecorder) PodSpec() *gomock.Call { +func (mr *MockApplicationMockRecorder) PodSpec() *MockApplicationPodSpecCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PodSpec", reflect.TypeOf((*MockApplication)(nil).PodSpec)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PodSpec", reflect.TypeOf((*MockApplication)(nil).PodSpec)) + return &MockApplicationPodSpecCall{Call: call} +} + +// MockApplicationPodSpecCall wrap *gomock.Call +type MockApplicationPodSpecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationPodSpecCall) Return(arg0 string) *MockApplicationPodSpecCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationPodSpecCall) Do(f func() string) *MockApplicationPodSpecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationPodSpecCall) DoAndReturn(f func() string) *MockApplicationPodSpecCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProvisioningState mocks base method. @@ -467,9 +1187,33 @@ func (m *MockApplication) ProvisioningState() description.ProvisioningState { } // ProvisioningState indicates an expected call of ProvisioningState. -func (mr *MockApplicationMockRecorder) ProvisioningState() *gomock.Call { +func (mr *MockApplicationMockRecorder) ProvisioningState() *MockApplicationProvisioningStateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningState", reflect.TypeOf((*MockApplication)(nil).ProvisioningState)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProvisioningState", reflect.TypeOf((*MockApplication)(nil).ProvisioningState)) + return &MockApplicationProvisioningStateCall{Call: call} +} + +// MockApplicationProvisioningStateCall wrap *gomock.Call +type MockApplicationProvisioningStateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationProvisioningStateCall) Return(arg0 description.ProvisioningState) *MockApplicationProvisioningStateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationProvisioningStateCall) Do(f func() description.ProvisioningState) *MockApplicationProvisioningStateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationProvisioningStateCall) DoAndReturn(f func() description.ProvisioningState) *MockApplicationProvisioningStateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Resources mocks base method. @@ -481,9 +1225,33 @@ func (m *MockApplication) Resources() []description.Resource { } // Resources indicates an expected call of Resources. -func (mr *MockApplicationMockRecorder) Resources() *gomock.Call { +func (mr *MockApplicationMockRecorder) Resources() *MockApplicationResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockApplication)(nil).Resources)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resources", reflect.TypeOf((*MockApplication)(nil).Resources)) + return &MockApplicationResourcesCall{Call: call} +} + +// MockApplicationResourcesCall wrap *gomock.Call +type MockApplicationResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationResourcesCall) Return(arg0 []description.Resource) *MockApplicationResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationResourcesCall) Do(f func() []description.Resource) *MockApplicationResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationResourcesCall) DoAndReturn(f func() []description.Resource) *MockApplicationResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAnnotations mocks base method. @@ -493,9 +1261,33 @@ func (m *MockApplication) SetAnnotations(arg0 map[string]string) { } // SetAnnotations indicates an expected call of SetAnnotations. -func (mr *MockApplicationMockRecorder) SetAnnotations(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetAnnotations(arg0 any) *MockApplicationSetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockApplication)(nil).SetAnnotations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockApplication)(nil).SetAnnotations), arg0) + return &MockApplicationSetAnnotationsCall{Call: call} +} + +// MockApplicationSetAnnotationsCall wrap *gomock.Call +type MockApplicationSetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetAnnotationsCall) Return() *MockApplicationSetAnnotationsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetAnnotationsCall) Do(f func(map[string]string)) *MockApplicationSetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetAnnotationsCall) DoAndReturn(f func(map[string]string)) *MockApplicationSetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmOrigin mocks base method. @@ -505,9 +1297,33 @@ func (m *MockApplication) SetCharmOrigin(arg0 description.CharmOriginArgs) { } // SetCharmOrigin indicates an expected call of SetCharmOrigin. -func (mr *MockApplicationMockRecorder) SetCharmOrigin(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetCharmOrigin(arg0 any) *MockApplicationSetCharmOriginCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmOrigin", reflect.TypeOf((*MockApplication)(nil).SetCharmOrigin), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmOrigin", reflect.TypeOf((*MockApplication)(nil).SetCharmOrigin), arg0) + return &MockApplicationSetCharmOriginCall{Call: call} +} + +// MockApplicationSetCharmOriginCall wrap *gomock.Call +type MockApplicationSetCharmOriginCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetCharmOriginCall) Return() *MockApplicationSetCharmOriginCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetCharmOriginCall) Do(f func(description.CharmOriginArgs)) *MockApplicationSetCharmOriginCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetCharmOriginCall) DoAndReturn(f func(description.CharmOriginArgs)) *MockApplicationSetCharmOriginCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCloudService mocks base method. @@ -517,9 +1333,33 @@ func (m *MockApplication) SetCloudService(arg0 description.CloudServiceArgs) { } // SetCloudService indicates an expected call of SetCloudService. -func (mr *MockApplicationMockRecorder) SetCloudService(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetCloudService(arg0 any) *MockApplicationSetCloudServiceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudService", reflect.TypeOf((*MockApplication)(nil).SetCloudService), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCloudService", reflect.TypeOf((*MockApplication)(nil).SetCloudService), arg0) + return &MockApplicationSetCloudServiceCall{Call: call} +} + +// MockApplicationSetCloudServiceCall wrap *gomock.Call +type MockApplicationSetCloudServiceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetCloudServiceCall) Return() *MockApplicationSetCloudServiceCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetCloudServiceCall) Do(f func(description.CloudServiceArgs)) *MockApplicationSetCloudServiceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetCloudServiceCall) DoAndReturn(f func(description.CloudServiceArgs)) *MockApplicationSetCloudServiceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -529,9 +1369,33 @@ func (m *MockApplication) SetConstraints(arg0 description.ConstraintsArgs) { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetConstraints(arg0 any) *MockApplicationSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplication)(nil).SetConstraints), arg0) + return &MockApplicationSetConstraintsCall{Call: call} +} + +// MockApplicationSetConstraintsCall wrap *gomock.Call +type MockApplicationSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetConstraintsCall) Return() *MockApplicationSetConstraintsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetConstraintsCall) Do(f func(description.ConstraintsArgs)) *MockApplicationSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetConstraintsCall) DoAndReturn(f func(description.ConstraintsArgs)) *MockApplicationSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetOperatorStatus mocks base method. @@ -541,9 +1405,33 @@ func (m *MockApplication) SetOperatorStatus(arg0 description.StatusArgs) { } // SetOperatorStatus indicates an expected call of SetOperatorStatus. -func (mr *MockApplicationMockRecorder) SetOperatorStatus(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetOperatorStatus(arg0 any) *MockApplicationSetOperatorStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOperatorStatus", reflect.TypeOf((*MockApplication)(nil).SetOperatorStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOperatorStatus", reflect.TypeOf((*MockApplication)(nil).SetOperatorStatus), arg0) + return &MockApplicationSetOperatorStatusCall{Call: call} +} + +// MockApplicationSetOperatorStatusCall wrap *gomock.Call +type MockApplicationSetOperatorStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetOperatorStatusCall) Return() *MockApplicationSetOperatorStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetOperatorStatusCall) Do(f func(description.StatusArgs)) *MockApplicationSetOperatorStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetOperatorStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockApplicationSetOperatorStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -553,9 +1441,33 @@ func (m *MockApplication) SetStatus(arg0 description.StatusArgs) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockApplicationMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetStatus(arg0 any) *MockApplicationSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockApplication)(nil).SetStatus), arg0) + return &MockApplicationSetStatusCall{Call: call} +} + +// MockApplicationSetStatusCall wrap *gomock.Call +type MockApplicationSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetStatusCall) Return() *MockApplicationSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetStatusCall) Do(f func(description.StatusArgs)) *MockApplicationSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockApplicationSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatusHistory mocks base method. @@ -565,9 +1477,33 @@ func (m *MockApplication) SetStatusHistory(arg0 []description.StatusArgs) { } // SetStatusHistory indicates an expected call of SetStatusHistory. -func (mr *MockApplicationMockRecorder) SetStatusHistory(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetStatusHistory(arg0 any) *MockApplicationSetStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockApplication)(nil).SetStatusHistory), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockApplication)(nil).SetStatusHistory), arg0) + return &MockApplicationSetStatusHistoryCall{Call: call} +} + +// MockApplicationSetStatusHistoryCall wrap *gomock.Call +type MockApplicationSetStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetStatusHistoryCall) Return() *MockApplicationSetStatusHistoryCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetStatusHistoryCall) Do(f func([]description.StatusArgs)) *MockApplicationSetStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetStatusHistoryCall) DoAndReturn(f func([]description.StatusArgs)) *MockApplicationSetStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetTools mocks base method. @@ -577,9 +1513,33 @@ func (m *MockApplication) SetTools(arg0 description.AgentToolsArgs) { } // SetTools indicates an expected call of SetTools. -func (mr *MockApplicationMockRecorder) SetTools(arg0 any) *gomock.Call { +func (mr *MockApplicationMockRecorder) SetTools(arg0 any) *MockApplicationSetToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTools", reflect.TypeOf((*MockApplication)(nil).SetTools), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTools", reflect.TypeOf((*MockApplication)(nil).SetTools), arg0) + return &MockApplicationSetToolsCall{Call: call} +} + +// MockApplicationSetToolsCall wrap *gomock.Call +type MockApplicationSetToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSetToolsCall) Return() *MockApplicationSetToolsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSetToolsCall) Do(f func(description.AgentToolsArgs)) *MockApplicationSetToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSetToolsCall) DoAndReturn(f func(description.AgentToolsArgs)) *MockApplicationSetToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -591,9 +1551,33 @@ func (m *MockApplication) Status() description.Status { } // Status indicates an expected call of Status. -func (mr *MockApplicationMockRecorder) Status() *gomock.Call { +func (mr *MockApplicationMockRecorder) Status() *MockApplicationStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockApplication)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockApplication)(nil).Status)) + return &MockApplicationStatusCall{Call: call} +} + +// MockApplicationStatusCall wrap *gomock.Call +type MockApplicationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationStatusCall) Return(arg0 description.Status) *MockApplicationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationStatusCall) Do(f func() description.Status) *MockApplicationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationStatusCall) DoAndReturn(f func() description.Status) *MockApplicationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusHistory mocks base method. @@ -605,9 +1589,33 @@ func (m *MockApplication) StatusHistory() []description.Status { } // StatusHistory indicates an expected call of StatusHistory. -func (mr *MockApplicationMockRecorder) StatusHistory() *gomock.Call { +func (mr *MockApplicationMockRecorder) StatusHistory() *MockApplicationStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockApplication)(nil).StatusHistory)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockApplication)(nil).StatusHistory)) + return &MockApplicationStatusHistoryCall{Call: call} +} + +// MockApplicationStatusHistoryCall wrap *gomock.Call +type MockApplicationStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationStatusHistoryCall) Return(arg0 []description.Status) *MockApplicationStatusHistoryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationStatusHistoryCall) Do(f func() []description.Status) *MockApplicationStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationStatusHistoryCall) DoAndReturn(f func() []description.Status) *MockApplicationStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StorageDirectives mocks base method. @@ -619,9 +1627,33 @@ func (m *MockApplication) StorageDirectives() map[string]description.StorageDire } // StorageDirectives indicates an expected call of StorageDirectives. -func (mr *MockApplicationMockRecorder) StorageDirectives() *gomock.Call { +func (mr *MockApplicationMockRecorder) StorageDirectives() *MockApplicationStorageDirectivesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageDirectives", reflect.TypeOf((*MockApplication)(nil).StorageDirectives)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageDirectives", reflect.TypeOf((*MockApplication)(nil).StorageDirectives)) + return &MockApplicationStorageDirectivesCall{Call: call} +} + +// MockApplicationStorageDirectivesCall wrap *gomock.Call +type MockApplicationStorageDirectivesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationStorageDirectivesCall) Return(arg0 map[string]description.StorageDirective) *MockApplicationStorageDirectivesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationStorageDirectivesCall) Do(f func() map[string]description.StorageDirective) *MockApplicationStorageDirectivesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationStorageDirectivesCall) DoAndReturn(f func() map[string]description.StorageDirective) *MockApplicationStorageDirectivesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Subordinate mocks base method. @@ -633,9 +1665,33 @@ func (m *MockApplication) Subordinate() bool { } // Subordinate indicates an expected call of Subordinate. -func (mr *MockApplicationMockRecorder) Subordinate() *gomock.Call { +func (mr *MockApplicationMockRecorder) Subordinate() *MockApplicationSubordinateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subordinate", reflect.TypeOf((*MockApplication)(nil).Subordinate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subordinate", reflect.TypeOf((*MockApplication)(nil).Subordinate)) + return &MockApplicationSubordinateCall{Call: call} +} + +// MockApplicationSubordinateCall wrap *gomock.Call +type MockApplicationSubordinateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationSubordinateCall) Return(arg0 bool) *MockApplicationSubordinateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationSubordinateCall) Do(f func() bool) *MockApplicationSubordinateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationSubordinateCall) DoAndReturn(f func() bool) *MockApplicationSubordinateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -647,9 +1703,33 @@ func (m *MockApplication) Tag() names.ApplicationTag { } // Tag indicates an expected call of Tag. -func (mr *MockApplicationMockRecorder) Tag() *gomock.Call { +func (mr *MockApplicationMockRecorder) Tag() *MockApplicationTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockApplication)(nil).Tag)) + return &MockApplicationTagCall{Call: call} +} + +// MockApplicationTagCall wrap *gomock.Call +type MockApplicationTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationTagCall) Return(arg0 names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationTagCall) Do(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationTagCall) DoAndReturn(f func() names.ApplicationTag) *MockApplicationTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tools mocks base method. @@ -661,9 +1741,33 @@ func (m *MockApplication) Tools() description.AgentTools { } // Tools indicates an expected call of Tools. -func (mr *MockApplicationMockRecorder) Tools() *gomock.Call { +func (mr *MockApplicationMockRecorder) Tools() *MockApplicationToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockApplication)(nil).Tools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockApplication)(nil).Tools)) + return &MockApplicationToolsCall{Call: call} +} + +// MockApplicationToolsCall wrap *gomock.Call +type MockApplicationToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationToolsCall) Return(arg0 description.AgentTools) *MockApplicationToolsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationToolsCall) Do(f func() description.AgentTools) *MockApplicationToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationToolsCall) DoAndReturn(f func() description.AgentTools) *MockApplicationToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Type mocks base method. @@ -675,9 +1779,33 @@ func (m *MockApplication) Type() string { } // Type indicates an expected call of Type. -func (mr *MockApplicationMockRecorder) Type() *gomock.Call { +func (mr *MockApplicationMockRecorder) Type() *MockApplicationTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockApplication)(nil).Type)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockApplication)(nil).Type)) + return &MockApplicationTypeCall{Call: call} +} + +// MockApplicationTypeCall wrap *gomock.Call +type MockApplicationTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationTypeCall) Return(arg0 string) *MockApplicationTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationTypeCall) Do(f func() string) *MockApplicationTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationTypeCall) DoAndReturn(f func() string) *MockApplicationTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Units mocks base method. @@ -689,9 +1817,33 @@ func (m *MockApplication) Units() []description.Unit { } // Units indicates an expected call of Units. -func (mr *MockApplicationMockRecorder) Units() *gomock.Call { +func (mr *MockApplicationMockRecorder) Units() *MockApplicationUnitsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockApplication)(nil).Units)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Units", reflect.TypeOf((*MockApplication)(nil).Units)) + return &MockApplicationUnitsCall{Call: call} +} + +// MockApplicationUnitsCall wrap *gomock.Call +type MockApplicationUnitsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationUnitsCall) Return(arg0 []description.Unit) *MockApplicationUnitsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationUnitsCall) Do(f func() []description.Unit) *MockApplicationUnitsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationUnitsCall) DoAndReturn(f func() []description.Unit) *MockApplicationUnitsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -703,9 +1855,33 @@ func (m *MockApplication) Validate() error { } // Validate indicates an expected call of Validate. -func (mr *MockApplicationMockRecorder) Validate() *gomock.Call { +func (mr *MockApplicationMockRecorder) Validate() *MockApplicationValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockApplication)(nil).Validate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockApplication)(nil).Validate)) + return &MockApplicationValidateCall{Call: call} +} + +// MockApplicationValidateCall wrap *gomock.Call +type MockApplicationValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockApplicationValidateCall) Return(arg0 error) *MockApplicationValidateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockApplicationValidateCall) Do(f func() error) *MockApplicationValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockApplicationValidateCall) DoAndReturn(f func() error) *MockApplicationValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockMachine is a mock of Machine interface. @@ -740,9 +1916,33 @@ func (m *MockMachine) AddBlockDevice(arg0 description.BlockDeviceArgs) descripti } // AddBlockDevice indicates an expected call of AddBlockDevice. -func (mr *MockMachineMockRecorder) AddBlockDevice(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AddBlockDevice(arg0 any) *MockMachineAddBlockDeviceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlockDevice", reflect.TypeOf((*MockMachine)(nil).AddBlockDevice), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlockDevice", reflect.TypeOf((*MockMachine)(nil).AddBlockDevice), arg0) + return &MockMachineAddBlockDeviceCall{Call: call} +} + +// MockMachineAddBlockDeviceCall wrap *gomock.Call +type MockMachineAddBlockDeviceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAddBlockDeviceCall) Return(arg0 description.BlockDevice) *MockMachineAddBlockDeviceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAddBlockDeviceCall) Do(f func(description.BlockDeviceArgs) description.BlockDevice) *MockMachineAddBlockDeviceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAddBlockDeviceCall) DoAndReturn(f func(description.BlockDeviceArgs) description.BlockDevice) *MockMachineAddBlockDeviceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddContainer mocks base method. @@ -754,9 +1954,33 @@ func (m *MockMachine) AddContainer(arg0 description.MachineArgs) description.Mac } // AddContainer indicates an expected call of AddContainer. -func (mr *MockMachineMockRecorder) AddContainer(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AddContainer(arg0 any) *MockMachineAddContainerCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContainer", reflect.TypeOf((*MockMachine)(nil).AddContainer), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContainer", reflect.TypeOf((*MockMachine)(nil).AddContainer), arg0) + return &MockMachineAddContainerCall{Call: call} +} + +// MockMachineAddContainerCall wrap *gomock.Call +type MockMachineAddContainerCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAddContainerCall) Return(arg0 description.Machine) *MockMachineAddContainerCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAddContainerCall) Do(f func(description.MachineArgs) description.Machine) *MockMachineAddContainerCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAddContainerCall) DoAndReturn(f func(description.MachineArgs) description.Machine) *MockMachineAddContainerCall { + c.Call = c.Call.DoAndReturn(f) + return c } // AddOpenedPortRange mocks base method. @@ -766,9 +1990,33 @@ func (m *MockMachine) AddOpenedPortRange(arg0 description.OpenedPortRangeArgs) { } // AddOpenedPortRange indicates an expected call of AddOpenedPortRange. -func (mr *MockMachineMockRecorder) AddOpenedPortRange(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) AddOpenedPortRange(arg0 any) *MockMachineAddOpenedPortRangeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOpenedPortRange", reflect.TypeOf((*MockMachine)(nil).AddOpenedPortRange), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOpenedPortRange", reflect.TypeOf((*MockMachine)(nil).AddOpenedPortRange), arg0) + return &MockMachineAddOpenedPortRangeCall{Call: call} +} + +// MockMachineAddOpenedPortRangeCall wrap *gomock.Call +type MockMachineAddOpenedPortRangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAddOpenedPortRangeCall) Return() *MockMachineAddOpenedPortRangeCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAddOpenedPortRangeCall) Do(f func(description.OpenedPortRangeArgs)) *MockMachineAddOpenedPortRangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAddOpenedPortRangeCall) DoAndReturn(f func(description.OpenedPortRangeArgs)) *MockMachineAddOpenedPortRangeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Annotations mocks base method. @@ -780,9 +2028,33 @@ func (m *MockMachine) Annotations() map[string]string { } // Annotations indicates an expected call of Annotations. -func (mr *MockMachineMockRecorder) Annotations() *gomock.Call { +func (mr *MockMachineMockRecorder) Annotations() *MockMachineAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockMachine)(nil).Annotations)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotations", reflect.TypeOf((*MockMachine)(nil).Annotations)) + return &MockMachineAnnotationsCall{Call: call} +} + +// MockMachineAnnotationsCall wrap *gomock.Call +type MockMachineAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineAnnotationsCall) Return(arg0 map[string]string) *MockMachineAnnotationsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineAnnotationsCall) Do(f func() map[string]string) *MockMachineAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineAnnotationsCall) DoAndReturn(f func() map[string]string) *MockMachineAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Base mocks base method. @@ -794,9 +2066,33 @@ func (m *MockMachine) Base() string { } // Base indicates an expected call of Base. -func (mr *MockMachineMockRecorder) Base() *gomock.Call { +func (mr *MockMachineMockRecorder) Base() *MockMachineBaseCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockMachine)(nil).Base)) + return &MockMachineBaseCall{Call: call} +} + +// MockMachineBaseCall wrap *gomock.Call +type MockMachineBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBaseCall) Return(arg0 string) *MockMachineBaseCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBaseCall) Do(f func() string) *MockMachineBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBaseCall) DoAndReturn(f func() string) *MockMachineBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c } // BlockDevices mocks base method. @@ -808,9 +2104,33 @@ func (m *MockMachine) BlockDevices() []description.BlockDevice { } // BlockDevices indicates an expected call of BlockDevices. -func (mr *MockMachineMockRecorder) BlockDevices() *gomock.Call { +func (mr *MockMachineMockRecorder) BlockDevices() *MockMachineBlockDevicesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockMachine)(nil).BlockDevices)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDevices", reflect.TypeOf((*MockMachine)(nil).BlockDevices)) + return &MockMachineBlockDevicesCall{Call: call} +} + +// MockMachineBlockDevicesCall wrap *gomock.Call +type MockMachineBlockDevicesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineBlockDevicesCall) Return(arg0 []description.BlockDevice) *MockMachineBlockDevicesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineBlockDevicesCall) Do(f func() []description.BlockDevice) *MockMachineBlockDevicesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineBlockDevicesCall) DoAndReturn(f func() []description.BlockDevice) *MockMachineBlockDevicesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Constraints mocks base method. @@ -822,9 +2142,33 @@ func (m *MockMachine) Constraints() description.Constraints { } // Constraints indicates an expected call of Constraints. -func (mr *MockMachineMockRecorder) Constraints() *gomock.Call { +func (mr *MockMachineMockRecorder) Constraints() *MockMachineConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Constraints", reflect.TypeOf((*MockMachine)(nil).Constraints)) + return &MockMachineConstraintsCall{Call: call} +} + +// MockMachineConstraintsCall wrap *gomock.Call +type MockMachineConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineConstraintsCall) Return(arg0 description.Constraints) *MockMachineConstraintsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineConstraintsCall) Do(f func() description.Constraints) *MockMachineConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineConstraintsCall) DoAndReturn(f func() description.Constraints) *MockMachineConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ContainerType mocks base method. @@ -836,9 +2180,33 @@ func (m *MockMachine) ContainerType() string { } // ContainerType indicates an expected call of ContainerType. -func (mr *MockMachineMockRecorder) ContainerType() *gomock.Call { +func (mr *MockMachineMockRecorder) ContainerType() *MockMachineContainerTypeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockMachine)(nil).ContainerType)) + return &MockMachineContainerTypeCall{Call: call} +} + +// MockMachineContainerTypeCall wrap *gomock.Call +type MockMachineContainerTypeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainerTypeCall) Return(arg0 string) *MockMachineContainerTypeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainerTypeCall) Do(f func() string) *MockMachineContainerTypeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainerTypeCall) DoAndReturn(f func() string) *MockMachineContainerTypeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Containers mocks base method. @@ -850,9 +2218,33 @@ func (m *MockMachine) Containers() []description.Machine { } // Containers indicates an expected call of Containers. -func (mr *MockMachineMockRecorder) Containers() *gomock.Call { +func (mr *MockMachineMockRecorder) Containers() *MockMachineContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Containers", reflect.TypeOf((*MockMachine)(nil).Containers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Containers", reflect.TypeOf((*MockMachine)(nil).Containers)) + return &MockMachineContainersCall{Call: call} +} + +// MockMachineContainersCall wrap *gomock.Call +type MockMachineContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineContainersCall) Return(arg0 []description.Machine) *MockMachineContainersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineContainersCall) Do(f func() []description.Machine) *MockMachineContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineContainersCall) DoAndReturn(f func() []description.Machine) *MockMachineContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Id mocks base method. @@ -864,9 +2256,33 @@ func (m *MockMachine) Id() string { } // Id indicates an expected call of Id. -func (mr *MockMachineMockRecorder) Id() *gomock.Call { +func (mr *MockMachineMockRecorder) Id() *MockMachineIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockMachine)(nil).Id)) + return &MockMachineIdCall{Call: call} +} + +// MockMachineIdCall wrap *gomock.Call +type MockMachineIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineIdCall) Return(arg0 string) *MockMachineIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineIdCall) Do(f func() string) *MockMachineIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineIdCall) DoAndReturn(f func() string) *MockMachineIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Instance mocks base method. @@ -878,9 +2294,33 @@ func (m *MockMachine) Instance() description.CloudInstance { } // Instance indicates an expected call of Instance. -func (mr *MockMachineMockRecorder) Instance() *gomock.Call { +func (mr *MockMachineMockRecorder) Instance() *MockMachineInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instance", reflect.TypeOf((*MockMachine)(nil).Instance)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instance", reflect.TypeOf((*MockMachine)(nil).Instance)) + return &MockMachineInstanceCall{Call: call} +} + +// MockMachineInstanceCall wrap *gomock.Call +type MockMachineInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineInstanceCall) Return(arg0 description.CloudInstance) *MockMachineInstanceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineInstanceCall) Do(f func() description.CloudInstance) *MockMachineInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineInstanceCall) DoAndReturn(f func() description.CloudInstance) *MockMachineInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Jobs mocks base method. @@ -892,9 +2332,33 @@ func (m *MockMachine) Jobs() []string { } // Jobs indicates an expected call of Jobs. -func (mr *MockMachineMockRecorder) Jobs() *gomock.Call { +func (mr *MockMachineMockRecorder) Jobs() *MockMachineJobsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jobs", reflect.TypeOf((*MockMachine)(nil).Jobs)) + return &MockMachineJobsCall{Call: call} +} + +// MockMachineJobsCall wrap *gomock.Call +type MockMachineJobsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineJobsCall) Return(arg0 []string) *MockMachineJobsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineJobsCall) Do(f func() []string) *MockMachineJobsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineJobsCall) DoAndReturn(f func() []string) *MockMachineJobsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MachineAddresses mocks base method. @@ -906,9 +2370,33 @@ func (m *MockMachine) MachineAddresses() []description.Address { } // MachineAddresses indicates an expected call of MachineAddresses. -func (mr *MockMachineMockRecorder) MachineAddresses() *gomock.Call { +func (mr *MockMachineMockRecorder) MachineAddresses() *MockMachineMachineAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineAddresses", reflect.TypeOf((*MockMachine)(nil).MachineAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MachineAddresses", reflect.TypeOf((*MockMachine)(nil).MachineAddresses)) + return &MockMachineMachineAddressesCall{Call: call} +} + +// MockMachineMachineAddressesCall wrap *gomock.Call +type MockMachineMachineAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineMachineAddressesCall) Return(arg0 []description.Address) *MockMachineMachineAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineMachineAddressesCall) Do(f func() []description.Address) *MockMachineMachineAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineMachineAddressesCall) DoAndReturn(f func() []description.Address) *MockMachineMachineAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Nonce mocks base method. @@ -920,9 +2408,33 @@ func (m *MockMachine) Nonce() string { } // Nonce indicates an expected call of Nonce. -func (mr *MockMachineMockRecorder) Nonce() *gomock.Call { +func (mr *MockMachineMockRecorder) Nonce() *MockMachineNonceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockMachine)(nil).Nonce)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nonce", reflect.TypeOf((*MockMachine)(nil).Nonce)) + return &MockMachineNonceCall{Call: call} +} + +// MockMachineNonceCall wrap *gomock.Call +type MockMachineNonceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineNonceCall) Return(arg0 string) *MockMachineNonceCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineNonceCall) Do(f func() string) *MockMachineNonceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineNonceCall) DoAndReturn(f func() string) *MockMachineNonceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenedPortRanges mocks base method. @@ -934,9 +2446,33 @@ func (m *MockMachine) OpenedPortRanges() description.PortRanges { } // OpenedPortRanges indicates an expected call of OpenedPortRanges. -func (mr *MockMachineMockRecorder) OpenedPortRanges() *gomock.Call { +func (mr *MockMachineMockRecorder) OpenedPortRanges() *MockMachineOpenedPortRangesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockMachine)(nil).OpenedPortRanges)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenedPortRanges", reflect.TypeOf((*MockMachine)(nil).OpenedPortRanges)) + return &MockMachineOpenedPortRangesCall{Call: call} +} + +// MockMachineOpenedPortRangesCall wrap *gomock.Call +type MockMachineOpenedPortRangesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineOpenedPortRangesCall) Return(arg0 description.PortRanges) *MockMachineOpenedPortRangesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineOpenedPortRangesCall) Do(f func() description.PortRanges) *MockMachineOpenedPortRangesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineOpenedPortRangesCall) DoAndReturn(f func() description.PortRanges) *MockMachineOpenedPortRangesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PasswordHash mocks base method. @@ -948,9 +2484,33 @@ func (m *MockMachine) PasswordHash() string { } // PasswordHash indicates an expected call of PasswordHash. -func (mr *MockMachineMockRecorder) PasswordHash() *gomock.Call { +func (mr *MockMachineMockRecorder) PasswordHash() *MockMachinePasswordHashCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockMachine)(nil).PasswordHash)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordHash", reflect.TypeOf((*MockMachine)(nil).PasswordHash)) + return &MockMachinePasswordHashCall{Call: call} +} + +// MockMachinePasswordHashCall wrap *gomock.Call +type MockMachinePasswordHashCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePasswordHashCall) Return(arg0 string) *MockMachinePasswordHashCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePasswordHashCall) Do(f func() string) *MockMachinePasswordHashCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePasswordHashCall) DoAndReturn(f func() string) *MockMachinePasswordHashCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Placement mocks base method. @@ -962,9 +2522,33 @@ func (m *MockMachine) Placement() string { } // Placement indicates an expected call of Placement. -func (mr *MockMachineMockRecorder) Placement() *gomock.Call { +func (mr *MockMachineMockRecorder) Placement() *MockMachinePlacementCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockMachine)(nil).Placement)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockMachine)(nil).Placement)) + return &MockMachinePlacementCall{Call: call} +} + +// MockMachinePlacementCall wrap *gomock.Call +type MockMachinePlacementCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePlacementCall) Return(arg0 string) *MockMachinePlacementCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePlacementCall) Do(f func() string) *MockMachinePlacementCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePlacementCall) DoAndReturn(f func() string) *MockMachinePlacementCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PreferredPrivateAddress mocks base method. @@ -976,9 +2560,33 @@ func (m *MockMachine) PreferredPrivateAddress() description.Address { } // PreferredPrivateAddress indicates an expected call of PreferredPrivateAddress. -func (mr *MockMachineMockRecorder) PreferredPrivateAddress() *gomock.Call { +func (mr *MockMachineMockRecorder) PreferredPrivateAddress() *MockMachinePreferredPrivateAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreferredPrivateAddress", reflect.TypeOf((*MockMachine)(nil).PreferredPrivateAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreferredPrivateAddress", reflect.TypeOf((*MockMachine)(nil).PreferredPrivateAddress)) + return &MockMachinePreferredPrivateAddressCall{Call: call} +} + +// MockMachinePreferredPrivateAddressCall wrap *gomock.Call +type MockMachinePreferredPrivateAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePreferredPrivateAddressCall) Return(arg0 description.Address) *MockMachinePreferredPrivateAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePreferredPrivateAddressCall) Do(f func() description.Address) *MockMachinePreferredPrivateAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePreferredPrivateAddressCall) DoAndReturn(f func() description.Address) *MockMachinePreferredPrivateAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // PreferredPublicAddress mocks base method. @@ -990,9 +2598,33 @@ func (m *MockMachine) PreferredPublicAddress() description.Address { } // PreferredPublicAddress indicates an expected call of PreferredPublicAddress. -func (mr *MockMachineMockRecorder) PreferredPublicAddress() *gomock.Call { +func (mr *MockMachineMockRecorder) PreferredPublicAddress() *MockMachinePreferredPublicAddressCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreferredPublicAddress", reflect.TypeOf((*MockMachine)(nil).PreferredPublicAddress)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreferredPublicAddress", reflect.TypeOf((*MockMachine)(nil).PreferredPublicAddress)) + return &MockMachinePreferredPublicAddressCall{Call: call} +} + +// MockMachinePreferredPublicAddressCall wrap *gomock.Call +type MockMachinePreferredPublicAddressCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachinePreferredPublicAddressCall) Return(arg0 description.Address) *MockMachinePreferredPublicAddressCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachinePreferredPublicAddressCall) Do(f func() description.Address) *MockMachinePreferredPublicAddressCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachinePreferredPublicAddressCall) DoAndReturn(f func() description.Address) *MockMachinePreferredPublicAddressCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ProviderAddresses mocks base method. @@ -1004,9 +2636,33 @@ func (m *MockMachine) ProviderAddresses() []description.Address { } // ProviderAddresses indicates an expected call of ProviderAddresses. -func (mr *MockMachineMockRecorder) ProviderAddresses() *gomock.Call { +func (mr *MockMachineMockRecorder) ProviderAddresses() *MockMachineProviderAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAddresses", reflect.TypeOf((*MockMachine)(nil).ProviderAddresses)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderAddresses", reflect.TypeOf((*MockMachine)(nil).ProviderAddresses)) + return &MockMachineProviderAddressesCall{Call: call} +} + +// MockMachineProviderAddressesCall wrap *gomock.Call +type MockMachineProviderAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineProviderAddressesCall) Return(arg0 []description.Address) *MockMachineProviderAddressesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineProviderAddressesCall) Do(f func() []description.Address) *MockMachineProviderAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineProviderAddressesCall) DoAndReturn(f func() []description.Address) *MockMachineProviderAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAddresses mocks base method. @@ -1016,9 +2672,33 @@ func (m *MockMachine) SetAddresses(arg0, arg1 []description.AddressArgs) { } // SetAddresses indicates an expected call of SetAddresses. -func (mr *MockMachineMockRecorder) SetAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetAddresses(arg0, arg1 any) *MockMachineSetAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddresses", reflect.TypeOf((*MockMachine)(nil).SetAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddresses", reflect.TypeOf((*MockMachine)(nil).SetAddresses), arg0, arg1) + return &MockMachineSetAddressesCall{Call: call} +} + +// MockMachineSetAddressesCall wrap *gomock.Call +type MockMachineSetAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetAddressesCall) Return() *MockMachineSetAddressesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetAddressesCall) Do(f func([]description.AddressArgs, []description.AddressArgs)) *MockMachineSetAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetAddressesCall) DoAndReturn(f func([]description.AddressArgs, []description.AddressArgs)) *MockMachineSetAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetAnnotations mocks base method. @@ -1028,9 +2708,33 @@ func (m *MockMachine) SetAnnotations(arg0 map[string]string) { } // SetAnnotations indicates an expected call of SetAnnotations. -func (mr *MockMachineMockRecorder) SetAnnotations(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetAnnotations(arg0 any) *MockMachineSetAnnotationsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockMachine)(nil).SetAnnotations), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAnnotations", reflect.TypeOf((*MockMachine)(nil).SetAnnotations), arg0) + return &MockMachineSetAnnotationsCall{Call: call} +} + +// MockMachineSetAnnotationsCall wrap *gomock.Call +type MockMachineSetAnnotationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetAnnotationsCall) Return() *MockMachineSetAnnotationsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetAnnotationsCall) Do(f func(map[string]string)) *MockMachineSetAnnotationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetAnnotationsCall) DoAndReturn(f func(map[string]string)) *MockMachineSetAnnotationsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetConstraints mocks base method. @@ -1040,9 +2744,33 @@ func (m *MockMachine) SetConstraints(arg0 description.ConstraintsArgs) { } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockMachineMockRecorder) SetConstraints(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetConstraints(arg0 any) *MockMachineSetConstraintsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockMachine)(nil).SetConstraints), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockMachine)(nil).SetConstraints), arg0) + return &MockMachineSetConstraintsCall{Call: call} +} + +// MockMachineSetConstraintsCall wrap *gomock.Call +type MockMachineSetConstraintsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetConstraintsCall) Return() *MockMachineSetConstraintsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetConstraintsCall) Do(f func(description.ConstraintsArgs)) *MockMachineSetConstraintsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetConstraintsCall) DoAndReturn(f func(description.ConstraintsArgs)) *MockMachineSetConstraintsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetInstance mocks base method. @@ -1052,9 +2780,33 @@ func (m *MockMachine) SetInstance(arg0 description.CloudInstanceArgs) { } // SetInstance indicates an expected call of SetInstance. -func (mr *MockMachineMockRecorder) SetInstance(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetInstance(arg0 any) *MockMachineSetInstanceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstance", reflect.TypeOf((*MockMachine)(nil).SetInstance), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstance", reflect.TypeOf((*MockMachine)(nil).SetInstance), arg0) + return &MockMachineSetInstanceCall{Call: call} +} + +// MockMachineSetInstanceCall wrap *gomock.Call +type MockMachineSetInstanceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetInstanceCall) Return() *MockMachineSetInstanceCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetInstanceCall) Do(f func(description.CloudInstanceArgs)) *MockMachineSetInstanceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetInstanceCall) DoAndReturn(f func(description.CloudInstanceArgs)) *MockMachineSetInstanceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetPreferredAddresses mocks base method. @@ -1064,9 +2816,33 @@ func (m *MockMachine) SetPreferredAddresses(arg0, arg1 description.AddressArgs) } // SetPreferredAddresses indicates an expected call of SetPreferredAddresses. -func (mr *MockMachineMockRecorder) SetPreferredAddresses(arg0, arg1 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetPreferredAddresses(arg0, arg1 any) *MockMachineSetPreferredAddressesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPreferredAddresses", reflect.TypeOf((*MockMachine)(nil).SetPreferredAddresses), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPreferredAddresses", reflect.TypeOf((*MockMachine)(nil).SetPreferredAddresses), arg0, arg1) + return &MockMachineSetPreferredAddressesCall{Call: call} +} + +// MockMachineSetPreferredAddressesCall wrap *gomock.Call +type MockMachineSetPreferredAddressesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetPreferredAddressesCall) Return() *MockMachineSetPreferredAddressesCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetPreferredAddressesCall) Do(f func(description.AddressArgs, description.AddressArgs)) *MockMachineSetPreferredAddressesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetPreferredAddressesCall) DoAndReturn(f func(description.AddressArgs, description.AddressArgs)) *MockMachineSetPreferredAddressesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatus mocks base method. @@ -1076,9 +2852,33 @@ func (m *MockMachine) SetStatus(arg0 description.StatusArgs) { } // SetStatus indicates an expected call of SetStatus. -func (mr *MockMachineMockRecorder) SetStatus(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetStatus(arg0 any) *MockMachineSetStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachine)(nil).SetStatus), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockMachine)(nil).SetStatus), arg0) + return &MockMachineSetStatusCall{Call: call} +} + +// MockMachineSetStatusCall wrap *gomock.Call +type MockMachineSetStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetStatusCall) Return() *MockMachineSetStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetStatusCall) Do(f func(description.StatusArgs)) *MockMachineSetStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetStatusCall) DoAndReturn(f func(description.StatusArgs)) *MockMachineSetStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetStatusHistory mocks base method. @@ -1088,9 +2888,33 @@ func (m *MockMachine) SetStatusHistory(arg0 []description.StatusArgs) { } // SetStatusHistory indicates an expected call of SetStatusHistory. -func (mr *MockMachineMockRecorder) SetStatusHistory(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetStatusHistory(arg0 any) *MockMachineSetStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockMachine)(nil).SetStatusHistory), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatusHistory", reflect.TypeOf((*MockMachine)(nil).SetStatusHistory), arg0) + return &MockMachineSetStatusHistoryCall{Call: call} +} + +// MockMachineSetStatusHistoryCall wrap *gomock.Call +type MockMachineSetStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetStatusHistoryCall) Return() *MockMachineSetStatusHistoryCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetStatusHistoryCall) Do(f func([]description.StatusArgs)) *MockMachineSetStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetStatusHistoryCall) DoAndReturn(f func([]description.StatusArgs)) *MockMachineSetStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetTools mocks base method. @@ -1100,9 +2924,33 @@ func (m *MockMachine) SetTools(arg0 description.AgentToolsArgs) { } // SetTools indicates an expected call of SetTools. -func (mr *MockMachineMockRecorder) SetTools(arg0 any) *gomock.Call { +func (mr *MockMachineMockRecorder) SetTools(arg0 any) *MockMachineSetToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTools", reflect.TypeOf((*MockMachine)(nil).SetTools), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTools", reflect.TypeOf((*MockMachine)(nil).SetTools), arg0) + return &MockMachineSetToolsCall{Call: call} +} + +// MockMachineSetToolsCall wrap *gomock.Call +type MockMachineSetToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSetToolsCall) Return() *MockMachineSetToolsCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSetToolsCall) Do(f func(description.AgentToolsArgs)) *MockMachineSetToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSetToolsCall) DoAndReturn(f func(description.AgentToolsArgs)) *MockMachineSetToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Status mocks base method. @@ -1114,9 +2962,33 @@ func (m *MockMachine) Status() description.Status { } // Status indicates an expected call of Status. -func (mr *MockMachineMockRecorder) Status() *gomock.Call { +func (mr *MockMachineMockRecorder) Status() *MockMachineStatusCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachine)(nil).Status)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockMachine)(nil).Status)) + return &MockMachineStatusCall{Call: call} +} + +// MockMachineStatusCall wrap *gomock.Call +type MockMachineStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineStatusCall) Return(arg0 description.Status) *MockMachineStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineStatusCall) Do(f func() description.Status) *MockMachineStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineStatusCall) DoAndReturn(f func() description.Status) *MockMachineStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c } // StatusHistory mocks base method. @@ -1128,9 +3000,33 @@ func (m *MockMachine) StatusHistory() []description.Status { } // StatusHistory indicates an expected call of StatusHistory. -func (mr *MockMachineMockRecorder) StatusHistory() *gomock.Call { +func (mr *MockMachineMockRecorder) StatusHistory() *MockMachineStatusHistoryCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockMachine)(nil).StatusHistory)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusHistory", reflect.TypeOf((*MockMachine)(nil).StatusHistory)) + return &MockMachineStatusHistoryCall{Call: call} +} + +// MockMachineStatusHistoryCall wrap *gomock.Call +type MockMachineStatusHistoryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineStatusHistoryCall) Return(arg0 []description.Status) *MockMachineStatusHistoryCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineStatusHistoryCall) Do(f func() []description.Status) *MockMachineStatusHistoryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineStatusHistoryCall) DoAndReturn(f func() []description.Status) *MockMachineStatusHistoryCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SupportedContainers mocks base method. @@ -1143,9 +3039,33 @@ func (m *MockMachine) SupportedContainers() ([]string, bool) { } // SupportedContainers indicates an expected call of SupportedContainers. -func (mr *MockMachineMockRecorder) SupportedContainers() *gomock.Call { +func (mr *MockMachineMockRecorder) SupportedContainers() *MockMachineSupportedContainersCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachine)(nil).SupportedContainers)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportedContainers", reflect.TypeOf((*MockMachine)(nil).SupportedContainers)) + return &MockMachineSupportedContainersCall{Call: call} +} + +// MockMachineSupportedContainersCall wrap *gomock.Call +type MockMachineSupportedContainersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineSupportedContainersCall) Return(arg0 []string, arg1 bool) *MockMachineSupportedContainersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineSupportedContainersCall) Do(f func() ([]string, bool)) *MockMachineSupportedContainersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineSupportedContainersCall) DoAndReturn(f func() ([]string, bool)) *MockMachineSupportedContainersCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tag mocks base method. @@ -1157,9 +3077,33 @@ func (m *MockMachine) Tag() names.MachineTag { } // Tag indicates an expected call of Tag. -func (mr *MockMachineMockRecorder) Tag() *gomock.Call { +func (mr *MockMachineMockRecorder) Tag() *MockMachineTagCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockMachine)(nil).Tag)) + return &MockMachineTagCall{Call: call} +} + +// MockMachineTagCall wrap *gomock.Call +type MockMachineTagCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineTagCall) Return(arg0 names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineTagCall) Do(f func() names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineTagCall) DoAndReturn(f func() names.MachineTag) *MockMachineTagCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tools mocks base method. @@ -1171,9 +3115,33 @@ func (m *MockMachine) Tools() description.AgentTools { } // Tools indicates an expected call of Tools. -func (mr *MockMachineMockRecorder) Tools() *gomock.Call { +func (mr *MockMachineMockRecorder) Tools() *MockMachineToolsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockMachine)(nil).Tools)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tools", reflect.TypeOf((*MockMachine)(nil).Tools)) + return &MockMachineToolsCall{Call: call} +} + +// MockMachineToolsCall wrap *gomock.Call +type MockMachineToolsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineToolsCall) Return(arg0 description.AgentTools) *MockMachineToolsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineToolsCall) Do(f func() description.AgentTools) *MockMachineToolsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineToolsCall) DoAndReturn(f func() description.AgentTools) *MockMachineToolsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Validate mocks base method. @@ -1185,9 +3153,33 @@ func (m *MockMachine) Validate() error { } // Validate indicates an expected call of Validate. -func (mr *MockMachineMockRecorder) Validate() *gomock.Call { +func (mr *MockMachineMockRecorder) Validate() *MockMachineValidateCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockMachine)(nil).Validate)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockMachine)(nil).Validate)) + return &MockMachineValidateCall{Call: call} +} + +// MockMachineValidateCall wrap *gomock.Call +type MockMachineValidateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockMachineValidateCall) Return(arg0 error) *MockMachineValidateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockMachineValidateCall) Do(f func() error) *MockMachineValidateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockMachineValidateCall) DoAndReturn(f func() error) *MockMachineValidateCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockPortRanges is a mock of PortRanges interface. @@ -1222,9 +3214,33 @@ func (m *MockPortRanges) ByUnit() map[string]description.UnitPortRanges { } // ByUnit indicates an expected call of ByUnit. -func (mr *MockPortRangesMockRecorder) ByUnit() *gomock.Call { +func (mr *MockPortRangesMockRecorder) ByUnit() *MockPortRangesByUnitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockPortRanges)(nil).ByUnit)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByUnit", reflect.TypeOf((*MockPortRanges)(nil).ByUnit)) + return &MockPortRangesByUnitCall{Call: call} +} + +// MockPortRangesByUnitCall wrap *gomock.Call +type MockPortRangesByUnitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPortRangesByUnitCall) Return(arg0 map[string]description.UnitPortRanges) *MockPortRangesByUnitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPortRangesByUnitCall) Do(f func() map[string]description.UnitPortRanges) *MockPortRangesByUnitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPortRangesByUnitCall) DoAndReturn(f func() map[string]description.UnitPortRanges) *MockPortRangesByUnitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockUnitPortRanges is a mock of UnitPortRanges interface. @@ -1259,7 +3275,31 @@ func (m *MockUnitPortRanges) ByEndpoint() map[string][]description.UnitPortRange } // ByEndpoint indicates an expected call of ByEndpoint. -func (mr *MockUnitPortRangesMockRecorder) ByEndpoint() *gomock.Call { +func (mr *MockUnitPortRangesMockRecorder) ByEndpoint() *MockUnitPortRangesByEndpointCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ByEndpoint)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByEndpoint", reflect.TypeOf((*MockUnitPortRanges)(nil).ByEndpoint)) + return &MockUnitPortRangesByEndpointCall{Call: call} +} + +// MockUnitPortRangesByEndpointCall wrap *gomock.Call +type MockUnitPortRangesByEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUnitPortRangesByEndpointCall) Return(arg0 map[string][]description.UnitPortRange) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUnitPortRangesByEndpointCall) Do(f func() map[string][]description.UnitPortRange) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUnitPortRangesByEndpointCall) DoAndReturn(f func() map[string][]description.UnitPortRange) *MockUnitPortRangesByEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/mongo_mock.go b/state/mocks/mongo_mock.go index c67fb711ac6..37cc143eb4a 100644 --- a/state/mocks/mongo_mock.go +++ b/state/mocks/mongo_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/mongo_mock.go github.com/juju/juju/internal/mongo Collection,Query +// mockgen -typed -package mocks -destination mocks/mongo_mock.go github.com/juju/juju/internal/mongo Collection,Query // // Package mocks is a generated GoMock package. @@ -51,9 +51,33 @@ func (m *MockCollection) Count() (int, error) { } // Count indicates an expected call of Count. -func (mr *MockCollectionMockRecorder) Count() *gomock.Call { +func (mr *MockCollectionMockRecorder) Count() *MockCollectionCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockCollection)(nil).Count)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockCollection)(nil).Count)) + return &MockCollectionCountCall{Call: call} +} + +// MockCollectionCountCall wrap *gomock.Call +type MockCollectionCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionCountCall) Return(arg0 int, arg1 error) *MockCollectionCountCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionCountCall) Do(f func() (int, error)) *MockCollectionCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionCountCall) DoAndReturn(f func() (int, error)) *MockCollectionCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Find mocks base method. @@ -65,9 +89,33 @@ func (m *MockCollection) Find(arg0 any) mongo.Query { } // Find indicates an expected call of Find. -func (mr *MockCollectionMockRecorder) Find(arg0 any) *gomock.Call { +func (mr *MockCollectionMockRecorder) Find(arg0 any) *MockCollectionFindCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockCollection)(nil).Find), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockCollection)(nil).Find), arg0) + return &MockCollectionFindCall{Call: call} +} + +// MockCollectionFindCall wrap *gomock.Call +type MockCollectionFindCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionFindCall) Return(arg0 mongo.Query) *MockCollectionFindCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionFindCall) Do(f func(any) mongo.Query) *MockCollectionFindCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionFindCall) DoAndReturn(f func(any) mongo.Query) *MockCollectionFindCall { + c.Call = c.Call.DoAndReturn(f) + return c } // FindId mocks base method. @@ -79,9 +127,33 @@ func (m *MockCollection) FindId(arg0 any) mongo.Query { } // FindId indicates an expected call of FindId. -func (mr *MockCollectionMockRecorder) FindId(arg0 any) *gomock.Call { +func (mr *MockCollectionMockRecorder) FindId(arg0 any) *MockCollectionFindIdCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindId", reflect.TypeOf((*MockCollection)(nil).FindId), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindId", reflect.TypeOf((*MockCollection)(nil).FindId), arg0) + return &MockCollectionFindIdCall{Call: call} +} + +// MockCollectionFindIdCall wrap *gomock.Call +type MockCollectionFindIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionFindIdCall) Return(arg0 mongo.Query) *MockCollectionFindIdCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionFindIdCall) Do(f func(any) mongo.Query) *MockCollectionFindIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionFindIdCall) DoAndReturn(f func(any) mongo.Query) *MockCollectionFindIdCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Name mocks base method. @@ -93,9 +165,33 @@ func (m *MockCollection) Name() string { } // Name indicates an expected call of Name. -func (mr *MockCollectionMockRecorder) Name() *gomock.Call { +func (mr *MockCollectionMockRecorder) Name() *MockCollectionNameCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockCollection)(nil).Name)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockCollection)(nil).Name)) + return &MockCollectionNameCall{Call: call} +} + +// MockCollectionNameCall wrap *gomock.Call +type MockCollectionNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionNameCall) Return(arg0 string) *MockCollectionNameCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionNameCall) Do(f func() string) *MockCollectionNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionNameCall) DoAndReturn(f func() string) *MockCollectionNameCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Pipe mocks base method. @@ -107,9 +203,33 @@ func (m *MockCollection) Pipe(arg0 any) *mgo.Pipe { } // Pipe indicates an expected call of Pipe. -func (mr *MockCollectionMockRecorder) Pipe(arg0 any) *gomock.Call { +func (mr *MockCollectionMockRecorder) Pipe(arg0 any) *MockCollectionPipeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pipe", reflect.TypeOf((*MockCollection)(nil).Pipe), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pipe", reflect.TypeOf((*MockCollection)(nil).Pipe), arg0) + return &MockCollectionPipeCall{Call: call} +} + +// MockCollectionPipeCall wrap *gomock.Call +type MockCollectionPipeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionPipeCall) Return(arg0 *mgo.Pipe) *MockCollectionPipeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionPipeCall) Do(f func(any) *mgo.Pipe) *MockCollectionPipeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionPipeCall) DoAndReturn(f func(any) *mgo.Pipe) *MockCollectionPipeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Writeable mocks base method. @@ -121,9 +241,33 @@ func (m *MockCollection) Writeable() mongo.WriteCollection { } // Writeable indicates an expected call of Writeable. -func (mr *MockCollectionMockRecorder) Writeable() *gomock.Call { +func (mr *MockCollectionMockRecorder) Writeable() *MockCollectionWriteableCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writeable", reflect.TypeOf((*MockCollection)(nil).Writeable)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writeable", reflect.TypeOf((*MockCollection)(nil).Writeable)) + return &MockCollectionWriteableCall{Call: call} +} + +// MockCollectionWriteableCall wrap *gomock.Call +type MockCollectionWriteableCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockCollectionWriteableCall) Return(arg0 mongo.WriteCollection) *MockCollectionWriteableCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockCollectionWriteableCall) Do(f func() mongo.WriteCollection) *MockCollectionWriteableCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockCollectionWriteableCall) DoAndReturn(f func() mongo.WriteCollection) *MockCollectionWriteableCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MockQuery is a mock of Query interface. @@ -158,9 +302,33 @@ func (m *MockQuery) All(arg0 any) error { } // All indicates an expected call of All. -func (mr *MockQueryMockRecorder) All(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) All(arg0 any) *MockQueryAllCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockQuery)(nil).All), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockQuery)(nil).All), arg0) + return &MockQueryAllCall{Call: call} +} + +// MockQueryAllCall wrap *gomock.Call +type MockQueryAllCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryAllCall) Return(arg0 error) *MockQueryAllCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryAllCall) Do(f func(any) error) *MockQueryAllCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryAllCall) DoAndReturn(f func(any) error) *MockQueryAllCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Apply mocks base method. @@ -173,9 +341,33 @@ func (m *MockQuery) Apply(arg0 mgo.Change, arg1 any) (*mgo.ChangeInfo, error) { } // Apply indicates an expected call of Apply. -func (mr *MockQueryMockRecorder) Apply(arg0, arg1 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Apply(arg0, arg1 any) *MockQueryApplyCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockQuery)(nil).Apply), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockQuery)(nil).Apply), arg0, arg1) + return &MockQueryApplyCall{Call: call} +} + +// MockQueryApplyCall wrap *gomock.Call +type MockQueryApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryApplyCall) Return(arg0 *mgo.ChangeInfo, arg1 error) *MockQueryApplyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryApplyCall) Do(f func(mgo.Change, any) (*mgo.ChangeInfo, error)) *MockQueryApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryApplyCall) DoAndReturn(f func(mgo.Change, any) (*mgo.ChangeInfo, error)) *MockQueryApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Batch mocks base method. @@ -187,9 +379,33 @@ func (m *MockQuery) Batch(arg0 int) mongo.Query { } // Batch indicates an expected call of Batch. -func (mr *MockQueryMockRecorder) Batch(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Batch(arg0 any) *MockQueryBatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Batch", reflect.TypeOf((*MockQuery)(nil).Batch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Batch", reflect.TypeOf((*MockQuery)(nil).Batch), arg0) + return &MockQueryBatchCall{Call: call} +} + +// MockQueryBatchCall wrap *gomock.Call +type MockQueryBatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryBatchCall) Return(arg0 mongo.Query) *MockQueryBatchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryBatchCall) Do(f func(int) mongo.Query) *MockQueryBatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryBatchCall) DoAndReturn(f func(int) mongo.Query) *MockQueryBatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Comment mocks base method. @@ -201,9 +417,33 @@ func (m *MockQuery) Comment(arg0 string) mongo.Query { } // Comment indicates an expected call of Comment. -func (mr *MockQueryMockRecorder) Comment(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Comment(arg0 any) *MockQueryCommentCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Comment", reflect.TypeOf((*MockQuery)(nil).Comment), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Comment", reflect.TypeOf((*MockQuery)(nil).Comment), arg0) + return &MockQueryCommentCall{Call: call} +} + +// MockQueryCommentCall wrap *gomock.Call +type MockQueryCommentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryCommentCall) Return(arg0 mongo.Query) *MockQueryCommentCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryCommentCall) Do(f func(string) mongo.Query) *MockQueryCommentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryCommentCall) DoAndReturn(f func(string) mongo.Query) *MockQueryCommentCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Count mocks base method. @@ -216,9 +456,33 @@ func (m *MockQuery) Count() (int, error) { } // Count indicates an expected call of Count. -func (mr *MockQueryMockRecorder) Count() *gomock.Call { +func (mr *MockQueryMockRecorder) Count() *MockQueryCountCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockQuery)(nil).Count)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockQuery)(nil).Count)) + return &MockQueryCountCall{Call: call} +} + +// MockQueryCountCall wrap *gomock.Call +type MockQueryCountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryCountCall) Return(arg0 int, arg1 error) *MockQueryCountCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryCountCall) Do(f func() (int, error)) *MockQueryCountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryCountCall) DoAndReturn(f func() (int, error)) *MockQueryCountCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Distinct mocks base method. @@ -230,9 +494,33 @@ func (m *MockQuery) Distinct(arg0 string, arg1 any) error { } // Distinct indicates an expected call of Distinct. -func (mr *MockQueryMockRecorder) Distinct(arg0, arg1 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Distinct(arg0, arg1 any) *MockQueryDistinctCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Distinct", reflect.TypeOf((*MockQuery)(nil).Distinct), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Distinct", reflect.TypeOf((*MockQuery)(nil).Distinct), arg0, arg1) + return &MockQueryDistinctCall{Call: call} +} + +// MockQueryDistinctCall wrap *gomock.Call +type MockQueryDistinctCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryDistinctCall) Return(arg0 error) *MockQueryDistinctCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryDistinctCall) Do(f func(string, any) error) *MockQueryDistinctCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryDistinctCall) DoAndReturn(f func(string, any) error) *MockQueryDistinctCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Explain mocks base method. @@ -244,9 +532,33 @@ func (m *MockQuery) Explain(arg0 any) error { } // Explain indicates an expected call of Explain. -func (mr *MockQueryMockRecorder) Explain(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Explain(arg0 any) *MockQueryExplainCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Explain", reflect.TypeOf((*MockQuery)(nil).Explain), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Explain", reflect.TypeOf((*MockQuery)(nil).Explain), arg0) + return &MockQueryExplainCall{Call: call} +} + +// MockQueryExplainCall wrap *gomock.Call +type MockQueryExplainCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryExplainCall) Return(arg0 error) *MockQueryExplainCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryExplainCall) Do(f func(any) error) *MockQueryExplainCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryExplainCall) DoAndReturn(f func(any) error) *MockQueryExplainCall { + c.Call = c.Call.DoAndReturn(f) + return c } // For mocks base method. @@ -258,9 +570,33 @@ func (m *MockQuery) For(arg0 any, arg1 func() error) error { } // For indicates an expected call of For. -func (mr *MockQueryMockRecorder) For(arg0, arg1 any) *gomock.Call { +func (mr *MockQueryMockRecorder) For(arg0, arg1 any) *MockQueryForCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "For", reflect.TypeOf((*MockQuery)(nil).For), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "For", reflect.TypeOf((*MockQuery)(nil).For), arg0, arg1) + return &MockQueryForCall{Call: call} +} + +// MockQueryForCall wrap *gomock.Call +type MockQueryForCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryForCall) Return(arg0 error) *MockQueryForCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryForCall) Do(f func(any, func() error) error) *MockQueryForCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryForCall) DoAndReturn(f func(any, func() error) error) *MockQueryForCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Hint mocks base method. @@ -276,9 +612,33 @@ func (m *MockQuery) Hint(arg0 ...string) mongo.Query { } // Hint indicates an expected call of Hint. -func (mr *MockQueryMockRecorder) Hint(arg0 ...any) *gomock.Call { +func (mr *MockQueryMockRecorder) Hint(arg0 ...any) *MockQueryHintCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hint", reflect.TypeOf((*MockQuery)(nil).Hint), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hint", reflect.TypeOf((*MockQuery)(nil).Hint), arg0...) + return &MockQueryHintCall{Call: call} +} + +// MockQueryHintCall wrap *gomock.Call +type MockQueryHintCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryHintCall) Return(arg0 mongo.Query) *MockQueryHintCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryHintCall) Do(f func(...string) mongo.Query) *MockQueryHintCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryHintCall) DoAndReturn(f func(...string) mongo.Query) *MockQueryHintCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Iter mocks base method. @@ -290,9 +650,33 @@ func (m *MockQuery) Iter() mongo.Iterator { } // Iter indicates an expected call of Iter. -func (mr *MockQueryMockRecorder) Iter() *gomock.Call { +func (mr *MockQueryMockRecorder) Iter() *MockQueryIterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iter", reflect.TypeOf((*MockQuery)(nil).Iter)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iter", reflect.TypeOf((*MockQuery)(nil).Iter)) + return &MockQueryIterCall{Call: call} +} + +// MockQueryIterCall wrap *gomock.Call +type MockQueryIterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryIterCall) Return(arg0 mongo.Iterator) *MockQueryIterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryIterCall) Do(f func() mongo.Iterator) *MockQueryIterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryIterCall) DoAndReturn(f func() mongo.Iterator) *MockQueryIterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Limit mocks base method. @@ -304,9 +688,33 @@ func (m *MockQuery) Limit(arg0 int) mongo.Query { } // Limit indicates an expected call of Limit. -func (mr *MockQueryMockRecorder) Limit(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Limit(arg0 any) *MockQueryLimitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Limit", reflect.TypeOf((*MockQuery)(nil).Limit), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Limit", reflect.TypeOf((*MockQuery)(nil).Limit), arg0) + return &MockQueryLimitCall{Call: call} +} + +// MockQueryLimitCall wrap *gomock.Call +type MockQueryLimitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryLimitCall) Return(arg0 mongo.Query) *MockQueryLimitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryLimitCall) Do(f func(int) mongo.Query) *MockQueryLimitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryLimitCall) DoAndReturn(f func(int) mongo.Query) *MockQueryLimitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // LogReplay mocks base method. @@ -318,9 +726,33 @@ func (m *MockQuery) LogReplay() mongo.Query { } // LogReplay indicates an expected call of LogReplay. -func (mr *MockQueryMockRecorder) LogReplay() *gomock.Call { +func (mr *MockQueryMockRecorder) LogReplay() *MockQueryLogReplayCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogReplay", reflect.TypeOf((*MockQuery)(nil).LogReplay)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogReplay", reflect.TypeOf((*MockQuery)(nil).LogReplay)) + return &MockQueryLogReplayCall{Call: call} +} + +// MockQueryLogReplayCall wrap *gomock.Call +type MockQueryLogReplayCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryLogReplayCall) Return(arg0 mongo.Query) *MockQueryLogReplayCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryLogReplayCall) Do(f func() mongo.Query) *MockQueryLogReplayCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryLogReplayCall) DoAndReturn(f func() mongo.Query) *MockQueryLogReplayCall { + c.Call = c.Call.DoAndReturn(f) + return c } // MapReduce mocks base method. @@ -333,9 +765,33 @@ func (m *MockQuery) MapReduce(arg0 *mgo.MapReduce, arg1 any) (*mgo.MapReduceInfo } // MapReduce indicates an expected call of MapReduce. -func (mr *MockQueryMockRecorder) MapReduce(arg0, arg1 any) *gomock.Call { +func (mr *MockQueryMockRecorder) MapReduce(arg0, arg1 any) *MockQueryMapReduceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapReduce", reflect.TypeOf((*MockQuery)(nil).MapReduce), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MapReduce", reflect.TypeOf((*MockQuery)(nil).MapReduce), arg0, arg1) + return &MockQueryMapReduceCall{Call: call} +} + +// MockQueryMapReduceCall wrap *gomock.Call +type MockQueryMapReduceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryMapReduceCall) Return(arg0 *mgo.MapReduceInfo, arg1 error) *MockQueryMapReduceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryMapReduceCall) Do(f func(*mgo.MapReduce, any) (*mgo.MapReduceInfo, error)) *MockQueryMapReduceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryMapReduceCall) DoAndReturn(f func(*mgo.MapReduce, any) (*mgo.MapReduceInfo, error)) *MockQueryMapReduceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // One mocks base method. @@ -347,9 +803,33 @@ func (m *MockQuery) One(arg0 any) error { } // One indicates an expected call of One. -func (mr *MockQueryMockRecorder) One(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) One(arg0 any) *MockQueryOneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "One", reflect.TypeOf((*MockQuery)(nil).One), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "One", reflect.TypeOf((*MockQuery)(nil).One), arg0) + return &MockQueryOneCall{Call: call} +} + +// MockQueryOneCall wrap *gomock.Call +type MockQueryOneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryOneCall) Return(arg0 error) *MockQueryOneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryOneCall) Do(f func(any) error) *MockQueryOneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryOneCall) DoAndReturn(f func(any) error) *MockQueryOneCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Prefetch mocks base method. @@ -361,9 +841,33 @@ func (m *MockQuery) Prefetch(arg0 float64) mongo.Query { } // Prefetch indicates an expected call of Prefetch. -func (mr *MockQueryMockRecorder) Prefetch(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Prefetch(arg0 any) *MockQueryPrefetchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prefetch", reflect.TypeOf((*MockQuery)(nil).Prefetch), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prefetch", reflect.TypeOf((*MockQuery)(nil).Prefetch), arg0) + return &MockQueryPrefetchCall{Call: call} +} + +// MockQueryPrefetchCall wrap *gomock.Call +type MockQueryPrefetchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryPrefetchCall) Return(arg0 mongo.Query) *MockQueryPrefetchCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryPrefetchCall) Do(f func(float64) mongo.Query) *MockQueryPrefetchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryPrefetchCall) DoAndReturn(f func(float64) mongo.Query) *MockQueryPrefetchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Select mocks base method. @@ -375,9 +879,33 @@ func (m *MockQuery) Select(arg0 any) mongo.Query { } // Select indicates an expected call of Select. -func (mr *MockQueryMockRecorder) Select(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Select(arg0 any) *MockQuerySelectCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Select", reflect.TypeOf((*MockQuery)(nil).Select), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Select", reflect.TypeOf((*MockQuery)(nil).Select), arg0) + return &MockQuerySelectCall{Call: call} +} + +// MockQuerySelectCall wrap *gomock.Call +type MockQuerySelectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySelectCall) Return(arg0 mongo.Query) *MockQuerySelectCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySelectCall) Do(f func(any) mongo.Query) *MockQuerySelectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySelectCall) DoAndReturn(f func(any) mongo.Query) *MockQuerySelectCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMaxScan mocks base method. @@ -389,9 +917,33 @@ func (m *MockQuery) SetMaxScan(arg0 int) mongo.Query { } // SetMaxScan indicates an expected call of SetMaxScan. -func (mr *MockQueryMockRecorder) SetMaxScan(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) SetMaxScan(arg0 any) *MockQuerySetMaxScanCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxScan", reflect.TypeOf((*MockQuery)(nil).SetMaxScan), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxScan", reflect.TypeOf((*MockQuery)(nil).SetMaxScan), arg0) + return &MockQuerySetMaxScanCall{Call: call} +} + +// MockQuerySetMaxScanCall wrap *gomock.Call +type MockQuerySetMaxScanCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySetMaxScanCall) Return(arg0 mongo.Query) *MockQuerySetMaxScanCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySetMaxScanCall) Do(f func(int) mongo.Query) *MockQuerySetMaxScanCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySetMaxScanCall) DoAndReturn(f func(int) mongo.Query) *MockQuerySetMaxScanCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetMaxTime mocks base method. @@ -403,9 +955,33 @@ func (m *MockQuery) SetMaxTime(arg0 time.Duration) mongo.Query { } // SetMaxTime indicates an expected call of SetMaxTime. -func (mr *MockQueryMockRecorder) SetMaxTime(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) SetMaxTime(arg0 any) *MockQuerySetMaxTimeCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxTime", reflect.TypeOf((*MockQuery)(nil).SetMaxTime), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxTime", reflect.TypeOf((*MockQuery)(nil).SetMaxTime), arg0) + return &MockQuerySetMaxTimeCall{Call: call} +} + +// MockQuerySetMaxTimeCall wrap *gomock.Call +type MockQuerySetMaxTimeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySetMaxTimeCall) Return(arg0 mongo.Query) *MockQuerySetMaxTimeCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySetMaxTimeCall) Do(f func(time.Duration) mongo.Query) *MockQuerySetMaxTimeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySetMaxTimeCall) DoAndReturn(f func(time.Duration) mongo.Query) *MockQuerySetMaxTimeCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Skip mocks base method. @@ -417,9 +993,33 @@ func (m *MockQuery) Skip(arg0 int) mongo.Query { } // Skip indicates an expected call of Skip. -func (mr *MockQueryMockRecorder) Skip(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Skip(arg0 any) *MockQuerySkipCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Skip", reflect.TypeOf((*MockQuery)(nil).Skip), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Skip", reflect.TypeOf((*MockQuery)(nil).Skip), arg0) + return &MockQuerySkipCall{Call: call} +} + +// MockQuerySkipCall wrap *gomock.Call +type MockQuerySkipCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySkipCall) Return(arg0 mongo.Query) *MockQuerySkipCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySkipCall) Do(f func(int) mongo.Query) *MockQuerySkipCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySkipCall) DoAndReturn(f func(int) mongo.Query) *MockQuerySkipCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Snapshot mocks base method. @@ -431,9 +1031,33 @@ func (m *MockQuery) Snapshot() mongo.Query { } // Snapshot indicates an expected call of Snapshot. -func (mr *MockQueryMockRecorder) Snapshot() *gomock.Call { +func (mr *MockQueryMockRecorder) Snapshot() *MockQuerySnapshotCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snapshot", reflect.TypeOf((*MockQuery)(nil).Snapshot)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snapshot", reflect.TypeOf((*MockQuery)(nil).Snapshot)) + return &MockQuerySnapshotCall{Call: call} +} + +// MockQuerySnapshotCall wrap *gomock.Call +type MockQuerySnapshotCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySnapshotCall) Return(arg0 mongo.Query) *MockQuerySnapshotCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySnapshotCall) Do(f func() mongo.Query) *MockQuerySnapshotCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySnapshotCall) DoAndReturn(f func() mongo.Query) *MockQuerySnapshotCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Sort mocks base method. @@ -449,9 +1073,33 @@ func (m *MockQuery) Sort(arg0 ...string) mongo.Query { } // Sort indicates an expected call of Sort. -func (mr *MockQueryMockRecorder) Sort(arg0 ...any) *gomock.Call { +func (mr *MockQueryMockRecorder) Sort(arg0 ...any) *MockQuerySortCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sort", reflect.TypeOf((*MockQuery)(nil).Sort), arg0...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sort", reflect.TypeOf((*MockQuery)(nil).Sort), arg0...) + return &MockQuerySortCall{Call: call} +} + +// MockQuerySortCall wrap *gomock.Call +type MockQuerySortCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQuerySortCall) Return(arg0 mongo.Query) *MockQuerySortCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQuerySortCall) Do(f func(...string) mongo.Query) *MockQuerySortCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQuerySortCall) DoAndReturn(f func(...string) mongo.Query) *MockQuerySortCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Tail mocks base method. @@ -463,7 +1111,31 @@ func (m *MockQuery) Tail(arg0 time.Duration) *mgo.Iter { } // Tail indicates an expected call of Tail. -func (mr *MockQueryMockRecorder) Tail(arg0 any) *gomock.Call { +func (mr *MockQueryMockRecorder) Tail(arg0 any) *MockQueryTailCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tail", reflect.TypeOf((*MockQuery)(nil).Tail), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tail", reflect.TypeOf((*MockQuery)(nil).Tail), arg0) + return &MockQueryTailCall{Call: call} +} + +// MockQueryTailCall wrap *gomock.Call +type MockQueryTailCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockQueryTailCall) Return(arg0 *mgo.Iter) *MockQueryTailCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockQueryTailCall) Do(f func(time.Duration) *mgo.Iter) *MockQueryTailCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockQueryTailCall) DoAndReturn(f func(time.Duration) *mgo.Iter) *MockQueryTailCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/operation_mock.go b/state/mocks/operation_mock.go index 3fd9d1f64d1..214f378df96 100644 --- a/state/mocks/operation_mock.go +++ b/state/mocks/operation_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/operation_mock.go github.com/juju/juju/state ModelOperation +// mockgen -typed -package mocks -destination mocks/operation_mock.go github.com/juju/juju/state ModelOperation // // Package mocks is a generated GoMock package. @@ -49,9 +49,33 @@ func (m *MockModelOperation) Build(arg0 int) ([]txn.Op, error) { } // Build indicates an expected call of Build. -func (mr *MockModelOperationMockRecorder) Build(arg0 any) *gomock.Call { +func (mr *MockModelOperationMockRecorder) Build(arg0 any) *MockModelOperationBuildCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockModelOperation)(nil).Build), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockModelOperation)(nil).Build), arg0) + return &MockModelOperationBuildCall{Call: call} +} + +// MockModelOperationBuildCall wrap *gomock.Call +type MockModelOperationBuildCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationBuildCall) Return(arg0 []txn.Op, arg1 error) *MockModelOperationBuildCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationBuildCall) Do(f func(int) ([]txn.Op, error)) *MockModelOperationBuildCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationBuildCall) DoAndReturn(f func(int) ([]txn.Op, error)) *MockModelOperationBuildCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Done mocks base method. @@ -63,7 +87,31 @@ func (m *MockModelOperation) Done(arg0 error) error { } // Done indicates an expected call of Done. -func (mr *MockModelOperationMockRecorder) Done(arg0 any) *gomock.Call { +func (mr *MockModelOperationMockRecorder) Done(arg0 any) *MockModelOperationDoneCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockModelOperation)(nil).Done), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockModelOperation)(nil).Done), arg0) + return &MockModelOperationDoneCall{Call: call} +} + +// MockModelOperationDoneCall wrap *gomock.Call +type MockModelOperationDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockModelOperationDoneCall) Return(arg0 error) *MockModelOperationDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockModelOperationDoneCall) Do(f func(error) error) *MockModelOperationDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockModelOperationDoneCall) DoAndReturn(f func(error) error) *MockModelOperationDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/resources_mock.go b/state/mocks/resources_mock.go index ae5a6a26fcb..edb8796676c 100644 --- a/state/mocks/resources_mock.go +++ b/state/mocks/resources_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources +// mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources // // Package mocks is a generated GoMock package. @@ -53,9 +53,33 @@ func (m *MockResources) AddPendingResource(arg0, arg1 string, arg2 resource.Reso } // AddPendingResource indicates an expected call of AddPendingResource. -func (mr *MockResourcesMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) AddPendingResource(arg0, arg1, arg2 any) *MockResourcesAddPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockResources)(nil).AddPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResource", reflect.TypeOf((*MockResources)(nil).AddPendingResource), arg0, arg1, arg2) + return &MockResourcesAddPendingResourceCall{Call: call} +} + +// MockResourcesAddPendingResourceCall wrap *gomock.Call +type MockResourcesAddPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesAddPendingResourceCall) Return(arg0 string, arg1 error) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesAddPendingResourceCall) Do(f func(string, string, resource.Resource) (string, error)) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesAddPendingResourceCall) DoAndReturn(f func(string, string, resource.Resource) (string, error)) *MockResourcesAddPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetPendingResource mocks base method. @@ -68,9 +92,33 @@ func (m *MockResources) GetPendingResource(arg0, arg1, arg2 string) (resources.R } // GetPendingResource indicates an expected call of GetPendingResource. -func (mr *MockResourcesMockRecorder) GetPendingResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) GetPendingResource(arg0, arg1, arg2 any) *MockResourcesGetPendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingResource", reflect.TypeOf((*MockResources)(nil).GetPendingResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingResource", reflect.TypeOf((*MockResources)(nil).GetPendingResource), arg0, arg1, arg2) + return &MockResourcesGetPendingResourceCall{Call: call} +} + +// MockResourcesGetPendingResourceCall wrap *gomock.Call +type MockResourcesGetPendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetPendingResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetPendingResourceCall) Do(f func(string, string, string) (resources.Resource, error)) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetPendingResourceCall) DoAndReturn(f func(string, string, string) (resources.Resource, error)) *MockResourcesGetPendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // GetResource mocks base method. @@ -83,9 +131,33 @@ func (m *MockResources) GetResource(arg0, arg1 string) (resources.Resource, erro } // GetResource indicates an expected call of GetResource. -func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) GetResource(arg0, arg1 any) *MockResourcesGetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResource", reflect.TypeOf((*MockResources)(nil).GetResource), arg0, arg1) + return &MockResourcesGetResourceCall{Call: call} +} + +// MockResourcesGetResourceCall wrap *gomock.Call +type MockResourcesGetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesGetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesGetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesGetResourceCall) Do(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesGetResourceCall) DoAndReturn(f func(string, string) (resources.Resource, error)) *MockResourcesGetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListPendingResources mocks base method. @@ -98,9 +170,33 @@ func (m *MockResources) ListPendingResources(arg0 string) (resources.Application } // ListPendingResources indicates an expected call of ListPendingResources. -func (mr *MockResourcesMockRecorder) ListPendingResources(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) ListPendingResources(arg0 any) *MockResourcesListPendingResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPendingResources", reflect.TypeOf((*MockResources)(nil).ListPendingResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPendingResources", reflect.TypeOf((*MockResources)(nil).ListPendingResources), arg0) + return &MockResourcesListPendingResourcesCall{Call: call} +} + +// MockResourcesListPendingResourcesCall wrap *gomock.Call +type MockResourcesListPendingResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesListPendingResourcesCall) Return(arg0 resources.ApplicationResources, arg1 error) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesListPendingResourcesCall) Do(f func(string) (resources.ApplicationResources, error)) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesListPendingResourcesCall) DoAndReturn(f func(string) (resources.ApplicationResources, error)) *MockResourcesListPendingResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ListResources mocks base method. @@ -113,9 +209,33 @@ func (m *MockResources) ListResources(arg0 string) (resources.ApplicationResourc } // ListResources indicates an expected call of ListResources. -func (mr *MockResourcesMockRecorder) ListResources(arg0 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) ListResources(arg0 any) *MockResourcesListResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResources)(nil).ListResources), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResources)(nil).ListResources), arg0) + return &MockResourcesListResourcesCall{Call: call} +} + +// MockResourcesListResourcesCall wrap *gomock.Call +type MockResourcesListResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesListResourcesCall) Return(arg0 resources.ApplicationResources, arg1 error) *MockResourcesListResourcesCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesListResourcesCall) Do(f func(string) (resources.ApplicationResources, error)) *MockResourcesListResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesListResourcesCall) DoAndReturn(f func(string) (resources.ApplicationResources, error)) *MockResourcesListResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResource mocks base method. @@ -129,9 +249,33 @@ func (m *MockResources) OpenResource(arg0, arg1 string) (resources.Resource, io. } // OpenResource indicates an expected call of OpenResource. -func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResource(arg0, arg1 any) *MockResourcesOpenResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResource", reflect.TypeOf((*MockResources)(nil).OpenResource), arg0, arg1) + return &MockResourcesOpenResourceCall{Call: call} +} + +// MockResourcesOpenResourceCall wrap *gomock.Call +type MockResourcesOpenResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // OpenResourceForUniter mocks base method. @@ -145,9 +289,33 @@ func (m *MockResources) OpenResourceForUniter(arg0, arg1 string) (resources.Reso } // OpenResourceForUniter indicates an expected call of OpenResourceForUniter. -func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) OpenResourceForUniter(arg0, arg1 any) *MockResourcesOpenResourceForUniterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenResourceForUniter", reflect.TypeOf((*MockResources)(nil).OpenResourceForUniter), arg0, arg1) + return &MockResourcesOpenResourceForUniterCall{Call: call} +} + +// MockResourcesOpenResourceForUniterCall wrap *gomock.Call +type MockResourcesOpenResourceForUniterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesOpenResourceForUniterCall) Return(arg0 resources.Resource, arg1 io.ReadCloser, arg2 error) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesOpenResourceForUniterCall) Do(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesOpenResourceForUniterCall) DoAndReturn(f func(string, string) (resources.Resource, io.ReadCloser, error)) *MockResourcesOpenResourceForUniterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RemovePendingAppResources mocks base method. @@ -159,9 +327,33 @@ func (m *MockResources) RemovePendingAppResources(arg0 string, arg1 map[string]s } // RemovePendingAppResources indicates an expected call of RemovePendingAppResources. -func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) RemovePendingAppResources(arg0, arg1 any) *MockResourcesRemovePendingAppResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePendingAppResources", reflect.TypeOf((*MockResources)(nil).RemovePendingAppResources), arg0, arg1) + return &MockResourcesRemovePendingAppResourcesCall{Call: call} +} + +// MockResourcesRemovePendingAppResourcesCall wrap *gomock.Call +type MockResourcesRemovePendingAppResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesRemovePendingAppResourcesCall) Return(arg0 error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesRemovePendingAppResourcesCall) Do(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesRemovePendingAppResourcesCall) DoAndReturn(f func(string, map[string]string) error) *MockResourcesRemovePendingAppResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetCharmStoreResources mocks base method. @@ -173,9 +365,33 @@ func (m *MockResources) SetCharmStoreResources(arg0 string, arg1 []resource.Reso } // SetCharmStoreResources indicates an expected call of SetCharmStoreResources. -func (mr *MockResourcesMockRecorder) SetCharmStoreResources(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetCharmStoreResources(arg0, arg1, arg2 any) *MockResourcesSetCharmStoreResourcesCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStoreResources", reflect.TypeOf((*MockResources)(nil).SetCharmStoreResources), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharmStoreResources", reflect.TypeOf((*MockResources)(nil).SetCharmStoreResources), arg0, arg1, arg2) + return &MockResourcesSetCharmStoreResourcesCall{Call: call} +} + +// MockResourcesSetCharmStoreResourcesCall wrap *gomock.Call +type MockResourcesSetCharmStoreResourcesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetCharmStoreResourcesCall) Return(arg0 error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetCharmStoreResourcesCall) Do(f func(string, []resource.Resource, time.Time) error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetCharmStoreResourcesCall) DoAndReturn(f func(string, []resource.Resource, time.Time) error) *MockResourcesSetCharmStoreResourcesCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetResource mocks base method. @@ -188,9 +404,33 @@ func (m *MockResources) SetResource(arg0, arg1 string, arg2 resource.Resource, a } // SetResource indicates an expected call of SetResource. -func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetResource(arg0, arg1, arg2, arg3, arg4 any) *MockResourcesSetResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetResource", reflect.TypeOf((*MockResources)(nil).SetResource), arg0, arg1, arg2, arg3, arg4) + return &MockResourcesSetResourceCall{Call: call} +} + +// MockResourcesSetResourceCall wrap *gomock.Call +type MockResourcesSetResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesSetResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetResourceCall) Do(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetResourceCall) DoAndReturn(f func(string, string, resource.Resource, io.Reader, state.IncrementCharmModifiedVersionType) (resources.Resource, error)) *MockResourcesSetResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // SetUnitResource mocks base method. @@ -203,9 +443,33 @@ func (m *MockResources) SetUnitResource(arg0, arg1 string, arg2 resource.Resourc } // SetUnitResource indicates an expected call of SetUnitResource. -func (mr *MockResourcesMockRecorder) SetUnitResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) SetUnitResource(arg0, arg1, arg2 any) *MockResourcesSetUnitResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitResource", reflect.TypeOf((*MockResources)(nil).SetUnitResource), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUnitResource", reflect.TypeOf((*MockResources)(nil).SetUnitResource), arg0, arg1, arg2) + return &MockResourcesSetUnitResourceCall{Call: call} +} + +// MockResourcesSetUnitResourceCall wrap *gomock.Call +type MockResourcesSetUnitResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesSetUnitResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesSetUnitResourceCall) Do(f func(string, string, resource.Resource) (resources.Resource, error)) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesSetUnitResourceCall) DoAndReturn(f func(string, string, resource.Resource) (resources.Resource, error)) *MockResourcesSetUnitResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UpdatePendingResource mocks base method. @@ -218,7 +482,31 @@ func (m *MockResources) UpdatePendingResource(arg0, arg1, arg2 string, arg3 reso } // UpdatePendingResource indicates an expected call of UpdatePendingResource. -func (mr *MockResourcesMockRecorder) UpdatePendingResource(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourcesMockRecorder) UpdatePendingResource(arg0, arg1, arg2, arg3, arg4 any) *MockResourcesUpdatePendingResourceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePendingResource", reflect.TypeOf((*MockResources)(nil).UpdatePendingResource), arg0, arg1, arg2, arg3, arg4) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePendingResource", reflect.TypeOf((*MockResources)(nil).UpdatePendingResource), arg0, arg1, arg2, arg3, arg4) + return &MockResourcesUpdatePendingResourceCall{Call: call} +} + +// MockResourcesUpdatePendingResourceCall wrap *gomock.Call +type MockResourcesUpdatePendingResourceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockResourcesUpdatePendingResourceCall) Return(arg0 resources.Resource, arg1 error) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockResourcesUpdatePendingResourceCall) Do(f func(string, string, string, resource.Resource, io.Reader) (resources.Resource, error)) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockResourcesUpdatePendingResourceCall) DoAndReturn(f func(string, string, string, resource.Resource, io.Reader) (resources.Resource, error)) *MockResourcesUpdatePendingResourceCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/txn_mock.go b/state/mocks/txn_mock.go index cf046ef18c2..00dcbfe1f50 100644 --- a/state/mocks/txn_mock.go +++ b/state/mocks/txn_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/txn_mock.go github.com/juju/txn/v3 Runner +// mockgen -typed -package mocks -destination mocks/txn_mock.go github.com/juju/txn/v3 Runner // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockRunner) MaybePruneTransactions(arg0 txn.PruneOptions) error { } // MaybePruneTransactions indicates an expected call of MaybePruneTransactions. -func (mr *MockRunnerMockRecorder) MaybePruneTransactions(arg0 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) MaybePruneTransactions(arg0 any) *MockRunnerMaybePruneTransactionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybePruneTransactions", reflect.TypeOf((*MockRunner)(nil).MaybePruneTransactions), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybePruneTransactions", reflect.TypeOf((*MockRunner)(nil).MaybePruneTransactions), arg0) + return &MockRunnerMaybePruneTransactionsCall{Call: call} +} + +// MockRunnerMaybePruneTransactionsCall wrap *gomock.Call +type MockRunnerMaybePruneTransactionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerMaybePruneTransactionsCall) Return(arg0 error) *MockRunnerMaybePruneTransactionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerMaybePruneTransactionsCall) Do(f func(txn.PruneOptions) error) *MockRunnerMaybePruneTransactionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerMaybePruneTransactionsCall) DoAndReturn(f func(txn.PruneOptions) error) *MockRunnerMaybePruneTransactionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // ResumeTransactions mocks base method. @@ -62,9 +86,33 @@ func (m *MockRunner) ResumeTransactions() error { } // ResumeTransactions indicates an expected call of ResumeTransactions. -func (mr *MockRunnerMockRecorder) ResumeTransactions() *gomock.Call { +func (mr *MockRunnerMockRecorder) ResumeTransactions() *MockRunnerResumeTransactionsCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResumeTransactions", reflect.TypeOf((*MockRunner)(nil).ResumeTransactions)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResumeTransactions", reflect.TypeOf((*MockRunner)(nil).ResumeTransactions)) + return &MockRunnerResumeTransactionsCall{Call: call} +} + +// MockRunnerResumeTransactionsCall wrap *gomock.Call +type MockRunnerResumeTransactionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerResumeTransactionsCall) Return(arg0 error) *MockRunnerResumeTransactionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerResumeTransactionsCall) Do(f func() error) *MockRunnerResumeTransactionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerResumeTransactionsCall) DoAndReturn(f func() error) *MockRunnerResumeTransactionsCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Run mocks base method. @@ -76,9 +124,33 @@ func (m *MockRunner) Run(arg0 txn.TransactionSource) error { } // Run indicates an expected call of Run. -func (mr *MockRunnerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) Run(arg0 any) *MockRunnerRunCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRunner)(nil).Run), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRunner)(nil).Run), arg0) + return &MockRunnerRunCall{Call: call} +} + +// MockRunnerRunCall wrap *gomock.Call +type MockRunnerRunCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerRunCall) Return(arg0 error) *MockRunnerRunCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerRunCall) Do(f func(txn.TransactionSource) error) *MockRunnerRunCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerRunCall) DoAndReturn(f func(txn.TransactionSource) error) *MockRunnerRunCall { + c.Call = c.Call.DoAndReturn(f) + return c } // RunTransaction mocks base method. @@ -90,7 +162,31 @@ func (m *MockRunner) RunTransaction(arg0 *txn.Transaction) error { } // RunTransaction indicates an expected call of RunTransaction. -func (mr *MockRunnerMockRecorder) RunTransaction(arg0 any) *gomock.Call { +func (mr *MockRunnerMockRecorder) RunTransaction(arg0 any) *MockRunnerRunTransactionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockRunner)(nil).RunTransaction), arg0) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTransaction", reflect.TypeOf((*MockRunner)(nil).RunTransaction), arg0) + return &MockRunnerRunTransactionCall{Call: call} +} + +// MockRunnerRunTransactionCall wrap *gomock.Call +type MockRunnerRunTransactionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRunnerRunTransactionCall) Return(arg0 error) *MockRunnerRunTransactionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRunnerRunTransactionCall) Do(f func(*txn.Transaction) error) *MockRunnerRunTransactionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRunnerRunTransactionCall) DoAndReturn(f func(*txn.Transaction) error) *MockRunnerRunTransactionCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/upgrader_mock.go b/state/mocks/upgrader_mock.go index cd83a44907e..2b370017b2b 100644 --- a/state/mocks/upgrader_mock.go +++ b/state/mocks/upgrader_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/upgrader_mock.go github.com/juju/juju/state Upgrader +// mockgen -typed -package mocks -destination mocks/upgrader_mock.go github.com/juju/juju/state Upgrader // // Package mocks is a generated GoMock package. @@ -48,7 +48,31 @@ func (m *MockUpgrader) IsUpgrading() (bool, error) { } // IsUpgrading indicates an expected call of IsUpgrading. -func (mr *MockUpgraderMockRecorder) IsUpgrading() *gomock.Call { +func (mr *MockUpgraderMockRecorder) IsUpgrading() *MockUpgraderIsUpgradingCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgrader)(nil).IsUpgrading)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgrading", reflect.TypeOf((*MockUpgrader)(nil).IsUpgrading)) + return &MockUpgraderIsUpgradingCall{Call: call} +} + +// MockUpgraderIsUpgradingCall wrap *gomock.Call +type MockUpgraderIsUpgradingCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockUpgraderIsUpgradingCall) Return(arg0 bool, arg1 error) *MockUpgraderIsUpgradingCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockUpgraderIsUpgradingCall) Do(f func() (bool, error)) *MockUpgraderIsUpgradingCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockUpgraderIsUpgradingCall) DoAndReturn(f func() (bool, error)) *MockUpgraderIsUpgradingCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/mocks/watcher_mock.go b/state/mocks/watcher_mock.go index a468df9d3fa..bdb1ddba225 100644 --- a/state/mocks/watcher_mock.go +++ b/state/mocks/watcher_mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state/watcher BaseWatcher +// mockgen -typed -package mocks -destination mocks/watcher_mock.go github.com/juju/juju/state/watcher BaseWatcher // // Package mocks is a generated GoMock package. @@ -48,9 +48,33 @@ func (m *MockBaseWatcher) Dead() <-chan struct{} { } // Dead indicates an expected call of Dead. -func (mr *MockBaseWatcherMockRecorder) Dead() *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Dead() *MockBaseWatcherDeadCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dead", reflect.TypeOf((*MockBaseWatcher)(nil).Dead)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dead", reflect.TypeOf((*MockBaseWatcher)(nil).Dead)) + return &MockBaseWatcherDeadCall{Call: call} +} + +// MockBaseWatcherDeadCall wrap *gomock.Call +type MockBaseWatcherDeadCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherDeadCall) Return(arg0 <-chan struct{}) *MockBaseWatcherDeadCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherDeadCall) Do(f func() <-chan struct{}) *MockBaseWatcherDeadCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherDeadCall) DoAndReturn(f func() <-chan struct{}) *MockBaseWatcherDeadCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Err mocks base method. @@ -62,9 +86,33 @@ func (m *MockBaseWatcher) Err() error { } // Err indicates an expected call of Err. -func (mr *MockBaseWatcherMockRecorder) Err() *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Err() *MockBaseWatcherErrCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockBaseWatcher)(nil).Err)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockBaseWatcher)(nil).Err)) + return &MockBaseWatcherErrCall{Call: call} +} + +// MockBaseWatcherErrCall wrap *gomock.Call +type MockBaseWatcherErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherErrCall) Return(arg0 error) *MockBaseWatcherErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherErrCall) Do(f func() error) *MockBaseWatcherErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherErrCall) DoAndReturn(f func() error) *MockBaseWatcherErrCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Kill mocks base method. @@ -74,9 +122,33 @@ func (m *MockBaseWatcher) Kill() { } // Kill indicates an expected call of Kill. -func (mr *MockBaseWatcherMockRecorder) Kill() *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Kill() *MockBaseWatcherKillCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockBaseWatcher)(nil).Kill)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockBaseWatcher)(nil).Kill)) + return &MockBaseWatcherKillCall{Call: call} +} + +// MockBaseWatcherKillCall wrap *gomock.Call +type MockBaseWatcherKillCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherKillCall) Return() *MockBaseWatcherKillCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherKillCall) Do(f func()) *MockBaseWatcherKillCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherKillCall) DoAndReturn(f func()) *MockBaseWatcherKillCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Unwatch mocks base method. @@ -86,9 +158,33 @@ func (m *MockBaseWatcher) Unwatch(arg0 string, arg1 any, arg2 chan<- watcher.Cha } // Unwatch indicates an expected call of Unwatch. -func (mr *MockBaseWatcherMockRecorder) Unwatch(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Unwatch(arg0, arg1, arg2 any) *MockBaseWatcherUnwatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unwatch", reflect.TypeOf((*MockBaseWatcher)(nil).Unwatch), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unwatch", reflect.TypeOf((*MockBaseWatcher)(nil).Unwatch), arg0, arg1, arg2) + return &MockBaseWatcherUnwatchCall{Call: call} +} + +// MockBaseWatcherUnwatchCall wrap *gomock.Call +type MockBaseWatcherUnwatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherUnwatchCall) Return() *MockBaseWatcherUnwatchCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherUnwatchCall) Do(f func(string, any, chan<- watcher.Change)) *MockBaseWatcherUnwatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherUnwatchCall) DoAndReturn(f func(string, any, chan<- watcher.Change)) *MockBaseWatcherUnwatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // UnwatchCollection mocks base method. @@ -98,9 +194,33 @@ func (m *MockBaseWatcher) UnwatchCollection(arg0 string, arg1 chan<- watcher.Cha } // UnwatchCollection indicates an expected call of UnwatchCollection. -func (mr *MockBaseWatcherMockRecorder) UnwatchCollection(arg0, arg1 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) UnwatchCollection(arg0, arg1 any) *MockBaseWatcherUnwatchCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnwatchCollection", reflect.TypeOf((*MockBaseWatcher)(nil).UnwatchCollection), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnwatchCollection", reflect.TypeOf((*MockBaseWatcher)(nil).UnwatchCollection), arg0, arg1) + return &MockBaseWatcherUnwatchCollectionCall{Call: call} +} + +// MockBaseWatcherUnwatchCollectionCall wrap *gomock.Call +type MockBaseWatcherUnwatchCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherUnwatchCollectionCall) Return() *MockBaseWatcherUnwatchCollectionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherUnwatchCollectionCall) Do(f func(string, chan<- watcher.Change)) *MockBaseWatcherUnwatchCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherUnwatchCollectionCall) DoAndReturn(f func(string, chan<- watcher.Change)) *MockBaseWatcherUnwatchCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Wait mocks base method. @@ -112,9 +232,33 @@ func (m *MockBaseWatcher) Wait() error { } // Wait indicates an expected call of Wait. -func (mr *MockBaseWatcherMockRecorder) Wait() *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Wait() *MockBaseWatcherWaitCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockBaseWatcher)(nil).Wait)) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockBaseWatcher)(nil).Wait)) + return &MockBaseWatcherWaitCall{Call: call} +} + +// MockBaseWatcherWaitCall wrap *gomock.Call +type MockBaseWatcherWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherWaitCall) Return(arg0 error) *MockBaseWatcherWaitCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherWaitCall) Do(f func() error) *MockBaseWatcherWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherWaitCall) DoAndReturn(f func() error) *MockBaseWatcherWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c } // Watch mocks base method. @@ -124,9 +268,33 @@ func (m *MockBaseWatcher) Watch(arg0 string, arg1 any, arg2 chan<- watcher.Chang } // Watch indicates an expected call of Watch. -func (mr *MockBaseWatcherMockRecorder) Watch(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) Watch(arg0, arg1, arg2 any) *MockBaseWatcherWatchCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockBaseWatcher)(nil).Watch), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockBaseWatcher)(nil).Watch), arg0, arg1, arg2) + return &MockBaseWatcherWatchCall{Call: call} +} + +// MockBaseWatcherWatchCall wrap *gomock.Call +type MockBaseWatcherWatchCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherWatchCall) Return() *MockBaseWatcherWatchCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherWatchCall) Do(f func(string, any, chan<- watcher.Change)) *MockBaseWatcherWatchCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherWatchCall) DoAndReturn(f func(string, any, chan<- watcher.Change)) *MockBaseWatcherWatchCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCollection mocks base method. @@ -136,9 +304,33 @@ func (m *MockBaseWatcher) WatchCollection(arg0 string, arg1 chan<- watcher.Chang } // WatchCollection indicates an expected call of WatchCollection. -func (mr *MockBaseWatcherMockRecorder) WatchCollection(arg0, arg1 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) WatchCollection(arg0, arg1 any) *MockBaseWatcherWatchCollectionCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCollection", reflect.TypeOf((*MockBaseWatcher)(nil).WatchCollection), arg0, arg1) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCollection", reflect.TypeOf((*MockBaseWatcher)(nil).WatchCollection), arg0, arg1) + return &MockBaseWatcherWatchCollectionCall{Call: call} +} + +// MockBaseWatcherWatchCollectionCall wrap *gomock.Call +type MockBaseWatcherWatchCollectionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherWatchCollectionCall) Return() *MockBaseWatcherWatchCollectionCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherWatchCollectionCall) Do(f func(string, chan<- watcher.Change)) *MockBaseWatcherWatchCollectionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherWatchCollectionCall) DoAndReturn(f func(string, chan<- watcher.Change)) *MockBaseWatcherWatchCollectionCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchCollectionWithFilter mocks base method. @@ -148,9 +340,33 @@ func (m *MockBaseWatcher) WatchCollectionWithFilter(arg0 string, arg1 chan<- wat } // WatchCollectionWithFilter indicates an expected call of WatchCollectionWithFilter. -func (mr *MockBaseWatcherMockRecorder) WatchCollectionWithFilter(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) WatchCollectionWithFilter(arg0, arg1, arg2 any) *MockBaseWatcherWatchCollectionWithFilterCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCollectionWithFilter", reflect.TypeOf((*MockBaseWatcher)(nil).WatchCollectionWithFilter), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchCollectionWithFilter", reflect.TypeOf((*MockBaseWatcher)(nil).WatchCollectionWithFilter), arg0, arg1, arg2) + return &MockBaseWatcherWatchCollectionWithFilterCall{Call: call} +} + +// MockBaseWatcherWatchCollectionWithFilterCall wrap *gomock.Call +type MockBaseWatcherWatchCollectionWithFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherWatchCollectionWithFilterCall) Return() *MockBaseWatcherWatchCollectionWithFilterCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherWatchCollectionWithFilterCall) Do(f func(string, chan<- watcher.Change, func(any) bool)) *MockBaseWatcherWatchCollectionWithFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherWatchCollectionWithFilterCall) DoAndReturn(f func(string, chan<- watcher.Change, func(any) bool)) *MockBaseWatcherWatchCollectionWithFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c } // WatchMulti mocks base method. @@ -162,7 +378,31 @@ func (m *MockBaseWatcher) WatchMulti(arg0 string, arg1 []any, arg2 chan<- watche } // WatchMulti indicates an expected call of WatchMulti. -func (mr *MockBaseWatcherMockRecorder) WatchMulti(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockBaseWatcherMockRecorder) WatchMulti(arg0, arg1, arg2 any) *MockBaseWatcherWatchMultiCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMulti", reflect.TypeOf((*MockBaseWatcher)(nil).WatchMulti), arg0, arg1, arg2) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchMulti", reflect.TypeOf((*MockBaseWatcher)(nil).WatchMulti), arg0, arg1, arg2) + return &MockBaseWatcherWatchMultiCall{Call: call} +} + +// MockBaseWatcherWatchMultiCall wrap *gomock.Call +type MockBaseWatcherWatchMultiCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBaseWatcherWatchMultiCall) Return(arg0 error) *MockBaseWatcherWatchMultiCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBaseWatcherWatchMultiCall) Do(f func(string, []any, chan<- watcher.Change) error) *MockBaseWatcherWatchMultiCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBaseWatcherWatchMultiCall) DoAndReturn(f func(string, []any, chan<- watcher.Change) error) *MockBaseWatcherWatchMultiCall { + c.Call = c.Call.DoAndReturn(f) + return c } diff --git a/state/package_test.go b/state/package_test.go index c69654ef452..8997e3c660c 100644 --- a/state/package_test.go +++ b/state/package_test.go @@ -25,12 +25,12 @@ import ( // - Replace blanket exports with functions in suites here that supply // behaviour to parent suites that require them. -//go:generate go run go.uber.org/mock/mockgen -package state -destination migration_import_mock_test.go github.com/juju/juju/state TransactionRunner,StateDocumentFactory,DocModelNamespace -//go:generate go run go.uber.org/mock/mockgen -package state -destination migration_import_input_mock_test.go github.com/juju/juju/state RemoteEntitiesInput,RelationNetworksInput,RemoteApplicationsInput,ApplicationOfferStateDocumentFactory,ApplicationOfferInput,FirewallRulesInput,FirewallRulesOutput -//go:generate go run go.uber.org/mock/mockgen -package state -destination migration_description_mock_test.go github.com/juju/description/v6 ApplicationOffer,FirewallRule,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/operation_mock.go github.com/juju/juju/state ModelOperation -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/application_ports_mock.go github.com/juju/juju/state ApplicationPortRanges -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/upgrader_mock.go github.com/juju/juju/state Upgrader +//go:generate go run go.uber.org/mock/mockgen -typed -package state -destination migration_import_mock_test.go github.com/juju/juju/state TransactionRunner,StateDocumentFactory,DocModelNamespace +//go:generate go run go.uber.org/mock/mockgen -typed -package state -destination migration_import_input_mock_test.go github.com/juju/juju/state RemoteEntitiesInput,RelationNetworksInput,RemoteApplicationsInput,ApplicationOfferStateDocumentFactory,ApplicationOfferInput,FirewallRulesInput,FirewallRulesOutput +//go:generate go run go.uber.org/mock/mockgen -typed -package state -destination migration_description_mock_test.go github.com/juju/description/v6 ApplicationOffer,FirewallRule,RemoteEntity,RelationNetwork,RemoteApplication,RemoteSpace,Status +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/operation_mock.go github.com/juju/juju/state ModelOperation +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/application_ports_mock.go github.com/juju/juju/state ApplicationPortRanges +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/upgrader_mock.go github.com/juju/juju/state Upgrader func TestPackage(t *testing.T) { if !runStateTests { diff --git a/state/resources_test.go b/state/resources_test.go index 48bba1224a1..283e201bab1 100644 --- a/state/resources_test.go +++ b/state/resources_test.go @@ -25,7 +25,7 @@ import ( "github.com/juju/juju/testing/factory" ) -//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources +//go:generate go run go.uber.org/mock/mockgen -typed -package mocks -destination mocks/resources_mock.go github.com/juju/juju/state Resources var _ = gc.Suite(&ResourcesSuite{})